diff options
author | Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> | 2022-09-19 11:35:45 +0200 |
---|---|---|
committer | Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> | 2023-01-31 11:29:01 +0100 |
commit | 8c2e76598995f0d417653c60a63ea342baf4e880 (patch) | |
tree | 8d423fe7e162950d1922c1898b6c17548631dbbc /nova/exception.py | |
parent | 23c5f3d585ff44b106a27fd54db5e012002611d3 (diff) | |
download | nova-8c2e76598995f0d417653c60a63ea342baf4e880.tar.gz |
compute: enhance compute evacuate instance to support target state
Related to the bp/allowing-target-state-for-evacuate. This change
is extending compute API to accept a new argument targetState.
The targetState argument when set will force state of an evacuated
instance to the destination host.
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Change-Id: I9660d42937ad62d647afc6be965f166cc5631392
Diffstat (limited to 'nova/exception.py')
-rw-r--r-- | nova/exception.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py index f89dc107fa..2c4bd77d34 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1451,6 +1451,11 @@ class InstanceEvacuateNotSupported(Invalid): msg_fmt = _('Instance evacuate is not supported.') +class InstanceEvacuateNotSupportedTargetState(Invalid): + msg_fmt = _("Target state '%(target_state)s' for instance evacuate " + "is not supported.") + + class DBNotAllowed(NovaException): msg_fmt = _('%(binary)s attempted direct database access which is ' 'not allowed by policy') @@ -1479,6 +1484,11 @@ class UnsupportedRescueImage(Invalid): msg_fmt = _("Requested rescue image '%(image)s' is not supported") +class UnsupportedRPCVersion(Invalid): + msg_fmt = _("Unsupported RPC version for %(api)s. " + "Required >= %(required)s") + + class Base64Exception(NovaException): msg_fmt = _("Invalid Base 64 data for file %(path)s") |