Re-define the framesize and flow dynamic define in testcase 37/39337/14
authorDeepak S <deepak.s@linux.intel.com>
Mon, 14 Aug 2017 02:15:55 +0000 (19:15 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Tue, 22 Aug 2017 02:36:41 +0000 (19:36 -0700)
This patch adds the framesize and flow into test option instead of
adding a seperate file to avoid the multiple file update incase of ip
change.

Change-Id: Ic473c73773ad36422ecc02618b8c646a5336b70a
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
46 files changed:
samples/vnf_samples/nsut/acl/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_packetsize.yaml [deleted file]
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.yaml
samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml
samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml
samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml
samples/vnf_samples/nsut/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml
samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml
samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml
samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml
samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.yaml
samples/vnf_samples/nsut/udp_replay/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml
samples/vnf_samples/nsut/vfw/acl_1rule.yaml
samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml
samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml
samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml
samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml
samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml
samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml
samples/vnf_samples/traffic_profiles/imix_storage.yaml [deleted file]
samples/vnf_samples/traffic_profiles/imix_video.yaml [deleted file]
samples/vnf_samples/traffic_profiles/imix_voice.yaml [deleted file]
samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml [deleted file]
samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets_vpe.yaml [deleted file]
samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml
samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml
samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml
samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml
tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
tests/unit/network_services/traffic_profile/test_rfc2544.py
tests/unit/network_services/traffic_profile/test_traffic_profile.py
yardstick/benchmark/scenarios/networking/vnf_generic.py
yardstick/network_services/traffic_profile/traffic_profile.py

index cf2dbfc..85ed245 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     vnf__1:
       rules: acl_1rule.yaml
index 477bd8f..1b33773 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets.yaml"
-    imix: "../../traffic_profiles/imix_voice.yaml"
   ixia_profile: ../../traffic_profiles/acl/acl_ipv4_profile_1flows.ixncfg
 context:
   type: Node
index 6957681..9a16466 100644 (file)
@@ -21,20 +21,24 @@ scenarios:
   nodes:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
-  tc_options:
+  options:
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
+    traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
-  vnf_options:
-    acl:
+    vnf__1:
       rules: acl_1rule.yaml
-      cfg: acl_config
+      vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1}
   runner:
-    type: Duration
-    duration: 400
+    type: Iteration
+    iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index 8d7fe3c..95fad73 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index 6b21ba5..397f352 100644 (file)
@@ -23,7 +23,13 @@ scenarios:
     vnf__1: vnf.yardstick
     tg__2: trafficgen_2.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -35,9 +41,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index df7a909..1fa0b5b 100644 (file)
@@ -23,7 +23,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -34,9 +40,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 {% endfor %}
 context:
   type: Node
diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_packetsize.yaml
deleted file mode 100644 (file)
index 96b3f68..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (c) 2016 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the License);
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an AS IS BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
----
-schema: yardstick:task:0.1
-scenarios:
-- type: NSPerf
-  traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml
-  topology: acl-tg-topology.yaml
-  nodes:
-    tg__1: trafficgen_1.yardstick
-    vnf__1: vnf.yardstick
-  tc_options:
-    rfc2544:
-      allowed_drop_rate: 0.0001 - 0.0001
-  vnf_options:
-    acl:
-      rules: acl_worstcaserules.yaml
-      cfg: acl_config
-  runner:
-    type: Duration
-    duration: 400
-    interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
-context:
-  type: Node
-  name: yardstick
-  nfvi_type: baremetal
-  file: /etc/yardstick/nodes/pod.yaml
index 8d7fe3c..95fad73 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index ab688a2..3ba22ff 100644 (file)
@@ -21,23 +21,24 @@ scenarios:
   nodes:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
-  tc_options:
+  options:
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
+    traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
-    latency: true
-  vnf_options:
-    acl:
+    vnf__1:
       rules: acl_1rule.yaml
-      cfg: acl_config
-  options:
-    packetsize: 64
+      vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1}
   runner:
     type: Iteration
     iterations: 28
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index 10eba4c..355b671 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   # put node context first, so we don't HEAT deploy if node has errors
   name: yardstick
index 3344a1d..5e8b039 100644 (file)
@@ -21,20 +21,24 @@ scenarios:
   nodes:
     tg__1: trafficgen_1.baremetal
     vnf__1: vnf.yardstick
-  tc_options:
+  options:
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
+    traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
-  vnf_options:
-    acl:
+    vnf__1:
       rules: acl_1rule.yaml
-      cfg: acl_config
+      vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1}
   runner:
-    type: Duration
-    duration: 400
+    type: Iteration
+    iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 contexts:
   # put node context first, so we don't HEAT deploy if node has errors
   - name: baremetal
