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 --- .../network_services/helpers/acl_vnf_topology_ixia.yaml | 4 ++-- .../unit/network_services/helpers/test_samplevnf_helper.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/unit/network_services/helpers') diff --git a/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml b/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml index 606d557e9..f60834fbd 100644 --- a/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml +++ b/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml @@ -27,7 +27,7 @@ nsd:nsd-catalog: VNF model: ../../vnf_descriptors/acl_vnf.yaml vld: - - id: private_1 + - id: uplink_1 name: tg__1 to vnf__1 link 1 type: ELAN vnfd-connection-point-ref: @@ -38,7 +38,7 @@ nsd:nsd-catalog: vnfd-connection-point-ref: xe0 vnfd-id-ref: vnf__1 #VNF - - id: public_1 + - id: downlink_1 name: vnf__1 to tg__1 link 2 type: ELAN vnfd-connection-point-ref: diff --git a/tests/unit/network_services/helpers/test_samplevnf_helper.py b/tests/unit/network_services/helpers/test_samplevnf_helper.py index 3d3f6dc28..0ac363f28 100644 --- a/tests/unit/network_services/helpers/test_samplevnf_helper.py +++ b/tests/unit/network_services/helpers/test_samplevnf_helper.py @@ -37,7 +37,7 @@ class TestPortPairs(unittest.TestCase): vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] interfaces = vnfd['vdu'][0]['external-interface'] port_pairs = PortPairs(interfaces) - self.assertEqual(port_pairs.valid_networks, [("private_0", "public_0")]) + self.assertEqual(port_pairs.valid_networks, [("uplink_0", "downlink_0")]) def test_all_ports(self): vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -45,17 +45,17 @@ class TestPortPairs(unittest.TestCase): port_pairs = PortPairs(interfaces) self.assertEqual(set(port_pairs.all_ports), {"xe0", "xe1"}) - def test_priv_ports(self): + def test_uplink_ports(self): vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] interfaces = vnfd['vdu'][0]['external-interface'] port_pairs = PortPairs(interfaces) - self.assertEqual(port_pairs.priv_ports, ["xe0"]) + self.assertEqual(port_pairs.uplink_ports, ["xe0"]) - def test_pub_ports(self): + def test_downlink_ports(self): vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] interfaces = vnfd['vdu'][0]['external-interface'] port_pairs = PortPairs(interfaces) - self.assertEqual(port_pairs.pub_ports, ["xe1"]) + self.assertEqual(port_pairs.downlink_ports, ["xe1"]) class TestMultiPortConfig(unittest.TestCase): @@ -99,7 +99,7 @@ class TestMultiPortConfig(unittest.TestCase): 'ifname': 'xe0', 'local_iface_name': 'eth0', 'local_mac': '00:00:00:00:00:02', - 'vld_id': 'private_0', + 'vld_id': 'uplink_0', }, 'vnfd-connection-point-ref': 'xe0', 'name': 'xe0'}, @@ -117,7 +117,7 @@ class TestMultiPortConfig(unittest.TestCase): 'ifname': 'xe1', 'local_iface_name': 'eth1', 'local_mac': '00:00:00:00:00:01', - 'vld_id': 'public_0', + 'vld_id': 'downlink_0', }, 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1'} -- cgit 1.2.3-korg