summaryrefslogtreecommitdiffstats
path: root/ocata
diff options
context:
space:
mode:
authorliboNet <libo.zhu@intel.com>2018-04-19 07:04:02 +0800
committerliboNet <libo.zhu@intel.com>2018-04-20 01:49:08 +0800
commitb73c759ceb608d50a67564bf5695060722505b6b (patch)
treeb9fad2ae461a3f1db5a5a0bec49172e10905b305 /ocata
parentbb941331a0917635302292b362979d50bafd4311 (diff)
Fix ocata registration test and implementation
fix the typo of cpupinning feature and rename its function name remove the unit of ram size, the MB is the agreement unit in openstack Change-Id: Ia798cfa85edc5821a536db7f5ba5335dc7948b4b Issue-ID: MULTICLOUD-200 Signed-off-by: liboNet <libo.zhu@intel.com>
Diffstat (limited to 'ocata')
-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'