summaryrefslogtreecommitdiffstats
path: root/multivimbroker
diff options
context:
space:
mode:
authorxinhuili <lxinhui@vmware.com>2017-09-11 19:00:14 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-11 19:00:14 +0000
commit363bd35940c079bf364ca9b5b4c4f3915972df63 (patch)
tree61d0b0a741d0610a4eedabac922ddd667e27a3ef /multivimbroker
parentcb49bafc97dbb178b2a0e789365aefd0246445c5 (diff)
parentad602833567ee36a937897a43cbc65c6470c63ae (diff)
Merge "Add extensions API to MultiCloud Framework"
Diffstat (limited to 'multivimbroker')
-rw-r--r--multivimbroker/multivimbroker/forwarder/urls.py3
-rw-r--r--multivimbroker/multivimbroker/forwarder/views.py7
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):