summaryrefslogtreecommitdiffstats
path: root/share/starlingx_base/registration/registration.py
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2019-08-28 03:47:27 +0000
committerBin Yang <bin.yang@windriver.com>2019-08-28 03:47:27 +0000
commitd0c33a679aa6e058bff58a07b320b78ba63090a5 (patch)
tree849d36f8478a1c60b53be1725d2f20644e6328e5 /share/starlingx_base/registration/registration.py
parent24f743142abe736e88fe7f4bf69511d2de823ab6 (diff)
Fix unregistration error
Change-Id: I907239e0d3f54bdd8cab6103cb3525626e629e39 Issue-ID: MULTICLOUD-793 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'share/starlingx_base/registration/registration.py')
-rw-r--r--share/starlingx_base/registration/registration.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/share/starlingx_base/registration/registration.py b/share/starlingx_base/registration/registration.py
index c795e524..8d724076 100644
--- a/share/starlingx_base/registration/registration.py
+++ b/share/starlingx_base/registration/registration.py
@@ -253,16 +253,23 @@ class RegistryHelper(newton_registration.RegistryHelper):
self._logger.debug("update cloud region fails %s" % str(e))
try:
- super(RegistryHelper, self).registryV0(vimid, project_idorname)
+ return super(RegistryHelper, self).registryV0(vimid, project_idorname)
except Exception as e:
- self._logger.debug("registryV0 fails %s" % str(e))
+ errmsg = "registryV0 fails %s" % str(e)
+ self._logger.debug(errmsg)
+ return 11, errmsg
- return 0
-
- def unregistry(self, vimid=""):
+ def unregistryV0(self, vimid=""):
'''extend base method'''
- return self.super(RegistryHelper, self).unregistry(vimid)
+ try:
+ return super(RegistryHelper, self).unregistryV0(vimid)
+ except Exception as e:
+ errmsg = "unregistryV0 fails %s" % str(e)
+ self._logger.debug(errmsg)
+ return 11, errmsg
+
+ # return (0, "Succeed")
def _get_ovsdpdk_capabilities(self, extra_specs, viminfo):
'''extend base method'''