summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
author00184532 <lu.yao135@zte.com.cn>2017-11-03 16:31:03 +0800
committerYao Lu <lu.yao135@zte.com.cn>2018-01-16 03:28:52 +0000
commit127f3f9cc8ff46e4f168422771421fdae9063398 (patch)
treeb9aff8b50531051ecf7eabd72586d79f55d3ebad /tests
parent431ed2baa96538fd48ebc1e7df8454b60b903de1 (diff)
support dpdk
Change-Id: I30970093bab418d679d3a3396d16aaff257272f4 Signed-off-by: 00184532 <lu.yao135@zte.com.cn>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_tempest.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/tests/unit/test_tempest.py b/tests/unit/test_tempest.py
index b03b3c0f..9a70aec5 100644
--- a/tests/unit/test_tempest.py
+++ b/tests/unit/test_tempest.py
@@ -34,7 +34,7 @@ from deploy.tempest import (
update_network,
get_hosts,
get_cluster,
- add_hosts_interface,
+ update_hosts_interface,
add_host_role,
enable_cinder_backend,
enable_opendaylight
@@ -173,7 +173,7 @@ def test_get_cluster():
@pytest.mark.parametrize('isbare', [
(False), (True)])
-def test_add_hosts_interface(isbare, tmpdir):
+def test_update_hosts_interface(isbare, tmpdir):
res_old_val = deploy.tempest.iso_path
deploy.tempest.iso_path = os.path.join(tmpdir.dirname, tmpdir.basename) + '/'
iso_file_path = os.path.join(deploy.tempest.iso_path, 'test_os.iso')
@@ -206,9 +206,9 @@ def test_add_hosts_interface(isbare, tmpdir):
{'ip': '', 'name': 'physnet1'}],
'ens9': [{'ip': '', 'name': 'HEARTBEAT'}]}
vip = '10.20.11.11'
- add_hosts_interface(1, hosts_info, mac_address_map,
- host_interface_map,
- vip, isbare, client)
+ update_hosts_interface(1, hosts_info, mac_address_map,
+ host_interface_map,
+ vip, isbare, client, True)
deploy.tempest.iso_path = res_old_val
if isbare:
assert client.hosts.get(host_id1).metadata == {
@@ -217,6 +217,8 @@ def test_add_hosts_interface(isbare, tmpdir):
'ipmi_user': 'zteroot', 'ipmi_passwd': 'superuser',
'interfaces': [{'name': 'ens8', 'mac': '11:11:11:11:11:11',
'assigned_networks': [{'ip': '', 'name': 'EXTERNAL'}]}],
+ 'hugepagesize': '1G',
+ 'hugepages': '20',
}
assert client.hosts.get(host_id2).metadata == {
'id': host_id2, 'name': 'controller02', 'cluster_id': cluster_id,
@@ -227,7 +229,10 @@ def test_add_hosts_interface(isbare, tmpdir):
{'ip': '', 'name': 'MANAGEMENT'},
{'ip': '', 'name': 'PUBLICAPI'},
{'ip': '', 'name': 'STORAGE'},
- {'ip': '', 'name': 'physnet1'}]}],
+ {'ip': '', 'name': 'physnet1'}],
+ 'vswitch_type': 'dvs'}],
+ 'hugepagesize': '1G',
+ 'hugepages': '20',
}
assert client.hosts.get(host_id3).metadata == {
'id': host_id3, 'name': 'computer01', 'cluster_id': cluster_id,
@@ -235,6 +240,8 @@ def test_add_hosts_interface(isbare, tmpdir):
'ipmi_user': 'zteroot', 'ipmi_passwd': 'superuser',
'interfaces': [{'name': 'ens9', 'mac': '33:33:33:33:33:33',
'assigned_networks': [{'ip': '', 'name': 'HEARTBEAT'}]}],
+ 'hugepagesize': '1G',
+ 'hugepages': '20',
}
else:
assert client.hosts.get(host_id1).metadata == {
@@ -242,6 +249,8 @@ def test_add_hosts_interface(isbare, tmpdir):
'cluster': cluster_id, 'os_version': iso_file_path,
'interfaces': [{'name': 'ens8', 'mac': '11:11:11:11:11:11',
'assigned_networks': [{'ip': '', 'name': 'EXTERNAL'}]}],
+ 'hugepagesize': '1G',
+ 'hugepages': '20',
}
assert client.hosts.get(host_id2).metadata == {
'id': host_id2, 'name': 'controller02', 'cluster_id': cluster_id,
@@ -251,13 +260,18 @@ def test_add_hosts_interface(isbare, tmpdir):
{'ip': '', 'name': 'MANAGEMENT'},
{'ip': '', 'name': 'PUBLICAPI'},
{'ip': '', 'name': 'STORAGE'},
- {'ip': '', 'name': 'physnet1'}]}],
+ {'ip': '', 'name': 'physnet1'}],
+ 'vswitch_type': 'dvs'}],
+ 'hugepagesize': '1G',
+ 'hugepages': '20',
}
assert client.hosts.get(host_id3).metadata == {
'id': host_id3, 'name': 'computer01', 'cluster_id': cluster_id,
'cluster': cluster_id, 'os_version': iso_file_path,
'interfaces': [{'name': 'ens9', 'mac': '33:33:33:33:33:33',
'assigned_networks': [{'ip': '', 'name': 'HEARTBEAT'}]}],
+ 'hugepagesize': '1G',
+ 'hugepages': '20',
}
tmpdir.remove()