summaryrefslogtreecommitdiffstats
path: root/share/starlingx_base/registration
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2019-04-12 06:52:17 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2019-04-12 06:52:17 +0000
commit8d49463db893bdfcd457163865cd801b47fab178 (patch)
tree5f57be374ac5e904649c6d2750be56bae4daeefe /share/starlingx_base/registration
parent6528a64e397075f73c4e5e2af560589d48d7f4d8 (diff)
Fix bug of registration
Change-Id: Idd12b60af24326c63fbda63928de191cdb6cf7f7 Issue-ID: MULTICLOUD-554 Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
Diffstat (limited to 'share/starlingx_base/registration')
-rw-r--r--share/starlingx_base/registration/registration.py30
1 files changed, 21 insertions, 9 deletions
diff --git a/share/starlingx_base/registration/registration.py b/share/starlingx_base/registration/registration.py
index dd71c1b4..b6ed9250 100644
--- a/share/starlingx_base/registration/registration.py
+++ b/share/starlingx_base/registration/registration.py
@@ -225,18 +225,30 @@ class RegistryHelper(newton_registration.RegistryHelper):
self._logger.info("create a cloud region: %s,%s,%s"
% (cloud_owner, gen_cloud_region_id, regionid))
- self._update_cloud_region(
- cloud_owner, gen_cloud_region_id, regionid, viminfo)
- new_vimid = extsys.encode_vim_id(
- cloud_owner, gen_cloud_region_id)
- # super(APIv1Registry, self).post(request, new_vimid)
- super(RegistryHelper, self)(new_vimid)
+ try:
+ self._update_cloud_region(
+ cloud_owner, gen_cloud_region_id, regionid, viminfo)
+ except Exception as e:
+ self._logger.debug("update cloud region fails %s" % e.message)
+
+ try:
+ new_vimid = extsys.encode_vim_id(
+ cloud_owner, gen_cloud_region_id)
+ super(RegistryHelper, self).registryV0(new_vimid, project_idorname)
+ except Exception as e:
+ self._logger.debug("registryV0 fails %s" % e.message)
# update the specified region
- self._update_cloud_region(cloud_owner, cloud_region_id,
- region_specified, viminfo)
+ try:
+ self._update_cloud_region(cloud_owner, cloud_region_id,
+ region_specified, viminfo)
+ except Exception as e:
+ self._logger.debug("update cloud region fails %s" % e.message)
- self.super(RegistryHelper, self).registry(vimid)
+ try:
+ super(RegistryHelper, self).registryV0(vimid, project_idorname)
+ except Exception as e:
+ self._logger.debug("registryV0 fails %s" % e.message)
return 0