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,23 @@
title: VirtualProviderGenerateIsoAction
type: object
required:
- action
- contents
properties:
action:
type: string
enum:
- iso.generate
description: The action to take.
contents:
type: object
properties:
vxlan_id:
type: integer
description: The VXLAN ID that the target server should initialize with when booted.
vlan_id:
type: integer
description: The VLAN ID that the target server should initialize with when booted.
static_ip:
type: string
description: The static IP that the target server should initialize with when booted.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: VirtualProviderTask.yml
discriminator:
propertyName: action
mapping:
"iso.generate": VirtualProviderGenerateIsoAction.yml
oneOf:
- $ref: VirtualProviderGenerateIsoAction.yml
7 changes: 7 additions & 0 deletions platform/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ x-tagGroups:
- Auto-Scale Groups
- Clusters
- Providers
- Virtual Providers
- Servers
- IPs
- name: Jobs
Expand Down Expand Up @@ -238,6 +239,8 @@ tags:
description: Endpoints related to managing infrastructure clusters.
- name: Providers
description: Endpoints related to providers configured for a hub.
- name: Virtual Providers
description: Endpoints related to virtual provider configurations.
- name: Servers
description: Endpoints related to managing servers on Cycle.
- name: IPs
Expand Down Expand Up @@ -587,6 +590,10 @@ paths:
"/v1/infrastructure/providers/{providerVendor}/locations":
$ref: "./paths/infrastructure/providers/locations.yml"

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

## Clusters
"/v1/infrastructure/clusters":
$ref: "./paths/infrastructure/clusters/clusters.yml"
Expand Down
38 changes: 38 additions & 0 deletions platform/paths/infrastructure/virtual-providers/tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
post:
operationId: "createVirtualProviderJob"
summary: Create Virtual Provider Job
description: |
Create a job 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:
$ref: ../../../../components/schemas/infrastructure/virtual-providers/tasks/VirtualProviderTask.yml

responses:
202:
description: Returns a job descriptor.
content:
application/json:
schema:
title: "TaskResponse"
type: object
required:
- data
properties:
data:
$ref: ../../../components/schemas/jobs/JobDescriptor.yml
default:
$ref: ../../../components/responses/errors/DefaultError.yml