From 2a872a606b2ed8e32de335c8a8a0d8b178ddba0c Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Wed, 8 Feb 2012 08:13:23 -0800 Subject: Add an alias to the ServerStartStop extension Fixes bug 928954 Change-Id: I0c7e230e9b68139056c60c5477d3902c252ef413 --- nova/api/openstack/compute/contrib/server_start_stop.py | 1 + nova/tests/api/openstack/compute/test_extensions.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/nova/api/openstack/compute/contrib/server_start_stop.py b/nova/api/openstack/compute/contrib/server_start_stop.py index e5317f051..5f26c7dac 100644 --- a/nova/api/openstack/compute/contrib/server_start_stop.py +++ b/nova/api/openstack/compute/contrib/server_start_stop.py @@ -67,6 +67,7 @@ class Server_start_stop(extensions.ExtensionDescriptor): """Start/Stop instance compute API support""" name = "ServerStartStop" + alias = "os-server-start-stop" namespace = "http://docs.openstack.org/compute/ext/servers/api/v1.1" updated = "2012-01-23:00:00+00:00" diff --git a/nova/tests/api/openstack/compute/test_extensions.py b/nova/tests/api/openstack/compute/test_extensions.py index adeb847a4..7341cd483 100644 --- a/nova/tests/api/openstack/compute/test_extensions.py +++ b/nova/tests/api/openstack/compute/test_extensions.py @@ -217,6 +217,13 @@ class ExtensionControllerTest(ExtensionTestCase): }, ) + for ext in data['extensions']: + url = '/fake/extensions/%s' % ext['alias'] + request = webob.Request.blank(url) + response = request.get_response(app) + output = json.loads(response.body) + self.assertEqual(output['extension']['alias'], ext['alias']) + def test_get_extension_json(self): app = compute.APIRouter() request = webob.Request.blank("/fake/extensions/FOXNSOX") -- cgit