index 7e9a589..fc1c3e9 100644 (file)
@@ -22,7 +22,9 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
index 5203e8d..6160ca0 100644 (file)
@@ -22,7 +22,14 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      publicip: ["152.16.40.10"]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -32,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets.yaml"
-    imix: "../../traffic_profiles/imix_voice.yaml"
   ixia_profile: ../../traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows.ixncfg
 context:
   type: Node
index feeacf5..15365b0 100644 (file)
@@ -22,7 +22,14 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      publicip: ["152.16.40.10"]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -32,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index b5548d5..c1f5f21 100644 (file)
@@ -23,7 +23,13 @@ scenarios:
     vnf__1: vnf.yardstick
     tg__2: trafficgen_2.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__2': 'xe0'}
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -35,9 +41,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index 7d746f0..1bf7df8 100644 (file)
@@ -23,7 +23,14 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      publicip: ["152.16.40.10"]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +40,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 {% endfor %}
 context:
   type: Node
index 16d0d08..e8cac4a 100644 (file)
@@ -22,7 +22,14 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      publicip: ["152.16.40.10"]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +40,6 @@ scenarios:
     type: Iteration
     iterations: 28
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index a2b73b6..e80e1fb 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -30,9 +36,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index b184a29..6753645 100644 (file)
@@ -20,7 +20,7 @@ access-list1:
           match-counter: 0
         actions: drop,count
         matches:
-          destination-ipv4-network: 152.16.40.20/24
+          destination-ipv4-network: 152.16.0.0/24
           destination-port-range:
             lower-port: 0
             upper-port: 65535
@@ -38,7 +38,7 @@ access-list1:
           destination-port-range:
             lower-port: 0
             upper-port: 65535
-          source-ipv4-network: 152.16.100.20/24
+          source-ipv4-network: 152.16.0.0/24
           source-port-range:
             lower-port: 0
             upper-port: 65535
index d4a4bb7..e0bd82a 100644 (file)
@@ -22,7 +22,9 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
index 71a803d..e07f5f9 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets.yaml"
-    imix: "../../traffic_profiles/imix_voice.yaml"
   ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows.ixncfg
 context:
   type: Node
index 3a17aba..53d4d3d 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index a92a91e..562575b 100644 (file)
@@ -21,8 +21,15 @@ scenarios:
   nodes:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
+    tg__2: trafficgen_2.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__2': 'xe0'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -34,11 +41,8 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
   nfvi_type: baremetal
-  file: /etc/yardstick/nodes/pod.yaml
+  file: /etc/yardstick/nodes/pod_3node.yaml
index ab2791c..db86221 100644 (file)
@@ -23,7 +23,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -34,9 +40,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 {% endfor %}
 context:
   type: Node
index 1e63300..a138145 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -34,9 +40,6 @@ scenarios:
     type: Iteration
     iterations: 28
     interval: 35
-  traffic_options:
-    flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml
-    imix: ../../traffic_profiles/imix_voice.yaml
 context:
   type: Node
   name: yardstick
index 7b25139..16996cb 100644 (file)
@@ -22,16 +22,19 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     vnf__1:
       cfg: vpe_config
   runner:
     type: Duration
     duration: 4
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
-    imix: "../../traffic_profiles/imix_voice.yaml"
   ixia_profile: ../../traffic_profiles/vpe/HTTP-vPE_IPv4_2Ports.rxf # Need vlan update
 context:
   type: Node
index 4652a62..02346d2 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {1518B: 100}
+      public: {1518B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -32,9 +38,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
-    imix: "../../traffic_profiles/imix_storage.yaml"
 context:
   type: Node
   name: yardstick
index bd64a45..a50ba38 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -32,9 +38,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
-    imix: "../../traffic_profiles/imix_voice.yaml"
 context:
   type: Node
   name: yardstick
index 0257886..e0a7493 100644 (file)
@@ -22,7 +22,13 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -32,9 +38,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
-    imix: "../../traffic_profiles/imix_voice.yaml"
   ixia_profile: ../../traffic_profiles/vpe/vpe_ipv4_profile_1flows.ixncfg
 context:
   type: Node
index 2c48d0e..57c5128 100644 (file)
@@ -21,8 +21,15 @@ scenarios:
   nodes:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
+    tg__2: trafficgen_2.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 100}
+      public: {64B: 100}
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__2': 'xe0'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -33,9 +40,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
-    imix: "../../traffic_profiles/imix_voice.yaml"
 context:
   type: Node
   name: yardstick
index 674fa95..6b78574 100644 (file)
@@ -22,7 +22,14 @@ scenarios:
     tg__1: trafficgen_1.yardstick
     vnf__1: vnf.yardstick
   options:
-    packetsize: 64
+    framesize:
+      private: {64B: 5, 128B: 11, 256B: 16, 373B: 10, 570B: 35, 1400B: 10, 1500B: 13}
+      public: {64B: 5, 128B: 3, 256B: 4, 373B: 6, 570B: 8, 1400B: 36, 1500B: 38}
+
+    flow:
+      src_ip: [{'tg__1': 'xe0'}]
+      dst_ip: [{'tg__1': 'xe1'}]
+      count: 1
     traffic_type: 4
     rfc2544:
       allowed_drop_rate: 0.0001 - 0.0001
