diff --git a/components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml b/components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml new file mode 100644 index 00000000..445ffd1b --- /dev/null +++ b/components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml @@ -0,0 +1,17 @@ +title: VirtualMachineIpAllocateTask +type: object +required: + - action + - contents +properties: + action: + type: string + enum: + - ip.allocate + description: The action to take. + contents: + type: object + properties: + ip_id: + $ref: ../../ID.yml + description: The ID of the IP address to allocate to the virtual machine. diff --git a/components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml b/components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml new file mode 100644 index 00000000..acb3dc4f --- /dev/null +++ b/components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml @@ -0,0 +1,19 @@ +title: VirtualMachineIpUnallocateTask +type: object +required: + - action + - contents +properties: + action: + type: string + enum: + - ip.unallocate + description: The action to take. + contents: + type: object + properties: + ip_id: + $ref: ../../ID.yml + description: The ID of the IP address to unallocate from the virtual machine. + required: + - ip_id diff --git a/platform/paths/virtual-machines/tasks.yml b/platform/paths/virtual-machines/tasks.yml index a468df83..340e4216 100644 --- a/platform/paths/virtual-machines/tasks.yml +++ b/platform/paths/virtual-machines/tasks.yml @@ -9,6 +9,8 @@ post: `stop`: `virtual-machines-manage` `reconfigure`: `virtual-machines-manage` `rootpw.change`: `virtual-machines-manage` + `ip.allocate`: `virtual-machines-manage` + `ip.unallocate`: `virtual-machines-manage` tags: - Virtual Machines parameters: @@ -30,11 +32,15 @@ post: stop: ../../../components/schemas/vms/tasks/VirtualMachineStopTask.yml reconfigure: ../../../components/schemas/vms/tasks/VirtualMachineReconfigureTask.yml rootpw.change: ../../../components/schemas/vms/tasks/VirtualMachineRootPwChangeTask.yml + ip.allocate: ../../../components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml + ip.unallocate: ../../../components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml oneOf: - $ref: ../../../components/schemas/vms/tasks/VirtualMachineStartTask.yml - $ref: ../../../components/schemas/vms/tasks/VirtualMachineStopTask.yml - $ref: ../../../components/schemas/vms/tasks/VirtualMachineReconfigureTask.yml - $ref: ../../../components/schemas/vms/tasks/VirtualMachineRootPwChangeTask.yml + - $ref: ../../../components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml + - $ref: ../../../components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml responses: 202: description: Returns a job descriptor.