summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:23:18 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 11:23:18 +0800
commit4a295b7b7c57b8657c657adf6e2658e9a8fd08e3 (patch)
tree161b9a9beaca9337949abd453233ec093a250a18
parent157d04a2c21145ff0b167d1e86847eb43e2432e4 (diff)
Add test_get_hpa_numa
Add test_get_hpa_numa Change-Id: I4dfee677b36599de305fa291f1c5fb1826ec2d36 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 364caca..b6caca4 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -331,3 +331,13 @@ class TestAAIClient(unittest.TestCase):
}
ret = self.view._get_hugepages_capabilities(extra)
self.assertEqual(0, len(ret["hpa-feature-attributes"]))
+
+ @mock.patch.object(restcall, "call_req")
+ def test_get_hpa_numa(self, mock_call):
+ extra = {
+ "hw:numa_nodes": 1,
+ "hw:numa_cpus.0": 1,
+ "hw:numa_mem.0": 1024,
+ }
+ ret = self.view._get_numa_capabilities(extra)
+ self.assertEqual(3, len(ret["hpa-feature-attributes"]))