@@ -32,9 +39,6 @@ scenarios:
     type: Iteration
     iterations: 10
     interval: 35
-  traffic_options:
-    flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
-    imix: "../../traffic_profiles/imix_video.yaml"
 context:
   type: Node
   name: yardstick
diff --git a/samples/vnf_samples/traffic_profiles/imix_storage.yaml b/samples/vnf_samples/traffic_profiles/imix_storage.yaml
deleted file mode 100644 (file)
index 8fd10ec..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2016-2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#imix definition for storage traffic
-#
-# it is a typical case for testing the synthetic VNF performance.
-#
-#percentage of the packets can be less than 100%
-#the traffic in downstream and upstream direction could be different
-
-schema: "nsb:imix:0.1"
-
-imix:
-  private:
-    imix_small: 0    #ipv4 case - 72B should be 0 ipv6 case - 84B
-    imix_128B: 0
-    imix_256B: 0
-    imix_373B: 0
-    imix_570B: 0
-    imix_1400B: 0
-    imix_1500B: 100
-
-  public:
-    imix_small: 0    #ipv4 case - 72B ipv6 - 84B
-    imix_128B: 0
-    imix_256B: 0
-    imix_373B: 0
-    imix_570B: 0
-    imix_1400B: 0
-    imix_1500B: 100
diff --git a/samples/vnf_samples/traffic_profiles/imix_video.yaml b/samples/vnf_samples/traffic_profiles/imix_video.yaml
deleted file mode 100644 (file)
index 36324bf..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (c) 2016-2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#imix definition for video traffic
-#
-# this is a real traffic profile when video/data traffic only is present
-#
-#percentage of the packets can be less than 100%
-#the traffic in downstream and upstream direction could be different
-#
-#small means ipv4 case - 72B should be 0, ipv6 case - 84B
-
-schema: "nsb:imix:0.1"
-
-imix:
-  private:
-    imix_small: 5    #ipv4 case - 72B should be 0 ipv6 case - 84B
-    imix_128B: 11
-    imix_256B: 16
-    imix_373B: 10
-    imix_570B: 35
-    imix_1400B: 10
-    imix_1500B: 13
-
-  public:
-    imix_small: 5    #ipv4 case - 72B ipv6 - 84B
-    imix_128B: 3
-    imix_256B: 4
-    imix_373B: 6
-    imix_570B: 8
-    imix_1400B: 36
-    imix_1500B: 38
diff --git a/samples/vnf_samples/traffic_profiles/imix_voice.yaml b/samples/vnf_samples/traffic_profiles/imix_voice.yaml
deleted file mode 100644 (file)
index b8f8e53..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2016-2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#imix definition for voice traffic
-#
-# it is a typical case for testing the synthetic VNF performance.
-#
-#percentage of the packets can be less than 100%
-#the traffic in downstream and upstream direction could be different
-
-schema: "nsb:imix:0.1"
-
-imix:
-  private:
-    imix_small: 100    #ipv4 case - 72B should be 0 ipv6 case - 84B
-    imix_128B: 0
-    imix_256B: 0
-    imix_373B: 0
-    imix_570B: 0
-    imix_1400B: 0
-    imix_1500B: 0
-
-  public:
-    imix_small: 100    #ipv4 case - 72B ipv6 - 84B
-    imix_128B: 0
-    imix_256B: 0
-    imix_373B: 0
-    imix_570B: 0
-    imix_1400B: 0
-    imix_1500B: 0
diff --git a/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml b/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml
deleted file mode 100644 (file)
index e713ea8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2016-2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-flow:
-    srcip4_range: '152.16.100.20'
-    dstip4_range: '152.40.40.20'
-    count: 1
diff --git a/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets_vpe.yaml b/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets_vpe.yaml
deleted file mode 100644 (file)
index 8bb913e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2016-2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-flow:
-    srcip4_range_1: '152.16.0.20'
-    dstip4_range_1: '152.40.0.20'
-    srcip4_range_2: '172.16.0.20'
-    dstip4_range_2: '172.40.0.20'
-    count: 1
index 2854826..98624b1 100644 (file)
@@ -49,41 +49,49 @@ 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"
-            srcip4: "{{get(flow, 'flow.srcip4_range', '1.1.1.1-1.1.255.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range', '90.90.1.1-90.90.255.255') }}"
+            srcip4: "{{get(flow, 'flow.src_ip0', '1.1.1.1-1.1.255.255') }}"
+            dstip4: "{{get(flow, 'flow.dst_ip0', '90.90.1.1-90.90.255.255') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.src_port0', '1234-4321') }}"
+            dstport: "{{get(flow, 'flow.dst_port0', '2001-4001') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
 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"
