From 30b03c1246c391d3bd9572cd6004c57890c0257b Mon Sep 17 00:00:00 2001 From: Huang Haibin Date: Sat, 24 Mar 2018 17:13:19 +0800 Subject: Update ovsdpdk of hpa to AAI unit test Change-Id: Ic73a6e99b4f1082ab7423cf96c917b0c5db566f9 Issue-ID: MULTICLOUD-195 Signed-off-by: Huang Haibin --- .../ocata/registration/tests/test_registration.py | 39 +++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/ocata/ocata/registration/tests/test_registration.py b/ocata/ocata/registration/tests/test_registration.py index 7ab7e306..fc2eed25 100644 --- a/ocata/ocata/registration/tests/test_registration.py +++ b/ocata/ocata/registration/tests/test_registration.py @@ -21,6 +21,43 @@ from newton_base.tests import mock_info from newton_base.tests import test_base from newton_base.util import VimDriverUtils +OCATA_MOCK_VIM_INFO = { + "createTime": "2017-04-01 02:22:27", + "domain": "Default", + "name": "TiS_R4", + "password": "admin", + "tenant": "admin", + "type": "openstack", + "url": "http://128.224.180.14:5000/v3", + "userName": "admin", + "vendor": "WindRiver", + "version": "newton", + "vimId": "windriver-hudson-dc_RegionOne", + 'cloud_owner': 'windriver-hudson-dc', + 'cloud_region_id': 'RegionOne', + 'cloud_extra_info': + '{' + '"ovsDpdk":{' + '"version": "v1",' + '"arch": "Intel64",' + '"libname":"dataProcessingAccelerationLibrary",' + '"libvalue":"v12.1",' + '}' + '}', + 'cloud_epa_caps': + '{' + '"huge_page":"true",' + '"cpu_pinning":"true",' + '"cpu_thread_policy":"true",' + '"numa_aware":"true",' + '"sriov":"true",' + '"dpdk_vswitch":"true",' + '"rdt":"false",' + '"numa_locality_pci":"true"' + '}', + 'insecure': 'True', +} + MOCK_GET_TENANT_RESPONSE = { "projects":[ {"id": "1", "name": "project"}, @@ -195,7 +232,7 @@ class TestFlavors(test_base.TestRequest): self, mock_get_vim_info, mock_get_session): restcall.req_to_aai = mock.Mock() restcall.req_to_aai.return_value = (0, {}, status.HTTP_200_OK) - mock_get_vim_info.return_value = mock_info.MOCK_VIM_INFO + mock_get_vim_info.return_value = OCATA_MOCK_VIM_INFO mock_get_session.return_value = test_base.get_mock_session( ["get"], { "side_effect": [ -- cgit 1.2.3-korg