From 8ba961d5cded6a0993ef00e8f9b5e0a7cd32d216 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Fri, 8 Sep 2017 11:34:48 -0700 Subject: Heat: support non-mesh network toplogy Previsouly we added all servers to every network in Heat in a full mesh. To more closely replicate test topology and to limit then number of ports we need to all each server to specify which ports should be connected to each network. This should also allow for some kind of multiport setup. Add optional network_ports dict to each server with network to port_list mapping match inteface based on port name or vld_id replace vld_id matching with network name matching, since network_name == vld_id Change-Id: I5de46b8f673949e3c17d8df6fa96f055c43886ce Signed-off-by: Ross Brattain --- .../unit/network_services/vnf_generic/vnf/test_sample_vnf.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests/unit/network_services/vnf_generic/vnf') diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py index 0264facf5..3bb4a9eca 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py @@ -412,6 +412,7 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'virtual-interface': { 'dst_mac': '00:00:00:00:00:03', 'vpci': '0000:05:00.0', + 'dpdk_port_num': '0', 'driver': 'i40e', 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', @@ -419,7 +420,9 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'dpdk_port_num': '0', 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', - 'local_mac': '00:00:00:00:00:01' + 'local_mac': '00:00:00:00:00:01', + 'vld_id': 'private_0', + 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', 'name': 'xe0' @@ -428,6 +431,7 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'virtual-interface': { 'dst_mac': '00:00:00:00:00:04', 'vpci': '0000:05:00.1', + 'dpdk_port_num': '1', 'driver': 'ixgbe', 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', @@ -435,7 +439,9 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'dpdk_port_num': '1', 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', - 'local_mac': '00:00:00:00:00:02' + 'local_mac': '00:00:00:00:00:02', + 'vld_id': 'public_0', + 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1' @@ -600,8 +606,8 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) dpdk_setup_helper.CFG_CONFIG = 'config' dpdk_setup_helper.CFG_SCRIPT = 'script' - dpdk_setup_helper.all_ports = [3, 4, 5] dpdk_setup_helper.pipeline_kwargs = {} + dpdk_setup_helper.all_ports = [0, 1, 2] expected = { 'cfg_file': 'config', -- cgit 1.2.3-korg