summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/registration
diff options
context:
space:
mode:
Diffstat (limited to 'windriver/titanium_cloud/registration')
-rw-r--r--windriver/titanium_cloud/registration/views/registration.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/windriver/titanium_cloud/registration/views/registration.py b/windriver/titanium_cloud/registration/views/registration.py
index 3f1e5790..56f77ba7 100644
--- a/windriver/titanium_cloud/registration/views/registration.py
+++ b/windriver/titanium_cloud/registration/views/registration.py
@@ -363,3 +363,23 @@ class Registry(newton_registration.Registry):
'{{\"value\":\"{0}\"}}'.format("v17.02")
})
return instruction_capability
+
+
+class RegistryV1(Registry):
+ def __init__(self):
+ self.proxy_prefix = settings.MULTICLOUD_PREFIX
+ self.aai_base_url = settings.AAI_BASE_URL
+ self._logger = logger
+
+ def post(self, request, cloud_owner="", cloud_region_id=""):
+ self._logger.info("registration with : %s, %s" % (cloud_owner, cloud_region_id))
+ self._logger.debug("with data: %s" % request.data)
+
+ vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+ return super(RegistryV1, self).post(request, vimid)
+
+ def delete(self, request, cloud_owner="", cloud_region_id=""):
+ self._logger.debug("unregister cloud region: %s, %s" % (cloud_owner, cloud_region_id))
+
+ vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+ return super(RegistryV1, self).delete(request, vimid)