From e8dcdd9935840d2d07c00f064ebd2add56a8c5da Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 8 Jun 2026 11:50:11 -0700 Subject: [PATCH 1/3] dns record get and stock on server models --- .../ProviderServerModelProviderSpec.yml | 52 +++++++++++++------ .../provider/model/ServerModelProvider.yml | 41 +++++++++++++-- platform/paths/dns/records/record.yml | 37 +++++++++++++ 3 files changed, 109 insertions(+), 21 deletions(-) diff --git a/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml b/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml index 59813659..9bcdf88c 100644 --- a/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml +++ b/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml @@ -1,39 +1,59 @@ -title: ProviderServerModelProviderSpec +title: ServerProvider type: object -description: Higher level information about a providers server. +description: A resource regarding the provider a given server is deployed from. required: - - identifier + - vendor + - integration_id - category - model - locations properties: vendor: type: string - description: The infrastructure vendor for the provider. - identifier: - type: string - description: A provider identifier. + description: The vendor for the provider this server is deployed from. integration_id: - anyOf: + description: The integration this server provider is associated with, if defined. + oneOf: - $ref: "../../../ID.yml" - type: "null" category: type: string - description: A category for the server. + description: The category of the server. class: type: string - description: A class for the server. + description: The class of the server, if defined. model: type: string description: The model of the server. locations: - description: A list of location ID's this server is available. + description: The locations where the server is deployed. type: array items: type: string availability_zones: - type: object - additionalProperties: - type: array - items: - type: string + oneOf: + - type: object + description: The availability zones the server can be deployed to, keyed by location. + additionalProperties: + type: array + items: + type: string + - type: "null" + stock: + oneOf: + - type: object + description: Stock information for the server, keyed by location. + additionalProperties: + type: object + required: + - quantity + - sync + properties: + quantity: + type: integer + description: The available quantity of stock at this location. + sync: + type: string + format: date-time + description: The time at which stock was last synced. + - type: "null" diff --git a/ial/components/schemas/provider/model/ServerModelProvider.yml b/ial/components/schemas/provider/model/ServerModelProvider.yml index 47ea17bc..fb3ca2ab 100644 --- a/ial/components/schemas/provider/model/ServerModelProvider.yml +++ b/ial/components/schemas/provider/model/ServerModelProvider.yml @@ -1,10 +1,14 @@ title: "ServerModelProvider" type: object -description: "Identifies the provider details, including the category, class, model ID, available locations, and availability zones for a server, plan, or model." +description: "Identifies the provider details, including the category, class, model ID, parent model ID, available locations, availability zones, and stock for a server, plan, or model." required: + - name - category - model_id properties: + name: + type: string + name: The name of the server model. category: type: string description: "The category of the server model." @@ -16,6 +20,11 @@ properties: model_id: type: string description: "The primary ID used to reference this server model." + parent_model_id: + type: + - "string" + - "null" + description: "The ID of the parent server model, if this model is derived from another." locations: type: - "array" @@ -24,7 +33,29 @@ properties: type: string description: "A list of locations where this server model is available." availability_zones: - description: "Details the availability zones where the server model is offered." - type: - - object - - "null" + description: "Details the availability zones where the server model is offered, keyed by location." + oneOf: + - type: object + additionalProperties: + type: array + items: + type: string + - type: "null" + stock: + description: "Stock information for the server model, keyed by location." + oneOf: + - type: object + additionalProperties: + type: object + required: + - quantity + - sync + properties: + quantity: + type: integer + description: "The available quantity of stock at this location." + sync: + type: string + format: date-time + description: "The time at which stock was last synced." + - type: "null" diff --git a/platform/paths/dns/records/record.yml b/platform/paths/dns/records/record.yml index 01d5dbc0..1d9ed60d 100644 --- a/platform/paths/dns/records/record.yml +++ b/platform/paths/dns/records/record.yml @@ -1,3 +1,40 @@ +get: + operationId: "getDnsRecord" + summary: Get DNS Zone Record + description: Requires the `dns-manage` capability. + tags: + - Records + parameters: + - name: zoneId + description: The ID of the Zone. + in: path + required: true + schema: + type: string + - name: recordId + description: The ID of the record. + in: path + required: true + schema: + type: string + - $ref: includes/RecordIncludeParam.yml + responses: + 200: + description: Returns a DNS Zone Record. + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + $ref: ../../../../components/schemas/dns/records/DnsRecord.yml + includes: + $ref: includes/RecordIncludes.yml + default: + $ref: ../../../../components/responses/errors/DefaultError.yml + patch: operationId: "updateDNSZoneRecord" summary: Update DNS Zone Record From 05475d8a8ec42bc1d6a8bc9fa7a60d9bc019a5be Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 8 Jun 2026 12:03:22 -0700 Subject: [PATCH 2/3] save --- .../ProviderServerModelProviderSpec.yml | 66 +++++++++---------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml b/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml index 9bcdf88c..5a62de81 100644 --- a/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml +++ b/components/schemas/infrastructure/providers/models/ProviderServerModelProviderSpec.yml @@ -1,59 +1,55 @@ -title: ServerProvider +title: ProviderServerModelProviderSpec type: object -description: A resource regarding the provider a given server is deployed from. +description: Higher level information about a providers server. required: - - vendor - - integration_id + - identifier - category - model - locations properties: vendor: type: string - description: The vendor for the provider this server is deployed from. + description: The infrastructure vendor for the provider. + identifier: + type: string + description: A provider identifier. integration_id: - description: The integration this server provider is associated with, if defined. - oneOf: + anyOf: - $ref: "../../../ID.yml" - type: "null" category: type: string - description: The category of the server. + description: A category for the server. class: type: string - description: The class of the server, if defined. + description: A class for the server. model: type: string description: The model of the server. locations: - description: The locations where the server is deployed. + description: A list of location ID's this server is available. type: array items: type: string availability_zones: - oneOf: - - type: object - description: The availability zones the server can be deployed to, keyed by location. - additionalProperties: - type: array - items: - type: string - - type: "null" + type: object + additionalProperties: + type: array + items: + type: string stock: - oneOf: - - type: object - description: Stock information for the server, keyed by location. - additionalProperties: - type: object - required: - - quantity - - sync - properties: - quantity: - type: integer - description: The available quantity of stock at this location. - sync: - type: string - format: date-time - description: The time at which stock was last synced. - - type: "null" + type: object + description: Stock information for the server, keyed by location. + additionalProperties: + type: object + required: + - quantity + - sync + properties: + quantity: + type: integer + description: The available quantity of stock at this location. + sync: + type: string + format: date-time + description: The time at which stock was last synced. From 8f111d67b9e2e7a33dced8ae23c2c8d5ddb74e31 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 8 Jun 2026 12:08:25 -0700 Subject: [PATCH 3/3] typo --- ial/components/schemas/provider/model/ServerModelProvider.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ial/components/schemas/provider/model/ServerModelProvider.yml b/ial/components/schemas/provider/model/ServerModelProvider.yml index fb3ca2ab..f498852f 100644 --- a/ial/components/schemas/provider/model/ServerModelProvider.yml +++ b/ial/components/schemas/provider/model/ServerModelProvider.yml @@ -8,7 +8,7 @@ required: properties: name: type: string - name: The name of the server model. + description: The name of the server model. category: type: string description: "The category of the server model."