summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 10:43:58 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 10:43:58 +0800
commit8171199ccd354a0f77cf289a3736e2bcddcfb050 (patch)
tree695b281b0ea0761517ada31ed5cf418688cea18d
parent5de1216655e1da0a4ee7474288d7bc1ce77d05bc (diff)
Add test_add_flavors_with_hpa
Add test_add_flavors_with_hpa Change-Id: I0e54180bce9ca7337d0b87854109972375c9cb6a Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_aai_client.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py
index 08d8a3b..c7d9a3c 100644
--- a/vio/vio/tests/test_aai_client.py
+++ b/vio/vio/tests/test_aai_client.py
@@ -62,6 +62,28 @@ class TestAAIClient(unittest.TestCase):
mock_call.assert_called_once()
@mock.patch.object(restcall, "call_req")
+ def test_add_flavors_with_hpa(self, mock_call):
+ flavors = {
+ "flavors": [{
+ "name": "onap.small",
+ "id": "1",
+ "vcpus": 1,
+ "ram": 512,
+ "disk": 10,
+ "ephemeral": 0,
+ "swap": 0,
+ "is_public": True,
+ "links": [{"href": "http://fake-url"}],
+ "is_disabled": False,
+ "extra_specs": {},
+ }]
+ }
+ self.view._get_ovsdpdk_capabilities = mock.MagicMock()
+ self.view._get_ovsdpdk_capabilities.return_value = {}
+ self.view.add_flavors(flavors)
+ mock_call.assert_called_once()
+
+ @mock.patch.object(restcall, "call_req")
def test_add_images(self, mock_call):
images = {
"images": [{