Merge changes from topic 'manual_ci_test_cases'
[yardstick.git] / samples / vnf_samples / traffic_profiles / ipv4_throughput-scale-up.yaml
index b9e0c8c..d0be9f4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2018 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.
@@ -33,7 +33,7 @@
 # the profile defines a public and private side to make limited traffic correlation
 # between private and public side same way as it is made by IXIA solution.
 #
-{% set vports = get(extra_args, 'vports', '2') %}
+{% set vports = get(extra_args, 'vports', 2) %}
 ---
 schema: "nsb:traffic_profile:0.1"
 
@@ -46,11 +46,10 @@ traffic_profile:
   frame_rate: 100  # pc of linerate
   duration: {{ duration }}
 
-{% set count = 0 %}
-{% for vport in range(vports|int) %}
+{% for vport in range((vports / 2)|int) %}
 uplink_{{vport}}:
   ipv4:
-    id: {{count + 1 }}
+    id: {{ (vport * 2) + 1 }}
     outer_l2:
       framesize:
         64B: "{{ get(imix, 'imix.uplink.64B', '0') }}"
@@ -59,23 +58,24 @@ uplink_{{vport}}:
         373b: "{{ get(imix, 'imix.uplink.373B', '0') }}"
         512B: "{{ get(imix, 'imix.uplink.512B', '0') }}"
         570B: "{{ get(imix, 'imix.uplink.570B', '0') }}"
+        1024B: "{{get(imix, 'imix.uplink.1024B', '0') }}"
         1400B: "{{ get(imix, 'imix.uplink.1400B', '0') }}"
         1500B: "{{ get(imix, 'imix.uplink.1500B', '0') }}"
         1518B: "{{ get(imix, 'imix.uplink.1518B', '0') }}"
     outer_l3v4:
       proto: "udp"
-      srcip4: "{{ get(flow, 'flow.src_ip_{{vport}}', '1.1.1.1-1.1.255.255') }}"
-      dstip4: "{{ get(flow, 'flow.dst_ip_{{vport}}', '90.90.1.1-90.90.255.255') }}"
-      count: "{{ get(flow, 'flow.count', '1') }}"
+      srcip4: {{ get(flow, 'flow.src_ip_%s'| format(vport), '1.%s.1.1-1.%s.255.255'| format(vport, vport)) }}
+      dstip4: {{ get(flow, 'flow.dst_ip_%s'| format(vport), '90.%s.1.1-90.%s.255.255'| format(vport, vport)) }}
+      count: {{ get(flow, 'flow.count', '1') }}
       ttl: 32
       dscp: 0
     outer_l4:
-      srcport: "{{ get(flow, 'flow.src_port_{{vport}}', '1234-4321') }}"
-      dstport: "{{ get(flow, 'flow.dst_port_{{vport}}', '2001-4001') }}"
-      count: "{{ get(flow, 'flow.count', '1') }}"
+      srcport: {{ get(flow, 'flow.src_port_%s'| format(vport), '1234-4321') }}
+      dstport: {{ get(flow, 'flow.dst_port_%s'| format(vport), '2001-4001') }}
+      count: {{ get(flow, 'flow.count', '1') }}
 downlink_{{vport}}:
   ipv4:
-    id: {{count + 2}}
+    id: {{ (vport * 2) + 2}}
     outer_l2:
       framesize:
         64B: "{{ get(imix, 'imix.downlink.64B', '0') }}"
@@ -84,20 +84,20 @@ downlink_{{vport}}:
         373b: "{{ get(imix, 'imix.downlink.373B', '0') }}"
         512B: "{{ get(imix, 'imix.downlink.512B', '0') }}"
         570B: "{{ get(imix, 'imix.downlink.570B', '0') }}"
+        1024B: "{{get(imix, 'imix.downlink.1024B', '0') }}"
         1400B: "{{ get(imix, 'imix.downlink.1400B', '0') }}"
         1500B: "{{ get(imix, 'imix.downlink.1500B', '0') }}"
         1518B: "{{ get(imix, 'imix.downlink.1518B', '0') }}"
 
     outer_l3v4:
       proto: "udp"
-      srcip4: "{{ get(flow, 'flow.dst_ip_{{vport}}', '90.90.1.1-90.90.255.255') }}"
-      dstip4: "{{ get(flow, 'flow.src_ip_{{vport}}', '1.1.1.1-1.1.255.255') }}"
-      count: "{{ get(flow, 'flow.count', '1') }}"
+      srcip4: {{ get(flow, 'flow.dst_ip_%s'| format(vport), '90.%s.1.1-90.%s.255.255'| format(vport, vport)) }}
+      dstip4: {{ get(flow, 'flow.src_ip_%s'| format(vport), '1.%s.1.1-1.%s.255.255'| format(vport, vport)) }}
+      count: {{ get(flow, 'flow.count', '1') }}
       ttl: 32
       dscp: 0
     outer_l4:
-      srcport: "{{ get(flow, 'flow.dst_port_{{vport}}', '1234-4321') }}"
-      dstport: "{{ get(flow, 'flow.src_port_{{vport}}', '2001-4001') }}"
-      count: "{{ get(flow, 'flow.count', '1') }}"
-{% set count = count + 2 %}
-{% endfor %}
\ No newline at end of file
+      srcport: {{ get(flow, 'flow.dst_port_%s'| format(vport), '1234-4321') }}
+      dstport: {{ get(flow, 'flow.src_port_%s'| format(vport), '2001-4001') }}
+      count: {{ get(flow, 'flow.count', '1') }}
+{% endfor %}