Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/schemas/includes/ProviderServerModelsIncludes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: ProviderServerModelsIncludes
description: A resource associated with a server models.
type: object
additionalProperties:
$ref: ../infrastructure/providers/models/ProviderServerModel.yml
5 changes: 0 additions & 5 deletions components/schemas/includes/ServerModelIncludes.yml

This file was deleted.

5 changes: 0 additions & 5 deletions components/schemas/includes/ServerModelsIncludes.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ properties:
integrations:
"$ref": "../../../includes/IntegrationsIncludes.yml"
models:
"$ref": "../../../includes/ServerModelsIncludes.yml"
"$ref": "../../../includes/ProviderServerModelsIncludes.yml"
locations:
"$ref": "../../../includes/LocationsIncludes.yml"
Original file line number Diff line number Diff line change
@@ -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
Expand Down
27 changes: 0 additions & 27 deletions components/schemas/infrastructure/providers/ServerSpecs.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ required:
- location_ids
properties:
id:
$ref: "../../ID.yml"
$ref: "../../../ID.yml"
name:
type: string
description: A name for the server.
description:
type: string
description: A description of the server.
specs:
$ref: "./ServerSpecs.yml"
$ref: ProviderServerModelSpec.yml
provider:
$ref: "./ProviderServerSpec.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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: ProviderServerSpec
title: ProviderServerModelProviderSpec
type: object
description: Higher level information about a providers server.
required:
Expand All @@ -7,12 +7,15 @@ 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"
- $ref: "../../../ID.yml"
- type: "null"
category:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ properties:
additionalProperties:
"$ref": ../clusters/Cluster.yml
models:
"$ref": "../../includes/ServerModelIncludes.yml"
"$ref": "../../includes/ProviderServerModelsIncludes.yml"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was singular for a single provider server model before. Should this be the singular version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Includes are plural, I standardized. There were two identical includes in the repo. I removed the incorrecly named one.

integrations:
"$ref": "../../includes/IntegrationsIncludes.yml"
2 changes: 1 addition & 1 deletion ial/components/schemas/provider/model/ServerModel.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 3 additions & 3 deletions platform/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,9 @@ paths:
$ref: "./paths/infrastructure/auto-scale/groups/access.yml"

## Providers
"/v1/infrastructure/providers/{providerVendor}/servers":
$ref: "./paths/infrastructure/providers/servers.yml"
"/v1/infrastructure/providers/{providerVendor}/locations":
"/v1/infrastructure/providers/{integrationId}/servers":
$ref: "./paths/infrastructure/providers/serverModels.yml"
"/v1/infrastructure/providers/{integrationId}/locations":
$ref: "./paths/infrastructure/providers/locations.yml"

## Virtual Providers
Expand Down
6 changes: 4 additions & 2 deletions platform/paths/infrastructure/providers/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
get:
operationId: "getProviderServers"
summary: List Provider Servers
operationId: getProviderServerModels
summary: List Provider Server Models
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:
Expand Down Expand Up @@ -41,6 +43,6 @@ get:
data:
type: array
items:
$ref: ../../../../components/schemas/infrastructure/providers/ProviderServerModel.yml
$ref: ../../../../components/schemas/infrastructure/providers/models/ProviderServerModel.yml
default:
$ref: ../../../../components/responses/errors/DefaultError.yml
76 changes: 37 additions & 39 deletions platform/paths/infrastructure/servers/servers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ get:
$ref: ../../../../components/responses/errors/DefaultError.yml

post:
operationId: "createServer"
summary: Create Server
operationId: "createServers"
summary: Create Servers
description: Requires the `servers-provision` capability.
tags:
- Servers
Expand Down Expand Up @@ -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.
Expand Down