summaryrefslogtreecommitdiffstats
path: root/ocata/ocata/registration
diff options
context:
space:
mode:
authorHuang Haibin <haibin.huang@intel.com>2018-03-24 17:13:19 +0800
committerHuang Haibin <haibin.huang@intel.com>2018-03-25 04:57:23 +0800
commit30b03c1246c391d3bd9572cd6004c57890c0257b (patch)
tree150415c08b090dea90c38cde940bcea20b9b3fb5 /ocata/ocata/registration
parent6e16b90e3241156724d0f2df73a3c807b0794842 (diff)
Update ovsdpdk of hpa to AAI unit test
Change-Id: Ic73a6e99b4f1082ab7423cf96c917b0c5db566f9 Issue-ID: MULTICLOUD-195 Signed-off-by: Huang Haibin <haibin.huang@intel.com>
Diffstat (limited to 'ocata/ocata/registration')
-rw-r--r--ocata/ocata/registration/tests/test_registration.py39
1 files changed, 38 insertions, 1 deletions
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": [