From 5dda8ee71c2e2da2e43cf0fb5252a42f6b8c1363 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 19 Dec 2025 07:31:14 -0800 Subject: [PATCH 1/4] server-models --- .../schemas/includes/ServerModelIncludes.yml | 2 +- .../schemas/includes/ServerModelsIncludes.yml | 2 +- .../providers/ProviderLocationDetails.yml | 4 +- .../ServerModel.yml} | 6 +- .../ServerModelProviderSpec.yml} | 7 +- .../ServerModelSpec.yml} | 2 +- platform/api.yml | 4 +- .../{servers.yml => serverModels.yml} | 10 ++- .../paths/infrastructure/servers/servers.yml | 74 +++++++++---------- 9 files changed, 57 insertions(+), 54 deletions(-) rename components/schemas/infrastructure/{providers/ProviderServerModel.yml => serverModels/ServerModel.yml} (90%) rename components/schemas/infrastructure/{providers/ProviderServerSpec.yml => serverModels/ServerModelProviderSpec.yml} (81%) rename components/schemas/infrastructure/{providers/ServerSpecs.yml => serverModels/ServerModelSpec.yml} (95%) rename platform/paths/infrastructure/providers/{servers.yml => serverModels.yml} (82%) diff --git a/components/schemas/includes/ServerModelIncludes.yml b/components/schemas/includes/ServerModelIncludes.yml index 48964ff2..0dcf91ca 100644 --- a/components/schemas/includes/ServerModelIncludes.yml +++ b/components/schemas/includes/ServerModelIncludes.yml @@ -2,4 +2,4 @@ title: ServerModelIncludes description: A resources that assocaited with a provider server. type: object additionalProperties: - "$ref": "../infrastructure/providers/ProviderServerModel.yml" + $ref: ../infrastructure/serverModels/ServerModel.yml diff --git a/components/schemas/includes/ServerModelsIncludes.yml b/components/schemas/includes/ServerModelsIncludes.yml index 6d09aa96..90187a4e 100644 --- a/components/schemas/includes/ServerModelsIncludes.yml +++ b/components/schemas/includes/ServerModelsIncludes.yml @@ -2,4 +2,4 @@ title: ServerModelsIncludes description: A resource associated with a server models. type: object additionalProperties: - $ref: ../infrastructure/providers/ProviderServerModel.yml + $ref: ../infrastructure/serverModels/ServerModel.yml diff --git a/components/schemas/infrastructure/providers/ProviderLocationDetails.yml b/components/schemas/infrastructure/providers/ProviderLocationDetails.yml index de83ca40..b33969c4 100644 --- a/components/schemas/infrastructure/providers/ProviderLocationDetails.yml +++ b/components/schemas/infrastructure/providers/ProviderLocationDetails.yml @@ -1,6 +1,6 @@ -title: LocationProvider +title: ProviderLocationDetails type: object -description: Information about the locaiton of the provider. +description: Information about the location of the provider. required: - identifier - location diff --git a/components/schemas/infrastructure/providers/ProviderServerModel.yml b/components/schemas/infrastructure/serverModels/ServerModel.yml similarity index 90% rename from components/schemas/infrastructure/providers/ProviderServerModel.yml rename to components/schemas/infrastructure/serverModels/ServerModel.yml index f04e3d07..090d48a3 100644 --- a/components/schemas/infrastructure/providers/ProviderServerModel.yml +++ b/components/schemas/infrastructure/serverModels/ServerModel.yml @@ -1,4 +1,4 @@ -title: ProviderServerModel +title: ServerModel type: object description: A server from a provider. required: @@ -21,9 +21,9 @@ properties: type: string description: A description of the server. specs: - $ref: "./ServerSpecs.yml" + $ref: ServerModelSpec.yml provider: - $ref: "./ProviderServerSpec.yml" + $ref: ServerModelProviderSpec.yml price: $ref: "../../billing/BillingAmount.yml" compatible: diff --git a/components/schemas/infrastructure/providers/ProviderServerSpec.yml b/components/schemas/infrastructure/serverModels/ServerModelProviderSpec.yml similarity index 81% rename from components/schemas/infrastructure/providers/ProviderServerSpec.yml rename to components/schemas/infrastructure/serverModels/ServerModelProviderSpec.yml index 7db3f62e..998aab29 100644 --- a/components/schemas/infrastructure/providers/ProviderServerSpec.yml +++ b/components/schemas/infrastructure/serverModels/ServerModelProviderSpec.yml @@ -1,4 +1,4 @@ -title: ProviderServerSpec +title: ServerModelProviderSpec type: object description: Higher level information about a providers server. required: @@ -7,9 +7,12 @@ required: - model - locations properties: + vendor: + type: string + description: The infrastructure vendor for the provider. identifier: type: string - description: A provider identifier + description: A provider identifier. integration_id: anyOf: - $ref: "../../ID.yml" diff --git a/components/schemas/infrastructure/providers/ServerSpecs.yml b/components/schemas/infrastructure/serverModels/ServerModelSpec.yml similarity index 95% rename from components/schemas/infrastructure/providers/ServerSpecs.yml rename to components/schemas/infrastructure/serverModels/ServerModelSpec.yml index 8636ed78..d60844dd 100644 --- a/components/schemas/infrastructure/providers/ServerSpecs.yml +++ b/components/schemas/infrastructure/serverModels/ServerModelSpec.yml @@ -1,4 +1,4 @@ -title: ServerSpecs +title: ServerModelSpec description: Specs for a given server type: object required: diff --git a/platform/api.yml b/platform/api.yml index 6e722ac4..3fc9106d 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -606,8 +606,8 @@ paths: $ref: "./paths/infrastructure/auto-scale/groups/access.yml" ## Providers - "/v1/infrastructure/providers/{providerVendor}/servers": - $ref: "./paths/infrastructure/providers/servers.yml" + "/v1/infrastructure/providers/{integrationId}/servers": + $ref: "./paths/infrastructure/providers/serverModels.yml" "/v1/infrastructure/providers/{providerVendor}/locations": $ref: "./paths/infrastructure/providers/locations.yml" diff --git a/platform/paths/infrastructure/providers/servers.yml b/platform/paths/infrastructure/providers/serverModels.yml similarity index 82% rename from platform/paths/infrastructure/providers/servers.yml rename to platform/paths/infrastructure/providers/serverModels.yml index 38771cf3..89a351f0 100644 --- a/platform/paths/infrastructure/providers/servers.yml +++ b/platform/paths/infrastructure/providers/serverModels.yml @@ -1,11 +1,13 @@ get: - operationId: "getProviderServers" + operationId: "getServerModels" summary: List Provider Servers tags: - Providers parameters: - - name: providerVendor - description: The vendor for the given provider. Example `gcp`, `equinix-metal`, `abstraction`, etc. Can also use a Provider Integration ID. + - name: integrationId + description: | + The infrastructure provider integration ID to query for server models. + Can also use a vendor string. Example `gcp`, `equinix-metal`, `abstraction`, etc. in: path required: true schema: @@ -41,6 +43,6 @@ get: data: type: array items: - $ref: ../../../../components/schemas/infrastructure/providers/ProviderServerModel.yml + $ref: ../../../../components/schemas/infrastructure/serverModels/ServerModel.yml default: $ref: ../../../../components/responses/errors/DefaultError.yml diff --git a/platform/paths/infrastructure/servers/servers.yml b/platform/paths/infrastructure/servers/servers.yml index fa5a4572..c9b848e8 100644 --- a/platform/paths/infrastructure/servers/servers.yml +++ b/platform/paths/infrastructure/servers/servers.yml @@ -91,7 +91,7 @@ get: $ref: ../../../../components/responses/errors/DefaultError.yml post: - operationId: "createServer" + operationId: "createServers" summary: Create Server description: Requires the `servers-provision` capability. tags: @@ -130,44 +130,42 @@ post: location_id: type: string description: The location ID of the Server. - quantity: - type: integer - description: The number of this Server at this location to deploy. - hostnames: - description: An array of hostnames for the given servers. - type: array - items: - type: string + advanced: - type: array - items: - type: object - properties: - provision_options: - type: - - object - - "null" - description: Advanced options to apply to the provisioning of a server. - properties: - attached_storage_size: - type: - - integer - - "null" - description: For providers that support setting this value dynamically; A number representing the GB size of the volume to be attached to the server. - reservation_id: - type: - - string - - "null" - description: A reservation ID to be used to provision a server that has been reserved at the provider. - encrypt_storage: - type: - - boolean - - "null" - description: For providers that support this setting, this option will encrypt storage for server. - zone: - type: - - string - - "null" + oneOf: + - type: object + properties: + provision_options: + oneOf: + - type: object + description: Advanced options to apply to the provisioning of a server. + properties: + attached_storage_size: + oneOf: + - type: integer + - type: "null" + description: | + For providers that support setting this value dynamically; + A number representing the GB size of the volume to be attached to the server. + reservation_id: + oneOf: + - type: string + - type: "null" + description: | + A reservation ID to be used to provision a server that has been reserved at the provider. + encrypt_storage: + oneOf: + - type: boolean + - type: "null" + description: | + For providers that support this setting, this option will encrypt storage for server. + - type: "null" + zone: + oneOf: + - type: string + - type: "null" + - type: "null" + responses: 202: description: Returns a Job Descriptor. From 389554f4851f97950ef7daa150add0ffbe5f3748 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 22 Dec 2025 14:50:58 -0800 Subject: [PATCH 2/4] updated server model --- platform/api.yml | 2 +- platform/paths/infrastructure/providers/locations.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/api.yml b/platform/api.yml index 3fc9106d..f1c4a421 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -608,7 +608,7 @@ paths: ## Providers "/v1/infrastructure/providers/{integrationId}/servers": $ref: "./paths/infrastructure/providers/serverModels.yml" - "/v1/infrastructure/providers/{providerVendor}/locations": + "/v1/infrastructure/providers/{integrationId}/locations": $ref: "./paths/infrastructure/providers/locations.yml" ## Virtual Providers diff --git a/platform/paths/infrastructure/providers/locations.yml b/platform/paths/infrastructure/providers/locations.yml index 8c2235ac..14508a80 100644 --- a/platform/paths/infrastructure/providers/locations.yml +++ b/platform/paths/infrastructure/providers/locations.yml @@ -4,8 +4,10 @@ get: tags: - Providers parameters: - - name: providerVendor - description: The vendor for the given Provider Integration. Example `gcp`, `equinix-metal`, `abstraction`, etc. Can also use the Integration ID. + - name: integrationId + description: | + The infrastructure provider integration ID to query for server models. + Can also use a vendor string. Example `gcp`, `equinix-metal`, `abstraction`, etc. in: path required: true schema: From c1bd5eabf95ffef3970d7ceb8005d80b5ab2e740 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 23 Dec 2025 08:13:58 -0800 Subject: [PATCH 3/4] provider server models --- .../includes/ProviderServerModelsIncludes.yml | 5 ++++ .../schemas/includes/ServerModelIncludes.yml | 5 ---- .../schemas/includes/ServerModelsIncludes.yml | 5 ---- .../groups/AutoScaleGroupIncludes.yml | 2 +- .../models/ProviderServerModel.yml} | 10 +++---- .../ProviderServerModelProviderSpec.yml} | 4 +-- .../models/ProviderServerModelSpec.yml | 27 +++++++++++++++++++ .../serverModels/ServerModelSpec.yml | 27 ------------------- .../infrastructure/servers/ServerIncludes.yml | 2 +- .../schemas/provider/model/ServerModel.yml | 2 +- .../infrastructure/providers/serverModels.yml | 6 ++--- 11 files changed, 45 insertions(+), 50 deletions(-) create mode 100644 components/schemas/includes/ProviderServerModelsIncludes.yml delete mode 100644 components/schemas/includes/ServerModelIncludes.yml delete mode 100644 components/schemas/includes/ServerModelsIncludes.yml rename components/schemas/infrastructure/{serverModels/ServerModel.yml => providers/models/ProviderServerModel.yml} (81%) rename components/schemas/infrastructure/{serverModels/ServerModelProviderSpec.yml => providers/models/ProviderServerModelProviderSpec.yml} (91%) create mode 100644 components/schemas/infrastructure/providers/models/ProviderServerModelSpec.yml delete mode 100644 components/schemas/infrastructure/serverModels/ServerModelSpec.yml diff --git a/components/schemas/includes/ProviderServerModelsIncludes.yml b/components/schemas/includes/ProviderServerModelsIncludes.yml new file mode 100644 index 00000000..a530af66 --- /dev/null +++ b/components/schemas/includes/ProviderServerModelsIncludes.yml @@ -0,0 +1,5 @@ +title: ProviderServerModelsIncludes +description: A resource associated with a server models. +type: object +additionalProperties: + $ref: ../infrastructure/providers/models/ProviderServerModel.yml diff --git a/components/schemas/includes/ServerModelIncludes.yml b/components/schemas/includes/ServerModelIncludes.yml deleted file mode 100644 index 0dcf91ca..00000000 --- a/components/schemas/includes/ServerModelIncludes.yml +++ /dev/null @@ -1,5 +0,0 @@ -title: ServerModelIncludes -description: A resources that assocaited with a provider server. -type: object -additionalProperties: - $ref: ../infrastructure/serverModels/ServerModel.yml diff --git a/components/schemas/includes/ServerModelsIncludes.yml b/components/schemas/includes/ServerModelsIncludes.yml deleted file mode 100644 index 90187a4e..00000000 --- a/components/schemas/includes/ServerModelsIncludes.yml +++ /dev/null @@ -1,5 +0,0 @@ -title: ServerModelsIncludes -description: A resource associated with a server models. -type: object -additionalProperties: - $ref: ../infrastructure/serverModels/ServerModel.yml diff --git a/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml b/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml index 21e3da86..f1d76801 100644 --- a/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml +++ b/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml @@ -5,6 +5,6 @@ properties: integrations: "$ref": "../../../includes/IntegrationsIncludes.yml" models: - "$ref": "../../../includes/ServerModelsIncludes.yml" + "$ref": "../../../includes/ProviderServerModelsIncludes.yml" locations: "$ref": "../../../includes/LocationsIncludes.yml" diff --git a/components/schemas/infrastructure/serverModels/ServerModel.yml b/components/schemas/infrastructure/providers/models/ProviderServerModel.yml similarity index 81% rename from components/schemas/infrastructure/serverModels/ServerModel.yml rename to components/schemas/infrastructure/providers/models/ProviderServerModel.yml index 090d48a3..ffa27dfa 100644 --- a/components/schemas/infrastructure/serverModels/ServerModel.yml +++ b/components/schemas/infrastructure/providers/models/ProviderServerModel.yml @@ -1,4 +1,4 @@ -title: ServerModel +title: ProviderServerModel type: object description: A server from a provider. required: @@ -13,7 +13,7 @@ required: - location_ids properties: id: - $ref: "../../ID.yml" + $ref: "../../../ID.yml" name: type: string description: A name for the server. @@ -21,11 +21,11 @@ properties: type: string description: A description of the server. specs: - $ref: ServerModelSpec.yml + $ref: ProviderServerModelSpec.yml provider: - $ref: ServerModelProviderSpec.yml + $ref: ProviderServerModelProviderSpec.yml price: - $ref: "../../billing/BillingAmount.yml" + $ref: "../../../billing/BillingAmount.yml" compatible: type: boolean description: A boolean where true signifies this server is compatible with the platform. diff --git a/components/schemas/infrastructure/serverModels/ServerModelProviderSpec.yml b/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml similarity index 91% rename from components/schemas/infrastructure/serverModels/ServerModelProviderSpec.yml rename to components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml index 998aab29..59813659 100644 --- a/components/schemas/infrastructure/serverModels/ServerModelProviderSpec.yml +++ b/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml @@ -1,4 +1,4 @@ -title: ServerModelProviderSpec +title: ProviderServerModelProviderSpec type: object description: Higher level information about a providers server. required: @@ -15,7 +15,7 @@ properties: description: A provider identifier. integration_id: anyOf: - - $ref: "../../ID.yml" + - $ref: "../../../ID.yml" - type: "null" category: type: string diff --git a/components/schemas/infrastructure/providers/models/ProviderServerModelSpec.yml b/components/schemas/infrastructure/providers/models/ProviderServerModelSpec.yml new file mode 100644 index 00000000..b88ab930 --- /dev/null +++ b/components/schemas/infrastructure/providers/models/ProviderServerModelSpec.yml @@ -0,0 +1,27 @@ +title: ProviderServerModelSpec +description: Specs for a given server +type: object +required: + - cpu + - gpu + - memory + - storage + - network + - features +properties: + cpu: + $ref: ../../specs/CPUSpec.yml + gpu: + $ref: ../../specs/GPUSpec.yml + memory: + $ref: ../../specs/MemorySpec.yml + storage: + type: array + items: + $ref: ../../specs/StorageSpec.yml + network: + type: array + items: + $ref: ../../specs/NetworkSpec.yml + features: + $ref: ../../specs/FeaturesSpec.yml diff --git a/components/schemas/infrastructure/serverModels/ServerModelSpec.yml b/components/schemas/infrastructure/serverModels/ServerModelSpec.yml deleted file mode 100644 index d60844dd..00000000 --- a/components/schemas/infrastructure/serverModels/ServerModelSpec.yml +++ /dev/null @@ -1,27 +0,0 @@ -title: ServerModelSpec -description: Specs for a given server -type: object -required: - - cpu - - gpu - - memory - - storage - - network - - features -properties: - cpu: - "$ref": "../specs/CPUSpec.yml" - gpu: - "$ref": "../specs/GPUSpec.yml" - memory: - "$ref": "../specs/MemorySpec.yml" - storage: - type: array - items: - "$ref": "../specs/StorageSpec.yml" - network: - type: array - items: - "$ref": "../specs/NetworkSpec.yml" - features: - "$ref": "../specs/FeaturesSpec.yml" diff --git a/components/schemas/infrastructure/servers/ServerIncludes.yml b/components/schemas/infrastructure/servers/ServerIncludes.yml index 13ee1738..83803861 100644 --- a/components/schemas/infrastructure/servers/ServerIncludes.yml +++ b/components/schemas/infrastructure/servers/ServerIncludes.yml @@ -9,6 +9,6 @@ properties: additionalProperties: "$ref": ../clusters/Cluster.yml models: - "$ref": "../../includes/ServerModelIncludes.yml" + "$ref": "../../includes/ProviderServerModelsIncludes.yml" integrations: "$ref": "../../includes/IntegrationsIncludes.yml" diff --git a/ial/components/schemas/provider/model/ServerModel.yml b/ial/components/schemas/provider/model/ServerModel.yml index ea82ccc7..d7f61369 100644 --- a/ial/components/schemas/provider/model/ServerModel.yml +++ b/ial/components/schemas/provider/model/ServerModel.yml @@ -1,4 +1,4 @@ -title: "ServerModel" +title: "ProviderServerModel" type: object description: "Represents a server model, detailing its name, drivers, description, specifications, provider, pricing, and compatibility." required: diff --git a/platform/paths/infrastructure/providers/serverModels.yml b/platform/paths/infrastructure/providers/serverModels.yml index 89a351f0..e648ef53 100644 --- a/platform/paths/infrastructure/providers/serverModels.yml +++ b/platform/paths/infrastructure/providers/serverModels.yml @@ -1,6 +1,6 @@ get: - operationId: "getServerModels" - summary: List Provider Servers + operationId: getProviderServerModels + summary: List Provider Server Models tags: - Providers parameters: @@ -43,6 +43,6 @@ get: data: type: array items: - $ref: ../../../../components/schemas/infrastructure/serverModels/ServerModel.yml + $ref: ../../../../components/schemas/infrastructure/providers/models/ProviderServerModel.yml default: $ref: ../../../../components/responses/errors/DefaultError.yml From 1ce4974fd07f0d46f1489b0255d6cbc8c9b7aa50 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 23 Dec 2025 08:29:21 -0800 Subject: [PATCH 4/4] comments --- platform/paths/infrastructure/servers/servers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/paths/infrastructure/servers/servers.yml b/platform/paths/infrastructure/servers/servers.yml index c9b848e8..417eb1dd 100644 --- a/platform/paths/infrastructure/servers/servers.yml +++ b/platform/paths/infrastructure/servers/servers.yml @@ -92,7 +92,7 @@ get: post: operationId: "createServers" - summary: Create Server + summary: Create Servers description: Requires the `servers-provision` capability. tags: - Servers