summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):