-            srcip4: "{{get(flow, 'flow.dstip4_range', '90.90.1.1-90.90.255.255') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range', '1.1.1.1-1.1.255.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip0', '90.90.1.1-90.90.255.255') }}"
+            dstip4: "{{get(flow, 'flow.src_ip0', '1.1.1.1-1.1.255.255') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.dstport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.srcport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.dst_port0', '1234-4321') }}"
+            dstport: "{{get(flow, 'flow.src_port0', '2001-4001') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
index 2ea8d3c..7283b63 100644 (file)
@@ -49,41 +49,49 @@ 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"
-            srcip4: "{{get(flow, 'flow.srcip4_range', '10.0.2.1-10.0.2.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range', '10.0.3.1-10.0.3.255') }}"
+            srcip4: "{{get(flow, 'flow.src_ip0', '10.0.2.1-10.0.2.255') }}"
+            dstip4: "{{get(flow, 'flow.dst_ip0', '10.0.3.1-10.0.3.255') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.src_port0', '1234-4321') }}"
+            dstport: "{{get(flow, 'flow.dst_port0', '2001-4001') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
 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"
-            srcip4: "{{get(flow, 'flow.dstip4_range', '10.0.3.1-10.0.3.255') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range', '10.0.2.1-10.0.2.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip0', '10.0.3.1-10.0.3.255') }}"
+            dstip4: "{{get(flow, 'flow.public_ip0', '10.0.2.1-10.0.2.255') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.dstport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.srcport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.dst_port0', '1234-4321') }}"
+            dstport: "{{get(flow, 'flow.src_port0', '2001-4001') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
index e935bdb..233457e 100644 (file)
@@ -49,13 +49,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') }}"
 
             QinQ:
                 S-VLAN:
@@ -69,14 +71,14 @@ private_1:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.srcip4_range_1', '192.168.0.0-192.168.255.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range_1', '192.16.0.0-192.16.0.31') }}"
+            srcip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}"
+            dstip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.src_port0', '0') }}"
+            dstport: "{{get(flow, 'flow.dst_port0', '0') }}"
 public_1:
       ipv4:
         outer_l2:
@@ -91,25 +93,27 @@ public_1:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.dstip4_range_1', '192.16.0.0-192.16.0.31') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range_1', '192.168.0.0-192.168.255.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}"
+            dstip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.dstport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.srcport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.dst_port0', '0') }}"
+            dstport: "{{get(flow, 'flow.src_port0', '0') }}"
 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.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') }}"
 
             QinQ:
                 S-VLAN:
@@ -123,14 +127,14 @@ private_2:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.srcip4_range_2', '192.168.0.0-192.168.255.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range_2', '192.16.0.0-192.16.0.31') }}"
+            srcip4: "{{get(flow, 'flow.src_ip1', '192.168.0.0-192.168.255.255') }}"
+            dstip4: "{{get(flow, 'flow.dst_ip1', '192.16.0.0-192.16.0.31') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.src_port1', '0') }}"
+            dstport: "{{get(flow, 'flow.dst_port1', '0') }}"
 public_2:
       ipv4:
         outer_l2:
@@ -145,11 +149,11 @@ public_2:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.dstip4_range_2', '192.16.0.0-192.16.0.31') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range_2', '192.168.0.0-192.168.255.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip1', '192.16.0.0-192.16.0.31') }}"
+            dstip4: "{{get(flow, 'flow.src_ip1', '192.168.0.0-192.168.255.255') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.dstport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.srcport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.dst_port1', '0') }}"
+            dstport: "{{get(flow, 'flow.src_port1', '0') }}"
index 6b213a5..d7531fc 100644 (file)
@@ -45,16 +45,15 @@ private_1:
 
         outer_l3v4:
             proto: "udp"
-            srcip4: "{{get(flow, 'flow.srcip4_range', '1.1.1.1-1.15.255.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range', '90.90.1.1-90.105.255.255') }}"
+            srcip4: "{{get(flow, 'flow.src_ip0', '1.1.1.1-1.15.255.255') }}"
+            dstip4: "{{get(flow, 'flow.dst_ip0', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.src_port0', '1234') }}"
+            dstport: "{{get(flow, 'flow.dst_port0', '2001') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
-
 public_1:
       ipv4:
         outer_l2:
@@ -69,14 +68,14 @@ public_1:
 
         outer_l3v4:
             proto: "udp"
-            srcip4: "{{get(flow, 'flow.dstip4_range', '1.1.1.1-1.15.255.255') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range', '90.90.1.1-90.105.255.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip0', '1.1.1.1-1.15.255.255') }}"
+            dstip4: "{{get(flow, 'flow.src_ip0', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.src_port0', '1234') }}"
+            dstport: "{{get(flow, 'flow.dst_port0', '2001') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
 private_2:
       ipv4:
@@ -92,14 +91,14 @@ private_2:
 
         outer_l3v4:
             proto: "udp"
