summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxinhuili <lxinhui@vmware.com>2017-09-07 11:40:23 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-07 11:40:23 +0000
commitbce887641f3a8217f472e8bd20e0a4d59b90496a (patch)
treef20b731cddc9daa288398000fa6d8579921546da
parentc763387cf77eef9e5a9def4b46d6260dd5aa1766 (diff)
parenta9562c1a7a41f0da36779193811f79fba2974e9b (diff)
Merge "Add registry API to MultiCloud framework"
-rw-r--r--multivimbroker/multivimbroker/forwarder/urls.py9
-rw-r--r--multivimbroker/multivimbroker/forwarder/views.py14
2 files changed, 20 insertions, 3 deletions
diff --git a/multivimbroker/multivimbroker/forwarder/urls.py b/multivimbroker/multivimbroker/forwarder/urls.py
index 2caa219..b391aa1 100644
--- a/multivimbroker/multivimbroker/forwarder/urls.py
+++ b/multivimbroker/multivimbroker/forwarder/urls.py
@@ -17,13 +17,18 @@ from rest_framework.urlpatterns import format_suffix_patterns
from multivimbroker.forwarder.views import Forward
from multivimbroker.forwarder.views import Identity
+from multivimbroker.forwarder.views import Registry
urlpatterns = [
url(r'^api/multicloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/identity/v3$',
Identity.as_view()),
- url(r'^api/multicloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/\
- identity/v3/auth/tokens$', Identity.as_view()),
+ url(r'^api/multicloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/identity/v3'
+ r'/auth/tokens$', Identity.as_view()),
+ url(r'^api/multicloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/registry$',
+ 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_-]+)',
Forward.as_view()),
]
diff --git a/multivimbroker/multivimbroker/forwarder/views.py b/multivimbroker/multivimbroker/forwarder/views.py
index ed67977..9eba2ec 100644
--- a/multivimbroker/multivimbroker/forwarder/views.py
+++ b/multivimbroker/multivimbroker/forwarder/views.py
@@ -39,7 +39,7 @@ class BaseServer(BaseHandler, APIView):
raise NotImplementedError()
-# vio proxy handler
+# proxy handler
class Identity(BaseServer):
def get(self, request, vimid):
@@ -51,6 +51,18 @@ class Identity(BaseServer):
return self.send(vimid, request.get_full_path(), request.body, "POST")
+class Registry(BaseServer):
+
+ def post(self, request, vimid):
+
+ return self.send(vimid, request.get_full_path(), request.body, "POST")
+
+ def delete(self, request, vimid):
+
+ return self.send(vimid, request.get_full_path(), request.body,
+ "DELETE")
+
+
# forward handler
class Forward(BaseServer):