Skip to content

Commit 5c9d4ae

Browse files
sharadyrobhoes
authored andcommitted
CA-236351: Add new API error "VM_HAS_NO_SUSPEND_VDI".
New API error need to raised if VM tried to be resumed without having suspend VDI. Signed-off-by: Sharad Yadav <[email protected]>
1 parent ec44d47 commit 5c9d4ae

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ocaml/idl/datamodel.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,8 @@ let _ =
985985
~doc:"Host cannot attach network (in the case of NIC bonding, this may be because attaching the network on this host would require other networks [that are currently active] to be taken down)." ();
986986
error Api_errors.vm_requires_vdi [ "vm"; "vdi" ]
987987
~doc:"VM cannot be started because it requires a VDI which cannot be attached" ();
988+
error Api_errors.vm_has_no_suspend_vdi [ "vm" ]
989+
~doc:"VM cannot be resumed because it has no suspend VDI" ();
988990
error Api_errors.vm_migrate_failed [ "vm"; "source"; "destination"; "msg" ]
989991
~doc:"An error occurred during the migration process." ();
990992
error Api_errors.vm_has_too_many_snapshots [ "vm" ]

ocaml/xapi-consts/api_errors.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ let vm_host_incompatible_version = "VM_HOST_INCOMPATIBLE_VERSION"
175175
let vm_host_incompatible_virtual_hardware_platform_version = "VM_HOST_INCOMPATIBLE_VIRTUAL_HARDWARE_PLATFORM_VERSION"
176176
let vm_has_pci_attached = "VM_HAS_PCI_ATTACHED"
177177
let vm_has_vgpu = "VM_HAS_VGPU"
178+
let vm_has_no_suspend_vdi = "VM_HAS_NO_SUSPEND_VDI"
178179
let host_cannot_attach_network = "HOST_CANNOT_ATTACH_NETWORK"
179180
let vm_no_suspend_sr = "VM_NO_SUSPEND_SR"
180181
let vm_no_crashdump_sr = "VM_NO_CRASHDUMP_SR"

0 commit comments

Comments
 (0)