Add Get register api implementation in framework 76/100276/2
authorHaibin Huang <haibin.huang@intel.com>
Tue, 14 Jan 2020 10:47:57 +0000 (02:47 -0800)
committerHaibin Huang <haibin.huang@intel.com>
Tue, 14 Jan 2020 11:12:01 +0000 (03:12 -0800)
the openstack plugin have implemented the api, so we also need to
implement it in the framework, then user can call it

Issue-ID: MULTICLOUD-740
Signed-off-by: Haibin Huang <haibin.huang@intel.com>
Change-Id: I16bc23dffd15e0d7a21d6ace090757a8f444e14f

multivimbroker/multivimbroker/forwarder/views.py

index 80146b6..898acc5 100644 (file)
@@ -72,6 +72,11 @@ class Registry(BaseServer):
         return self.send(vimid, request.get_full_path(), request.body, "POST",
                          headers=originHeaders(request))
 
+    def get(self, request, vimid):
+
+        return self.send(vimid, request.get_full_path(), request.body, "GET",
+                         headers=originHeaders(request))
+
 
 class UnRegistry(BaseServer):
 
@@ -177,6 +182,10 @@ class APIv1Identity(Identity):
 
 class APIv1Registry(Registry):
 
+    def get(self, request, cloud_owner, cloud_region_id):
+        vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+        return super(APIv1Registry, self).get(request, vimid)
+
     def post(self, request, cloud_owner, cloud_region_id):
         vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
         return super(APIv1Registry, self).post(request, vimid)

© 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