diff options
author | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2015-03-09 00:40:29 +0000 |
---|---|---|
committer | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2015-06-08 03:06:44 +0000 |
commit | 735c45070e67a3c080bb706af6639106dfd16cb2 (patch) | |
tree | 36921f2db69951b8d150dc03632ee4398b906382 /nova/api/openstack/compute/plugins/v3/console_output.py | |
parent | 5a1a1b7b71f88969f68bf498d1e2b594cd34c164 (diff) | |
download | nova-735c45070e67a3c080bb706af6639106dfd16cb2.tar.gz |
Add and use raise_feature_not_supported()
In HTTPNotImplemented cases, each API passes its original message.
The meaning of these messages are almost the same but messages are
inconsistent.
This patch adds common raise_feature_not_supported() and replaces
these messages with the method for consistent message.
Partially implements blueprint v2-on-v3-api
Change-Id: I23da9bf153cb92944c0f4e76d70ce72a4ff6b16f
Diffstat (limited to 'nova/api/openstack/compute/plugins/v3/console_output.py')
-rw-r--r-- | nova/api/openstack/compute/plugins/v3/console_output.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nova/api/openstack/compute/plugins/v3/console_output.py b/nova/api/openstack/compute/plugins/v3/console_output.py index 7a5ed845b7..ab93ea1886 100644 --- a/nova/api/openstack/compute/plugins/v3/console_output.py +++ b/nova/api/openstack/compute/plugins/v3/console_output.py @@ -25,7 +25,6 @@ from nova.api.openstack import wsgi from nova.api import validation from nova import compute from nova import exception -from nova.i18n import _ ALIAS = "os-console-output" authorize = extensions.os_compute_authorizer(ALIAS) @@ -61,8 +60,7 @@ class ConsoleOutputController(wsgi.Controller): except exception.InstanceNotReady as e: raise webob.exc.HTTPConflict(explanation=e.format_message()) except NotImplementedError: - msg = _("Unable to get console log, functionality not implemented") - raise webob.exc.HTTPNotImplemented(explanation=msg) + common.raise_feature_not_supported() # XML output is not correctly escaped, so remove invalid characters # NOTE(cyeoh): We don't support XML output with V2.1, but for |