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_acl_vnf.py | 8 ++++---- .../vnf_generic/vnf/test_cgnapt_vnf.py | 10 +++++----- .../vnf_generic/vnf/test_prox_helpers.py | 10 +++++----- .../vnf_generic/vnf/test_prox_vnf.py | 8 ++++---- .../vnf_generic/vnf/test_sample_vnf.py | 20 ++++++++++---------- .../vnf_generic/vnf/test_tg_prox.py | 8 ++++---- .../vnf_generic/vnf/test_tg_rfc2544_trex.py | 4 ++-- .../vnf_generic/vnf/test_tg_trex.py | 8 ++++---- .../vnf_generic/vnf/test_udp_replay.py | 12 ++++++------ .../vnf_generic/vnf/test_vfw_vnf.py | 8 ++++---- .../vnf_generic/vnf/test_vpe_vnf.py | 22 +++++++++++----------- 11 files changed, 59 insertions(+), 59 deletions(-) (limited to 'tests/unit/network_services/vnf_generic/vnf') diff --git a/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py index f47da3729..e9444b493 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py @@ -144,7 +144,7 @@ class TestAclApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': AclApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -172,7 +172,7 @@ class TestAclApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': AclApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -197,7 +197,7 @@ class TestAclApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': AclApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -207,7 +207,7 @@ class TestAclApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.0', 'dpdk_port_num': 0}, 'xe1': {'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': AclApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py index c21beabfc..76f2d5b5d 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py @@ -73,7 +73,7 @@ link 1 up def test__get_cgnapt_config(self): vnfd_helper = mock.Mock() - vnfd_helper.port_pairs.priv_ports = [{"name": 'a'}, {"name": "b"}, {"name": "c"}] + vnfd_helper.port_pairs.uplink_ports = [{"name": 'a'}, {"name": "b"}, {"name": "c"}] helper = CgnaptApproxSetupEnvHelper(vnfd_helper, mock.Mock(), mock.Mock()) helper._get_ports_gateway = mock.Mock(side_effect=[3, 5, 2]) @@ -206,7 +206,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': CgnaptApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -234,7 +234,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': CgnaptApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -259,7 +259,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': CgnaptApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -269,7 +269,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.0', 'dpdk_port_num': 0}, 'xe1': {'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': CgnaptApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py b/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py index 821c10f64..8d21fbb28 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py @@ -679,7 +679,7 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): 'vpci': '0000:05:00.0', 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'netmask': '255.255.255.0', 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', @@ -698,7 +698,7 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): 'vpci': '0000:05:00.1', 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'driver': "i40e", 'netmask': '255.255.255.0', 'dpdk_port_num': 1, @@ -1281,7 +1281,7 @@ class TestProxResourceHelper(unittest.TestCase): 'vpci': '0000:05:00.0', 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'netmask': '255.255.255.0', 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', @@ -1300,7 +1300,7 @@ class TestProxResourceHelper(unittest.TestCase): 'vpci': '0000:05:00.1', 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'driver': "i40e", 'netmask': '255.255.255.0', 'dpdk_port_num': 1, @@ -1755,7 +1755,7 @@ class TestProxResourceHelper(unittest.TestCase): 'vpci': '0000:06:00.0', 'local_ip': '152.16.100.20', 'type': 'PCI-PASSTHROUGH', - 'vld_id': 'private_1', + 'vld_id': 'uplink_1', 'netmask': '255.255.255.0', 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py index 2e83cafc1..d1f7f05d8 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py @@ -187,7 +187,7 @@ class TestProxApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': ProxApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -221,7 +221,7 @@ class TestProxApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': ProxApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -252,7 +252,7 @@ class TestProxApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': ProxApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -264,7 +264,7 @@ class TestProxApproxVnf(unittest.TestCase): }, 'xe1': { 'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': ProxApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', 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 fa733489c..4b9f4172e 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 @@ -102,7 +102,7 @@ class TestVnfSshHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', @@ -119,7 +119,7 @@ class TestVnfSshHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', @@ -300,7 +300,7 @@ class TestSetupEnvHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', @@ -317,7 +317,7 @@ class TestSetupEnvHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', @@ -430,7 +430,7 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', @@ -448,7 +448,7 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', @@ -1029,7 +1029,7 @@ class TestClientResourceHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', @@ -1047,7 +1047,7 @@ class TestClientResourceHelper(unittest.TestCase): 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', @@ -1912,8 +1912,8 @@ class TestSampleVnf(unittest.TestCase): self.assertIsNone(sample_vnf._build_ports()) self.assertIsNotNone(sample_vnf.networks) - self.assertIsNotNone(sample_vnf.priv_ports) - self.assertIsNotNone(sample_vnf.pub_ports) + self.assertIsNotNone(sample_vnf.uplink_ports) + self.assertIsNotNone(sample_vnf.downlink_ports) self.assertIsNotNone(sample_vnf.my_ports) @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py index d1f24700a..73e1c723f 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py @@ -180,7 +180,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': ProxTrafficGen.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -214,7 +214,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': ProxTrafficGen.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -245,7 +245,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': ProxTrafficGen.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -257,7 +257,7 @@ class TestProxTrafficGen(unittest.TestCase): }, 'xe1': { 'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': ProxTrafficGen.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py index 0fe0c3d45..637706fb4 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py @@ -100,7 +100,7 @@ class TestTrexTrafficGenRFC(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", @@ -120,7 +120,7 @@ class TestTrexTrafficGenRFC(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'driver': "i40e", 'netmask': '255.255.255.0', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py index 4fd4c4c43..eb9f0525b 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py @@ -165,7 +165,7 @@ class TestTrexTrafficGen(unittest.TestCase): "interfaces": { "xe0": { "local_iface_name": "ens786f0", - "vld_id": "private", + "vld_id": TrafficProfile.UPLINK, "netmask": "255.255.255.0", "vpci": "0000:05:00.0", "local_ip": "152.16.100.19", @@ -177,7 +177,7 @@ class TestTrexTrafficGen(unittest.TestCase): }, "xe1": { "local_iface_name": "ens786f1", - "vld_id": "public", + "vld_id": TrafficProfile.DOWNLINK, "netmask": "255.255.255.0", "vpci": "0000:05:00.1", "local_ip": "152.16.40.19", @@ -233,7 +233,7 @@ class TestTrexTrafficGen(unittest.TestCase): "interfaces": { "xe0": { "local_iface_name": "ens513f0", - "vld_id": "public", + "vld_id": TrafficProfile.DOWNLINK, "netmask": "255.255.255.0", "vpci": "0000:02:00.0", "local_ip": "152.16.40.20", @@ -267,7 +267,7 @@ class TestTrexTrafficGen(unittest.TestCase): "interfaces": { "xe0": { "local_iface_name": "ens785f0", - "vld_id": "private", + "vld_id": TrafficProfile.UPLINK, "netmask": "255.255.255.0", "vpci": "0000:05:00.0", "local_ip": "152.16.100.20", diff --git a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py index 95bc08b17..b75ed6764 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py @@ -78,7 +78,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): 'netmask': '255.255.255.0', 'dst_ip': '152.16.100.20', 'type': 'PCI-PASSTHROUGH', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', @@ -97,7 +97,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): 'netmask': '255.255.255.0', 'dst_ip': '152.16.40.20', 'type': 'PCI-PASSTHROUGH', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', @@ -200,7 +200,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): "interfaces": { "xe0": { "local_iface_name": "ens786f0", - "vld_id": "private", + "vld_id": UdpReplayApproxVnf.UPLINK, "netmask": "255.255.255.0", "vpci": "0000:05:00.0", "local_ip": "152.16.100.19", @@ -212,7 +212,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): }, "xe1": { "local_iface_name": "ens786f1", - "vld_id": "public", + "vld_id": UdpReplayApproxVnf.DOWNLINK, "netmask": "255.255.255.0", "vpci": "0000:05:00.1", "local_ip": "152.16.40.19", @@ -268,7 +268,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): "interfaces": { "xe0": { "local_iface_name": "ens513f0", - "vld_id": "public", + "vld_id": UdpReplayApproxVnf.DOWNLINK, "netmask": "255.255.255.0", "vpci": "0000:02:00.0", "local_ip": "152.16.40.20", @@ -302,7 +302,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): "interfaces": { "xe0": { "local_iface_name": "ens785f0", - "vld_id": "private", + "vld_id": UdpReplayApproxVnf.UPLINK, "netmask": "255.255.255.0", "vpci": "0000:05:00.0", "local_ip": "152.16.100.20", diff --git a/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py index 38cc1774a..958099a03 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py @@ -142,7 +142,7 @@ class TestFWApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': FWApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -170,7 +170,7 @@ class TestFWApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': FWApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -195,7 +195,7 @@ class TestFWApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': FWApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -205,7 +205,7 @@ class TestFWApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.0', 'dpdk_port_num': 0}, 'xe1': {'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': FWApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', 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