summaryrefslogtreecommitdiffstats
path: root/ocata
diff options
context:
space:
mode:
authorHuang Haibin <haibin.huang@intel.com>2018-03-20 19:48:42 +0800
committerHuang Haibin <haibin.huang@intel.com>2018-03-20 21:01:36 +0800
commit34420e833e87398b49c3d309cebfc7b1ff7fc76b (patch)
treedae365a9e952b11d249a06a824470d12ce6d7aa3 /ocata
parent46cb3d57da8228dbce28351367935d551531bde5 (diff)
Update local storage of HPA to AAI
Change-Id: I2fb9260ea0b2daaf35f90204773ed53e530f889b Issue-ID: MULTICLOUD-191 Signed-off-by: Huang Haibin <haibin.huang@intel.com>
Diffstat (limited to 'ocata')
-rw-r--r--ocata/ocata/registration/views/registration.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ocata/ocata/registration/views/registration.py b/ocata/ocata/registration/views/registration.py
index 03922445..9926af5f 100644
--- a/ocata/ocata/registration/views/registration.py
+++ b/ocata/ocata/registration/views/registration.py
@@ -125,6 +125,22 @@ class Registry(newton_registration.Registry):
hpa_caps.append("]")
hpa_caps.append("},")
+ elif (flavor['name'].find('onap.local_storage') != -1):
+ hpa_caps.append("{'hpaCapabilityID': '" + str(uuid4) + "', ")
+ hpa_caps.append("'hpaFeature': 'localStorage', ")
+ hpa_caps.append("'hardwareArchitecture': 'generic', ")
+ hpa_caps.append("'version': 'v1', ")
+
+ hpa_caps.append("[")
+ hpa_caps.append("{'hpa-attribute-key':'diskSize', ")
+ hpa_caps.append("'hpa-attribute-value': {'value':" + str(flavor_info['disk']) + ", unit:'MB'}}, ")
+ hpa_caps.append("{'hpa-attribute-key':'ephemeralDiskSize', ")
+ hpa_caps.append("'hpa-attribute-value': {'value':" + str(flavor_info['OS-FLV-EXT-DATA:ephemeral']) + ", unit:'MB'}}, ")
+ hpa_caps.append("{'hpa-attribute-key':'swapMemSize', ")
+ hpa_caps.append("'hpa-attribute-value': {'value':" + str(flavor_info['swap']) + ", unit:'MB'}}, ")
+ hpa_caps.append("]")
+ hpa_caps.append("},")
+
elif (flavor['name'].find('onap.numa') != -1):
hpa_caps.append("{'hpaCapabilityID': '" + str(uuid4) + "', ")
hpa_caps.append("'hpaFeature': 'numa', ")