Merge "Add registry API to MultiCloud framework"
authorxinhuili <lxinhui@vmware.com>
Thu, 7 Sep 2017 11:40:23 +0000 (11:40 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 7 Sep 2017 11:40:23 +0000 (11:40 +0000)
multivimbroker/multivimbroker/forwarder/urls.py
multivimbroker/multivimbroker/forwarder/views.py

index 2caa219..b391aa1 100644 (file)
@@ -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()),
 ]
index ed67977..9eba2ec 100644 (file)
@@ -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):
 

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use