diff options
author | Huang Haibin <haibin.huang@intel.com> | 2018-03-20 21:29:05 +0800 |
---|---|---|
committer | Huang Haibin <haibin.huang@intel.com> | 2018-03-20 21:29:05 +0800 |
commit | 875731b44ff3cc6d1e7f2d826b0e4613f2069b26 (patch) | |
tree | ca47b29f08f32c0588673ca85406aad4b9c8f011 /ocata | |
parent | 34420e833e87398b49c3d309cebfc7b1ff7fc76b (diff) |
Update huge page of HPA to AAI
Change-Id: Ifa96dc461d2bbc19ab979316f883e9c7a3df7974
Issue-ID: MULTICLOUD-192
Signed-off-by: Huang Haibin <haibin.huang@intel.com>
Diffstat (limited to 'ocata')
-rw-r--r-- | ocata/ocata/registration/views/registration.py | 17 |
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("]") |