-            srcip4: "{{get(flow, 'flow.srcip4_range', '1.1.1.1-1.15.255.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range', '90.90.1.1-90.105.255.255') }}"
+            srcip4: "{{get(flow, 'flow.src_ip1', '1.1.1.1-1.15.255.255') }}"
+            dstip4: "{{get(flow, 'flow.dst_ip1', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.src_port1', '1234') }}"
+            dstport: "{{get(flow, 'flow.dst_port1', '2001') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
 public_2:
       ipv4:
@@ -115,12 +114,12 @@ public_2:
 
         outer_l3v4:
             proto: "udp"
-            srcip4: "{{get(flow, 'flow.dstip4_range', '1.1.1.1-1.15.255.255') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range', '90.90.1.1-90.105.255.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip1', '1.1.1.1-1.15.255.255') }}"
+            dstip4: "{{get(flow, 'flow.src_ip1', '90.90.1.1-90.105.255.255') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 0
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+            srcport: "{{get(flow, 'flow.dst_port1', '1234') }}"
+            dstport: "{{get(flow, 'flow.src_port1', '2001') }}"
             count: "{{get(flow, 'flow.count', '1') }}"
index 4a21a42..7468dbd 100644 (file)
@@ -68,14 +68,16 @@ private_1:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.srcip4_range_1', '192.168.0.0-192.168.255.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range_1', '192.16.0.0-192.16.0.31') }}"
+            srcip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}"
+            dstip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.src_port0', '0') }}"
+            dstport: "{{get(flow, 'flow.dst_port0', '0') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
 public_1:
       ipv4:
         outer_l2:
@@ -90,14 +92,16 @@ public_1:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.dstip4_range_1', '192.16.0.0-192.16.0.31') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range_1', '192.168.0.0-192.168.255.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}"
+            dstip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.dstport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.srcport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.dst_port0', '0') }}"
+            dstport: "{{get(flow, 'flow.src_port0', '0') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
 private_2:
       ipv4:
         outer_l2:
@@ -122,14 +126,15 @@ private_2:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.srcip4_range_2', '192.168.0.0-192.168.255.255') }}"
-            dstip4: "{{get(flow, 'flow.dstip4_range_2', '192.16.0.0-192.16.0.31') }}"
+            srcip4: "{{get(flow, 'flow.srcip1', '192.168.0.0-192.168.255.255') }}"
+            dstip4: "{{get(flow, 'flow.dstip1', '192.16.0.0-192.16.0.31') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.src_port1', '0') }}"
+            dstport: "{{get(flow, 'flow.dst_port1', '0') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
 public_2:
       ipv4:
         outer_l2:
@@ -144,11 +149,13 @@ public_2:
 
         outer_l3v4:
             proto: "tcp"
-            srcip4: "{{get(flow, 'flow.dstip4_range_2', '192.16.0.0-192.16.0.31') }}"
-            dstip4: "{{get(flow, 'flow.srcip4_range_2', '192.168.0.0-192.168.255.255') }}"
+            srcip4: "{{get(flow, 'flow.dst_ip1', '192.16.0.0-192.16.0.31') }}"
+            dstip4: "{{get(flow, 'flow.src_ip1', '192.168.0.0-192.168.255.255') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
             ttl: 32
             dscp: 32
 
         outer_l4:
-            srcport: "{{get(flow, 'flow.dstport_range', '0') }}"
-            dstport: "{{get(flow, 'flow.srcport_range', '0') }}"
+            srcport: "{{get(flow, 'flow.dst_port1', '0') }}"
+            dstport: "{{get(flow, 'flow.src_port1', '0') }}"
+            count: "{{get(flow, 'flow.count', '1') }}"
index 651614d..8ce3362 100644 (file)
@@ -375,6 +375,9 @@ class TestNetworkServiceTestCase(unittest.TestCase):
                     'allowed_drop_rate': '0.8 - 1',
                 },
             },
