diff --git a/nova/api/openstack/compute/cloudpipe.py b/nova/api/openstack/compute/cloudpipe.py index aff0482e6654..ddc6e341ed00 100644 --- a/nova/api/openstack/compute/cloudpipe.py +++ b/nova/api/openstack/compute/cloudpipe.py @@ -19,8 +19,6 @@ from webob import exc from nova.api.openstack import extensions from nova.api.openstack import wsgi -ALIAS = 'os-cloudpipe' - class CloudpipeController(wsgi.Controller): """Handle creating and listing cloudpipe instances.""" @@ -42,30 +40,3 @@ class CloudpipeController(wsgi.Controller): def update(self, req, id, body): """Configure cloudpipe parameters for the project.""" raise exc.HTTPGone() - - -class Cloudpipe(extensions.V21APIExtensionBase): - """Adds actions to create cloudpipe instances. - - When running with the Vlan network mode, you need a mechanism to route - from the public Internet to your vlans. This mechanism is known as a - cloudpipe. - - At the time of creating this class, only OpenVPN is supported. Support for - a SSH Bastion host is forthcoming. - """ - - name = "Cloudpipe" - alias = ALIAS - version = 1 - - def get_resources(self): - resource = [extensions.ResourceExtension(ALIAS, - CloudpipeController())] - return resource - - def get_controller_extensions(self): - """It's an abstract function V21APIExtensionBase and the extension - will not be loaded without it. - """ - return [] diff --git a/nova/api/openstack/compute/routes.py b/nova/api/openstack/compute/routes.py index 0c35ecb375ea..339b32504c03 100644 --- a/nova/api/openstack/compute/routes.py +++ b/nova/api/openstack/compute/routes.py @@ -25,6 +25,7 @@ from nova.api.openstack.compute import assisted_volume_snapshots from nova.api.openstack.compute import attach_interfaces from nova.api.openstack.compute import availability_zone from nova.api.openstack.compute import certificates +from nova.api.openstack.compute import cloudpipe from nova.api.openstack.compute import config_drive from nova.api.openstack.compute import console_auth_tokens from nova.api.openstack.compute import console_output @@ -125,6 +126,10 @@ certificates_controller = functools.partial( _create_controller, certificates.CertificatesController, [], []) +cloudpipe_controller = functools.partial( + _create_controller, cloudpipe.CloudpipeController, [], []) + + fixed_ips_controller = functools.partial(_create_controller, fixed_ips.FixedIPController, [], []) @@ -389,6 +394,13 @@ ROUTE_LIST = ( ('/os-certificates/{id}', { 'GET': [certificates_controller, 'show'] }), + ('/os-cloudpipe', { + 'GET': [cloudpipe_controller, 'index'], + 'POST': [cloudpipe_controller, 'create'] + }), + ('/os-cloudpipe/{id}', { + 'PUT': [cloudpipe_controller, 'update'] + }), ('/os-console-auth-tokens/{id}', { 'GET': [console_auth_tokens_controller, 'show'] }), diff --git a/setup.cfg b/setup.cfg index 8f55a1bfe5f7..93e6f1b15964 100644 --- a/setup.cfg +++ b/setup.cfg @@ -74,7 +74,6 @@ wsgi_scripts = nova.api.v21.extensions = baremetal_nodes = nova.api.openstack.compute.baremetal_nodes:BareMetalNodes cells = nova.api.openstack.compute.cells:Cells - cloudpipe = nova.api.openstack.compute.cloudpipe:Cloudpipe extension_info = nova.api.openstack.compute.extension_info:ExtensionInfo images = nova.api.openstack.compute.images:Images image_metadata = nova.api.openstack.compute.image_metadata:ImageMetadata