summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:10:18 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:10:18 +0800
commit211b94b0ea2c6c8de1ff2f10a8fce68fe5249470 (patch)
tree357c396a71e989d6ae18be307143e15c7c8f6251 /vio
parentf82151ac7e9cc8f44c2317e56afb1b459a4bedae (diff)
Add test_get_hpa_cpupin
Add test_get_hpa_cpupin Change-Id: I4aba410f8415e5e7855aabbf1383af0cde81a0dd Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r--vio/vio/tests/test_aai_client.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py
index dd7e5fe..57c51f9 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -277,3 +277,12 @@ class TestAAIClient(unittest.TestCase):
}
ret = self.view._get_hpa_basic_capabilities(flavor)
self.assertEqual(len(ret["hpa-feature-attributes"]), 2)
+
+ @mock.patch.object(restcall, "call_req")
+ def test_get_hpa_cpupin(self, mock_call):
+ extra = {
+ "hw:cpu_policy": "cpu_policy",
+ "hw:cpu_thread_policy": "thread_policy"
+ }
+ ret = self.view._get_cpupinning_capabilities(extra)
+ self.assertEqual(len(ret["hpa-feature-attributes"]), 2)