+            'options': {
+                'framesize': {'64B': 100}
+            },
             'runner': {
                 'object': 'NetworkServiceTestCase',
                 'interval': 35,
@@ -414,17 +417,40 @@ class TestNetworkServiceTestCase(unittest.TestCase):
     def test___init__(self):
         assert self.topology
 
+    def test__get_ip_flow_range(self):
+        self.scenario_cfg["traffic_options"]["flow"] = \
+            self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")
+        result = '152.16.100.1-152.16.100.254'
+        self.assertEqual(result, self.s._get_ip_flow_range({"tg__1": 'xe0'}))
+
     def test___get_traffic_flow(self):
         self.scenario_cfg["traffic_options"]["flow"] = \
             self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")
-        result = {'flow': {'dstip4_range': '152.40.0.20',
-                           'srcip4_range': '152.16.0.20', 'count': 1}}
+        self.scenario_cfg["options"] = {}
+        self.scenario_cfg['options'] = {
+            'flow': {
+              'src_ip': [
+                {
+                  'tg__1': 'xe0',
+                },
+              ],
+              'dst_ip': [
+                {
+                  'tg__1': 'xe1',
+                },
+              ],
+              'public_ip': ['1.1.1.1'],
+            },
+        }
+        result = {'flow': {'dst_ip0': '152.16.40.1-152.16.40.254',
+                           'src_ip0': '152.16.100.1-152.16.100.254'}}
+
         self.assertEqual(result, self.s._get_traffic_flow())
 
     def test___get_traffic_flow_error(self):
         self.scenario_cfg["traffic_options"]["flow"] = \
             "ipv4_1flow_Packets_vpe.yaml1"
-        self.assertEqual({}, self.s._get_traffic_flow())
+        self.assertEqual({'flow': {}}, self.s._get_traffic_flow())
 
     def test_get_vnf_imp(self):
         vnfd = COMPLETE_TREX_VNFD['vnfd:vnfd-catalog']['vnfd'][0]['class-name']
@@ -586,7 +612,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
 
     def test___get_traffic_imix_exception(self):
         with mock.patch.dict(self.scenario_cfg["traffic_options"], {'imix': ''}):
-            self.assertEqual({}, self.s._get_traffic_imix())
+            self.assertEqual({'imix': {'64B': 100}}, self.s._get_traffic_imix())
 
     def test__fill_traffic_profile(self):
         with mock.patch.dict("sys.modules", STL_MOCKS):
index dcaf43d..04b7efc 100644 (file)
@@ -115,9 +115,9 @@ class TestRFC2544Profile(unittest.TestCase):
                            'outer_l3v4': {'dstip4': '1.1.1.1-1.15.255.255',
                                           'proto': 'udp',
                                           'srcip4': '90.90.1.1-90.105.255.255',
-                                          'dscp': 0, 'ttl': 32},
+                                          'dscp': 0, 'ttl': 32, 'count': 1},
                            'outer_l4': {'srcport': '2001',
-                                        'dsrport': '1234'}}},
+                               'dsrport': '1234', 'count': 1}}},
                'private_1': {'ipv4':
                            {'outer_l2': {'framesize':
                                          {'64B': '100', '1518B': '0',
@@ -127,9 +127,9 @@ class TestRFC2544Profile(unittest.TestCase):
                             'outer_l3v4': {'dstip4': '9.9.1.1-90.105.255.255',
                                            'proto': 'udp',
                                            'srcip4': '1.1.1.1-1.15.255.255',
-                                           'dscp': 0, 'ttl': 32},
+                                           'dscp': 0, 'ttl': 32, 'count': 1},
                             'outer_l4': {'dstport': '2001',
-                                         'srcport': '1234'}}},
+                                'srcport': '1234', 'count': 1}}},
                'schema': 'isb:traffic_profile:0.1'}
 
     def test___init__(self):
index fd769e6..37193f8 100644 (file)
@@ -117,9 +117,11 @@ class TestTrexProfile(unittest.TestCase):
                                    'outer_l3v4': {'dstip4': '1.1.1.1-1.1.2.2',
                                                   'proto': 'udp',
                                                   'srcip4': '9.9.1.1-90.1.2.2',
-                                                  'dscp': 0, 'ttl': 32},
+                                                  'dscp': 0, 'ttl': 32,
+                                                  'count': 1},
                                    'outer_l4': {'srcport': '2001',
-                                                'dsrport': '1234'}}},
+                                                'dsrport': '1234',
+                                                'count': 1}}},
                'private': {'ipv4':
                            {'outer_l2': {'framesize':
                                          {'64B': '100', '1518B': '0',
@@ -131,9 +133,10 @@ class TestTrexProfile(unittest.TestCase):
                             'outer_l3v4': {'dstip4': '9.9.1.1-90.105.255.255',
                                            'proto': 'udp',
                                            'srcip4': '1.1.1.1-1.15.255.255',
-                                           'dscp': 0, 'ttl': 32},
+                                           'dscp': 0, 'ttl': 32, 'count': 1},
                             'outer_l4': {'dstport': '2001',
-                                         'srcport': '1234'}}},
+                                         'srcport': '1234',
+                                         'count': 1}}},
                'schema': 'isb:traffic_profile:0.1'}
     PROFILE_v6 = {'description': 'Traffic profile to run RFC2544 latency',
                   'name': 'rfc2544',
@@ -149,9 +152,11 @@ class TestTrexProfile(unittest.TestCase):
                                       'outer_l3v4': {'dstip6': '0064:ff9b:0:0:0:0:9810:6414-0064:ff9b:0:0:0:0:9810:6420',
                                                      'proto': 'udp',
                                                      'srcip6': '0064:ff9b:0:0:0:0:9810:2814-0064:ff9b:0:0:0:0:9810:2820',
-                                                     'dscp': 0, 'ttl': 32},
+                                                     'dscp': 0, 'ttl': 32,
+                                                     'count': 1},
                                       'outer_l4': {'srcport': '2001',
-                                                   'dsrport': '1234'}}},
+                                                   'dsrport': '1234',
+                                                   'count': 1}}},
                   'private':
                   {'ipv6': {'outer_l2': {'framesize':
                                          {'64B': '100', '1518B': '0',
@@ -163,9 +168,11 @@ class TestTrexProfile(unittest.TestCase):
                             'outer_l3v4': {'dstip6': '0064:ff9b:0:0:0:0:9810:2814-0064:ff9b:0:0:0:0:9810:2820',
                                            'proto': 'udp',
                                            'srcip6': '0064:ff9b:0:0:0:0:9810:6414-0064:ff9b:0:0:0:0:9810:6420',
-                                           'dscp': 0, 'ttl': 32},
+                                           'dscp': 0, 'ttl': 32,
+                                           'count': 1},
                             'outer_l4': {'dstport': '2001',
-                                         'srcport': '1234'}}},
+                                         'srcport': '1234',
+                                         'count': 1}}},
                   'schema': 'isb:traffic_profile:0.1'}
 
     def test___init__(self):
