Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocate unallocate vm ip address task #517

Merged
merged 3 commits into from
Nov 20, 2024
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
17 changes: 17 additions & 0 deletions components/schemas/vms/tasks/VirtualMachineIpAllocateTask.yml
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 19 additions & 0 deletions components/schemas/vms/tasks/VirtualMachineIpUnallocateTask.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions platform/paths/virtual-machines/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down
Loading