diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-06-21 12:46:11 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-06-21 12:46:11 +0000 |
commit | d8c9864d95bec6d2babb2cb5a2aeeb284fca4834 (patch) | |
tree | 89d468e4e38a27277da498f3f0593118f8576ec5 /nova/api | |
parent | 253e0aab8f774db5f62cf1809a73d51c708aa927 (diff) | |
parent | 99c51e34230394cadf0b82e364ea10c38e193979 (diff) | |
download | nova-d8c9864d95bec6d2babb2cb5a2aeeb284fca4834.tar.gz nova-d8c9864d95bec6d2babb2cb5a2aeeb284fca4834.tar.xz nova-d8c9864d95bec6d2babb2cb5a2aeeb284fca4834.zip |
Merge "Allow reboot or rebuild from vm_state=Error"
Diffstat (limited to 'nova/api')
-rw-r--r-- | nova/api/openstack/common.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py index bec919f4b..dd746e23d 100644 --- a/nova/api/openstack/common.py +++ b/nova/api/openstack/common.py @@ -358,9 +358,12 @@ def raise_http_conflict_for_instance_invalid_state(exc, action): """ attr = exc.kwargs.get('attr') state = exc.kwargs.get('state') + not_launched = exc.kwargs.get('not_launched') if attr and state: msg = _("Cannot '%(action)s' while instance is in %(attr)s " "%(state)s") % {'action': action, 'attr': attr, 'state': state} + elif not_launched: + msg = _("Cannot '%s' an instance which has never been active") % action else: # At least give some meaningful message msg = _("Instance is in an invalid state for '%s'") % action |