summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaibin Huang <haibin.huang@intel.com>2020-03-12 16:07:03 +0800
committerHaibin Huang <haibin.huang@intel.com>2020-03-12 16:11:45 +0800
commit6d5abf915fcce40e23469d9dbd2bdedf411cd899 (patch)
tree7228680554e23b36163daec6b0b56cd9bf9063fd
parentcff26d9fb92100ad5da1a9d8d7118f6113f1e9a7 (diff)
Fix hpa_capabilities is not define
Issue-ID: MULTICLOUD-1028 Signed-off-by: Haibin Huang <haibin.huang@intel.com> Change-Id: I477ff0ca23fc1480d5a9402b53251d8bbe8713c4
-rw-r--r--share/newton_base/registration/registration_driver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/newton_base/registration/registration_driver.py b/share/newton_base/registration/registration_driver.py
index 26954273..26247fd7 100644
--- a/share/newton_base/registration/registration_driver.py
+++ b/share/newton_base/registration/registration_driver.py
@@ -563,6 +563,7 @@ class RegistryHelper(MultiCloudAAIHelper):
flavor_info['flavor-selflink'] = 'http://0.0.0.0'
# add hpa capabilities
+ hpa_capabilities = []
if (flavor['name'].find('onap.') == 0):
req_resouce = "/flavors/%s/os-extra_specs" % flavor['id']
extraResp = self._get_list_resources(
@@ -576,9 +577,9 @@ class RegistryHelper(MultiCloudAAIHelper):
hpa_capability = hpa.get_hpa_capabilities(data)
hpa_capabilities.append(hpa_capability)
+ logger.info("hpa_capabilities:%s" % hpa_capabilities)
flavor_info['hpa-capabilities'] = \
{'hpa-capability': hpa_capabilities}
- logger.debug("hpa_capabilities:%s" % hpa_capabilities)
retcode, content = self._update_resoure(
cloud_owner, cloud_region_id, flavor['id'],