index 9f8efa6..55fdade 100644 (file)
@@ -17,10 +17,14 @@ from __future__ import absolute_import
 import logging
 
 import errno
+
+import ipaddress
 import os
 
 import re
 from itertools import chain
+
+import six
 from operator import itemgetter
 from collections import defaultdict
 
@@ -126,19 +130,50 @@ class NetworkServiceTestCase(base.Scenario):
         self.collector = None
         self.traffic_profile = None
 
+    def _get_ip_flow_range(self, ip_start_range):
+
+        node_name, range_or_interface = next(iter(ip_start_range.items()), (None, '0.0.0.0'))
+        if node_name is not None:
+            node = self.context_cfg["nodes"].get(node_name, {})
+            try:
+                # the ip_range is the interface name
+                interface = node.get("interfaces", {})[range_or_interface]
+            except KeyError:
+                ip = "0.0.0.0"
+                mask = "255.255.255.0"
+            else:
+                ip = interface["local_ip"]
+                # we can't default these values, they must both exist to be valid
+                mask = interface["netmask"]
+
+            ipaddr = ipaddress.ip_network(six.text_type('{}/{}'.format(ip, mask)), strict=False)
+            hosts = list(ipaddr.hosts())
+            ip_addr_range = "{}-{}".format(hosts[0], hosts[-1])
+        else:
+            # we are manually specifying the range
+            ip_addr_range = range_or_interface
+        return ip_addr_range
+
     def _get_traffic_flow(self):
+        flow = {}
         try:
-            with open(self.scenario_cfg["traffic_options"]["flow"]) as fflow:
-                flow = yaml_load(fflow)
-        except (KeyError, IOError, OSError):
+            fflow = self.scenario_cfg["options"]["flow"]
+            for index, src in enumerate(fflow.get("src_ip", [])):
+                flow["src_ip{}".format(index)] = self._get_ip_flow_range(src)
+
+            for index, dst in enumerate(fflow.get("dst_ip", [])):
+                flow["dst_ip{}".format(index)] = self._get_ip_flow_range(dst)
+
+            for index, publicip in enumerate(fflow.get("publicip", [])):
+                flow["public_ip{}".format(index)] = publicip
+        except KeyError:
             flow = {}
-        return flow
+        return {"flow": flow}
 
     def _get_traffic_imix(self):
         try:
-            with open(self.scenario_cfg["traffic_options"]["imix"]) as fimix:
-                imix = yaml_load(fimix)
-        except (KeyError, IOError, OSError):
+            imix = {"imix": self.scenario_cfg['options']['framesize']}
+        except KeyError:
             imix = {}
         return imix
 
index 3e1f8d8..fcec04f 100644 (file)
@@ -26,6 +26,7 @@ from stl.trex_stl_lib.trex_stl_streams import STLFlowLatencyStats
 from stl.trex_stl_lib.trex_stl_streams import STLTXCont
 from stl.trex_stl_lib.trex_stl_streams import STLProfile
 from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLVmWrFlowVar
+from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFlowVarRepeatableRandom
 from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFlowVar
 from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLPktBuilder
 from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLScVmRaw
@@ -132,7 +133,7 @@ class TrexProfile(TrafficProfile):
                                                 pkt_offset='Ether.dst')
             self.vm_flow_vars.append(stl_vm_wr_flow_var)
 
-    def set_src_ip4(self, src_ip4):
+    def set_src_ip4(self, src_ip4, count=1):
         """ set source ipv4 address fields """
         src_ips = src_ip4.split('-')
         min_value = src_ips[0]
@@ -141,12 +142,13 @@ class TrexProfile(TrafficProfile):
             src_ip4 = min_value
             self._set_ip_fields(src=src_ip4)
         else:
-            stl_vm_flow_var = STLVmFlowVar(name="ip4_src",
-                                           min_value=min_value,
-                                           max_value=max_value,
-                                           size=4,
-                                           op='random',
-                                           step=1)
+            stl_vm_flow_var = \
+                STLVmFlowVarRepeatableRandom(name="ip4_src",
+                                             min_value=min_value,
+                                             max_value=max_value,
+                                             size=4,
+                                             limit=int(count),
+                                             seed=0x1235)
             self.vm_flow_vars.append(stl_vm_flow_var)
             stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='ip4_src',
                                                 pkt_offset='IP.src')
