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
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
title: VirtualProviderIso
description: The ISO image for a virtual provider.
type: object
required:
- id
- creator
- hub_id
- integration_id
- config
- state
- events
properties:
id:
$ref: ../../ID.yml
creator:
$ref: ../../creators/CreatorScope.yml
hub_id:
$ref: ../../ID.yml
integration_id:
$ref: ../../ID.yml
config:
type: object
required:
- token
properties:
token:
type: string
description: Authentication token for the ISO.
ipxe:
oneOf:
- type: object
properties:
vlan_id:
type:
- integer
- "null"
description: VLAN ID for the IPXE boot.
static_ip:
type:
- string
- "null"
description: Static IP assigned to the IPXE boot.
gateway_ip:
type:
- string
- "null"
description: Gateway IP assigned to the IPXE boot.
dns_ip:
type:
- string
- "null"
description: DNS IP assigned to the IPXE boot.
- type: "null"
server:
oneOf:
- type: object
properties:
vlan_id:
type:
- integer
- "null"
description: VLAN ID for the serer.
static_ip:
type:
- string
- "null"
description: Static IP assigned to the server.
gateway_ip:
type:
- string
- "null"
description: Gateway IP assigned to the server.
dns_ip:
type:
- string
- "null"
description: DNS IP assigned to the server.
- type: "null"
backend:
oneOf:
- type: object
properties:
provider:
type: string
enum:
- AWS
- Azure
- GCP
- Local
description: The provider responsible for storing the ISO.
file_name:
type: string
description: Name of the ISO file.
file_id:
type: string
description: Unique identifier for the ISO file.
size:
type: integer
format: int64
description: Size of the ISO file in bytes.
- type: "null"
state:
allOf:
- required:
- current
properties:
current:
description: The current state of the environment.
type: string
enum:
- new
- building
- live
- deleting
- deleted
- $ref: ../../State.yml
events:
type: object
description: A collection of timestamps for each event in the ISO's lifetime.
required:
- created
- updated
- deleted
properties:
created:
description: The timestamp of when the ISO was created.
$ref: ../../DateTime.yml
updated:
description: The timestamp of when the ISO was updated.
$ref: ../../DateTime.yml
deleted:
description: The timestamp of when the ISO was deleted.
$ref: ../../DateTime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,9 @@ title: VirtualProviderGenerateIsoAction
type: object
required:
- action
- contents
properties:
action:
type: string
enum:
- iso.generate
- generate
description: The action to take.
contents:
type: object
properties:
vxlan_id:
type:
- integer
- "null"
description: The VXLAN ID that the target server should initialize with when booted.
vlan_id:
type:
- integer
- "null"
description: The VLAN ID that the target server should initialize with when booted.
static_ip:
type:
- string
- "null"
description: The static IP that the target server should initialize with when booted.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: VirtualProviderTask.yml
title: VirtualProviderIsoTask.yml
discriminator:
propertyName: action
mapping:
"iso.generate": VirtualProviderGenerateIsoAction.yml
"generate": VirtualProviderGenerateIsoAction.yml
oneOf:
- $ref: VirtualProviderGenerateIsoAction.yml
15 changes: 9 additions & 6 deletions platform/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ paths:
$ref: "./paths/containers/instances/tasks.yml"
"/v1/containers/{containerId}/instances/{instanceId}/volumes":
$ref: "./paths/containers/instances/volumes.yml"
? "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/report"
: $ref: paths/containers/instances/telemetry/report.yml
? "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/stream"
: $ref: paths/containers/instances/telemetry/stream.yml
"/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/report":
$ref: paths/containers/instances/telemetry/report.yml
"/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/stream":
$ref: paths/containers/instances/telemetry/stream.yml
"/v1/containers/{containerId}/instances/{instanceId}/console":
$ref: "paths/containers/instances/console.yml"
"/v1/containers/{containerId}/functions/tasks":
Expand Down Expand Up @@ -591,8 +591,11 @@ paths:
$ref: "./paths/infrastructure/providers/locations.yml"

