aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
authorOrest Voznyy <orestx.voznyy@intel.com>2019-01-09 10:30:44 +0200
committerOrest Voznyy <orestx.voznyy@intel.com>2019-02-21 11:19:39 +0200
commitd1f84fa084f1c7d9bede5c31596f4bbe8636fd1b (patch)
tree26509e8d4e862a58605eb83b01e5ff252eb69b70 /yardstick
parentda9f1c865045ffc418646d33bc3d95376e5ef019 (diff)
Unify TG and VNF names in infrastructure files
Update naming in related files, i.e. pod, docs, docstrings. Rename TGs and VNFs to follow a single naming convention, for all VNFs: name: trafficgen_0 role: tg__0 name: vnf_0 role: vnf__0 JIRA: YARDSTICK-1578 Change-Id: I7596b915939f242349a99721b6088ae738dd277f Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com>
Diffstat (limited to 'yardstick')
-rw-r--r--yardstick/benchmark/core/task.py2
-rw-r--r--yardstick/network_services/vnf_generic/vnf/sample_vnf.py4
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py46
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml22
-rw-r--r--yardstick/tests/unit/network_services/vnf_generic/vnf/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml6
5 files changed, 40 insertions, 40 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index 477dbcc57..afd805f94 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -621,7 +621,7 @@ class TaskParser(object): # pragma: no cover
scenario:
nodes:
- tg__0: tg_0.yardstick
+ tg__0: trafficgen_0.yardstick
vnf__0: vnf_0.yardstick
NOTE: in Kubernetes context, the separator character between the server
diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
index 2a477bb8d..a369a3ae6 100644
--- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
@@ -719,8 +719,8 @@ class SampleVNF(GenericVNF):
scenarios:
- type: NSPerf
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: trafficgen_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
collectd:
<options> # COLLECTD priority 3
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index ff8ce5796..ecc9e1249 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -159,7 +159,7 @@ TRAFFIC_PROFILE = {
class TestNetworkServiceTestCase(unittest.TestCase):
def setUp(self):
- self.tg__1 = {
+ self.tg__0 = {
'name': 'trafficgen_1.yardstick',
'ip': '10.10.10.11',
'role': 'TrafficGen',
@@ -185,7 +185,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
},
}
- self.vnf__1 = {
+ self.vnf__0 = {
'name': 'vnf.yardstick',
'ip': '10.10.10.12',
'host': '10.223.197.164',
@@ -242,8 +242,8 @@ class TestNetworkServiceTestCase(unittest.TestCase):
self.context_cfg = {
'nodes': {
- 'tg__1': self.tg__1,
- 'vnf__1': self.vnf__1,
+ 'tg__0': self.tg__0,
+ 'vnf__0': self.vnf__0,
},
'networks': {
GenericVNF.UPLINK: {
@@ -270,7 +270,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
],
'type': 'ELAN',
'id': GenericVNF.UPLINK,
- 'name': 'tg__1 to vnf__1 link 1'
+ 'name': 'tg__0 to vnf__0 link 1'
}
self.vld1 = {
@@ -288,7 +288,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
],
'type': 'ELAN',
'id': GenericVNF.DOWNLINK,
- 'name': 'vnf__1 to tg__1 link 2'
+ 'name': 'vnf__0 to tg__0 link 2'
}
self.topology = {
@@ -300,12 +300,12 @@ class TestNetworkServiceTestCase(unittest.TestCase):
{
'member-vnf-index': '1',
'VNF model': 'tg_trex_tpl.yaml',
- 'vnfd-id-ref': 'tg__1',
+ 'vnfd-id-ref': 'tg__0',
},
{
'member-vnf-index': '2',
'VNF model': 'tg_trex_tpl.yaml',
- 'vnfd-id-ref': 'vnf__1',
+ 'vnfd-id-ref': 'vnf__0',
},
],
'vld': [self.vld0, self.vld1],
@@ -343,8 +343,8 @@ class TestNetworkServiceTestCase(unittest.TestCase):
},
'nodes': {
'tg__2': 'trafficgen_2.yardstick',
- 'tg__1': 'trafficgen_1.yardstick',
- 'vnf__1': 'vnf.yardstick',
+ 'tg__0': 'trafficgen_1.yardstick',
+ 'vnf__0': 'vnf.yardstick',
},
}
@@ -411,12 +411,12 @@ class TestNetworkServiceTestCase(unittest.TestCase):
'flow': {
'src_ip': [
{
- 'tg__1': 'xe0',
+ 'tg__0': 'xe0',
},
],
'dst_ip': [
{
- 'tg__1': 'xe1',
+ 'tg__0': 'xe1',
},
],
'public_ip': ['1.1.1.1'],
@@ -446,9 +446,9 @@ class TestNetworkServiceTestCase(unittest.TestCase):
self.assertIn('found in', exc_str)
def test_load_vnf_models_invalid(self):
- self.context_cfg["nodes"]['tg__1']['VNF model'] = \
+ self.context_cfg["nodes"]['tg__0']['VNF model'] = \
self._get_file_abspath("tg_trex_tpl.yaml")
- self.context_cfg["nodes"]['vnf__1']['VNF model'] = \
+ self.context_cfg["nodes"]['vnf__0']['VNF model'] = \
self._get_file_abspath("tg_trex_tpl.yaml")
vnf = mock.Mock(autospec=GenericVNF)
@@ -469,13 +469,13 @@ class TestNetworkServiceTestCase(unittest.TestCase):
nodes = self.context_cfg["nodes"]
self.assertEqual('../../vnf_descriptors/tg_rfc2544_tpl.yaml',
- nodes['tg__1']['VNF model'])
+ nodes['tg__0']['VNF model'])
self.assertEqual('../../vnf_descriptors/vpe_vnf.yaml',
- nodes['vnf__1']['VNF model'])
+ nodes['vnf__0']['VNF model'])
def test_map_topology_to_infrastructure_insufficient_nodes(self):
cfg = deepcopy(self.context_cfg)
- del cfg['nodes']['vnf__1']
+ del cfg['nodes']['vnf__0']
cfg_patch = mock.patch.object(self.s, 'context_cfg', cfg)
with cfg_patch:
@@ -489,10 +489,10 @@ class TestNetworkServiceTestCase(unittest.TestCase):
cfg = deepcopy(self.s.context_cfg)
# delete all, we don't know which will come first
- del cfg['nodes']['vnf__1']['interfaces']['xe0']['local_mac']
- del cfg['nodes']['vnf__1']['interfaces']['xe1']['local_mac']
- del cfg['nodes']['tg__1']['interfaces']['xe0']['local_mac']
- del cfg['nodes']['tg__1']['interfaces']['xe1']['local_mac']
+ del cfg['nodes']['vnf__0']['interfaces']['xe0']['local_mac']
+ del cfg['nodes']['vnf__0']['interfaces']['xe1']['local_mac']
+ del cfg['nodes']['tg__0']['interfaces']['xe0']['local_mac']
+ del cfg['nodes']['tg__0']['interfaces']['xe1']['local_mac']
config_patch = mock.patch.object(self.s, 'context_cfg', cfg)
with config_patch:
@@ -507,7 +507,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
ssh.from_node.return_value = ssh_mock
# purge an important key from the data structure
- for interface in self.tg__1['interfaces'].values():
+ for interface in self.tg__0['interfaces'].values():
del interface['local_mac']
with self.assertRaises(exceptions.IncorrectConfig) as raised:
@@ -516,7 +516,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
self.assertIn('not found', str(raised.exception))
# restore local_mac
- for index, interface in enumerate(self.tg__1['interfaces'].values()):
+ for index, interface in enumerate(self.tg__0['interfaces'].values()):
interface['local_mac'] = '00:00:00:00:00:{:2x}'.format(index)
# make a connection point ref with 3 points
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml b/yardstick/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml
index 1ac6c1f89..aaf84bb5e 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017 Intel Corporation
+# Copyright (c) 2016-2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -20,31 +20,31 @@ nsd:nsd-catalog:
description: scenario with VPE,L3fwd and VNF
constituent-vnfd:
- member-vnf-index: '1'
- vnfd-id-ref: tg__1
- VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #tg_vpe_upstream.yaml #VPE VNF
+ vnfd-id-ref: tg__0
+ VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #tg_trex_tpl.yaml #TREX
- member-vnf-index: '2'
- vnfd-id-ref: vnf__1
- VNF model: ../../vnf_descriptors/vpe_vnf.yaml #tg_l3fwd.yaml #tg_trex_tpl.yaml #TREX
+ vnfd-id-ref: vnf__0
+ VNF model: ../../vnf_descriptors/vpe_vnf.yaml #VPE VNF
vld:
- id: uplink
- name: tg__1 to vnf__1 link 1
+ name: tg__0 to vnf__0 link 1
type: ELAN
vnfd-connection-point-ref:
- member-vnf-index-ref: '1'
vnfd-connection-point-ref: xe0
- vnfd-id-ref: tg__1 #TREX
+ vnfd-id-ref: tg__0
- member-vnf-index-ref: '2'
vnfd-connection-point-ref: xe0
- vnfd-id-ref: vnf__1 #VNF
+ vnfd-id-ref: vnf__0
- id: downlink
- name: vnf__1 to tg__1 link 2
+ name: vnf__0 to tg__0 link 2
type: ELAN
vnfd-connection-point-ref:
- member-vnf-index-ref: '2'
vnfd-connection-point-ref: xe1
- vnfd-id-ref: vnf__1 #L3fwd
+ vnfd-id-ref: vnf__0
- member-vnf-index-ref: '1'
vnfd-connection-point-ref: xe1
- vnfd-id-ref: tg__1 #VPE VNF
+ vnfd-id-ref: tg__0
diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml b/yardstick/tests/unit/network_services/vnf_generic/vnf/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
index fb1be35c1..09c22ad9e 100644
--- a/yardstick/tests/unit/network_services/vnf_generic/vnf/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
+++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017 Intel Corporation
+# Copyright (c) 2016-2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@ scenarios:
traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml"
topology: vpe_vnf_topology.yaml
nodes:
- tg__1: trafficgen_1.yardstick
- vnf__1: vnf.yardstick
+ tg__0: trafficgen_0.yardstick
+ vnf__0: vnf_0.yardstick
tc_options:
rfc2544:
allowed_drop_rate: 0.8 - 1