summaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/helpers
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-12 09:57:38 -0700
committerEdward MacGillivray <edward.s.macgillivray@intel.com>2017-09-18 10:30:58 -0700
commitae0cdbea1100a09d0c46191dd7e5d8d5eec8d484 (patch)
tree0649b8b464c4c7379eed8e05976eaa7c836f990e /tests/unit/network_services/helpers
parent468aeaf9fe6a5cd0d350f566ed7b9216efc752b6 (diff)
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 <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Diffstat (limited to 'tests/unit/network_services/helpers')
-rw-r--r--tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml4
-rw-r--r--tests/unit/network_services/helpers/test_samplevnf_helper.py14
2 files changed, 9 insertions, 9 deletions
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'}