@@ -154,7 +156,7 @@ class TrexProfile(TrafficProfile):
             stl_vm_fix_ipv4 = STLVmFixIpv4(offset="IP")
             self.vm_flow_vars.append(stl_vm_fix_ipv4)
 
-    def set_dst_ip4(self, dst_ip4):
+    def set_dst_ip4(self, dst_ip4, count=1):
         """ set destination ipv4 address fields """
         dst_ips = dst_ip4.split('-')
         min_value = dst_ips[0]
@@ -163,12 +165,13 @@ class TrexProfile(TrafficProfile):
             dst_ip4 = min_value
             self._set_ip_fields(dst=dst_ip4)
         else:
-            stl_vm_flow_var = STLVmFlowVar(name="dst_ip4",
-                                           min_value=min_value,
-                                           max_value=max_value,
-                                           size=4,
-                                           op='random',
-                                           step=1)
+            stl_vm_flow_var = \
+                STLVmFlowVarRepeatableRandom(name="dst_ip4",
+                                             min_value=min_value,
+                                             max_value=max_value,
+                                             size=4,
+                                             limit=int(count),
+                                             seed=0x1235)
             self.vm_flow_vars.append(stl_vm_flow_var)
             stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='dst_ip4',
                                                 pkt_offset='IP.dst')
@@ -240,7 +243,7 @@ class TrexProfile(TrafficProfile):
                                                 pkt_offset='IP.tos')
             self.vm_flow_vars.append(stl_vm_wr_flow_var)
 
-    def set_src_port(self, src_port):
+    def set_src_port(self, src_port, count=1):
         """ set packet source port """
         src_ports = str(src_port).split('-')
         min_value = int(src_ports[0])
@@ -250,18 +253,19 @@ class TrexProfile(TrafficProfile):
             self._set_udp_fields(sport=src_port)
         else:
             max_value = int(src_ports[1])
-            stl_vm_flow_var = STLVmFlowVar(name="port_src",
-                                           min_value=min_value,
-                                           max_value=max_value,
-                                           size=2,
-                                           op='random',
-                                           step=1)
+            stl_vm_flow_var = \
+                STLVmFlowVarRepeatableRandom(name="port_src",
+                                             min_value=min_value,
+                                             max_value=max_value,
+                                             size=2,
+                                             limit=int(count),
+                                             seed=0x1235)
             self.vm_flow_vars.append(stl_vm_flow_var)
             stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='port_src',
                                                 pkt_offset=self.udp_sport)
             self.vm_flow_vars.append(stl_vm_wr_flow_var)
 
-    def set_dst_port(self, dst_port):
+    def set_dst_port(self, dst_port, count=1):
         """ set packet destnation port """
         dst_ports = str(dst_port).split('-')
         min_value = int(dst_ports[0])
@@ -271,12 +275,13 @@ class TrexProfile(TrafficProfile):
             self._set_udp_fields(dport=dst_port)
         else:
             max_value = int(dst_ports[1])
-            stl_vm_flow_var = STLVmFlowVar(name="port_dst",
-                                           min_value=min_value,
-                                           max_value=max_value,
-                                           size=2,
-                                           op='random',
-                                           step=1)
+            stl_vm_flow_var = \
+                STLVmFlowVarRepeatableRandom(name="port_dst",
+                                             min_value=min_value,
+                                             max_value=max_value,
+                                             size=2,
+                                             limit=int(count),
+                                             seed=0x1235)
             self.vm_flow_vars.append(stl_vm_flow_var)
             stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='port_dst',
                                                 pkt_offset=self.udp_dport)
@@ -335,9 +340,9 @@ class TrexProfile(TrafficProfile):
         if 'dscp' in outer_l3v4:
             self.set_dscp(outer_l3v4['dscp'])
         if 'srcip4' in outer_l3v4:
-            self.set_src_ip4(outer_l3v4['srcip4'])
+            self.set_src_ip4(outer_l3v4['srcip4'], outer_l3v4['count'])
         if 'dstip4' in outer_l3v4:
-            self.set_dst_ip4(outer_l3v4['dstip4'])
+            self.set_dst_ip4(outer_l3v4['dstip4'], outer_l3v4['count'])
 
     def set_outer_l3v6_fields(self, outer_l3v6):
         """ setup outer l3v6 fields from traffic profile """
@@ -367,9 +372,9 @@ class TrexProfile(TrafficProfile):
     def set_outer_l4_fields(self, outer_l4):
         """ setup outer l4 fields from traffic profile """
         if 'srcport' in outer_l4:
-            self.set_src_port(outer_l4['srcport'])
+            self.set_src_port(outer_l4['srcport'], outer_l4['count'])
         if 'dstport' in outer_l4:
-            self.set_dst_port(outer_l4['dstport'])
+            self.set_dst_port(outer_l4['dstport'], outer_l4['count'])
 
     def generate_imix_data(self, packet_definition):
         """ generate packet size for a given traffic profile """