summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2018-03-20 08:41:55 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-20 08:41:55 +0000
commit873eae4ad75d4464765843d5b41b2ef3205c3267 (patch)
treee170c25c47c699cdb92b91dd8c6e5e54571c5bee
parent894c04333c03436c253ff5705d5957b1ba4c0783 (diff)
parent875731b44ff3cc6d1e7f2d826b0e4613f2069b26 (diff)
Merge "Update huge page of HPA to AAI"
-rw-r--r--ocata/ocata/registration/views/registration.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/ocata/ocata/registration/views/registration.py b/ocata/ocata/registration/views/registration.py
index 9926af5f..35fa0333 100644
--- a/ocata/ocata/registration/views/registration.py
+++ b/ocata/ocata/registration/views/registration.py
@@ -166,6 +166,23 @@ class Registry(newton_registration.Registry):
hpa_caps.append("]")
hpa_caps.append("},")
+ elif (flavor['name'].find('onap.huge_page') != -1):
+ hpa_caps.append("{'hpaCapabilityId': '" + str(uuid4) + "', ")
+ hpa_caps.append("'hpaFeature': 'hugePages', ")
+ hpa_caps.append("'hardwareArchitecture': 'generic', ")
+ hpa_caps.append("'version': 'v1', ")
+
+ if len(properties):
+ flavor_info['flavor-properties'] = flavor['properties']
+ hpa_caps.append("[")
+ values = flavor['name'].split('_')
+ for p in range(len(properties)):
+ if (properties[p] == "hw:mem_page_size") :
+ hpa_caps.append("{'hpa-attribute-key':'memoryPageSize', ")
+ hpa_caps.append("'hpa-attribute-value': {'value':'" + values[2] + "'}}, ")
+ hpa_caps.append("]")
+ hpa_caps.append("},")
+
else:
self._logger.info("can not support this flavor type")
hpa_caps.append("]")