## Virtual Providers
"/v1/infrastructure/virtual-providers/{integrationId}/tasks":
$ref: "./paths/infrastructure/virtual-providers/tasks.yml"
"/v1/infrastructure/virtual-providers/{integrationId}/isos/{isoId}/tasks":
$ref: "./paths/infrastructure/virtual-providers/isos/tasks.yml"

"/v1/infrastructure/virtual-providers/{integrationId}/isos":
$ref: "./paths/infrastructure/virtual-providers/isos/isos.yml"

## Clusters
"/v1/infrastructure/clusters":
Expand Down
129 changes: 129 additions & 0 deletions platform/paths/infrastructure/virtual-providers/isos/isos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
post:
operationId: "createVirtualProviderIso"
summary: Create Virtual Provider Iso
description: |
Create an ISO for a virtual provider.

Requires the `servers-manage` capability.
tags:
- Virtual Providers
parameters:
- name: integrationId
description: The ID of the virtual provider integration to execute the job on.
in: path
required: true
schema:
type: string
requestBody:
description: Parameters for creating a new virtual provider job.
content:
application/json:
schema:
type: object
required:
- config
properties:
config:
type: object
required:
- token
properties:
token:
type: string
description: Authentication token for the ISO.
ipxe:
oneOf:
- type: object
properties:
vlan_id:
type:
- integer
- "null"
description: VLAN ID for the IPXE boot.
static_ip:
type:
- string
- "null"
description: Static IP assigned to the IPXE boot.
gateway_ip:
type:
- string
- "null"
description: Gateway IP assigned to the IPXE boot.
dns_ip:
type:
- string
- "null"
description: DNS IP assigned to the IPXE boot.
- type: "null"
server:
oneOf:
- type: object
properties:
vlan_id:
type:
- integer
- "null"
description: VLAN ID for the serer.
static_ip:
type:
- string
- "null"
description: Static IP assigned to the server.
gateway_ip:
type:
- string
- "null"
description: Gateway IP assigned to the server.
dns_ip:
type:
- string
- "null"
description: DNS IP assigned to the server.
- type: "null"
responses:
201:
description: Returns an ISO.
content:
application/json:
schema:
title: "TaskResponse"
type: object
required:
- data
properties:
data:
$ref: ../../../../../components/schemas/infrastructure/virtual-providers/VirtualProviderIso.yml
default:
$ref: ../../../../../components/responses/errors/DefaultError.yml

get:
operationId: getVirtualProviderIsos
summary: Get ISOs for a virtual provider
description: |
Get ISOs for a virtual provider.

Requires the `servers-manage` capability.
tags:
- Virtual Providers
parameters:
- name: integrationId
description: The ID of the integration.
in: path
required: true
schema:
type: string
responses:
200:
description: Returns an a list of ISOs.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: ../../../../../components/schemas/infrastructure/virtual-providers/VirtualProviderIso.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
post:
operationId: "createVirtualProviderJob"
summary: Create Virtual Provider Job
operationId: "createVirtualProviderIsoJob"
summary: Create Virtual Provider Iso Job
description: |
Create a job for a virtual provider.
Create a job for a virtual provider iso.

Requires the `servers-manage` capability.
tags:
- Virtual Providers
parameters:
- name: integrationId
description: The ID of the virtual provider integration to execute the job on.
description: The ID of the virtual provider intergration.
in: path
required: true
schema:
type: string
- name: isoId
description: The ID for the virtual provider ISO.
in: path
required: true
schema:
type: string
requestBody:
description: Parameters for creating a new virtual provider job.
description: Parameters for creating a new virtual provider iso job.
content:
application/json:
schema:
$ref: ../../../../components/schemas/infrastructure/virtual-providers/tasks/VirtualProviderTask.yml
$ref: ../../../../../components/schemas/infrastructure/virtual-providers/tasks/VirtualProviderIsoTask.yml

responses:
202:
Expand All @@ -33,6 +39,6 @@ post:
- data
properties:
data:
$ref: ../../../../components/schemas/jobs/JobDescriptor.yml
$ref: ../../../../../components/schemas/jobs/JobDescriptor.yml
default:
$ref: ../../../../components/responses/errors/DefaultError.yml
$ref: ../../../../../components/responses/errors/DefaultError.yml