IXIA: Add IP random range `seed` configuration option 85/60485/4
authorMyron Sosyak <myronx.sosyak@intel.com>
Thu, 2 Aug 2018 13:47:45 +0000 (14:47 +0100)
committerMyron Sosyak <myronx.sosyak@intel.com>
Fri, 3 Aug 2018 12:07:01 +0000 (13:07 +0100)
Added IP random range `seed` configuration option into IXIA
traffic profile.

JIRA: YARDSTICK-1364

Change-Id: Ic050b6cc48ea75ac6d0470bf7ec1b188649811e1
Signed-off-by: Sosyak, Myronx <myronx.sosyak@intel.com>
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_cgnapt.yaml
samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml
yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
yardstick/network_services/traffic_profile/ixia_rfc2544.py
yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py

index dcf66e0..5074914 100644 (file)
@@ -52,6 +52,7 @@ uplink_0:
             srcip4: "{{get(flow, 'flow.src_ip_0', '1.1.1.1-1.15.255.255') }}"
             dstip4: "{{get(flow, 'flow.dst_ip_0', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
@@ -84,6 +85,7 @@ downlink_0:
             dstip4: "{{get(flow, 'flow.public_ip_0', '90.90.1.1-90.105.255.255') }}"
             {% endif %}
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
@@ -113,6 +115,7 @@ uplink_1:
             srcip4: "{{get(flow, 'flow.src_ip_1', '1.1.1.1-1.15.255.255') }}"
             dstip4: "{{get(flow, 'flow.dst_ip_1', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
@@ -145,6 +148,7 @@ downlink_1:
             dstip4: "{{get(flow, 'flow.public_ip_1', '90.90.1.1-90.105.255.255') }}"
             {% endif %}
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
index 4c08858..3cbd7cd 100644 (file)
@@ -50,6 +50,7 @@ uplink_0:
             srcip4: "{{get(flow, 'flow.src_ip_0', '1.1.1.1-1.15.255.255') }}"
             dstip4: "{{get(flow, 'flow.dst_ip_0', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
@@ -77,6 +78,7 @@ downlink_0:
             srcip4: "{{get(flow, 'flow.dst_ip_0', '1.1.1.1-1.15.255.255') }}"
             dstip4: "{{get(flow, 'flow.public_ip_0', '10.0.2.1-10.0.2.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
@@ -104,6 +106,7 @@ uplink_1:
             srcip4: "{{get(flow, 'flow.src_ip_1', '1.1.1.1-1.15.255.255') }}"
             dstip4: "{{get(flow, 'flow.dst_ip_1', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
@@ -131,6 +134,7 @@ downlink_1:
             srcip4: "{{get(flow, 'flow.dst_ip_1', '1.1.1.1-1.15.255.255') }}"
             dstip4: "{{get(flow, 'flow.public_ip_1', '10.0.2.1-10.0.2.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
index 7c13e51..edff361 100644 (file)
@@ -72,6 +72,7 @@ uplink_0:
             srcip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}"
             dstip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 32
 
@@ -98,6 +99,7 @@ downlink_0:
             srcip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}"
             dstip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 32
 
@@ -134,6 +136,7 @@ uplink_1:
             srcip4: "{{get(flow, 'flow.srcip_1', '192.168.0.0-192.168.255.255') }}"
             dstip4: "{{get(flow, 'flow.dstip_1', '192.16.0.0-192.16.0.31') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 32
 
@@ -160,6 +163,7 @@ downlink_1:
             srcip4: "{{get(flow, 'flow.dst_ip_1', '192.16.0.0-192.16.0.31') }}"
             dstip4: "{{get(flow, 'flow.src_ip_1', '192.168.0.0-192.168.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
+            seed: "{{get(flow, 'flow.seed', '1') }}"
             ttl: 32
             dscp: 32
 
index 2729cf6..82f406d 100644 (file)
@@ -432,15 +432,16 @@ class IxNextgen(object):  # pragma: no cover
             count = traffic_param['outer_l3']['count']
             srcip = str(traffic_param['outer_l3']['srcip'])
             dstip = str(traffic_param['outer_l3']['dstip'])
+            seed = traffic_param['outer_l3']['seed']
             srcmask = traffic_param['outer_l3']['srcmask'] or IP_VERSION_4_MASK
             dstmask = traffic_param['outer_l3']['dstmask'] or IP_VERSION_4_MASK
 
             self._update_ipv4_address(
                 self._get_stack_item(fg_id, PROTO_IPV4)[0],
-                'srcIp', srcip, 1, srcmask, count)
+                'srcIp', srcip, seed, srcmask, count)
             self._update_ipv4_address(
                 self._get_stack_item(fg_id, PROTO_IPV4)[0],
-                'dstIp', dstip, 1, dstmask, count)
+                'dstIp', dstip, seed, dstmask, count)
 
     def update_l4(self, traffic):
         """Update the L4 headers
index 056f32a..2086273 100644 (file)
@@ -95,6 +95,7 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
                         'count': ip['count'],
                         'dscp': ip['dscp'],
                         'ttl': ip['ttl'],
+                        'seed': ip['seed'],
                         'srcip': srcip,
                         'dstip': dstip,
                         'srcmask': srcmask,
index 4d5276a..2416aee 100644 (file)
@@ -35,6 +35,7 @@ TRAFFIC_PARAMETERS = {
         },
         'outer_l3': {
             'count': 512,
+            'seed': 1,
             'dscp': 0,
             'proto': 'udp',
             'ttl': 32,
@@ -64,6 +65,7 @@ TRAFFIC_PARAMETERS = {
         },
         'outer_l3': {
             'count': 1024,
+            'seed': 1,
             'dscp': 0,
             'proto': 'udp',
             'ttl': 32,