diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2017-08-25 11:37:48 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2017-09-01 17:57:02 +0800 |
commit | ad602833567ee36a937897a43cbc65c6470c63ae (patch) | |
tree | 2a6eee501767278e96f7b9c02a43c929f7b77e50 /multivimbroker | |
parent | a9562c1a7a41f0da36779193811f79fba2974e9b (diff) |
Add extensions API to MultiCloud Framework
Change-Id: I6ca32957f329aadb587f98fdf0e663743792c452
issue-id: MULTICLOUD-65
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'multivimbroker')
-rw-r--r-- | multivimbroker/multivimbroker/forwarder/urls.py | 3 | ||||
-rw-r--r-- | multivimbroker/multivimbroker/forwarder/views.py | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/forwarder/urls.py b/multivimbroker/multivimbroker/forwarder/urls.py index b391aa1..ee4098b 100644 --- a/multivimbroker/multivimbroker/forwarder/urls.py +++ b/multivimbroker/multivimbroker/forwarder/urls.py @@ -15,6 +15,7 @@ from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns +from multivimbroker.forwarder.views import Extension from multivimbroker.forwarder.views import Forward from multivimbroker.forwarder.views import Identity from multivimbroker.forwarder.views import Registry @@ -29,6 +30,8 @@ urlpatterns = [ Registry.as_view()), url(r'^api/multicloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)$', Registry.as_view()), + url(r'^api/multicloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/extensions$', + Extension.as_view()), url(r'^api/multicloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)', Forward.as_view()), ] diff --git a/multivimbroker/multivimbroker/forwarder/views.py b/multivimbroker/multivimbroker/forwarder/views.py index 9eba2ec..edb9be1 100644 --- a/multivimbroker/multivimbroker/forwarder/views.py +++ b/multivimbroker/multivimbroker/forwarder/views.py @@ -63,6 +63,13 @@ class Registry(BaseServer): "DELETE") +class Extension(BaseServer): + + def get(self, request, vimid): + + return self.send(vimid, request.get_full_path(), request.body, "GET") + + # forward handler class Forward(BaseServer): |