summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-19 20:15:31 +0000
committerGerrit Code Review <review@openstack.org>2017-06-19 20:15:31 +0000
commita5809278bfa6bc7d78d9c39b6d5dcdbe4b0c7cef (patch)
tree29aa91ce8d91a6bd0f9ff99b22e1cf7c961bda66
parent3000c8637ee9bdb75fff5de3cb488e45c22bb6ef (diff)
parentfacfe2ac42b03f2be46a1e9197a86a057a5219ba (diff)
Merge "Use plain routes list for os-cloudpipe endpoint instead of stevedore"
-rw-r--r--nova/api/openstack/compute/cloudpipe.py29
-rw-r--r--nova/api/openstack/compute/routes.py12
-rw-r--r--setup.cfg1
3 files changed, 12 insertions, 30 deletions
diff --git a/nova/api/openstack/compute/cloudpipe.py b/nova/api/openstack/compute/cloudpipe.py
index aff0482..ddc6e34 100644
--- a/nova/api/openstack/compute/cloudpipe.py
+++ b/nova/api/openstack/compute/cloudpipe.py
@@ -19,8 +19,6 @@ from webob import exc
19from nova.api.openstack import extensions 19from nova.api.openstack import extensions
20from nova.api.openstack import wsgi 20from nova.api.openstack import wsgi
21 21
22ALIAS = 'os-cloudpipe'
23
24 22
25class CloudpipeController(wsgi.Controller): 23class CloudpipeController(wsgi.Controller):
26 """Handle creating and listing cloudpipe instances.""" 24 """Handle creating and listing cloudpipe instances."""
@@ -42,30 +40,3 @@ class CloudpipeController(wsgi.Controller):
42 def update(self, req, id, body): 40 def update(self, req, id, body):
43 """Configure cloudpipe parameters for the project.""" 41 """Configure cloudpipe parameters for the project."""
44 raise exc.HTTPGone() 42 raise exc.HTTPGone()
45
46
47class Cloudpipe(extensions.V21APIExtensionBase):
48 """Adds actions to create cloudpipe instances.
49
50 When running with the Vlan network mode, you need a mechanism to route
51 from the public Internet to your vlans. This mechanism is known as a
52 cloudpipe.
53
54 At the time of creating this class, only OpenVPN is supported. Support for
55 a SSH Bastion host is forthcoming.
56 """
57
58 name = "Cloudpipe"
59 alias = ALIAS
60 version = 1
61
62 def get_resources(self):
63 resource = [extensions.ResourceExtension(ALIAS,
64 CloudpipeController())]
65 return resource
66
67 def get_controller_extensions(self):
68 """It's an abstract function V21APIExtensionBase and the extension
69 will not be loaded without it.
70 """
71 return []
diff --git a/nova/api/openstack/compute/routes.py b/nova/api/openstack/compute/routes.py
index 0c35ecb..339b325 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
25from nova.api.openstack.compute import attach_interfaces 25from nova.api.openstack.compute import attach_interfaces
26from nova.api.openstack.compute import availability_zone 26from nova.api.openstack.compute import availability_zone
27from nova.api.openstack.compute import certificates 27from nova.api.openstack.compute import certificates
28from nova.api.openstack.compute import cloudpipe
28from nova.api.openstack.compute import config_drive 29from nova.api.openstack.compute import config_drive
29from nova.api.openstack.compute import console_auth_tokens 30from nova.api.openstack.compute import console_auth_tokens
30from nova.api.openstack.compute import console_output 31from nova.api.openstack.compute import console_output
@@ -125,6 +126,10 @@ certificates_controller = functools.partial(
125 _create_controller, certificates.CertificatesController, [], []) 126 _create_controller, certificates.CertificatesController, [], [])
126 127
127 128
129cloudpipe_controller = functools.partial(
130 _create_controller, cloudpipe.CloudpipeController, [], [])
131
132
128fixed_ips_controller = functools.partial(_create_controller, 133fixed_ips_controller = functools.partial(_create_controller,
129 fixed_ips.FixedIPController, [], []) 134 fixed_ips.FixedIPController, [], [])
130 135
@@ -389,6 +394,13 @@ ROUTE_LIST = (
389 ('/os-certificates/{id}', { 394 ('/os-certificates/{id}', {
390 'GET': [certificates_controller, 'show'] 395 'GET': [certificates_controller, 'show']
391 }), 396 }),
397 ('/os-cloudpipe', {
398 'GET': [cloudpipe_controller, 'index'],
399 'POST': [cloudpipe_controller, 'create']
400 }),
401 ('/os-cloudpipe/{id}', {
402 'PUT': [cloudpipe_controller, 'update']
403 }),
392 ('/os-console-auth-tokens/{id}', { 404 ('/os-console-auth-tokens/{id}', {
393 'GET': [console_auth_tokens_controller, 'show'] 405 'GET': [console_auth_tokens_controller, 'show']
394 }), 406 }),
diff --git a/setup.cfg b/setup.cfg
index 8f55a1b..93e6f1b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -74,7 +74,6 @@ wsgi_scripts =
74nova.api.v21.extensions = 74nova.api.v21.extensions =
75 baremetal_nodes = nova.api.openstack.compute.baremetal_nodes:BareMetalNodes 75 baremetal_nodes = nova.api.openstack.compute.baremetal_nodes:BareMetalNodes
76 cells = nova.api.openstack.compute.cells:Cells 76 cells = nova.api.openstack.compute.cells:Cells
77 cloudpipe = nova.api.openstack.compute.cloudpipe:Cloudpipe
78 extension_info = nova.api.openstack.compute.extension_info:ExtensionInfo 77 extension_info = nova.api.openstack.compute.extension_info:ExtensionInfo
79 images = nova.api.openstack.compute.images:Images 78 images = nova.api.openstack.compute.images:Images
80 image_metadata = nova.api.openstack.compute.image_metadata:ImageMetadata 79 image_metadata = nova.api.openstack.compute.image_metadata:ImageMetadata