From ae0cdbea1100a09d0c46191dd7e5d8d5eec8d484 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Tue, 12 Sep 2017 09:57:38 -0700 Subject: NSB: count from 0, vnf_0, tg_9, private->uplink, public->downlink Also rename private to uplink, public to downlink for scale-out template we need to count from 0 so we can use range() without +1/-1 errors vnf_0, vnf_1 tg_0, tg_1 also fix Ixia defaults Change-Id: I6aecfbb95f99af20f012a9df19c19be77d1b5b77 Signed-off-by: Ross Brattain Signed-off-by: Edward MacGillivray --- .../vnf_generic/vnf/test_vpe_vnf.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py') diff --git a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py index 62389870b..757109d11 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py @@ -57,8 +57,8 @@ class TestConfigCreate(unittest.TestCase): def test___init__(self): config_create = ConfigCreate([0], [1], 2) - self.assertEqual(config_create.priv_ports, [0]) - self.assertEqual(config_create.pub_ports, [1]) + self.assertEqual(config_create.uplink_ports, [0]) + self.assertEqual(config_create.downlink_ports, [1]) self.assertEqual(config_create.socket, 2) def test_vpe_initialize(self): @@ -110,7 +110,7 @@ class TestConfigCreate(unittest.TestCase): self.assertNotEqual(result, '') def test_create_vpe_config(self): - priv_ports = [ + uplink_ports = [ { 'index': 0, 'dpdk_port_num': 1, @@ -121,7 +121,7 @@ class TestConfigCreate(unittest.TestCase): }, ] - pub_ports = [ + downlink_ports = [ { 'index': 2, 'dpdk_port_num': 3, @@ -132,7 +132,7 @@ class TestConfigCreate(unittest.TestCase): }, ] - config_create = ConfigCreate(priv_ports, pub_ports, 23) + config_create = ConfigCreate(uplink_ports, downlink_ports, 23) curr_path = os.path.dirname(os.path.abspath(__file__)) vpe_cfg = "samples/vnf_samples/nsut/vpe/vpe_config" vnf_cfg = os.path.join(curr_path, "../../../../..", vpe_cfg) @@ -192,7 +192,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'dst_ip': '152.16.100.20', 'local_iface_name': 'xe0', 'local_mac': '00:00:00:00:00:02', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', @@ -211,7 +211,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', 'local_mac': '00:00:00:00:00:01', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', @@ -310,7 +310,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': VpeApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -344,7 +344,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': VpeApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -375,7 +375,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': VpeApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -387,7 +387,7 @@ class TestVpeApproxVnf(unittest.TestCase): }, 'xe1': { 'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': VpeApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', -- cgit 1.2.3-korg