diff options
author | Huang Haibin <haibin.huang@intel.com> | 2018-03-21 00:45:46 +0800 |
---|---|---|
committer | Huang Haibin <haibin.huang@intel.com> | 2018-03-21 00:45:46 +0800 |
commit | bbfb70d39ea3a2dad2e89aad64714b7cb6819147 (patch) | |
tree | f9e1010a0c06af08ccfb5957de04c3b5948d2cf9 | |
parent | 873eae4ad75d4464765843d5b41b2ef3205c3267 (diff) |
Update CPU instruction set extension of HPA to AAI
Change-Id: If9da736827582ea83764a2d6f78db70ba2197446
Issue-ID: MULTICLOUD-193
Signed-off-by: Huang Haibin <haibin.huang@intel.com>
-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 35fa0333..1bcfc60d 100644 --- a/ocata/ocata/registration/views/registration.py +++ b/ocata/ocata/registration/views/registration.py @@ -183,6 +183,23 @@ class Registry(newton_registration.Registry): hpa_caps.append("]") hpa_caps.append("},") + elif (flavor['name'].find('onap.iax') != -1): + hpa_caps.append("{'hpaCapabilityId': '" + str(uuid4) + "', ") + hpa_caps.append("'hpaFeature': 'instructionSetExtensions', ") + hpa_caps.append("'hardwareArchitecture': 'Intel64', ") + hpa_caps.append("'version': 'v1', ") + + if len(properties): + flavor_info['flavor-properties'] = flavor['properties'] + hpa_caps.append("[") + value = flavor['properties'].split('=')[1] + for p in range(len(properties)): + if (properties[p].find("hw:capabilities:cpu_info:features") != -1) : + hpa_caps.append("{'hpa-attribute-key':'instructionSetExtensions', ") + hpa_caps.append("'hpa-attribute-value': {'value':[" + value + "]}}, ") + hpa_caps.append("]") + hpa_caps.append("},") + else: self._logger.info("can not support this flavor type") hpa_caps.append("]") |