diff options
author | Tracy Jones <tjones@vmware.com> | 2014-03-26 13:41:03 -0700 |
---|---|---|
committer | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2014-05-10 10:33:29 -0400 |
commit | 8fba518295c82be328d3c96eef16652734ec66bd (patch) | |
tree | f1be948d1eda0a1b3f8006ccd32d0c52e74679b8 /nova/virt/vmwareapi/error_util.py | |
parent | 5949ab8d9aad95b8e28f5f49841ada0d3cc073ba (diff) | |
download | nova-8fba518295c82be328d3c96eef16652734ec66bd.tar.gz |
VMware: spawn refactor - phase 1 - power_on_vm
move power_on to vm_util and change all power_on in vmops to use it
ensure test_driver_api tests only the driver and not vmops
change id for the last review in this phase 1 series with a spawn
test is Ia137f1ea4b9fa43741cdd7d610831da8e5474d62
partial blueprint vmware-spawn-refactor
Change-Id: I5c1d8bc38c4a7d0107c8d7639e385239e53b070d
Diffstat (limited to 'nova/virt/vmwareapi/error_util.py')
-rw-r--r-- | nova/virt/vmwareapi/error_util.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/virt/vmwareapi/error_util.py b/nova/virt/vmwareapi/error_util.py index fa96607091..d8d186470f 100644 --- a/nova/virt/vmwareapi/error_util.py +++ b/nova/virt/vmwareapi/error_util.py @@ -29,6 +29,7 @@ FILE_ALREADY_EXISTS = 'FileAlreadyExists' FILE_FAULT = 'FileFault' FILE_LOCKED = 'FileLocked' FILE_NOT_FOUND = 'FileNotFound' +INVALID_POWER_STATE = 'InvalidPowerState' INVALID_PROPERTY = 'InvalidProperty' NO_PERMISSION = 'NoPermission' NOT_AUTHENTICATED = 'NotAuthenticated' @@ -194,6 +195,11 @@ class NotAuthenticatedException(VMwareDriverException): code = 403 +class InvalidPowerStateException(VMwareDriverException): + msg_fmt = _("Invalid Power State.") + code = 409 + + # Populate the fault registry with the exceptions that have # special treatment. _fault_classes_registry = { @@ -203,6 +209,7 @@ _fault_classes_registry = { FILE_FAULT: FileFaultException, FILE_LOCKED: FileLockedException, FILE_NOT_FOUND: FileNotFoundException, + INVALID_POWER_STATE: InvalidPowerStateException, INVALID_PROPERTY: InvalidPropertyException, NO_PERMISSION: NoPermissionException, NOT_AUTHENTICATED: NotAuthenticatedException |