summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:12:26 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:12:26 +0800
commit6184c62c07824236deec259360d8634e8e6b7d35 (patch)
treeb5e30f29668838b4843f2eac3e37ab453f7b3be2
parent211b94b0ea2c6c8de1ff2f10a8fce68fe5249470 (diff)
Add test_get_hpa_cputopo
Add test_get_hpa_cputopo Change-Id: Ib409fed0ac233f8cae060b18d74bb3b37559c0cd Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_aai_client.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py
index 57c51f9..ea333d1 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -286,3 +286,13 @@ class TestAAIClient(unittest.TestCase):
}
ret = self.view._get_cpupinning_capabilities(extra)
self.assertEqual(len(ret["hpa-feature-attributes"]), 2)
+
+ @mock.patch.object(restcall, "call_req")
+ def test_get_hpa_cputopo(self, mock_call):
+ extra = {
+ "hw:cpu_sockets": 2,
+ "hw:cpu_cores": 2,
+ "hw:cpu_threads": 4
+ }
+ ret = self.view._get_cputopology_capabilities(extra)
+ self.assertEqual(len(ret["hpa-feature-attributes"]), 3)