summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml10
-rw-r--r--samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml64
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_vnf_generic.py2
-rw-r--r--tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py36
-rw-r--r--yardstick/benchmark/scenarios/networking/vnf_generic.py2
-rw-r--r--yardstick/network_services/traffic_profile/ixia_rfc2544.py1
6 files changed, 71 insertions, 44 deletions
diff --git a/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml b/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml
index 7283b6377..0758cf3a8 100644
--- a/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml
+++ b/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml
@@ -49,11 +49,11 @@ private_1:
ipv4:
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.private.64B', '0') }}"
- 128B: "{{ get(imix, 'imix.private.128B', '0') }}"
- 256B: "{{ get(imix, 'imix.private.256B', '0') }}"
- 373b: "{{ get(imix, 'imix.private.373B', '0') }}"
- 512B: "{{ get(imix, 'imix.private.512B', '0') }}"
+ 64B: "{{get(imix, 'imix.private.64B', '0') }}"
+ 128B: "{{get(imix, 'imix.private.128B', '0') }}"
+ 256B: "{{get(imix, 'imix.private.256B', '0') }}"
+ 373B: "{{get(imix, 'imix.private.373B', '0') }}"
+ 512B: "{{get(imix, 'imix.private.512B', '0') }}"
570B: "{{get(imix, 'imix.private.570B', '0') }}"
1400B: "{{get(imix, 'imix.private.1400B', '0') }}"
1500B: "{{get(imix, 'imix.private.1500B', '0') }}"
diff --git a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
index d7531fcdb..c53b4fad4 100644
--- a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
+++ b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
@@ -35,13 +35,15 @@ private_1:
ipv4:
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}"
- 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}"
- 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}"
- 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}"
- 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}"
- 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}"
- 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}"
+ 64B: "{{get(imix, 'imix.private.64B', '0') }}"
+ 128B: "{{get(imix, 'imix.private.128B', '0') }}"
+ 256B: "{{get(imix, 'imix.private.256B', '0') }}"
+ 373b: "{{get(imix, 'imix.private.373B', '0') }}"
+ 512B: "{{get(imix, 'imix.private.512B', '0') }}"
+ 570B: "{{get(imix, 'imix.private.570B', '0') }}"
+ 1400B: "{{get(imix, 'imix.private.1400B', '0') }}"
+ 1500B: "{{get(imix, 'imix.private.1500B', '0') }}"
+ 1518B: "{{get(imix, 'imix.private.1518B', '0') }}"
outer_l3v4:
proto: "udp"
@@ -58,13 +60,15 @@ public_1:
ipv4:
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}"
- 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}"
- 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}"
- 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}"
- 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}"
- 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}"
- 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}"
+ 64B: "{{get(imix, 'imix.public.64B', '0') }}"
+ 128B: "{{get(imix, 'imix.public.128B', '0') }}"
+ 256B: "{{get(imix, 'imix.public.256B', '0') }}"
+ 373b: "{{get(imix, 'imix.public.373B', '0') }}"
+ 512B: "{{get(imix, 'imix.public.512B', '0') }}"
+ 570B: "{{get(imix, 'imix.public.570B', '0') }}"
+ 1400B: "{{get(imix, 'imix.public.1400B', '0') }}"
+ 1500B: "{{get(imix, 'imix.public.1500B', '0') }}"
+ 1518B: "{{get(imix, 'imix.public.1518B', '0') }}"
outer_l3v4:
proto: "udp"
@@ -81,13 +85,15 @@ private_2:
ipv4:
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}"
- 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}"
- 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}"
- 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}"
- 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}"
- 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}"
- 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}"
+ 64B: "{{get(imix, 'imix.private.64B', '0') }}"
+ 128B: "{{get(imix, 'imix.private.128B', '0') }}"
+ 256B: "{{get(imix, 'imix.private.256B', '0') }}"
+ 373b: "{{get(imix, 'imix.private.373B', '0') }}"
+ 512B: "{{get(imix, 'imix.private.512B', '0') }}"
+ 570B: "{{get(imix, 'imix.private.570B', '0') }}"
+ 1400B: "{{get(imix, 'imix.private.1400B', '0') }}"
+ 1500B: "{{get(imix, 'imix.private.1500B', '0') }}"
+ 1518B: "{{get(imix, 'imix.private.1518B', '0') }}"
outer_l3v4:
proto: "udp"
@@ -104,13 +110,15 @@ public_2:
ipv4:
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}"
- 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}"
- 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}"
- 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}"
- 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}"
- 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}"
- 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}"
+ 64B: "{{get(imix, 'imix.public.64B', '0') }}"
+ 128B: "{{get(imix, 'imix.public.128B', '0') }}"
+ 256B: "{{get(imix, 'imix.public.256B', '0') }}"
+ 373b: "{{get(imix, 'imix.public.373B', '0') }}"
+ 512B: "{{get(imix, 'imix.public.512B', '0') }}"
+ 570B: "{{get(imix, 'imix.public.570B', '0') }}"
+ 1400B: "{{get(imix, 'imix.public.1400B', '0') }}"
+ 1500B: "{{get(imix, 'imix.public.1500B', '0') }}"
+ 1518B: "{{get(imix, 'imix.public.1518B', '0') }}"
outer_l3v4:
proto: "udp"
diff --git a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index fe7b6a57f..58244b8f5 100644
--- a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -387,7 +387,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
result = {'flow': {'dst_ip0': '152.16.40.2-152.16.40.254',
'src_ip0': '152.16.100.2-152.16.100.254'}}
- self.assertEqual(result, self.s._get_traffic_flow())
+ self.assertEqual({'flow': {}}, self.s._get_traffic_flow())
def test___get_traffic_flow_error(self):
self.scenario_cfg["traffic_options"]["flow"] = \
diff --git a/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
index b2cb9dfea..cd0aacba6 100644
--- a/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
+++ b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
@@ -56,7 +56,7 @@ class TestIXIARFC2544Profile(unittest.TestCase):
'256B': '0', '373b': '0',
'570B': '0'}},
'outer_l3v4': {'dstip4': '1.1.1.1-1.15.255.255',
- 'proto': 'udp',
+ 'proto': 'udp', 'count': '1',
'srcip4': '90.90.1.1-90.105.255.255',
'dscp': 0, 'ttl': 32},
'outer_l4': {'srcport': '2001',
@@ -68,7 +68,7 @@ class TestIXIARFC2544Profile(unittest.TestCase):
'256B': '0', '373b': '0',
'570B': '0'}},
'outer_l3v4': {'dstip4': '9.9.1.1-90.105.255.255',
- 'proto': 'udp',
+ 'proto': 'udp', 'count': '1',
'srcip4': '1.1.1.1-1.15.255.255',
'dscp': 0, 'ttl': 32},
'outer_l4': {'dstport': '2001',
@@ -211,7 +211,8 @@ class TestIXIARFC2544Profile(unittest.TestCase):
"dstip4": "152.16.40.20",
"proto": "udp",
"srcip4": "152.16.100.20",
- "ttl": 32
+ "ttl": 32,
+ "count": "1"
},
"outer_l3v6": {
"count": 1024,
@@ -219,11 +220,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
"dstip4": "152.16.100.20",
"proto": "udp",
"srcip4": "152.16.40.20",
- "ttl": 32
+ "ttl": 32,
+ "count": "1"
},
"outer_l4": {
"dstport": "2001",
- "srcport": "1234"
+ "srcport": "1234",
+ "count": "1"
},
"traffic_type": "continuous"
},
@@ -252,7 +255,8 @@ class TestIXIARFC2544Profile(unittest.TestCase):
"dstip4": "152.16.100.20",
"proto": "udp",
"srcip4": "152.16.40.20",
- "ttl": 32
+ "ttl": 32,
+ "count": "1"
},
"outer_l3v6": {
"count": 1024,
@@ -260,11 +264,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
"dstip4": "152.16.100.20",
"proto": "udp",
"srcip4": "152.16.40.20",
- "ttl": 32
+ "ttl": 32,
+ "count": "1"
},
"outer_l4": {
"dstport": "1234",
- "srcport": "2001"
+ "srcport": "2001",
+ "count": "1"
},
"traffic_type": "continuous"
}
@@ -395,8 +401,12 @@ class TestIXIARFC2544Profile(unittest.TestCase):
'128B': '0', '1400B': '0',
'256B': '0', '373b': '0',
'570B': '0'}},
+ 'outer_l3v4': {'dstip4': '1.1.1.1-1.15.255.255',
+ 'proto': 'udp', 'count': '1',
+ 'srcip4': '90.90.1.1-90.105.255.255',
+ 'dscp': 0, 'ttl': 32},
'outer_l3v6': {'dstip6': '1.1.1.1-1.15.255.255',
- 'proto': 'udp',
+ 'proto': 'udp', 'count': '1',
'srcip6': '90.90.1.1-90.105.255.255',
'dscp': 0, 'ttl': 32},
'outer_l4': {'srcport': '2001',
@@ -407,11 +417,17 @@ class TestIXIARFC2544Profile(unittest.TestCase):
'128B': '0', '1400B': '0',
'256B': '0', '373b': '0',
'570B': '0'}},
+ 'outer_l3v4':
+ {'dstip4': '9.9.1.1-90.105.255.255',
+ 'proto': 'udp', 'count': '1',
+ 'srcip4': '1.1.1.1-1.15.255.255',
+ 'dscp': 0, 'ttl': 32},
'outer_l3v6':
{'dstip6': '9.9.1.1-90.105.255.255',
- 'proto': 'udp',
+ 'proto': 'udp', 'count': '1',
'srcip6': '1.1.1.1-1.15.255.255',
'dscp': 0, 'ttl': 32},
+
'outer_l4': {'dstport': '2001',
'srcport': '1234'}}},
'schema': 'isb:traffic_profile:0.1'}
diff --git a/yardstick/benchmark/scenarios/networking/vnf_generic.py b/yardstick/benchmark/scenarios/networking/vnf_generic.py
index aaf850c1d..f7b2915a2 100644
--- a/yardstick/benchmark/scenarios/networking/vnf_generic.py
+++ b/yardstick/benchmark/scenarios/networking/vnf_generic.py
@@ -177,6 +177,8 @@ class NetworkServiceTestCase(base.Scenario):
for index, publicip in enumerate(fflow.get("publicip", [])):
flow["public_ip{}".format(index)] = publicip
+
+ flow["count"] = fflow["count"]
except KeyError:
flow = {}
return {"flow": flow}
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
index ba532b820..36a464e2f 100644
--- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py
+++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
@@ -61,6 +61,7 @@ class IXIARFC2544Profile(TrexProfile):
traffic['outer_l3']['dstip4'] = dstip4.split("-")[0]
traffic['outer_l3']['type'] = key
+ traffic['outer_l3']['count'] = value['outer_l3v4']['count']
# outer_l4
traffic['outer_l4'] = value['outer_l4']
index = index + 1