summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2018-04-20 01:15:08 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-20 01:15:08 +0000
commit2213d20964890593e2e72d2c827e4c6a827c4e69 (patch)
treec428df089283071e74b7c31fa4594bd841731cb1
parent1c77c1b6536f0343c56005dff3e10bc05cb7b06f (diff)
parentb73c759ceb608d50a67564bf5695060722505b6b (diff)
Merge "Fix ocata registration test and implementation"
-rw-r--r--ocata/ocata/registration/tests/test_registration.py4
-rw-r--r--ocata/ocata/registration/views/registration.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/ocata/ocata/registration/tests/test_registration.py b/ocata/ocata/registration/tests/test_registration.py
index c35eddfa..50b7fda2 100644
--- a/ocata/ocata/registration/tests/test_registration.py
+++ b/ocata/ocata/registration/tests/test_registration.py
@@ -63,7 +63,7 @@ MOCK_GET_FLAVOR_RESPONSE = {
"OS-FLV-DISABLED:disabled": True, "link": [{"href":1}]
},
{
- "id": "2", "name": "mini", "vcpus": 2, "ram": "2MB",
+ "id": "2", "name": "mini", "vcpus": 2, "ram": "2",
"disk": "2G", "OS-FLV-EXT-DATA:ephemeral": True,
"swap": False, "os-flavor-access:is_public": True,
"OS-FLV-DISABLED:disabled": True
@@ -154,7 +154,7 @@ MOCK_GET_HPA_FLAVOR_LIST1_RESPONSE= {
"OS-FLV-DISABLED:disabled": True, "link": [{"href": 1}]
},
{
- "id": "2", "name": "onap.mini", "vcpus": 2, "ram": "2MB",
+ "id": "2", "name": "onap.mini", "vcpus": 2, "ram": "2",
"disk": "2G", "OS-FLV-EXT-DATA:ephemeral": True,
"swap": False, "os-flavor-access:is_public": True,
"OS-FLV-DISABLED:disabled": True
diff --git a/ocata/ocata/registration/views/registration.py b/ocata/ocata/registration/views/registration.py
index 636e3ecc..25ec0dbf 100644
--- a/ocata/ocata/registration/views/registration.py
+++ b/ocata/ocata/registration/views/registration.py
@@ -91,7 +91,7 @@ class Registry(newton_registration.Registry):
hpa_caps.append(caps_dict)
# cpupining capabilities
- caps_dict = self._get_cpupining_capabilities(extra_specs)
+ caps_dict = self._get_cpupinning_capabilities(extra_specs)
if len(caps_dict) > 0:
self._logger.debug("cpupining_capabilities_info: %s" % caps_dict)
hpa_caps.append(caps_dict)
@@ -157,13 +157,13 @@ class Registry(newton_registration.Registry):
return basic_capability
- def _get_cpupining_capabilities(self, extra_specs):
+ def _get_cpupinning_capabilities(self, extra_specs):
cpupining_capability = {}
feature_uuid = uuid.uuid4()
if extra_specs.has_key('hw:cpu_policy') or extra_specs.has_key('hw:cpu_thread_policy'):
cpupining_capability['hpaCapabilityID'] = str(feature_uuid)
- cpupining_capability['hpaFeature'] = 'cpuPining'
+ cpupining_capability['hpaFeature'] = 'cpuPinning'
cpupining_capability['hardwareArchitecture'] = 'generic'
cpupining_capability['version'] = 'v1'