diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-03-26 12:14:23 -0700 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-03-26 12:14:23 -0700 |
commit | b73962800ad896b822fb27a04644cb1c76ac7d0a (patch) | |
tree | 3828ab45537e5263e34601547a974eb9c9de2334 /vio | |
parent | 60efc7cc18ab0b34846c49e1be012fd6233dcbcc (diff) |
Add test_add_pservers
Add test_add_pservers for AAIClient
Change-Id: I5ac9e1c9f4a60ae4c6882c6f972d17bca8432cdd
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.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py index c4ef303..79f6bb5 100644 --- a/vio/vio/tests/test_aai_client.py +++ b/vio/vio/tests/test_aai_client.py @@ -82,3 +82,18 @@ class TestAAIClient(unittest.TestCase): } self.view.add_networks(networks) mock_call.assert_called_once() + + @mock.patch.object(restcall, "call_req") + def test_add_pservers(self, mock_call): + pservers = { + "hypervisors": [{ + "name": "compute-1", + "vcpus": 100, + "local_disk_size": 1000, + "memory_size": 10240, + "host_ip": "10.0.0.7", + "id": "compute-1-id" + }] + } + self.view.add_pservers(pservers) + self.assertEqual(mock_call.call_count, 2) |