aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-06-20 14:31:19 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-08-08 08:54:23 -0700
commit5ce3b6f8c8b3217091e51a6041455738603d90b8 (patch)
treeca34e15a85d69e2b23ce498fead47761624ae42c
parent72778951d6b8968f562fb8fefa02a57159ea1b83 (diff)
NSB update
Refactored main NSB VNF classes accroding to class diagram https://wiki.opnfv.org/display/yardstick/NSB+class+diagram All the SampleVNFs have been separated and placed under the SampleVNF class. Added AutoConnectSSH to automatically create SSH conneciton on demand. Added VnfdHelper class to wrap the VNFD dictionary in prepartion for class-based modeling. Extracted DpdkVnfSetupEnvHelper for DPDK based VNF setup. Extracted Stats and other client config to ResourceHelper Had to replace dict_key_flatten with deepgetitem due to Python 2.7 Jinja2 infinite recursion. Change-Id: Ia8840e9c44cdbdf39aab6b02e6d2176b31937dc9 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
-rwxr-xr-xrun_tests.sh13
-rw-r--r--samples/vnf_samples/nsut/vpe/ixia_traffic.cfg64
-rw-r--r--samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml40
-rw-r--r--samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml13
-rw-r--r--samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml13
-rw-r--r--samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml43
-rw-r--r--samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml43
-rw-r--r--samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml13
-rw-r--r--samples/vnf_samples/nsut/vpe/vpe_config/vpe_config101
-rw-r--r--samples/vnf_samples/nsut/vpe/vpe_config/vpe_downstream41
-rw-r--r--samples/vnf_samples/nsut/vpe/vpe_config/vpe_script384
-rw-r--r--samples/vnf_samples/nsut/vpe/vpe_config/vpe_upstream64
-rw-r--r--samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml53
-rw-r--r--samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml50
-rw-r--r--samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml50
-rw-r--r--samples/vnf_samples/traffic_profiles/example.yaml338
-rw-r--r--samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml24
-rw-r--r--samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml18
-rw-r--r--samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets_vpe.yaml6
-rw-r--r--samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml89
-rw-r--r--samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml66
-rw-r--r--samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml154
-rw-r--r--samples/vnf_samples/traffic_profiles/vpe/HTTP-vPE_IPv4_2Ports.rxf1335
-rw-r--r--samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_1flows.ixncfgbin0 -> 103360 bytes
-rw-r--r--samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_256Kflows.ixncfgbin0 -> 103357 bytes
-rw-r--r--tests/ci/cover.awk25
-rw-r--r--tests/ci/cover.sh92
-rw-r--r--tests/unit/apiserver/__init__.py8
-rw-r--r--tests/unit/apiserver/resources/test_env_action.py4
-rw-r--r--tests/unit/benchmark/contexts/test_heat.py296
-rw-r--r--tests/unit/benchmark/contexts/test_kubernetes.py34
-rw-r--r--tests/unit/benchmark/contexts/test_node.py181
-rw-r--r--tests/unit/benchmark/contexts/test_standalone.py9
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_vnf_generic.py152
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_vsperf.py2
-rw-r--r--tests/unit/common/test_utils.py848
-rw-r--r--tests/unit/network_services/helpers/__init__.py0
-rw-r--r--tests/unit/network_services/helpers/test_cpu.py119
-rw-r--r--tests/unit/network_services/helpers/test_samplevnf_helper.py1082
-rw-r--r--tests/unit/network_services/test_utils.py2
-rw-r--r--tests/unit/network_services/test_yang_model.py135
-rw-r--r--tests/unit/network_services/traffic_profile/test_rfc2544.py200
-rw-r--r--tests/unit/network_services/traffic_profile/test_traffic_profile.py10
-rw-r--r--tests/unit/network_services/vnf_generic/test_vnfdgen.py17
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_base.py312
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py2239
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py445
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py560
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py308
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py1002
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/vpe_config/action_bulk_512.txt512
-rwxr-xr-xtests/unit/network_services/vnf_generic/vnf/vpe_config/full_tm_profile_10G.cfg105
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/vpe_config/fw_bulk_inst0_256.txt256
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_config101
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_script384
-rw-r--r--tests/unit/test_ssh.py107
-rw-r--r--tox.ini6
-rw-r--r--yardstick/benchmark/contexts/base.py29
-rw-r--r--yardstick/benchmark/contexts/heat.py127
-rw-r--r--yardstick/benchmark/contexts/node.py42
-rw-r--r--yardstick/benchmark/contexts/standalone.py41
-rw-r--r--yardstick/benchmark/core/task.py8
-rw-r--r--yardstick/benchmark/scenarios/lib/migrate.py11
-rw-r--r--yardstick/benchmark/scenarios/networking/vnf_generic.py292
-rw-r--r--yardstick/common/utils.py98
-rw-r--r--yardstick/network_services/helpers/__init__.py0
-rw-r--r--yardstick/network_services/helpers/cpu.py76
-rw-r--r--yardstick/network_services/helpers/samplevnf_helper.py639
-rw-r--r--yardstick/network_services/pipeline.py113
-rw-r--r--yardstick/network_services/traffic_profile/rfc2544.py210
-rw-r--r--yardstick/network_services/traffic_profile/traffic_profile.py13
-rw-r--r--yardstick/network_services/utils.py8
-rw-r--r--yardstick/network_services/vnf_generic/vnf/base.py234
-rw-r--r--yardstick/network_services/vnf_generic/vnf/sample_vnf.py994
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_ping.py155
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py303
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_trex.py345
-rw-r--r--yardstick/network_services/vnf_generic/vnf/vpe_vnf.py545
-rw-r--r--yardstick/network_services/vnf_generic/vnfdgen.py64
-rw-r--r--yardstick/network_services/yang_model.py107
-rw-r--r--yardstick/orchestrator/heat.py4
-rw-r--r--yardstick/ssh.py147
82 files changed, 12372 insertions, 4801 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 50ccb04c6..b3cbfb127 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -16,6 +16,12 @@ getopts ":f" FILE_OPTION
# don't write .pyc files this can cause odd unittest results
export PYTHONDONTWRITEBYTECODE=1
+PY_VER="py$( python --version | sed 's/[^[:digit:]]//g' | cut -c-2 )"
+export PY_VER
+
+COVER_DIR_NAME="./tests/ci/"
+export COVER_DIR_NAME
+
run_flake8() {
echo "Running flake8 ... "
logfile=test_results.log
@@ -60,8 +66,11 @@ run_tests() {
}
run_coverage() {
- source tests/ci/cover.sh
- run_coverage_test
+ # don't re-run coverage on both py27 py3, it takes too long
+ if [[ -z $SKIP_COVERAGE ]] ; then
+ source $COVER_DIR_NAME/cover.sh
+ run_coverage_test
+ fi
}
run_functional_test() {
diff --git a/samples/vnf_samples/nsut/vpe/ixia_traffic.cfg b/samples/vnf_samples/nsut/vpe/ixia_traffic.cfg
new file mode 100644
index 000000000..cdeee6e35
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/ixia_traffic.cfg
@@ -0,0 +1,64 @@
+# 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.
+{
+ "private_1": {
+ "id": 1,
+ "bidir": "False",
+ "duration": 60,
+ "iload": "100",
+ "outer_l2": {
+ "dstmac": "00:00:00:00:00:03",
+ "framesPerSecond": true,
+ "framesize": 64,
+ "srcmac": "00:00:00:00:00:01"
+ },
+ "outer_l3": {
+ "dscp": 0,
+ "dstip4": "152.16.40.20",
+ "proto": "udp",
+ "srcip4": "152.16.100.20",
+ "ttl": 32
+ },
+ "outer_l4": {
+ "dstport": "2001",
+ "srcport": "1234"
+ },
+ "traffic_type": "continuous"
+ },
+ "public_1": {
+ "id": 2,
+ "bidir": "False",
+ "duration": 60,
+ "iload": "100",
+ "outer_l2": {
+ "dstmac": "00:00:00:00:00:04",
+ "framesPerSecond": true,
+ "framesize": 64,
+ "srcmac": "00:00:00:00:00:01"
+ },
+ "outer_l3": {
+ "count": 1024,
+ "dscp": 0,
+ "dstip4": "152.16.100.20",
+ "proto": "udp",
+ "srcip4": "152.16.40.20",
+ "ttl": 32
+ },
+ "outer_l4": {
+ "dstport": "1234",
+ "srcport": "2001"
+ },
+ "traffic_type": "continuous"
+ }
+}
diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml
new file mode 100644
index 000000000..7b251395b
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml
@@ -0,0 +1,40 @@
+# 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.
+
+---
+schema: yardstick:task:0.1
+scenarios:
+- type: NSPerf
+ traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml"
+ topology: vpe_vnf_topology_ixload.yaml
+ nodes:
+ tg__1: trafficgen_1.yardstick
+ vnf__1: vnf.yardstick
+ options:
+ packetsize: 64
+ 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
+ name: yardstick
+ nfvi_type: baremetal
+ file: /etc/yardstick/nodes/pod.yaml
diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml
index 37687613c..4652a62d5 100644
--- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml
+++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml
@@ -21,15 +21,16 @@ scenarios:
nodes:
tg__1: trafficgen_1.yardstick
vnf__1: vnf.yardstick
- tc_options:
+ options:
+ packetsize: 64
+ traffic_type: 4
rfc2544:
- allowed_drop_rate: 0.8 - 1
- vnf_options:
- vpe:
+ allowed_drop_rate: 0.0001 - 0.0001
+ vnf__1:
cfg: vpe_config
runner:
- type: Duration
- duration: 400
+ type: Iteration
+ iterations: 10
interval: 35
traffic_options:
flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
index fb1be35c1..bd64a45f3 100644
--- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
+++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
@@ -21,15 +21,16 @@ scenarios:
nodes:
tg__1: trafficgen_1.yardstick
vnf__1: vnf.yardstick
- tc_options:
+ options:
+ packetsize: 64
+ traffic_type: 4
rfc2544:
- allowed_drop_rate: 0.8 - 1
- vnf_options:
- vpe:
+ allowed_drop_rate: 0.0001 - 0.0001
+ vnf__1:
cfg: vpe_config
runner:
- type: Duration
- duration: 400
+ type: Iteration
+ iterations: 10
interval: 35
traffic_options:
flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml
new file mode 100644
index 000000000..0257886fb
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml
@@ -0,0 +1,43 @@
+# 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.
+
+---
+schema: yardstick:task:0.1
+scenarios:
+- type: NSPerf
+ traffic_profile: "../../traffic_profiles/ixia_ipv4_latency_vpe.yaml"
+ topology: vpe_vnf_topology_ixia.yaml
+ nodes:
+ tg__1: trafficgen_1.yardstick
+ vnf__1: vnf.yardstick
+ options:
+ packetsize: 64
+ traffic_type: 4
+ rfc2544:
+ allowed_drop_rate: 0.0001 - 0.0001
+ vnf__1:
+ cfg: vpe_config
+ runner:
+ 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
+ name: yardstick
+ nfvi_type: baremetal
+ file: /etc/yardstick/nodes/pod.yaml
diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml
new file mode 100644
index 000000000..2c48d0ef9
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml
@@ -0,0 +1,43 @@
+# 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.
+
+---
+schema: yardstick:task:0.1
+scenarios:
+- type: NSPerf
+ traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml"
+ topology: vpe_vnf_topology-3node.yaml
+ nodes:
+ tg__1: trafficgen_1.yardstick
+ vnf__1: vnf.yardstick
+ options:
+ packetsize: 64
+ traffic_type: 4
+ rfc2544:
+ allowed_drop_rate: 0.0001 - 0.0001
+ corelated_traffic: true
+ vnf__1:
+ cfg: vpe_config
+ runner:
+ 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
+ nfvi_type: baremetal
+ file: /etc/yardstick/nodes/pod.yaml
diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml
index c481f812b..674fa95f4 100644
--- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml
+++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml
@@ -21,15 +21,16 @@ scenarios:
nodes:
tg__1: trafficgen_1.yardstick
vnf__1: vnf.yardstick
- tc_options:
+ options:
+ packetsize: 64
+ traffic_type: 4
rfc2544:
- allowed_drop_rate: 0.8 - 1
- vnf_options:
- vpe:
+ allowed_drop_rate: 0.0001 - 0.0001
+ vnf__1:
cfg: vpe_config
runner:
- type: Duration
- duration: 400
+ type: Iteration
+ iterations: 10
interval: 35
traffic_options:
flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml"
diff --git a/samples/vnf_samples/nsut/vpe/vpe_config/vpe_config b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_config
deleted file mode 100644
index 17ebc6a76..000000000
--- a/samples/vnf_samples/nsut/vpe/vpe_config/vpe_config
+++ /dev/null
@@ -1,101 +0,0 @@
-[EAL]
-log_level = 0
-
-[PIPELINE0]
-type = MASTER
-core = s{socket}c0
-
-[MEMPOOL0]
-pool_size = 256K
-
-[MEMPOOL1]
-pool_size = 2M
-
-[RXQ1.0]
-mempool = MEMPOOL1
-
-;;;;;;;;;;Begin of upstream 0;;;;;;;;;;;;;;;;;;
-[PIPELINE1]
-type = FIREWALL
-core = s{socket}c1
-pktq_in = RXQ0.0
-pktq_out = SWQ0 SINK0
-n_rules = 4096
-pkt_type = qinq_ipv4
-
-[PIPELINE2]
-type = FLOW_CLASSIFICATION
-core = s{socket}c1
-pktq_in = SWQ0
-pktq_out = SWQ1 SINK1
-n_flows = 65536
-key_size = 8; dma_size
-key_offset = 268; dma_dst_offset
-key_mask = 00000FFF00000FFF; qinq
-flowid_offset = 172; mbuf (128) + 64
-
-[PIPELINE3]
-type = FLOW_ACTIONS
-core = s{socket}c1h
-pktq_in = SWQ1
-pktq_out = SWQ2
-n_flows = 65536
-n_meters_per_flow = 1;dscp is not considered for per user metering
-flow_id_offset = 172; mbuf (128) + 64
-ip_hdr_offset = 278 ; should not needed, but who knows?
-color_offset = 176
-
-[PIPELINE4]
-type = FLOW_ACTIONS
-core = s{socket}c1h
-pktq_in = SWQ2
-pktq_out = SWQ3
-n_flows = 65536
-n_meters_per_flow = 4; Use dscp to classify into 1 out of 4 TC
-flow_id_offset = 172; mbuf (128) + 64
-ip_hdr_offset = 278 ; should not needed, but who knows?
-color_offset = 176
-
-[PIPELINE5]
-type = ROUTING
-core = s{socket}c1
-pktq_in = SWQ3
-pktq_out = TXQ1.0 SINK2
-encap = ethernet_mpls
-mpls_color_mark = yes
-ip_hdr_offset = 278 ; should not needed, but who knows?
-color_offset = 176
-
-;;;;;;;;;;Begin of downstream 0;;;;;;;;;;;;;;;;;;
-[PIPELINE6]
-type = ROUTING
-core = s{socket}c2
-pktq_in = RXQ1.0
-pktq_out = SWQ4 SINK3
-encap = ethernet_qinq
-qinq_sched = yes
-ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
-
-
-[PIPELINE7]
-type = PASS-THROUGH
-core = s{socket}c2h
-pktq_in = SWQ4
-pktq_out = SWQ5
-
-[PIPELINE8]
-type = PASS-THROUGH
-core = s{socket}c2h
-pktq_in = SWQ5 TM0
-pktq_out = TM0 SWQ6
-
-[PIPELINE9]
-type = PASS-THROUGH
-core = s{socket}c2
-pktq_in = SWQ6
-pktq_out = TXQ0.0
-
-[TM0]
-burst_read = 24;dequeue should be slightly slower then enqueue to create buffer
-burst_write = 32
-cfg = /tmp/full_tm_profile_10G.cfg
diff --git a/samples/vnf_samples/nsut/vpe/vpe_config/vpe_downstream b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_downstream
new file mode 100644
index 000000000..540518d17
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_downstream
@@ -0,0 +1,41 @@
+# 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.
+
+[PIPELINE6]
+type = ROUTING
+core = s{socket}c4
+pktq_in = RXQ1.0
+pktq_out = SWQ4 SINK3
+encap = ethernet_qinq
+qinq_sched = yes
+ip_hdr_offset = 270
+
+
+[PIPELINE7]
+type = PASS-THROUGH
+core = s{socket}c5h
+pktq_in = SWQ4
+pktq_out = SWQ5
+
+[PIPELINE8]
+type = PASS-THROUGH
+core = s{socket}c5h
+pktq_in = SWQ5 TM0
+pktq_out = TM0 SWQ6
+
+[PIPELINE9]
+type = PASS-THROUGH
+core = s{socket}c5h
+pktq_in = SWQ6
+pktq_out = TXQ0.0
diff --git a/samples/vnf_samples/nsut/vpe/vpe_config/vpe_script b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_script
deleted file mode 100644
index 740eb6586..000000000
--- a/samples/vnf_samples/nsut/vpe/vpe_config/vpe_script
+++ /dev/null
@@ -1,384 +0,0 @@
-#=================================================================
-#Pipeline 1 : 256 Firewall Rules for 1 port with 0.0.X.0/24 for destination IP
-#=================================================================
-p 1 firewall add bulk /tmp/fw_bulk_inst0_256.txt
-p 1 firewall add default 1
-
-#=================================================================
-#Pipeline 2 : 512 flow classfication Rules for 1 port using QinQ as input. Flow id = SVLAN * 512 + CVLAN
-#=================================================================
-p 2 flow add qinq 128 512 port 0 id 1
-p 2 flow add default 1
-
-#=================================================================
-#Pipeline 3 : 512 metering Rules for 1 port
-#=================================================================
-p 3 action flow bulk /tmp/action_bulk_512.txt
-p 3 flows 512 ports 1
-
-#=================================================================
-#Pipeline 4 : 512 metering Rules and 4 traffic classes for 1 port
-#=================================================================
-p 4 action flow bulk /tmp/action_bulk_512.txt
-p 4 flows 512 ports 1
-p 4 action dscp 0 class 0 color G
-p 4 action dscp 1 class 1 color Y
-p 4 action dscp 2 class 2 color R
-p 4 action dscp 3 class 3 color G
-p 4 action dscp 4 class 0 color Y
-p 4 action dscp 5 class 1 color R
-p 4 action dscp 6 class 2 color G
-p 4 action dscp 7 class 3 color Y
-p 4 action dscp 8 class 0 color R
-p 4 action dscp 9 class 1 color G
-p 4 action dscp 10 class 2 color Y
-p 4 action dscp 11 class 3 color R
-p 4 action dscp 12 class 0 color G
-p 4 action dscp 13 class 1 color Y
-p 4 action dscp 14 class 2 color R
-p 4 action dscp 15 class 3 color G
-p 4 action dscp 16 class 0 color Y
-p 4 action dscp 17 class 1 color R
-p 4 action dscp 18 class 2 color G
-p 4 action dscp 19 class 3 color Y
-p 4 action dscp 20 class 0 color R
-p 4 action dscp 21 class 1 color G
-p 4 action dscp 22 class 2 color Y
-p 4 action dscp 23 class 3 color R
-p 4 action dscp 24 class 0 color G
-p 4 action dscp 25 class 1 color Y
-p 4 action dscp 26 class 2 color R
-p 4 action dscp 27 class 3 color G
-p 4 action dscp 28 class 0 color Y
-p 4 action dscp 29 class 1 color R
-p 4 action dscp 30 class 2 color G
-p 4 action dscp 31 class 3 color Y
-p 4 action dscp 32 class 0 color R
-p 4 action dscp 33 class 1 color G
-p 4 action dscp 34 class 2 color Y
-p 4 action dscp 35 class 3 color R
-p 4 action dscp 36 class 0 color G
-p 4 action dscp 37 class 1 color Y
-p 4 action dscp 38 class 2 color R
-p 4 action dscp 39 class 3 color G
-p 4 action dscp 40 class 0 color Y
-p 4 action dscp 41 class 1 color R
-p 4 action dscp 42 class 2 color G
-p 4 action dscp 43 class 3 color Y
-p 4 action dscp 44 class 0 color R
-p 4 action dscp 45 class 1 color G
-p 4 action dscp 46 class 2 color Y
-p 4 action dscp 47 class 3 color R
-p 4 action dscp 48 class 0 color G
-p 4 action dscp 49 class 1 color Y
-p 4 action dscp 50 class 2 color R
-p 4 action dscp 51 class 3 color G
-p 4 action dscp 52 class 0 color Y
-p 4 action dscp 53 class 1 color R
-p 4 action dscp 54 class 2 color G
-p 4 action dscp 55 class 3 color Y
-p 4 action dscp 56 class 0 color R
-p 4 action dscp 57 class 1 color G
-p 4 action dscp 58 class 2 color Y
-p 4 action dscp 59 class 3 color R
-p 4 action dscp 60 class 0 color G
-p 4 action dscp 61 class 1 color Y
-p 4 action dscp 62 class 2 color R
-p 4 action dscp 63 class 3 color G
-#=================================================================
-#Pipeline 5 : 32 Upstream Routing Rules for 1 ports with dst_ip : 0.0.0.0 to 0.0.255.255
-#=================================================================
-p 5 route add 152.40.0.0 21 port 0 ether {port1_dst_mac} mpls 0:0
-p 5 route add 152.40.8.0 21 port 0 ether {port1_dst_mac} mpls 0:1
-p 5 route add 152.40.16.0 21 port 0 ether {port1_dst_mac} mpls 0:2
-p 5 route add 152.40.24.0 21 port 0 ether {port1_dst_mac} mpls 0:3
-p 5 route add 152.40.32.0 21 port 0 ether {port1_dst_mac} mpls 0:4
-p 5 route add 152.40.40.0 21 port 0 ether {port1_dst_mac} mpls 0:5
-p 5 route add 152.40.48.0 21 port 0 ether {port1_dst_mac} mpls 0:6
-p 5 route add 152.40.56.0 21 port 0 ether {port1_dst_mac} mpls 0:7
-p 5 route add 152.40.64.0 21 port 0 ether {port1_dst_mac} mpls 0:8
-p 5 route add 152.40.72.0 21 port 0 ether {port1_dst_mac} mpls 0:9
-p 5 route add 152.40.80.0 21 port 0 ether {port1_dst_mac} mpls 0:10
-p 5 route add 152.40.88.0 21 port 0 ether {port1_dst_mac} mpls 0:11
-p 5 route add 152.40.96.0 21 port 0 ether {port1_dst_mac} mpls 0:12
-p 5 route add 152.40.104.0 21 port 0 ether {port1_dst_mac} mpls 0:13
-p 5 route add 152.40.112.0 21 port 0 ether {port1_dst_mac} mpls 0:14
-p 5 route add 152.40.120.0 21 port 0 ether {port1_dst_mac} mpls 0:15
-p 5 route add 152.40.128.0 21 port 0 ether {port1_dst_mac} mpls 0:16
-p 5 route add 152.40.136.0 21 port 0 ether {port1_dst_mac} mpls 0:17
-p 5 route add 152.40.144.0 21 port 0 ether {port1_dst_mac} mpls 0:18
-p 5 route add 152.40.152.0 21 port 0 ether {port1_dst_mac} mpls 0:19
-p 5 route add 152.40.160.0 21 port 0 ether {port1_dst_mac} mpls 0:20
-p 5 route add 152.40.168.0 21 port 0 ether {port1_dst_mac} mpls 0:21
-p 5 route add 152.40.176.0 21 port 0 ether {port1_dst_mac} mpls 0:22
-p 5 route add 152.40.184.0 21 port 0 ether {port1_dst_mac} mpls 0:23
-p 5 route add 152.40.192.0 21 port 0 ether {port1_dst_mac} mpls 0:24
-p 5 route add 152.40.200.0 21 port 0 ether {port1_dst_mac} mpls 0:25
-p 5 route add 152.40.208.0 21 port 0 ether {port1_dst_mac} mpls 0:26
-p 5 route add 152.40.216.0 21 port 0 ether {port1_dst_mac} mpls 0:27
-p 5 route add 152.40.224.0 21 port 0 ether {port1_dst_mac} mpls 0:28
-p 5 route add 152.40.232.0 21 port 0 ether {port1_dst_mac} mpls 0:29
-p 5 route add 152.40.240.0 21 port 0 ether {port1_dst_mac} mpls 0:30
-p 5 route add 152.40.248.0 21 port 0 ether {port1_dst_mac} mpls 0:31
-p 5 route add default 1
-
-#=================================================================
-#Pipeline 6 : 256 Downstream Routing Rules for 1 ports with dst_ip : 0.0.0.0 to 0.0.255.255
-#=================================================================
-p 6 route add 152.16.0.0 24 port 0 ether {port0_dst_mac} qinq 0 0
-p 6 route add 152.16.1.0 24 port 0 ether {port0_dst_mac} qinq 0 1
-p 6 route add 152.16.2.0 24 port 0 ether {port0_dst_mac} qinq 0 2
-p 6 route add 152.16.3.0 24 port 0 ether {port0_dst_mac} qinq 0 3
-p 6 route add 152.16.4.0 24 port 0 ether {port0_dst_mac} qinq 0 4
-p 6 route add 152.16.5.0 24 port 0 ether {port0_dst_mac} qinq 0 5
-p 6 route add 152.16.6.0 24 port 0 ether {port0_dst_mac} qinq 0 6
-p 6 route add 152.16.7.0 24 port 0 ether {port0_dst_mac} qinq 0 7
-p 6 route add 152.16.8.0 24 port 0 ether {port0_dst_mac} qinq 0 8
-p 6 route add 152.16.9.0 24 port 0 ether {port0_dst_mac} qinq 0 9
-p 6 route add 152.16.10.0 24 port 0 ether {port0_dst_mac} qinq 0 10
-p 6 route add 152.16.11.0 24 port 0 ether {port0_dst_mac} qinq 0 11
-p 6 route add 152.16.12.0 24 port 0 ether {port0_dst_mac} qinq 0 12
-p 6 route add 152.16.13.0 24 port 0 ether {port0_dst_mac} qinq 0 13
-p 6 route add 152.16.14.0 24 port 0 ether {port0_dst_mac} qinq 0 14
-p 6 route add 152.16.15.0 24 port 0 ether {port0_dst_mac} qinq 0 15
-p 6 route add 152.16.16.0 24 port 0 ether {port0_dst_mac} qinq 0 16
-p 6 route add 152.16.17.0 24 port 0 ether {port0_dst_mac} qinq 0 17
-p 6 route add 152.16.18.0 24 port 0 ether {port0_dst_mac} qinq 0 18
-p 6 route add 152.16.19.0 24 port 0 ether {port0_dst_mac} qinq 0 19
-p 6 route add 152.16.20.0 24 port 0 ether {port0_dst_mac} qinq 0 20
-p 6 route add 152.16.21.0 24 port 0 ether {port0_dst_mac} qinq 0 21
-p 6 route add 152.16.22.0 24 port 0 ether {port0_dst_mac} qinq 0 22
-p 6 route add 152.16.23.0 24 port 0 ether {port0_dst_mac} qinq 0 23
-p 6 route add 152.16.24.0 24 port 0 ether {port0_dst_mac} qinq 0 24
-p 6 route add 152.16.25.0 24 port 0 ether {port0_dst_mac} qinq 0 25
-p 6 route add 152.16.26.0 24 port 0 ether {port0_dst_mac} qinq 0 26
-p 6 route add 152.16.27.0 24 port 0 ether {port0_dst_mac} qinq 0 27
-p 6 route add 152.16.28.0 24 port 0 ether {port0_dst_mac} qinq 0 28
-p 6 route add 152.16.29.0 24 port 0 ether {port0_dst_mac} qinq 0 29
-p 6 route add 152.16.30.0 24 port 0 ether {port0_dst_mac} qinq 0 30
-p 6 route add 152.16.31.0 24 port 0 ether {port0_dst_mac} qinq 0 31
-p 6 route add 152.16.32.0 24 port 0 ether {port0_dst_mac} qinq 0 32
-p 6 route add 152.16.33.0 24 port 0 ether {port0_dst_mac} qinq 0 33
-p 6 route add 152.16.34.0 24 port 0 ether {port0_dst_mac} qinq 0 34
-p 6 route add 152.16.35.0 24 port 0 ether {port0_dst_mac} qinq 0 35
-p 6 route add 152.16.36.0 24 port 0 ether {port0_dst_mac} qinq 0 36
-p 6 route add 152.16.37.0 24 port 0 ether {port0_dst_mac} qinq 0 37
-p 6 route add 152.16.38.0 24 port 0 ether {port0_dst_mac} qinq 0 38
-p 6 route add 152.16.39.0 24 port 0 ether {port0_dst_mac} qinq 0 39
-p 6 route add 152.16.40.0 24 port 0 ether {port0_dst_mac} qinq 0 40
-p 6 route add 152.16.41.0 24 port 0 ether {port0_dst_mac} qinq 0 41
-p 6 route add 152.16.42.0 24 port 0 ether {port0_dst_mac} qinq 0 42
-p 6 route add 152.16.43.0 24 port 0 ether {port0_dst_mac} qinq 0 43
-p 6 route add 152.16.44.0 24 port 0 ether {port0_dst_mac} qinq 0 44
-p 6 route add 152.16.45.0 24 port 0 ether {port0_dst_mac} qinq 0 45
-p 6 route add 152.16.46.0 24 port 0 ether {port0_dst_mac} qinq 0 46
-p 6 route add 152.16.47.0 24 port 0 ether {port0_dst_mac} qinq 0 47
-p 6 route add 152.16.48.0 24 port 0 ether {port0_dst_mac} qinq 0 48
-p 6 route add 152.16.49.0 24 port 0 ether {port0_dst_mac} qinq 0 49
-p 6 route add 152.16.50.0 24 port 0 ether {port0_dst_mac} qinq 0 50
-p 6 route add 152.16.51.0 24 port 0 ether {port0_dst_mac} qinq 0 51
-p 6 route add 152.16.52.0 24 port 0 ether {port0_dst_mac} qinq 0 52
-p 6 route add 152.16.53.0 24 port 0 ether {port0_dst_mac} qinq 0 53
-p 6 route add 152.16.54.0 24 port 0 ether {port0_dst_mac} qinq 0 54
-p 6 route add 152.16.55.0 24 port 0 ether {port0_dst_mac} qinq 0 55
-p 6 route add 152.16.56.0 24 port 0 ether {port0_dst_mac} qinq 0 56
-p 6 route add 152.16.57.0 24 port 0 ether {port0_dst_mac} qinq 0 57
-p 6 route add 152.16.58.0 24 port 0 ether {port0_dst_mac} qinq 0 58
-p 6 route add 152.16.59.0 24 port 0 ether {port0_dst_mac} qinq 0 59
-p 6 route add 152.16.60.0 24 port 0 ether {port0_dst_mac} qinq 0 60
-p 6 route add 152.16.61.0 24 port 0 ether {port0_dst_mac} qinq 0 61
-p 6 route add 152.16.62.0 24 port 0 ether {port0_dst_mac} qinq 0 62
-p 6 route add 152.16.63.0 24 port 0 ether {port0_dst_mac} qinq 0 63
-p 6 route add 152.16.64.0 24 port 0 ether {port0_dst_mac} qinq 0 64
-p 6 route add 152.16.65.0 24 port 0 ether {port0_dst_mac} qinq 0 65
-p 6 route add 152.16.66.0 24 port 0 ether {port0_dst_mac} qinq 0 66
-p 6 route add 152.16.67.0 24 port 0 ether {port0_dst_mac} qinq 0 67
-p 6 route add 152.16.68.0 24 port 0 ether {port0_dst_mac} qinq 0 68
-p 6 route add 152.16.69.0 24 port 0 ether {port0_dst_mac} qinq 0 69
-p 6 route add 152.16.70.0 24 port 0 ether {port0_dst_mac} qinq 0 70
-p 6 route add 152.16.71.0 24 port 0 ether {port0_dst_mac} qinq 0 71
-p 6 route add 152.16.72.0 24 port 0 ether {port0_dst_mac} qinq 0 72
-p 6 route add 152.16.73.0 24 port 0 ether {port0_dst_mac} qinq 0 73
-p 6 route add 152.16.74.0 24 port 0 ether {port0_dst_mac} qinq 0 74
-p 6 route add 152.16.75.0 24 port 0 ether {port0_dst_mac} qinq 0 75
-p 6 route add 152.16.76.0 24 port 0 ether {port0_dst_mac} qinq 0 76
-p 6 route add 152.16.77.0 24 port 0 ether {port0_dst_mac} qinq 0 77
-p 6 route add 152.16.78.0 24 port 0 ether {port0_dst_mac} qinq 0 78
-p 6 route add 152.16.79.0 24 port 0 ether {port0_dst_mac} qinq 0 79
-p 6 route add 152.16.80.0 24 port 0 ether {port0_dst_mac} qinq 0 80
-p 6 route add 152.16.81.0 24 port 0 ether {port0_dst_mac} qinq 0 81
-p 6 route add 152.16.82.0 24 port 0 ether {port0_dst_mac} qinq 0 82
-p 6 route add 152.16.83.0 24 port 0 ether {port0_dst_mac} qinq 0 83
-p 6 route add 152.16.84.0 24 port 0 ether {port0_dst_mac} qinq 0 84
-p 6 route add 152.16.85.0 24 port 0 ether {port0_dst_mac} qinq 0 85
-p 6 route add 152.16.86.0 24 port 0 ether {port0_dst_mac} qinq 0 86
-p 6 route add 152.16.87.0 24 port 0 ether {port0_dst_mac} qinq 0 87
-p 6 route add 152.16.88.0 24 port 0 ether {port0_dst_mac} qinq 0 88
-p 6 route add 152.16.89.0 24 port 0 ether {port0_dst_mac} qinq 0 89
-p 6 route add 152.16.90.0 24 port 0 ether {port0_dst_mac} qinq 0 90
-p 6 route add 152.16.91.0 24 port 0 ether {port0_dst_mac} qinq 0 91
-p 6 route add 152.16.92.0 24 port 0 ether {port0_dst_mac} qinq 0 92
-p 6 route add 152.16.93.0 24 port 0 ether {port0_dst_mac} qinq 0 93
-p 6 route add 152.16.94.0 24 port 0 ether {port0_dst_mac} qinq 0 94
-p 6 route add 152.16.95.0 24 port 0 ether {port0_dst_mac} qinq 0 95
-p 6 route add 152.16.96.0 24 port 0 ether {port0_dst_mac} qinq 0 96
-p 6 route add 152.16.97.0 24 port 0 ether {port0_dst_mac} qinq 0 97
-p 6 route add 152.16.98.0 24 port 0 ether {port0_dst_mac} qinq 0 98
-p 6 route add 152.16.99.0 24 port 0 ether {port0_dst_mac} qinq 0 99
-p 6 route add 152.16.100.0 24 port 0 ether {port0_dst_mac} qinq 0 100
-p 6 route add 152.16.101.0 24 port 0 ether {port0_dst_mac} qinq 0 101
-p 6 route add 152.16.102.0 24 port 0 ether {port0_dst_mac} qinq 0 102
-p 6 route add 152.16.103.0 24 port 0 ether {port0_dst_mac} qinq 0 103
-p 6 route add 152.16.104.0 24 port 0 ether {port0_dst_mac} qinq 0 104
-p 6 route add 152.16.105.0 24 port 0 ether {port0_dst_mac} qinq 0 105
-p 6 route add 152.16.106.0 24 port 0 ether {port0_dst_mac} qinq 0 106
-p 6 route add 152.16.107.0 24 port 0 ether {port0_dst_mac} qinq 0 107
-p 6 route add 152.16.108.0 24 port 0 ether {port0_dst_mac} qinq 0 108
-p 6 route add 152.16.109.0 24 port 0 ether {port0_dst_mac} qinq 0 109
-p 6 route add 152.16.110.0 24 port 0 ether {port0_dst_mac} qinq 0 110
-p 6 route add 152.16.111.0 24 port 0 ether {port0_dst_mac} qinq 0 111
-p 6 route add 152.16.112.0 24 port 0 ether {port0_dst_mac} qinq 0 112
-p 6 route add 152.16.113.0 24 port 0 ether {port0_dst_mac} qinq 0 113
-p 6 route add 152.16.114.0 24 port 0 ether {port0_dst_mac} qinq 0 114
-p 6 route add 152.16.115.0 24 port 0 ether {port0_dst_mac} qinq 0 115
-p 6 route add 152.16.116.0 24 port 0 ether {port0_dst_mac} qinq 0 116
-p 6 route add 152.16.117.0 24 port 0 ether {port0_dst_mac} qinq 0 117
-p 6 route add 152.16.118.0 24 port 0 ether {port0_dst_mac} qinq 0 118
-p 6 route add 152.16.119.0 24 port 0 ether {port0_dst_mac} qinq 0 119
-p 6 route add 152.16.120.0 24 port 0 ether {port0_dst_mac} qinq 0 120
-p 6 route add 152.16.121.0 24 port 0 ether {port0_dst_mac} qinq 0 121
-p 6 route add 152.16.122.0 24 port 0 ether {port0_dst_mac} qinq 0 122
-p 6 route add 152.16.123.0 24 port 0 ether {port0_dst_mac} qinq 0 123
-p 6 route add 152.16.124.0 24 port 0 ether {port0_dst_mac} qinq 0 124
-p 6 route add 152.16.125.0 24 port 0 ether {port0_dst_mac} qinq 0 125
-p 6 route add 152.16.126.0 24 port 0 ether {port0_dst_mac} qinq 0 126
-p 6 route add 152.16.127.0 24 port 0 ether {port0_dst_mac} qinq 0 127
-p 6 route add 152.16.128.0 24 port 0 ether {port0_dst_mac} qinq 0 128
-p 6 route add 152.16.129.0 24 port 0 ether {port0_dst_mac} qinq 0 129
-p 6 route add 152.16.130.0 24 port 0 ether {port0_dst_mac} qinq 0 130
-p 6 route add 152.16.131.0 24 port 0 ether {port0_dst_mac} qinq 0 131
-p 6 route add 152.16.132.0 24 port 0 ether {port0_dst_mac} qinq 0 132
-p 6 route add 152.16.133.0 24 port 0 ether {port0_dst_mac} qinq 0 133
-p 6 route add 152.16.134.0 24 port 0 ether {port0_dst_mac} qinq 0 134
-p 6 route add 152.16.135.0 24 port 0 ether {port0_dst_mac} qinq 0 135
-p 6 route add 152.16.136.0 24 port 0 ether {port0_dst_mac} qinq 0 136
-p 6 route add 152.16.137.0 24 port 0 ether {port0_dst_mac} qinq 0 137
-p 6 route add 152.16.138.0 24 port 0 ether {port0_dst_mac} qinq 0 138
-p 6 route add 152.16.139.0 24 port 0 ether {port0_dst_mac} qinq 0 139
-p 6 route add 152.16.140.0 24 port 0 ether {port0_dst_mac} qinq 0 140
-p 6 route add 152.16.141.0 24 port 0 ether {port0_dst_mac} qinq 0 141
-p 6 route add 152.16.142.0 24 port 0 ether {port0_dst_mac} qinq 0 142
-p 6 route add 152.16.143.0 24 port 0 ether {port0_dst_mac} qinq 0 143
-p 6 route add 152.16.144.0 24 port 0 ether {port0_dst_mac} qinq 0 144
-p 6 route add 152.16.145.0 24 port 0 ether {port0_dst_mac} qinq 0 145
-p 6 route add 152.16.146.0 24 port 0 ether {port0_dst_mac} qinq 0 146
-p 6 route add 152.16.147.0 24 port 0 ether {port0_dst_mac} qinq 0 147
-p 6 route add 152.16.148.0 24 port 0 ether {port0_dst_mac} qinq 0 148
-p 6 route add 152.16.149.0 24 port 0 ether {port0_dst_mac} qinq 0 149
-p 6 route add 152.16.150.0 24 port 0 ether {port0_dst_mac} qinq 0 150
-p 6 route add 152.16.151.0 24 port 0 ether {port0_dst_mac} qinq 0 151
-p 6 route add 152.16.152.0 24 port 0 ether {port0_dst_mac} qinq 0 152
-p 6 route add 152.16.153.0 24 port 0 ether {port0_dst_mac} qinq 0 153
-p 6 route add 152.16.154.0 24 port 0 ether {port0_dst_mac} qinq 0 154
-p 6 route add 152.16.155.0 24 port 0 ether {port0_dst_mac} qinq 0 155
-p 6 route add 152.16.156.0 24 port 0 ether {port0_dst_mac} qinq 0 156
-p 6 route add 152.16.157.0 24 port 0 ether {port0_dst_mac} qinq 0 157
-p 6 route add 152.16.158.0 24 port 0 ether {port0_dst_mac} qinq 0 158
-p 6 route add 152.16.159.0 24 port 0 ether {port0_dst_mac} qinq 0 159
-p 6 route add 152.16.160.0 24 port 0 ether {port0_dst_mac} qinq 0 160
-p 6 route add 152.16.161.0 24 port 0 ether {port0_dst_mac} qinq 0 161
-p 6 route add 152.16.162.0 24 port 0 ether {port0_dst_mac} qinq 0 162
-p 6 route add 152.16.163.0 24 port 0 ether {port0_dst_mac} qinq 0 163
-p 6 route add 152.16.164.0 24 port 0 ether {port0_dst_mac} qinq 0 164
-p 6 route add 152.16.165.0 24 port 0 ether {port0_dst_mac} qinq 0 165
-p 6 route add 152.16.166.0 24 port 0 ether {port0_dst_mac} qinq 0 166
-p 6 route add 152.16.167.0 24 port 0 ether {port0_dst_mac} qinq 0 167
-p 6 route add 152.16.168.0 24 port 0 ether {port0_dst_mac} qinq 0 168
-p 6 route add 152.16.169.0 24 port 0 ether {port0_dst_mac} qinq 0 169
-p 6 route add 152.16.170.0 24 port 0 ether {port0_dst_mac} qinq 0 170
-p 6 route add 152.16.171.0 24 port 0 ether {port0_dst_mac} qinq 0 171
-p 6 route add 152.16.172.0 24 port 0 ether {port0_dst_mac} qinq 0 172
-p 6 route add 152.16.173.0 24 port 0 ether {port0_dst_mac} qinq 0 173
-p 6 route add 152.16.174.0 24 port 0 ether {port0_dst_mac} qinq 0 174
-p 6 route add 152.16.175.0 24 port 0 ether {port0_dst_mac} qinq 0 175
-p 6 route add 152.16.176.0 24 port 0 ether {port0_dst_mac} qinq 0 176
-p 6 route add 152.16.177.0 24 port 0 ether {port0_dst_mac} qinq 0 177
-p 6 route add 152.16.178.0 24 port 0 ether {port0_dst_mac} qinq 0 178
-p 6 route add 152.16.179.0 24 port 0 ether {port0_dst_mac} qinq 0 179
-p 6 route add 152.16.180.0 24 port 0 ether {port0_dst_mac} qinq 0 180
-p 6 route add 152.16.181.0 24 port 0 ether {port0_dst_mac} qinq 0 181
-p 6 route add 152.16.182.0 24 port 0 ether {port0_dst_mac} qinq 0 182
-p 6 route add 152.16.183.0 24 port 0 ether {port0_dst_mac} qinq 0 183
-p 6 route add 152.16.184.0 24 port 0 ether {port0_dst_mac} qinq 0 184
-p 6 route add 152.16.185.0 24 port 0 ether {port0_dst_mac} qinq 0 185
-p 6 route add 152.16.186.0 24 port 0 ether {port0_dst_mac} qinq 0 186
-p 6 route add 152.16.187.0 24 port 0 ether {port0_dst_mac} qinq 0 187
-p 6 route add 152.16.188.0 24 port 0 ether {port0_dst_mac} qinq 0 188
-p 6 route add 152.16.189.0 24 port 0 ether {port0_dst_mac} qinq 0 189
-p 6 route add 152.16.190.0 24 port 0 ether {port0_dst_mac} qinq 0 190
-p 6 route add 152.16.191.0 24 port 0 ether {port0_dst_mac} qinq 0 191
-p 6 route add 152.16.192.0 24 port 0 ether {port0_dst_mac} qinq 0 192
-p 6 route add 152.16.193.0 24 port 0 ether {port0_dst_mac} qinq 0 193
-p 6 route add 152.16.194.0 24 port 0 ether {port0_dst_mac} qinq 0 194
-p 6 route add 152.16.195.0 24 port 0 ether {port0_dst_mac} qinq 0 195
-p 6 route add 152.16.196.0 24 port 0 ether {port0_dst_mac} qinq 0 196
-p 6 route add 152.16.197.0 24 port 0 ether {port0_dst_mac} qinq 0 197
-p 6 route add 152.16.198.0 24 port 0 ether {port0_dst_mac} qinq 0 198
-p 6 route add 152.16.199.0 24 port 0 ether {port0_dst_mac} qinq 0 199
-p 6 route add 152.16.200.0 24 port 0 ether {port0_dst_mac} qinq 0 200
-p 6 route add 152.16.201.0 24 port 0 ether {port0_dst_mac} qinq 0 201
-p 6 route add 152.16.202.0 24 port 0 ether {port0_dst_mac} qinq 0 202
-p 6 route add 152.16.203.0 24 port 0 ether {port0_dst_mac} qinq 0 203
-p 6 route add 152.16.204.0 24 port 0 ether {port0_dst_mac} qinq 0 204
-p 6 route add 152.16.205.0 24 port 0 ether {port0_dst_mac} qinq 0 205
-p 6 route add 152.16.206.0 24 port 0 ether {port0_dst_mac} qinq 0 206
-p 6 route add 152.16.207.0 24 port 0 ether {port0_dst_mac} qinq 0 207
-p 6 route add 152.16.208.0 24 port 0 ether {port0_dst_mac} qinq 0 208
-p 6 route add 152.16.209.0 24 port 0 ether {port0_dst_mac} qinq 0 209
-p 6 route add 152.16.210.0 24 port 0 ether {port0_dst_mac} qinq 0 210
-p 6 route add 152.16.211.0 24 port 0 ether {port0_dst_mac} qinq 0 211
-p 6 route add 152.16.212.0 24 port 0 ether {port0_dst_mac} qinq 0 212
-p 6 route add 152.16.213.0 24 port 0 ether {port0_dst_mac} qinq 0 213
-p 6 route add 152.16.214.0 24 port 0 ether {port0_dst_mac} qinq 0 214
-p 6 route add 152.16.215.0 24 port 0 ether {port0_dst_mac} qinq 0 215
-p 6 route add 152.16.216.0 24 port 0 ether {port0_dst_mac} qinq 0 216
-p 6 route add 152.16.217.0 24 port 0 ether {port0_dst_mac} qinq 0 217
-p 6 route add 152.16.218.0 24 port 0 ether {port0_dst_mac} qinq 0 218
-p 6 route add 152.16.219.0 24 port 0 ether {port0_dst_mac} qinq 0 219
-p 6 route add 152.16.220.0 24 port 0 ether {port0_dst_mac} qinq 0 220
-p 6 route add 152.16.221.0 24 port 0 ether {port0_dst_mac} qinq 0 221
-p 6 route add 152.16.222.0 24 port 0 ether {port0_dst_mac} qinq 0 222
-p 6 route add 152.16.223.0 24 port 0 ether {port0_dst_mac} qinq 0 223
-p 6 route add 152.16.224.0 24 port 0 ether {port0_dst_mac} qinq 0 224
-p 6 route add 152.16.225.0 24 port 0 ether {port0_dst_mac} qinq 0 225
-p 6 route add 152.16.226.0 24 port 0 ether {port0_dst_mac} qinq 0 226
-p 6 route add 152.16.227.0 24 port 0 ether {port0_dst_mac} qinq 0 227
-p 6 route add 152.16.228.0 24 port 0 ether {port0_dst_mac} qinq 0 228
-p 6 route add 152.16.229.0 24 port 0 ether {port0_dst_mac} qinq 0 229
-p 6 route add 152.16.230.0 24 port 0 ether {port0_dst_mac} qinq 0 230
-p 6 route add 152.16.231.0 24 port 0 ether {port0_dst_mac} qinq 0 231
-p 6 route add 152.16.232.0 24 port 0 ether {port0_dst_mac} qinq 0 232
-p 6 route add 152.16.233.0 24 port 0 ether {port0_dst_mac} qinq 0 233
-p 6 route add 152.16.234.0 24 port 0 ether {port0_dst_mac} qinq 0 234
-p 6 route add 152.16.235.0 24 port 0 ether {port0_dst_mac} qinq 0 235
-p 6 route add 152.16.236.0 24 port 0 ether {port0_dst_mac} qinq 0 236
-p 6 route add 152.16.237.0 24 port 0 ether {port0_dst_mac} qinq 0 237
-p 6 route add 152.16.238.0 24 port 0 ether {port0_dst_mac} qinq 0 238
-p 6 route add 152.16.239.0 24 port 0 ether {port0_dst_mac} qinq 0 239
-p 6 route add 152.16.240.0 24 port 0 ether {port0_dst_mac} qinq 0 240
-p 6 route add 152.16.241.0 24 port 0 ether {port0_dst_mac} qinq 0 241
-p 6 route add 152.16.242.0 24 port 0 ether {port0_dst_mac} qinq 0 242
-p 6 route add 152.16.243.0 24 port 0 ether {port0_dst_mac} qinq 0 243
-p 6 route add 152.16.244.0 24 port 0 ether {port0_dst_mac} qinq 0 244
-p 6 route add 152.16.245.0 24 port 0 ether {port0_dst_mac} qinq 0 245
-p 6 route add 152.16.246.0 24 port 0 ether {port0_dst_mac} qinq 0 246
-p 6 route add 152.16.247.0 24 port 0 ether {port0_dst_mac} qinq 0 247
-p 6 route add 152.16.248.0 24 port 0 ether {port0_dst_mac} qinq 0 248
-p 6 route add 152.16.249.0 24 port 0 ether {port0_dst_mac} qinq 0 249
-p 6 route add 152.16.250.0 24 port 0 ether {port0_dst_mac} qinq 0 250
-p 6 route add 152.16.251.0 24 port 0 ether {port0_dst_mac} qinq 0 251
-p 6 route add 152.16.252.0 24 port 0 ether {port0_dst_mac} qinq 0 252
-p 6 route add 152.16.253.0 24 port 0 ether {port0_dst_mac} qinq 0 253
-p 6 route add 152.16.254.0 24 port 0 ether {port0_dst_mac} qinq 0 254
-p 6 route add 152.16.255.0 24 port 0 ether {port0_dst_mac} qinq 0 255
-p 6 route add default 1
diff --git a/samples/vnf_samples/nsut/vpe/vpe_config/vpe_upstream b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_upstream
new file mode 100644
index 000000000..a571c514f
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_upstream
@@ -0,0 +1,64 @@
+# 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.
+
+[PIPELINE1]
+type = FIREWALL
+core = s{socket}c1
+pktq_in = RXQ0.0
+pktq_out = SWQ0 SINK0
+n_rules = 4096
+pkt_type = qinq_ipv4
+
+[PIPELINE2]
+type = FLOW_CLASSIFICATION
+core = s{socket}c2
+pktq_in = SWQ0
+pktq_out = SWQ1 SINK1
+n_flows = 65536
+key_size = 8
+key_offset = 268
+key_mask = 00000FFF00000FFF
+flowid_offset = 172
+
+[PIPELINE3]
+type = FLOW_ACTIONS
+core = s{socket}c2h
+pktq_in = SWQ1
+pktq_out = SWQ2
+n_flows = 65536
+n_meters_per_flow = 1
+flow_id_offset = 172
+ip_hdr_offset = 278
+color_offset = 176
+
+[PIPELINE4]
+type = FLOW_ACTIONS
+core = s{socket}c1h
+pktq_in = SWQ2
+pktq_out = SWQ3
+n_flows = 65536
+n_meters_per_flow = 4
+flow_id_offset = 172
+ip_hdr_offset = 278
+color_offset = 176
+
+[PIPELINE5]
+type = ROUTING
+core = s0c3
+pktq_in = SWQ3
+pktq_out = TXQ1.0 SINK2
+encap = ethernet_mpls
+mpls_color_mark = yes
+ip_hdr_offset = 278
+color_offset = 176
diff --git a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml
new file mode 100644
index 000000000..c56a7e173
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml
@@ -0,0 +1,53 @@
+# 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.
+
+nsd:nsd-catalog:
+ nsd:
+ - id: VPE
+ name: VPE
+ short-name: VPE
+ description: scenario with VPE,L3fwd and VNF
+ constituent-vnfd:
+ - member-vnf-index: '1'
+ vnfd-id-ref: tg__1
+ VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #tg_vpe_upstream.yaml #VPE VNF
+ - member-vnf-index: '2'
+ vnfd-id-ref: vnf__1
+ VNF model: ../../vnf_descriptors/vpe_vnf.yaml #tg_l3fwd.yaml #tg_trex_tpl.yaml #TREX
+ - member-vnf-index: '3'
+ vnfd-id-ref: tg__2
+ VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #tg_vpe_upstream.yaml #VPE VNF
+
+ vld:
+ - id: private
+ name: tg__1 to vnf__1 link 1
+ type: ELAN
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: '1'
+ vnfd-connection-point-ref: xe0
+ vnfd-id-ref: tg__1 #TREX
+ - member-vnf-index-ref: '2'
+ vnfd-connection-point-ref: xe0
+ vnfd-id-ref: vnf__1 #VNF
+
+ - id: public
+ name: vnf__1 to tg__2 link 2
+ type: ELAN
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: '2'
+ vnfd-connection-point-ref: xe1
+ vnfd-id-ref: vnf__1 #L3fwd
+ - member-vnf-index-ref: '3'
+ vnfd-connection-point-ref: xe0
+ vnfd-id-ref: tg__2 #VPE VNF
diff --git a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml
new file mode 100644
index 000000000..610805d3b
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml
@@ -0,0 +1,50 @@
+# 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.
+
+nsd:nsd-catalog:
+ nsd:
+ - id: VPE
+ name: VPE
+ short-name: VPE
+ description: scenario with VPE,L3fwd and VNF
+ constituent-vnfd:
+ - member-vnf-index: '1'
+ vnfd-id-ref: tg__1
+ VNF model: ../../vnf_descriptors/ixia_rfc2544_tpl.yaml
+ - member-vnf-index: '2'
+ vnfd-id-ref: vnf__1
+ VNF model: ../../vnf_descriptors/vpe_vnf.yaml
+
+ vld:
+ - id: private
+ name: tg__1 to vnf__1 link 1
+ type: ELAN
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: '1'
+ vnfd-connection-point-ref: xe0
+ vnfd-id-ref: tg__1 #TREX
+ - member-vnf-index-ref: '2'
+ vnfd-connection-point-ref: xe0
+ vnfd-id-ref: vnf__1 #VNF
+
+ - id: public
+ name: vnf__1 to tg__1 link 2
+ type: ELAN
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: '2'
+ vnfd-connection-point-ref: xe1
+ vnfd-id-ref: vnf__1 #L3fwd
+ - member-vnf-index-ref: '1'
+ vnfd-connection-point-ref: xe1
+ vnfd-id-ref: tg__1 #VPE VNF
diff --git a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml
new file mode 100644
index 000000000..5505a832b
--- /dev/null
+++ b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml
@@ -0,0 +1,50 @@
+# 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.
+
+nsd:nsd-catalog:
+ nsd:
+ - id: VPE
+ name: VPE
+ short-name: VPE
+ description: scenario with VPE,L3fwd and VNF
+ constituent-vnfd:
+ - member-vnf-index: '1'
+ vnfd-id-ref: tg__1
+ VNF model: ../../vnf_descriptors/tg_ixload.yaml
+ - member-vnf-index: '2'
+ vnfd-id-ref: vnf__1
+ VNF model: ../../vnf_descriptors/vpe_vnf.yaml
+
+ vld:
+ - id: private
+ name: tg__1 to vnf__1 link 1
+ type: ELAN
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: '1'
+ vnfd-connection-point-ref: xe0
+ vnfd-id-ref: tg__1 #TREX
+ - member-vnf-index-ref: '2'
+ vnfd-connection-point-ref: xe0
+ vnfd-id-ref: vnf__1 #VNF
+
+ - id: public
+ name: vnf__1 to tg__1 link 2
+ type: ELAN
+ vnfd-connection-point-ref:
+ - member-vnf-index-ref: '2'
+ vnfd-connection-point-ref: xe1
+ vnfd-id-ref: vnf__1 #L3fwd
+ - member-vnf-index-ref: '1'
+ vnfd-connection-point-ref: xe1
+ vnfd-id-ref: tg__1 #VPE VNF
diff --git a/samples/vnf_samples/traffic_profiles/example.yaml b/samples/vnf_samples/traffic_profiles/example.yaml
index 71371995e..fc2501526 100644
--- a/samples/vnf_samples/traffic_profiles/example.yaml
+++ b/samples/vnf_samples/traffic_profiles/example.yaml
@@ -25,174 +25,174 @@ traffic_profile:
# that specifies a range (e.g. ipv4 address, port)
private:
- - ipv4_1:
- outer_l2:
- framesize:
- 64B: {{ get(imix_small, 12) }}
- 128B: {{get(imix_128B, 12) }}
- 256B: {{get(imix_256B, 12) }}
- 373b: {{ get(imix_373B, 12) }}
- 570B: {{get(imix_570B, 12) }}
- 1400B: {{get(imix_1400B, 12) }}
- 1518b: {{get(imix_1500B, 12) }}
- srcmac: {{src_mac}} # xe0.local_mac
- dstmac: {{dst_mac}} # xe0.dst_mac
- QinQ:
- S-VLAN:
- id: {{ get(flow.s_vlan_range, "0") }}
- priority: 0
- cfi: 0
- C-VLAN:
- id: {{ get(flow.c_vlan_range, "0") }}
- priority: 0
- cfi: 0
- mpls:
- label: {{ get(flow.mpls_label, "0") }}
-
- outer_l3v4:
- proto: {{ get(flow.outer_proto, "udp") }},
- srcip4: {{ get(flow.outer_srcip4, "1.1.1.1") }}
- dstip4: {{ get(flow.outer_dstip4, "90.90.90.90") }}
- ttl: 32
- dscp: {{ get(flow.tos, 0) }}
-
- outer_l4:
- srcport: {{ get(flow.outer_srcport, "3002") }}
- dstport: {{ get(flow.outer_dstport, "3001") }}
- vni: {{ get(flow.vxlan_vni, "2345") }} #optional
- inner_l2: #optional
- srcmac: {{ get(flow.inner_srcmac, "00:00:00:00:00:00") }}
- dstmac: {{ get(flow.inner_dstmac, "00:00:00:00:00:00") }}
-
- inner_l3v4: #optional
- proto: {{ get(flow.inner_proto, "udp") }},
- srcip4: {{ get(flow.inner_srcip4, "1.1.1.1") }}
- dstip4: {{ get(flow.inner_dstip4, "90.90.90.90") }}
- ttl: 32
- dscp: {{ get(flow.inner_tos, 0) }}
-
- inner_l3v6:
- proto: {{ get(flow.inner_proto, "udp") }},
- srcip6: {{ get(flow.inner_srcip6, "2001::1") }}
- dstip6: {{ get(flow.outer_dstip6, "2001::11") }}
- ttl: 32
- tc: {{ get(flow.inner_tos, 0) }}
-
- inner_l4:
- srcport: {{ get(flow.inner_srcport, "3002") }}
- dstport: {{ get(flow.inner_dstport, "3001") }}
-
- - ipv6_2:
- outer_l2:
- framesize:
- 64B: {{ get(imix_small, 12) }}
- 128B: {{get(imix_128B, 12) }}
- 256B: {{get(imix_256B, 12) }}
- 373b: {{ get(imix_373B, 12) }}
- 570B: {{get(imix_570B, 12) }}
- 1400B: {{get(imix_1400B, 12) }}
- 1518b: {{get(imix_1500B, 12) }}
- srcmac: {{src_mac}} # xe0.local_mac
- dstmac: {{dst_mac}} # xe0.dst_mac
- QinQ:
- S-VLAN:
- id: {{ get(flow.s_vlan_range, "0") }}
- priority: 0
- cfi: 0
- C-VLAN:
- id: {{ get(flow.c_vlan_range, "0") }}
- priority: 0
- cfi: 0
- mpls:
- label: {{ get(flow.mpls_label, "0") }}
-
- outer_l3v6:
- proto: {{ get(flow.outer_proto, "udp") }},
- srcip6: {{ get(flow.outer_srcip6, "2001::1") }}
- dstip6: {{ get(flow.outer_dstip6, "2001::11") }}
- ttl: 32
- tc: {{ get(flow.outer_tos, 0) }}
-
- outer_l4:
- srcport: {{ get(flow.outer_srcport, "3002") }}
- dstport: {{ get(flow.outer_dstport, "3001") }}
- vni: {{ get(flow.vxlan_vni, "2345") }} #optional
- inner_l2: #optional
- srcmac: {{ get(flow.inner_srcmac, "00:00:00:00:00:00") }}
- dstmac: {{ get(flow.inner_dstmac, "00:00:00:00:00:00") }}
-
- inner_l3v4: #optional
- proto: {{ get(flow.inner_proto, "udp") }},
- srcip4: {{ get(flow.inner_srcip4, "1.1.1.1") }}
- dstip4: {{ get(flow.inner_dstip4, "90.90.90.90") }}
- ttl: 32
- dscp: {{ get(flow.inner_tos, 0) }}
-
- inner_l3v6:
- proto: {{ get(flow.inner_proto, "udp") }},
- srcip6: {{ get(flow.inner_srcip6, "2001::1") }}
- dstip6: {{ get(flow.outer_dstip6, "2001::11") }}
- ttl: 32
- tc: {{ get(flow.inner_tos, 0) }}
-
- inner_l4:
- srcport: {{ get(flow.inner_srcport, "3002") }}
- dstport: {{ get(flow.inner_dstport, "3001") }}
+ - ipv4_1:
+ outer_l2:
+ framesize:
+ 64B: {{ get(imix_small, 12) }}
+ 128B: {{get(imix_128B, 12) }}
+ 256B: {{get(imix_256B, 12) }}
+ 373b: {{ get(imix_373B, 12) }}
+ 570B: {{get(imix_570B, 12) }}
+ 1400B: {{get(imix_1400B, 12) }}
+ 1518b: {{get(imix_1500B, 12) }}
+ srcmac: {{src_mac}} # xe0.local_mac
+ dstmac: {{dst_mac}} # xe0.dst_mac
+ QinQ:
+ S-VLAN:
+ id: {{ get(flow.s_vlan_range, "0") }}
+ priority: 0
+ cfi: 0
+ C-VLAN:
+ id: {{ get(flow.c_vlan_range, "0") }}
+ priority: 0
+ cfi: 0
+ mpls:
+ label: {{ get(flow.mpls_label, "0") }}
+
+ outer_l3v4:
+ proto: {{ get(flow.outer_proto, "udp") }},
+ srcip4: {{ get(flow.outer_srcip4, "1.1.1.1") }}
+ dstip4: {{ get(flow.outer_dstip4, "90.90.90.90") }}
+ ttl: 32
+ dscp: {{ get(flow.tos, 0) }}
+
+ outer_l4:
+ srcport: {{ get(flow.outer_srcport, "3002") }}
+ dstport: {{ get(flow.outer_dstport, "3001") }}
+ vni: {{ get(flow.vxlan_vni, "2345") }} #optional
+ inner_l2: #optional
+ srcmac: {{ get(flow.inner_srcmac, "00:00:00:00:00:00") }}
+ dstmac: {{ get(flow.inner_dstmac, "00:00:00:00:00:00") }}
+
+ inner_l3v4: #optional
+ proto: {{ get(flow.inner_proto, "udp") }},
+ srcip4: {{ get(flow.inner_srcip4, "1.1.1.1") }}
+ dstip4: {{ get(flow.inner_dstip4, "90.90.90.90") }}
+ ttl: 32
+ dscp: {{ get(flow.inner_tos, 0) }}
+
+ inner_l3v6:
+ proto: {{ get(flow.inner_proto, "udp") }},
+ srcip6: {{ get(flow.inner_srcip6, "2001::1") }}
+ dstip6: {{ get(flow.outer_dstip6, "2001::11") }}
+ ttl: 32
+ tc: {{ get(flow.inner_tos, 0) }}
+
+ inner_l4:
+ srcport: {{ get(flow.inner_srcport, "3002") }}
+ dstport: {{ get(flow.inner_dstport, "3001") }}
+
+ - ipv6_2:
+ outer_l2:
+ framesize:
+ 64B: {{ get(imix_small, 12) }}
+ 128B: {{get(imix_128B, 12) }}
+ 256B: {{get(imix_256B, 12) }}
+ 373b: {{ get(imix_373B, 12) }}
+ 570B: {{get(imix_570B, 12) }}
+ 1400B: {{get(imix_1400B, 12) }}
+ 1518b: {{get(imix_1500B, 12) }}
+ srcmac: {{src_mac}} # xe0.local_mac
+ dstmac: {{dst_mac}} # xe0.dst_mac
+ QinQ:
+ S-VLAN:
+ id: {{ get(flow.s_vlan_range, "0") }}
+ priority: 0
+ cfi: 0
+ C-VLAN:
+ id: {{ get(flow.c_vlan_range, "0") }}
+ priority: 0
+ cfi: 0
+ mpls:
+ label: {{ get(flow.mpls_label, "0") }}
+
+ outer_l3v6:
+ proto: {{ get(flow.outer_proto, "udp") }},
+ srcip6: {{ get(flow.outer_srcip6, "2001::1") }}
+ dstip6: {{ get(flow.outer_dstip6, "2001::11") }}
+ ttl: 32
+ tc: {{ get(flow.outer_tos, 0) }}
+
+ outer_l4:
+ srcport: {{ get(flow.outer_srcport, "3002") }}
+ dstport: {{ get(flow.outer_dstport, "3001") }}
+ vni: {{ get(flow.vxlan_vni, "2345") }} #optional
+ inner_l2: #optional
+ srcmac: {{ get(flow.inner_srcmac, "00:00:00:00:00:00") }}
+ dstmac: {{ get(flow.inner_dstmac, "00:00:00:00:00:00") }}
+
+ inner_l3v4: #optional
+ proto: {{ get(flow.inner_proto, "udp") }},
+ srcip4: {{ get(flow.inner_srcip4, "1.1.1.1") }}
+ dstip4: {{ get(flow.inner_dstip4, "90.90.90.90") }}
+ ttl: 32
+ dscp: {{ get(flow.inner_tos, 0) }}
+
+ inner_l3v6:
+ proto: {{ get(flow.inner_proto, "udp") }},
+ srcip6: {{ get(flow.inner_srcip6, "2001::1") }}
+ dstip6: {{ get(flow.outer_dstip6, "2001::11") }}
+ ttl: 32
+ tc: {{ get(flow.inner_tos, 0) }}
+
+ inner_l4:
+ srcport: {{ get(flow.inner_srcport, "3002") }}
+ dstport: {{ get(flow.inner_dstport, "3001") }}
public:
- - ipv4_2:
- outer_l2:
- framesize:
- 64B: {{ get(imix_small, 12) }}
- 128B: {{get(imix_128B, 12) }}
- 256B: {{get(imix_256B, 12) }}
- 373b: {{ get(imix_373B, 12) }}
- 570B: {{get(imix_570B, 12) }}
- 1400B: {{get(imix_1400B, 12) }}
- 1518b: {{get(imix_1500B, 12) }}
- srcmac: {{get(private.ipv4_1.dst_mac}} # xe0.local_mac
- dstmac: {{get)private.ipv4_1.src_mac}} # xe0.dst_mac
- QinQ:
- S-VLAN:
- id: {{ get(flow.s_vlan_range, "0") }}
- priority: 0
- cfi: 0
- C-VLAN:
- id: {{ get(flow.c_vlan_range, "0") }}
- priority: 0
- cfi: 0
- mpls:
- label: {{ get(flow.mpls_label, "0") }}
-
- outer_l3v4:
- proto: {{ get(flow.outer_proto, "udp") }},
- srcip4: {{ get(private.ipv4_1.outer_l3v4.dstip4) }}
- dstip4: {{ get(private.ipv4_1.outer_l3v4.srcip4) }}
- ttl: 32
- dscp: {{ get(flow.tos, 0) }}
-
- outer_l4:
- srcport: {{ get(private.ipv4_1.outer_l4.dstport) }}
- dstport: {{ get(private.ipv4_1.outer_l4.srcport) }}
- vni: {{ get(flow.vxlan_vni, "2345") }} #optional
- inner_l2: #optional
- srcmac: {{ get(private.ipv4_1.outer_l4.inner_l2.dstmac) }}
- dstmac: {{ get(private.ipv4_1.outer_l4.inner_l2.srcmac) }}
-
- inner_l3v4: #optional
- proto: {{ get(flow.inner_proto, "udp") }},
- srcip4: {{ get(private.ipv4_1.inner_l3v4.dstip4) }}
- dstip4: {{ get(private.ipv4_1.inner_l3v4.srcip4) }}
- ttl: 32
- dscp: {{ get(flow.inner_tos, 0) }}
-
- inner_l3v6:
- proto: {{ get(flow.inner_proto, "udp") }},
- srcip6: {{ get(private.ipv4_1.inner_l3v6.dstip6) }}
- dstip6: {{ get(private.ipv4_1.inner_l3v6.srcip6) }}
- ttl: 32
- tc: {{ get(flow.inner_tos, 0) }}
-
- inner_l4:
- srcport: {{ get(private.ipv4_1.inner_l4.dstport) }}
- dstport: {{ get(private.ipv4_1.inner_l4.srcport) }}
+ - ipv4_2:
+ outer_l2:
+ framesize:
+ 64B: {{ get(imix_small, 12) }}
+ 128B: {{get(imix_128B, 12) }}
+ 256B: {{get(imix_256B, 12) }}
+ 373b: {{ get(imix_373B, 12) }}
+ 570B: {{get(imix_570B, 12) }}
+ 1400B: {{get(imix_1400B, 12) }}
+ 1518b: {{get(imix_1500B, 12) }}
+ srcmac: {{get(private.ipv4_1.dst_mac}} # xe0.local_mac
+ dstmac: {{get)private.ipv4_1.src_mac}} # xe0.dst_mac
+ QinQ:
+ S-VLAN:
+ id: {{ get(flow.s_vlan_range, "0") }}
+ priority: 0
+ cfi: 0
+ C-VLAN:
+ id: {{ get(flow.c_vlan_range, "0") }}
+ priority: 0
+ cfi: 0
+ mpls:
+ label: {{ get(flow.mpls_label, "0") }}
+
+ outer_l3v4:
+ proto: {{ get(flow.outer_proto, "udp") }},
+ srcip4: {{ get(private.ipv4_1.outer_l3v4.dstip4) }}
+ dstip4: {{ get(private.ipv4_1.outer_l3v4.srcip4) }}
+ ttl: 32
+ dscp: {{ get(flow.tos, 0) }}
+
+ outer_l4:
+ srcport: {{ get(private.ipv4_1.outer_l4.dstport) }}
+ dstport: {{ get(private.ipv4_1.outer_l4.srcport) }}
+ vni: {{ get(flow.vxlan_vni, "2345") }} #optional
+ inner_l2: #optional
+ srcmac: {{ get(private.ipv4_1.outer_l4.inner_l2.dstmac) }}
+ dstmac: {{ get(private.ipv4_1.outer_l4.inner_l2.srcmac) }}
+
+ inner_l3v4: #optional
+ proto: {{ get(flow.inner_proto, "udp") }},
+ srcip4: {{ get(private.ipv4_1.inner_l3v4.dstip4) }}
+ dstip4: {{ get(private.ipv4_1.inner_l3v4.srcip4) }}
+ ttl: 32
+ dscp: {{ get(flow.inner_tos, 0) }}
+
+ inner_l3v6:
+ proto: {{ get(flow.inner_proto, "udp") }},
+ srcip6: {{ get(private.ipv4_1.inner_l3v6.dstip6) }}
+ dstip6: {{ get(private.ipv4_1.inner_l3v6.srcip6) }}
+ ttl: 32
+ tc: {{ get(flow.inner_tos, 0) }}
+
+ inner_l4:
+ srcport: {{ get(private.ipv4_1.inner_l4.dstport) }}
+ dstport: {{ get(private.ipv4_1.inner_l4.srcport) }}
diff --git a/samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml b/samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml
new file mode 100644
index 000000000..a7394abf1
--- /dev/null
+++ b/samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml
@@ -0,0 +1,24 @@
+schema: "isb:traffic_profile:0.1"
+
+name: TrafficProfileGenericHTTP
+description: Traffic profile to run HTTP test
+traffic_profile:
+ traffic_type: TrafficProfileGenericHTTP
+
+#http client specific values
+private_1:
+ http_no_requests: "1000" # number of http iterations
+ http_concurency: "65000" # number of threads to be run
+ http_locator: "/1B.bin" # http locator to be read
+ http_peer_address: "152.40.40.20" # address range of the servers
+ http_peer_port: "9004" # port range of the server
+ http_client_address: "152.16.100.20" # address range of the servers
+ private_subnet_mask: "255.255.255.0"
+ attacker_tests: "False" # True : If attacker Test, False : Otherwise
+
+#http server side
+public_1:
+ http_locator_image_size: "1B" # image size requested by http client
+ http_bind_address: "152.40.40.20" # where address is bound
+ http_bind_port: "9004" # when port is bound
+ public_subnet_mask: "255.255.255.0"
diff --git a/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml b/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml
new file mode 100644
index 000000000..e713ea858
--- /dev/null
+++ b/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml
@@ -0,0 +1,18 @@
+# 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
index f3046f463..8bb913ebf 100644
--- a/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets_vpe.yaml
+++ b/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets_vpe.yaml
@@ -13,6 +13,8 @@
# limitations under the License.
flow:
- srcip4_range: '152.16.0.20'
- dstip4_range: '152.40.0.20'
+ 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
diff --git a/samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml b/samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml
new file mode 100644
index 000000000..2854826e6
--- /dev/null
+++ b/samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml
@@ -0,0 +1,89 @@
+# 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 definition for ACL tests - 1K flows - ipv4 only
+#
+# the number of flows defines the widest range of parameters
+# for example if srcip_range=1.0.0.1-1.0.0.255 and dst_ip_range=10.0.0.1-10.0.1.255
+# and it should define only 16 flows
+#
+#there is assumption that packets generated will have a random sequences of following addresses pairs
+# in the packets
+# 1. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512)
+# 2. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512)
+# ...
+# 512. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512)
+#
+# not all combination should be filled
+# Any other field with random range will be added to flow definition
+#
+# the example.yaml provides all possibilities for traffic generation
+#
+# 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.
+#
+schema: "nsb:traffic_profile:0.1"
+
+# This file is a template, it will be filled with values from tc.yaml before passing to the traffic generator
+
+name: rfc2544
+description: Traffic profile to run RFC2544 latency
+traffic_profile:
+ traffic_type : RFC2544Profile # defines traffic behavior - constant or look for highest possible throughput
+ frame_rate : 100 # pc of linerate
+ # that specifies a range (e.g. ipv4 address, port)
+
+
+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') }}"
+
+ 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') }}"
+ ttl: 32
+ dscp: 0
+ outer_l4:
+ srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
+ dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+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') }}"
+
+ 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') }}"
+ ttl: 32
+ dscp: 0
+ outer_l4:
+ srcport: "{{get(flow, 'flow.dstport_range', '1234') }}"
+ dstport: "{{get(flow, 'flow.srcport_range', '2001') }}"
diff --git a/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml b/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml
index cfa166a74..e935bdbd0 100644
--- a/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml
+++ b/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml
@@ -45,7 +45,7 @@ traffic_profile:
# that specifies a range (e.g. ipv4 address, port)
-private:
+private_1:
ipv4:
outer_l2:
framesize:
@@ -69,15 +69,15 @@ private:
outer_l3v4:
proto: "tcp"
- srcip4: "{{get(flow, 'flow.srcip4_range', '192.168.0.0-192.168.255.255') }}"
- dstip4: "{{get(flow, 'flow.dstip4_range', '192.16.0.0-192.16.0.31') }}"
+ 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') }}"
ttl: 32
dscp: 32
outer_l4:
srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
-public:
+public_1:
ipv4:
outer_l2:
framesize:
@@ -91,8 +91,62 @@ public:
outer_l3v4:
proto: "tcp"
- srcip4: "{{get(flow, 'flow.dstip4_range', '192.16.0.0-192.16.0.31') }}"
- dstip4: "{{get(flow, 'flow.srcip4_range', '192.168.0.0-192.168.255.255') }}"
+ 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') }}"
+ ttl: 32
+ dscp: 32
+
+ outer_l4:
+ srcport: "{{get(flow, 'flow.dstport_range', '0') }}"
+ dstport: "{{get(flow, 'flow.srcport_range', '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') }}"
+
+ QinQ:
+ S-VLAN:
+ id: 128
+ priority: 0
+ cfi: 0
+ C-VLAN:
+ id: 512
+ priority: 0
+ cfi: 0
+
+ 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') }}"
+ ttl: 32
+ dscp: 32
+
+ outer_l4:
+ srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
+ dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
+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') }}"
+
+ 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') }}"
ttl: 32
dscp: 32
diff --git a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml
new file mode 100644
index 000000000..4a21a4274
--- /dev/null
+++ b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml
@@ -0,0 +1,154 @@
+# 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 definition for ACL tests - 1K flows - ipv4 only
+#
+# the number of flows defines the widest range of parameters
+# for example if srcip_range=1.0.0.1-1.0.0.255 and dst_ip_range=10.0.0.1-10.0.1.255
+# and it should define only 16 flows
+#
+#there is assumption that packets generated will have a random sequences of following addresses pairs
+# in the packets
+# 1. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512)
+# 2. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512)
+# ...
+# 512. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512)
+#
+# not all combination should be filled
+# Any other field with random range will be added to flow definition
+#
+# the example.yaml provides all possibilities for traffic generation
+#
+# 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.
+#
+schema: "isb:traffic_profile:0.1"
+
+# This file is a template, it will be filled with values from tc.yaml before passing to the traffic generator
+
+name: rfc2544
+description: Traffic profile to run RFC2544 latency
+traffic_profile:
+ traffic_type : IXIARFC2544Profile # defines traffic behavior - constant or look for highest possible throughput
+ frame_rate : 100 # pc of linerate
+ # that specifies a range (e.g. ipv4 address, port)
+
+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') }}"
+
+ QinQ:
+ S-VLAN:
+ id: 128
+ priority: 0
+ cfi: 0
+ C-VLAN:
+ id: 512
+ priority: 0
+ cfi: 0
+
+ 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') }}"
+ ttl: 32
+ dscp: 32
+
+ outer_l4:
+ srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
+ dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
+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') }}"
+
+ 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') }}"
+ ttl: 32
+ dscp: 32
+
+ outer_l4:
+ srcport: "{{get(flow, 'flow.dstport_range', '0') }}"
+ dstport: "{{get(flow, 'flow.srcport_range', '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') }}"
+
+ QinQ:
+ S-VLAN:
+ id: 128
+ priority: 0
+ cfi: 0
+ C-VLAN:
+ id: 512
+ priority: 0
+ cfi: 0
+
+ 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') }}"
+ ttl: 32
+ dscp: 32
+
+ outer_l4:
+ srcport: "{{get(flow, 'flow.srcport_range', '0') }}"
+ dstport: "{{get(flow, 'flow.dstport_range', '0') }}"
+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') }}"
+
+ 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') }}"
+ ttl: 32
+ dscp: 32
+
+ outer_l4:
+ srcport: "{{get(flow, 'flow.dstport_range', '0') }}"
+ dstport: "{{get(flow, 'flow.srcport_range', '0') }}"
diff --git a/samples/vnf_samples/traffic_profiles/vpe/HTTP-vPE_IPv4_2Ports.rxf b/samples/vnf_samples/traffic_profiles/vpe/HTTP-vPE_IPv4_2Ports.rxf
new file mode 100644
index 000000000..a11025fa1
--- /dev/null
+++ b/samples/vnf_samples/traffic_profiles/vpe/HTTP-vPE_IPv4_2Ports.rxf
@@ -0,0 +1,1335 @@
+<?xml version="1.0" ?>
+<root ver="[21, [1, [0, [0]]]]" type="ixRepository">
+ <_smSessionXml ver="[0, [1, [0, [0]]]]" type="ixSMSessionXML">
+ <xml type="str">&lt;rpf&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.SMSession type=&quot;Ixia.Aptixia.StackManager.SMSession&quot; objectid=&quot;fa09b9eb-82e7-423b-8f09-12129de0d853&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;doWaitLinkUp type=&quot;Bool&quot;&gt;0&lt;/doWaitLinkUp&gt;&#13;&#10; &lt;doGratArp type=&quot;Bool&quot;&gt;0&lt;/doGratArp&gt;&#13;&#10; &lt;subscribeToGratArpNotifications type=&quot;Bool&quot;&gt;0&lt;/subscribeToGratArpNotifications&gt;&#13;&#10; &lt;doInterfaceCheck type=&quot;Bool&quot;&gt;0&lt;/doInterfaceCheck&gt;&#13;&#10; &lt;rebootPortsBeforeConfigure type=&quot;Bool&quot;&gt;0&lt;/rebootPortsBeforeConfigure&gt;&#13;&#10; &lt;testDuration type=&quot;Int&quot;&gt;10000&lt;/testDuration&gt;&#13;&#10; &lt;checkLinkState type=&quot;Bool&quot;&gt;0&lt;/checkLinkState&gt;&#13;&#10; &lt;portGroupList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.PortGroup type=&quot;Ixia.Aptixia.StackManager.PortGroup&quot; objectid=&quot;865be042-32d5-426a-9e75-0908c943801f&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;client network&lt;/name&gt;&#13;&#10; &lt;category type=&quot;String&quot; /&gt;&#13;&#10; &lt;stack type=&quot;Ixia.Aptixia.StackManager.L1EthernetPlugin&quot; objectid=&quot;1dcd6e1b-17cd-45a1-875a-cbea40d3468c&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;autoNegotiate type=&quot;Bool&quot;&gt;1&lt;/autoNegotiate&gt;&#13;&#10; &lt;speed type=&quot;String&quot;&gt;k100FD&lt;/speed&gt;&#13;&#10; &lt;advertise10Half type=&quot;Bool&quot;&gt;1&lt;/advertise10Half&gt;&#13;&#10; &lt;advertise10Full type=&quot;Bool&quot;&gt;1&lt;/advertise10Full&gt;&#13;&#10; &lt;advertise100Half type=&quot;Bool&quot;&gt;1&lt;/advertise100Half&gt;&#13;&#10; &lt;advertise100Full type=&quot;Bool&quot;&gt;1&lt;/advertise100Full&gt;&#13;&#10; &lt;advertise1000Full type=&quot;Bool&quot;&gt;1&lt;/advertise1000Full&gt;&#13;&#10; &lt;cardDualPhy type=&quot;Ixia.Aptixia.StackManager.DualPhyPlugin&quot; objectid=&quot;b458c333-b4d4-48ef-bd38-3b456f72f8c8&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;medium type=&quot;String&quot;&gt;auto&lt;/medium&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/cardDualPhy&gt;&#13;&#10; &lt;cardElm type=&quot;Ixia.Aptixia.StackManager.EthernetELMPlugin&quot; objectid=&quot;28c0383a-76a7-4750-8162-2ad946ddac97&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;negotiateMasterSlave type=&quot;Bool&quot;&gt;1&lt;/negotiateMasterSlave&gt;&#13;&#10; &lt;negotiationType type=&quot;String&quot;&gt;master&lt;/negotiationType&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/cardElm&gt;&#13;&#10; &lt;enableFlowControl type=&quot;Bool&quot;&gt;0&lt;/enableFlowControl&gt;&#13;&#10; &lt;directedAddress type=&quot;String&quot;&gt;01:80:C2:00:00:01&lt;/directedAddress&gt;&#13;&#10; &lt;dataCenter type=&quot;Ixia.Aptixia.StackManager.DataCenterSettings&quot; objectid=&quot;b9a0be2e-3880-4100-9e29-9b474f9301f4&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;dcSupported type=&quot;Bool&quot;&gt;1&lt;/dcSupported&gt;&#13;&#10; &lt;dcEnabled type=&quot;Bool&quot;&gt;0&lt;/dcEnabled&gt;&#13;&#10; &lt;dcFlowControl type=&quot;Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType&quot;&gt;0&lt;/dcFlowControl&gt;&#13;&#10; &lt;dcMode type=&quot;Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode&quot;&gt;2&lt;/dcMode&gt;&#13;&#10; &lt;dcPfcMapping type=&quot;IntList&quot; /&gt;&#13;&#10; &lt;dcPfcPauseEnable type=&quot;Bool&quot;&gt;0&lt;/dcPfcPauseEnable&gt;&#13;&#10; &lt;dcPfcPauseDelay type=&quot;Int&quot;&gt;1&lt;/dcPfcPauseDelay&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/dataCenter&gt;&#13;&#10; &lt;childrenList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.L2EthernetPlugin type=&quot;Ixia.Aptixia.StackManager.L2EthernetPlugin&quot; objectid=&quot;e0232591-010e-492c-8a28-75e436f4adb2&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;macRangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.MacRange type=&quot;Ixia.Aptixia.StackManager.MacRange&quot; objectid=&quot;3011c8a8-a9fd-4b76-a27d-91948113ed4f&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;MAC-R1&lt;/name&gt;&#13;&#10; &lt;mac type=&quot;String&quot;&gt;00:98:10:64:14:00&lt;/mac&gt;&#13;&#10; &lt;incrementBy type=&quot;String&quot;&gt;00:00:00:00:00:01&lt;/incrementBy&gt;&#13;&#10; &lt;mtu type=&quot;Int&quot;&gt;1500&lt;/mtu&gt;&#13;&#10; &lt;count type=&quot;Int&quot;&gt;1&lt;/count&gt;&#13;&#10; &lt;vlanRange type=&quot;Ixia.Aptixia.StackManager.VlanIdRange&quot; objectid=&quot;adb27552-7165-46a3-bc9e-04914adf40ac&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;VLAN-R1&lt;/name&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;0&lt;/enabled&gt;&#13;&#10; &lt;firstId type=&quot;Int&quot;&gt;1&lt;/firstId&gt;&#13;&#10; &lt;incrementStep type=&quot;Int&quot;&gt;100&lt;/incrementStep&gt;&#13;&#10; &lt;increment type=&quot;Int&quot;&gt;1&lt;/increment&gt;&#13;&#10; &lt;uniqueCount type=&quot;Int&quot;&gt;4094&lt;/uniqueCount&gt;&#13;&#10; &lt;priority type=&quot;Int&quot;&gt;0&lt;/priority&gt;&#13;&#10; &lt;tpid type=&quot;String&quot;&gt;0x8100&lt;/tpid&gt;&#13;&#10; &lt;innerEnable type=&quot;Bool&quot;&gt;0&lt;/innerEnable&gt;&#13;&#10; &lt;innerFirstId type=&quot;Int&quot;&gt;1&lt;/innerFirstId&gt;&#13;&#10; &lt;innerIncrementStep type=&quot;Int&quot;&gt;1&lt;/innerIncrementStep&gt;&#13;&#10; &lt;innerIncrement type=&quot;Int&quot;&gt;1&lt;/innerIncrement&gt;&#13;&#10; &lt;innerUniqueCount type=&quot;Int&quot;&gt;4094&lt;/innerUniqueCount&gt;&#13;&#10; &lt;innerPriority type=&quot;Int&quot;&gt;0&lt;/innerPriority&gt;&#13;&#10; &lt;idIncrMode type=&quot;Int&quot;&gt;1&lt;/idIncrMode&gt;&#13;&#10; &lt;innerTpid type=&quot;String&quot;&gt;0x8100&lt;/innerTpid&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/vlanRange&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.MacRange&gt;&#13;&#10; &lt;/macRangeList&gt;&#13;&#10; &lt;vlanRangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.VlanIdRange type=&quot;Ixia.Aptixia.StackManager.VlanIdRange&quot; objectid=&quot;adb27552-7165-46a3-bc9e-04914adf40ac&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;/vlanRangeList&gt;&#13;&#10; &lt;childrenList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IpV4V6Plugin type=&quot;Ixia.Aptixia.StackManager.IpV4V6Plugin&quot; objectid=&quot;a916ae0f-0731-405d-ad19-eaade6c515f1&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;rangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IpV4V6Range type=&quot;Ixia.Aptixia.StackManager.IpV4V6Range&quot; objectid=&quot;a3559674-8d95-4020-90b3-b42eacaef105&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;IP-R1&lt;/name&gt;&#13;&#10; &lt;ipType type=&quot;String&quot;&gt;IPv4&lt;/ipType&gt;&#13;&#10; &lt;ipAddress type=&quot;String&quot;&gt;152.16.100.20&lt;/ipAddress&gt;&#13;&#10; &lt;prefix type=&quot;Int&quot;&gt;24&lt;/prefix&gt;&#13;&#10; &lt;incrementBy type=&quot;String&quot;&gt;0.0.0.1&lt;/incrementBy&gt;&#13;&#10; &lt;count type=&quot;Int&quot;&gt;1&lt;/count&gt;&#13;&#10; &lt;autoCountEnabled type=&quot;Bool&quot;&gt;0&lt;/autoCountEnabled&gt;&#13;&#10; &lt;gatewayAddress type=&quot;String&quot;&gt;152.16.100.10&lt;/gatewayAddress&gt;&#13;&#10; &lt;gatewayIncrement type=&quot;String&quot;&gt;0.0.0.0&lt;/gatewayIncrement&gt;&#13;&#10; &lt;gatewayIncrementMode type=&quot;String&quot;&gt;perSubnet&lt;/gatewayIncrementMode&gt;&#13;&#10; &lt;enableGatewayArp type=&quot;Bool&quot;&gt;0&lt;/enableGatewayArp&gt;&#13;&#10; &lt;generateStatistics type=&quot;Bool&quot;&gt;0&lt;/generateStatistics&gt;&#13;&#10; &lt;mss type=&quot;Int&quot;&gt;1460&lt;/mss&gt;&#13;&#10; &lt;randomizeAddress type=&quot;Bool&quot;&gt;0&lt;/randomizeAddress&gt;&#13;&#10; &lt;randomizeSeed type=&quot;Int&quot;&gt;2596329041&lt;/randomizeSeed&gt;&#13;&#10; &lt;autoMacGeneration type=&quot;Bool&quot;&gt;1&lt;/autoMacGeneration&gt;&#13;&#10; &lt;macRange type=&quot;Ixia.Aptixia.StackManager.MacRange&quot; objectid=&quot;3011c8a8-a9fd-4b76-a27d-91948113ed4f&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;vlanRange type=&quot;Ixia.Aptixia.StackManager.VlanIdRange&quot; objectid=&quot;adb27552-7165-46a3-bc9e-04914adf40ac&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;atmRange type=&quot;Ixia.Aptixia.StackManager.AtmRange&quot; objectid=&quot;00000000-0000-0000-0000-000000000000&quot; /&gt;&#13;&#10; &lt;pvcRange type=&quot;Ixia.Aptixia.StackManager.PvcRange&quot; objectid=&quot;00000000-0000-0000-0000-000000000000&quot; /&gt;&#13;&#10; &lt;autoIpTypeEnabled type=&quot;Bool&quot;&gt;0&lt;/autoIpTypeEnabled&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IpV4V6Range&gt;&#13;&#10; &lt;/rangeList&gt;&#13;&#10; &lt;rangeGroups type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.RangeGroup type=&quot;Ixia.Aptixia.StackManager.RangeGroup&quot; objectid=&quot;aa33a76b-9c7f-48d9-a537-8d6eeec03662&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;DistGroup1&lt;/name&gt;&#13;&#10; &lt;distribType type=&quot;Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType&quot;&gt;0&lt;/distribType&gt;&#13;&#10; &lt;rangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IpV4V6Range type=&quot;Ixia.Aptixia.StackManager.IpV4V6Range&quot; objectid=&quot;a3559674-8d95-4020-90b3-b42eacaef105&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;/rangeList&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.RangeGroup&gt;&#13;&#10; &lt;/rangeGroups&gt;&#13;&#10; &lt;childrenList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;extensionList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;dscMode type=&quot;Bool&quot;&gt;0&lt;/dscMode&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;IP-1&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IpV4V6Plugin&gt;&#13;&#10; &lt;/childrenList&gt;&#13;&#10; &lt;extensionList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;dscMode type=&quot;Bool&quot;&gt;0&lt;/dscMode&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;MAC/VLAN-1&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.L2EthernetPlugin&gt;&#13;&#10; &lt;/childrenList&gt;&#13;&#10; &lt;extensionList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;dscMode type=&quot;Bool&quot;&gt;0&lt;/dscMode&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Ethernet-1&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/stack&gt;&#13;&#10; &lt;globalPluginList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type=&quot;Ixia.Aptixia.StackManager.IxLoadSettingsPlugin&quot; objectid=&quot;9c6c8594-548e-4ea5-a478-0bfb6252c1ce&quot; version=&quot;1.0.0&quot;&gt;&#13;&#10; &lt;teardownInterfaceWithUser type=&quot;Bool&quot;&gt;0&lt;/teardownInterfaceWithUser&gt;&#13;&#10; &lt;interfaceBehavior type=&quot;Int&quot;&gt;0&lt;/interfaceBehavior&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Settings-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IxLoadSettingsPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.DnsPlugin type=&quot;Ixia.Aptixia.StackManager.DnsPlugin&quot; objectid=&quot;693c7b7b-327b-4d59-b187-57d7600308e3&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;domain type=&quot;String&quot; /&gt;&#13;&#10; &lt;timeout type=&quot;Int&quot;&gt;30000&lt;/timeout&gt;&#13;&#10; &lt;nameServerList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;searchList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;hostList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;DNS-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.DnsPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.FilterPlugin type=&quot;Ixia.Aptixia.StackManager.FilterPlugin&quot; objectid=&quot;0f6ebdb4-7909-447a-b80a-e132dae33a9b&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;auto type=&quot;Bool&quot;&gt;1&lt;/auto&gt;&#13;&#10; &lt;all type=&quot;Bool&quot;&gt;0&lt;/all&gt;&#13;&#10; &lt;pppoecontrol type=&quot;Bool&quot;&gt;0&lt;/pppoecontrol&gt;&#13;&#10; &lt;pppoenetwork type=&quot;Bool&quot;&gt;0&lt;/pppoenetwork&gt;&#13;&#10; &lt;isis type=&quot;Bool&quot;&gt;0&lt;/isis&gt;&#13;&#10; &lt;ip type=&quot;String&quot; /&gt;&#13;&#10; &lt;tcp type=&quot;String&quot; /&gt;&#13;&#10; &lt;udp type=&quot;String&quot; /&gt;&#13;&#10; &lt;mac type=&quot;String&quot; /&gt;&#13;&#10; &lt;icmp type=&quot;String&quot; /&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Filter-1&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.FilterPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.TCPPlugin type=&quot;Ixia.Aptixia.StackManager.TCPPlugin&quot; objectid=&quot;7a893f25-0ac6-41c7-ab5a-511c2068582a&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;bestPerfSettings type=&quot;Bool&quot;&gt;0&lt;/bestPerfSettings&gt;&#13;&#10; &lt;accept_ra_all type=&quot;Bool&quot;&gt;0&lt;/accept_ra_all&gt;&#13;&#10; &lt;tcp_abort_on_overflow type=&quot;Bool&quot;&gt;0&lt;/tcp_abort_on_overflow&gt;&#13;&#10; &lt;tcp_adv_win_scale type=&quot;Int&quot;&gt;2&lt;/tcp_adv_win_scale&gt;&#13;&#10; &lt;tcp_app_win type=&quot;Int&quot;&gt;31&lt;/tcp_app_win&gt;&#13;&#10; &lt;tcp_bic type=&quot;Int&quot;&gt;0&lt;/tcp_bic&gt;&#13;&#10; &lt;tcp_bic_fast_convergence type=&quot;Int&quot;&gt;1&lt;/tcp_bic_fast_convergence&gt;&#13;&#10; &lt;tcp_bic_low_window type=&quot;Int&quot;&gt;14&lt;/tcp_bic_low_window&gt;&#13;&#10; &lt;tcp_dsack type=&quot;Bool&quot;&gt;1&lt;/tcp_dsack&gt;&#13;&#10; &lt;tcp_ecn type=&quot;Bool&quot;&gt;0&lt;/tcp_ecn&gt;&#13;&#10; &lt;tcp_fack type=&quot;Bool&quot;&gt;1&lt;/tcp_fack&gt;&#13;&#10; &lt;tcp_fin_timeout type=&quot;Int&quot;&gt;60&lt;/tcp_fin_timeout&gt;&#13;&#10; &lt;tcp_frto type=&quot;Int&quot;&gt;0&lt;/tcp_frto&gt;&#13;&#10; &lt;tcp_keepalive_intvl type=&quot;Int&quot;&gt;7200&lt;/tcp_keepalive_intvl&gt;&#13;&#10; &lt;tcp_keepalive_probes type=&quot;Int&quot;&gt;75&lt;/tcp_keepalive_probes&gt;&#13;&#10; &lt;tcp_keepalive_time type=&quot;Int&quot;&gt;9&lt;/tcp_keepalive_time&gt;&#13;&#10; &lt;tcp_low_latency type=&quot;Int&quot;&gt;0&lt;/tcp_low_latency&gt;&#13;&#10; &lt;tcp_max_orphans type=&quot;Int&quot;&gt;8192&lt;/tcp_max_orphans&gt;&#13;&#10; &lt;tcp_max_syn_backlog type=&quot;Int&quot;&gt;1024&lt;/tcp_max_syn_backlog&gt;&#13;&#10; &lt;tcp_max_tw_buckets type=&quot;Int&quot;&gt;180000&lt;/tcp_max_tw_buckets&gt;&#13;&#10; &lt;tcp_mem_low type=&quot;Int&quot;&gt;24576&lt;/tcp_mem_low&gt;&#13;&#10; &lt;tcp_mem_pressure type=&quot;Int&quot;&gt;32768&lt;/tcp_mem_pressure&gt;&#13;&#10; &lt;tcp_mem_high type=&quot;Int&quot;&gt;49152&lt;/tcp_mem_high&gt;&#13;&#10; &lt;tcp_moderate_rcvbuf type=&quot;Int&quot;&gt;0&lt;/tcp_moderate_rcvbuf&gt;&#13;&#10; &lt;tcp_no_metrics_save type=&quot;Bool&quot;&gt;0&lt;/tcp_no_metrics_save&gt;&#13;&#10; &lt;tcp_orphan_retries type=&quot;Int&quot;&gt;0&lt;/tcp_orphan_retries&gt;&#13;&#10; &lt;tcp_reordering type=&quot;Int&quot;&gt;3&lt;/tcp_reordering&gt;&#13;&#10; &lt;tcp_retrans_collapse type=&quot;Bool&quot;&gt;1&lt;/tcp_retrans_collapse&gt;&#13;&#10; &lt;tcp_retries1 type=&quot;Int&quot;&gt;3&lt;/tcp_retries1&gt;&#13;&#10; &lt;tcp_retries2 type=&quot;Int&quot;&gt;15&lt;/tcp_retries2&gt;&#13;&#10; &lt;tcp_rfc1337 type=&quot;Bool&quot;&gt;0&lt;/tcp_rfc1337&gt;&#13;&#10; &lt;tcp_rmem_min type=&quot;Int&quot;&gt;4096&lt;/tcp_rmem_min&gt;&#13;&#10; &lt;tcp_rmem_default type=&quot;Int&quot;&gt;1024&lt;/tcp_rmem_default&gt;&#13;&#10; &lt;tcp_rmem_max type=&quot;Int&quot;&gt;262144&lt;/tcp_rmem_max&gt;&#13;&#10; &lt;tcp_sack type=&quot;Bool&quot;&gt;1&lt;/tcp_sack&gt;&#13;&#10; &lt;tcp_stdurg type=&quot;Bool&quot;&gt;0&lt;/tcp_stdurg&gt;&#13;&#10; &lt;tcp_synack_retries type=&quot;Int&quot;&gt;5&lt;/tcp_synack_retries&gt;&#13;&#10; &lt;tcp_syn_retries type=&quot;Int&quot;&gt;5&lt;/tcp_syn_retries&gt;&#13;&#10; &lt;tcp_timestamps type=&quot;Bool&quot;&gt;1&lt;/tcp_timestamps&gt;&#13;&#10; &lt;tcp_tw_recycle type=&quot;Bool&quot;&gt;1&lt;/tcp_tw_recycle&gt;&#13;&#10; &lt;tcp_tw_reuse type=&quot;Bool&quot;&gt;0&lt;/tcp_tw_reuse&gt;&#13;&#10; &lt;tcp_vegas_alpha type=&quot;Int&quot;&gt;2&lt;/tcp_vegas_alpha&gt;&#13;&#10; &lt;tcp_vegas_beta type=&quot;Int&quot;&gt;6&lt;/tcp_vegas_beta&gt;&#13;&#10; &lt;tcp_vegas_cong_avoid type=&quot;Int&quot;&gt;0&lt;/tcp_vegas_cong_avoid&gt;&#13;&#10; &lt;tcp_vegas_gamma type=&quot;Int&quot;&gt;2&lt;/tcp_vegas_gamma&gt;&#13;&#10; &lt;tcp_westwood type=&quot;Int&quot;&gt;0&lt;/tcp_westwood&gt;&#13;&#10; &lt;tcp_window_scaling type=&quot;Bool&quot;&gt;0&lt;/tcp_window_scaling&gt;&#13;&#10; &lt;ip_no_pmtu_disc type=&quot;Bool&quot;&gt;1&lt;/ip_no_pmtu_disc&gt;&#13;&#10; &lt;tcp_wmem_min type=&quot;Int&quot;&gt;4096&lt;/tcp_wmem_min&gt;&#13;&#10; &lt;tcp_wmem_default type=&quot;Int&quot;&gt;1024&lt;/tcp_wmem_default&gt;&#13;&#10; &lt;tcp_wmem_max type=&quot;Int&quot;&gt;262144&lt;/tcp_wmem_max&gt;&#13;&#10; &lt;tcp_ipfrag_time type=&quot;Int&quot;&gt;30&lt;/tcp_ipfrag_time&gt;&#13;&#10; &lt;tcp_port_min type=&quot;Int&quot;&gt;1024&lt;/tcp_port_min&gt;&#13;&#10; &lt;tcp_port_max type=&quot;Int&quot;&gt;65535&lt;/tcp_port_max&gt;&#13;&#10; &lt;tcp_rto_min type=&quot;Int&quot;&gt;1000&lt;/tcp_rto_min&gt;&#13;&#10; &lt;tcp_rto_max type=&quot;Int&quot;&gt;120000&lt;/tcp_rto_max&gt;&#13;&#10; &lt;tcp_tw_rfc1323_strict type=&quot;Bool&quot;&gt;0&lt;/tcp_tw_rfc1323_strict&gt;&#13;&#10; &lt;udp_port_randomization type=&quot;Bool&quot;&gt;0&lt;/udp_port_randomization&gt;&#13;&#10; &lt;disable_min_max_buffer_size type=&quot;Bool&quot;&gt;1&lt;/disable_min_max_buffer_size&gt;&#13;&#10; &lt;llm_hdr_gap type=&quot;Int&quot;&gt;8&lt;/llm_hdr_gap&gt;&#13;&#10; &lt;llm_hdr_gap_ns type=&quot;Int&quot;&gt;10&lt;/llm_hdr_gap_ns&gt;&#13;&#10; &lt;inter_packet_granular_delay type=&quot;Double&quot;&gt;0&lt;/inter_packet_granular_delay&gt;&#13;&#10; &lt;delayed_acks type=&quot;Bool&quot;&gt;1&lt;/delayed_acks&gt;&#13;&#10; &lt;accept_ra_default type=&quot;Bool&quot;&gt;0&lt;/accept_ra_default&gt;&#13;&#10; &lt;rps_needed type=&quot;Bool&quot;&gt;0&lt;/rps_needed&gt;&#13;&#10; &lt;delayed_acks_segments type=&quot;Int&quot;&gt;0&lt;/delayed_acks_segments&gt;&#13;&#10; &lt;delayed_acks_timeout type=&quot;Int&quot;&gt;0&lt;/delayed_acks_timeout&gt;&#13;&#10; &lt;tcp_large_icwnd type=&quot;Int&quot;&gt;0&lt;/tcp_large_icwnd&gt;&#13;&#10; &lt;tcp_mgmt_rmem type=&quot;Int&quot;&gt;87380&lt;/tcp_mgmt_rmem&gt;&#13;&#10; &lt;tcp_mgmt_wmem type=&quot;Int&quot;&gt;32768&lt;/tcp_mgmt_wmem&gt;&#13;&#10; &lt;adjust_tcp_buffers type=&quot;Bool&quot;&gt;1&lt;/adjust_tcp_buffers&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;TCP-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.TCPPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.GratArpPlugin type=&quot;Ixia.Aptixia.StackManager.GratArpPlugin&quot; objectid=&quot;fc54eec4-41ef-4b6c-9415-bf639013b52d&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;forwardGratArp type=&quot;Bool&quot;&gt;0&lt;/forwardGratArp&gt;&#13;&#10; &lt;rateControlEnabled type=&quot;Bool&quot;&gt;0&lt;/rateControlEnabled&gt;&#13;&#10; &lt;maxFramesPerSecond type=&quot;Int&quot;&gt;0&lt;/maxFramesPerSecond&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;GratARP-1&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.GratArpPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.MeshingPlugin type=&quot;Ixia.Aptixia.StackManager.MeshingPlugin&quot; objectid=&quot;b0ccbeae-9db2-4416-bbed-80dcb2a7a9ed&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;trafficMaps type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.MeshingTrafficMap type=&quot;Ixia.Aptixia.StackManager.MeshingTrafficMap&quot; objectid=&quot;d231b294-6ffb-4393-be54-3a233ec5699f&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;newClientActivity1!HTTP server_newServerActivity1&lt;/name&gt;&#13;&#10; &lt;configMapFilename type=&quot;String&quot;&gt;newClientActivity1Script.configmap&lt;/configMapFilename&gt;&#13;&#10; &lt;sourceActivityId type=&quot;Int&quot;&gt;0&lt;/sourceActivityId&gt;&#13;&#10; &lt;ipPreference type=&quot;Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eIpPreference&quot;&gt;2&lt;/ipPreference&gt;&#13;&#10; &lt;portRangesString type=&quot;String&quot; /&gt;&#13;&#10; &lt;meshingType type=&quot;Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eMeshingType&quot;&gt;2&lt;/meshingType&gt;&#13;&#10; &lt;destinationActivityId type=&quot;Int&quot;&gt;0&lt;/destinationActivityId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.MeshingTrafficMap&gt;&#13;&#10; &lt;/trafficMaps&gt;&#13;&#10; &lt;activityRangeMapInfoList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Meshing-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.MeshingPlugin&gt;&#13;&#10; &lt;/globalPluginList&gt;&#13;&#10; &lt;portList type=&quot;Ixia.RpFramework.Server.Core.ShadowedPropertyStringList&quot;&gt;&#13;&#10; &lt;String&gt;10.223.166.127;2;13&lt;/String&gt;&#13;&#10; &lt;/portList&gt;&#13;&#10; &lt;typeSpecificData type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IPSecPortGroupData type=&quot;Ixia.Aptixia.StackManager.IPSecPortGroupData&quot; objectid=&quot;df783f7c-615e-47c1-b7f0-1174985ea22e&quot; version=&quot;8.1.7&quot;&gt;&#13;&#10; &lt;role type=&quot;String&quot;&gt;Initiator&lt;/role&gt;&#13;&#10; &lt;associates type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;overrideGlobalOptions type=&quot;Bool&quot;&gt;0&lt;/overrideGlobalOptions&gt;&#13;&#10; &lt;useMaxInitiationRate type=&quot;Bool&quot;&gt;0&lt;/useMaxInitiationRate&gt;&#13;&#10; &lt;maxInitiationRate type=&quot;Int&quot;&gt;50&lt;/maxInitiationRate&gt;&#13;&#10; &lt;useMaxPendingTunnels type=&quot;Bool&quot;&gt;0&lt;/useMaxPendingTunnels&gt;&#13;&#10; &lt;maxPendingTunnels type=&quot;Int&quot;&gt;50&lt;/maxPendingTunnels&gt;&#13;&#10; &lt;teardownRate type=&quot;Int&quot;&gt;10&lt;/teardownRate&gt;&#13;&#10; &lt;enableESPPerStreamStats type=&quot;Bool&quot;&gt;0&lt;/enableESPPerStreamStats&gt;&#13;&#10; &lt;enableESPReplayStats type=&quot;Bool&quot;&gt;0&lt;/enableESPReplayStats&gt;&#13;&#10; &lt;activities type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;pcpuLogLevel type=&quot;String&quot;&gt;0&lt;/pcpuLogLevel&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IPSecPortGroupData&gt;&#13;&#10; &lt;/typeSpecificData&gt;&#13;&#10; &lt;virtualMode type=&quot;Bool&quot;&gt;0&lt;/virtualMode&gt;&#13;&#10; &lt;allowedVirtualModeTypes type=&quot;Ixia.RpFramework.Server.Core.ShadowedPropertyStringList&quot; /&gt;&#13;&#10; &lt;doOwnership type=&quot;Bool&quot;&gt;0&lt;/doOwnership&gt;&#13;&#10; &lt;branchToNicMap type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;cpuAggregation type=&quot;Bool&quot;&gt;0&lt;/cpuAggregation&gt;&#13;&#10; &lt;activePort type=&quot;String&quot; /&gt;&#13;&#10; &lt;networkLayersManager type=&quot;Ixia.Aptixia.StackManager.NetworkLayersManager&quot; objectid=&quot;3d3cf9ef-8aab-4388-9252-4baea80122d3&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.PortGroup&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.PortGroup type=&quot;Ixia.Aptixia.StackManager.PortGroup&quot; objectid=&quot;c4ecfc60-64ac-4dc2-9410-e0f58d84f229&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;server network&lt;/name&gt;&#13;&#10; &lt;category type=&quot;String&quot; /&gt;&#13;&#10; &lt;stack type=&quot;Ixia.Aptixia.StackManager.L1EthernetPlugin&quot; objectid=&quot;1bd9f1bc-9959-464e-b1e8-ddb0bb4d0181&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;autoNegotiate type=&quot;Bool&quot;&gt;1&lt;/autoNegotiate&gt;&#13;&#10; &lt;speed type=&quot;String&quot;&gt;k100FD&lt;/speed&gt;&#13;&#10; &lt;advertise10Half type=&quot;Bool&quot;&gt;1&lt;/advertise10Half&gt;&#13;&#10; &lt;advertise10Full type=&quot;Bool&quot;&gt;1&lt;/advertise10Full&gt;&#13;&#10; &lt;advertise100Half type=&quot;Bool&quot;&gt;1&lt;/advertise100Half&gt;&#13;&#10; &lt;advertise100Full type=&quot;Bool&quot;&gt;1&lt;/advertise100Full&gt;&#13;&#10; &lt;advertise1000Full type=&quot;Bool&quot;&gt;1&lt;/advertise1000Full&gt;&#13;&#10; &lt;cardDualPhy type=&quot;Ixia.Aptixia.StackManager.DualPhyPlugin&quot; objectid=&quot;4fe8412b-7d4c-4ebe-a0d4-480a4401b3d0&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;medium type=&quot;String&quot;&gt;auto&lt;/medium&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;4&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/cardDualPhy&gt;&#13;&#10; &lt;cardElm type=&quot;Ixia.Aptixia.StackManager.EthernetELMPlugin&quot; objectid=&quot;4dfec118-30e8-4494-b7c7-e28518e7848a&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;negotiateMasterSlave type=&quot;Bool&quot;&gt;1&lt;/negotiateMasterSlave&gt;&#13;&#10; &lt;negotiationType type=&quot;String&quot;&gt;master&lt;/negotiationType&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;4&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/cardElm&gt;&#13;&#10; &lt;enableFlowControl type=&quot;Bool&quot;&gt;0&lt;/enableFlowControl&gt;&#13;&#10; &lt;directedAddress type=&quot;String&quot;&gt;01:80:C2:00:00:01&lt;/directedAddress&gt;&#13;&#10; &lt;dataCenter type=&quot;Ixia.Aptixia.StackManager.DataCenterSettings&quot; objectid=&quot;123fecc5-cb5e-43e9-92a1-b053dc56d0f3&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;dcSupported type=&quot;Bool&quot;&gt;1&lt;/dcSupported&gt;&#13;&#10; &lt;dcEnabled type=&quot;Bool&quot;&gt;0&lt;/dcEnabled&gt;&#13;&#10; &lt;dcFlowControl type=&quot;Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType&quot;&gt;0&lt;/dcFlowControl&gt;&#13;&#10; &lt;dcMode type=&quot;Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode&quot;&gt;2&lt;/dcMode&gt;&#13;&#10; &lt;dcPfcMapping type=&quot;IntList&quot; /&gt;&#13;&#10; &lt;dcPfcPauseEnable type=&quot;Bool&quot;&gt;0&lt;/dcPfcPauseEnable&gt;&#13;&#10; &lt;dcPfcPauseDelay type=&quot;Int&quot;&gt;1&lt;/dcPfcPauseDelay&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;4&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/dataCenter&gt;&#13;&#10; &lt;childrenList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.L2EthernetPlugin type=&quot;Ixia.Aptixia.StackManager.L2EthernetPlugin&quot; objectid=&quot;35ff711b-53f7-4c74-9e8b-98d35adaa6bf&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;macRangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.MacRange type=&quot;Ixia.Aptixia.StackManager.MacRange&quot; objectid=&quot;f91c9f52-8150-4d0f-b657-498ed241835c&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;MAC-R2&lt;/name&gt;&#13;&#10; &lt;mac type=&quot;String&quot;&gt;00:98:10:28:14:00&lt;/mac&gt;&#13;&#10; &lt;incrementBy type=&quot;String&quot;&gt;00:00:00:00:00:01&lt;/incrementBy&gt;&#13;&#10; &lt;mtu type=&quot;Int&quot;&gt;1500&lt;/mtu&gt;&#13;&#10; &lt;count type=&quot;Int&quot;&gt;1&lt;/count&gt;&#13;&#10; &lt;vlanRange type=&quot;Ixia.Aptixia.StackManager.VlanIdRange&quot; objectid=&quot;57fa3f41-7695-42d7-ac26-68924bb1e8bb&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;VLAN-R2&lt;/name&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;0&lt;/enabled&gt;&#13;&#10; &lt;firstId type=&quot;Int&quot;&gt;1&lt;/firstId&gt;&#13;&#10; &lt;incrementStep type=&quot;Int&quot;&gt;32&lt;/incrementStep&gt;&#13;&#10; &lt;increment type=&quot;Int&quot;&gt;1&lt;/increment&gt;&#13;&#10; &lt;uniqueCount type=&quot;Int&quot;&gt;4094&lt;/uniqueCount&gt;&#13;&#10; &lt;priority type=&quot;Int&quot;&gt;0&lt;/priority&gt;&#13;&#10; &lt;tpid type=&quot;String&quot;&gt;0x8100&lt;/tpid&gt;&#13;&#10; &lt;innerEnable type=&quot;Bool&quot;&gt;0&lt;/innerEnable&gt;&#13;&#10; &lt;innerFirstId type=&quot;Int&quot;&gt;1&lt;/innerFirstId&gt;&#13;&#10; &lt;innerIncrementStep type=&quot;Int&quot;&gt;1&lt;/innerIncrementStep&gt;&#13;&#10; &lt;innerIncrement type=&quot;Int&quot;&gt;1&lt;/innerIncrement&gt;&#13;&#10; &lt;innerUniqueCount type=&quot;Int&quot;&gt;4094&lt;/innerUniqueCount&gt;&#13;&#10; &lt;innerPriority type=&quot;Int&quot;&gt;0&lt;/innerPriority&gt;&#13;&#10; &lt;idIncrMode type=&quot;Int&quot;&gt;1&lt;/idIncrMode&gt;&#13;&#10; &lt;innerTpid type=&quot;String&quot;&gt;0x8100&lt;/innerTpid&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/vlanRange&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.MacRange&gt;&#13;&#10; &lt;/macRangeList&gt;&#13;&#10; &lt;vlanRangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.VlanIdRange type=&quot;Ixia.Aptixia.StackManager.VlanIdRange&quot; objectid=&quot;57fa3f41-7695-42d7-ac26-68924bb1e8bb&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;/vlanRangeList&gt;&#13;&#10; &lt;childrenList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IpV4V6Plugin type=&quot;Ixia.Aptixia.StackManager.IpV4V6Plugin&quot; objectid=&quot;b85b184d-9bb4-48c2-a029-e633fee7a3c8&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;rangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IpV4V6Range type=&quot;Ixia.Aptixia.StackManager.IpV4V6Range&quot; objectid=&quot;1d9bf537-0c3d-4fdf-9b85-0a622cc77649&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;IP-R2&lt;/name&gt;&#13;&#10; &lt;ipType type=&quot;String&quot;&gt;IPv4&lt;/ipType&gt;&#13;&#10; &lt;ipAddress type=&quot;String&quot;&gt;152.16.40.20&lt;/ipAddress&gt;&#13;&#10; &lt;prefix type=&quot;Int&quot;&gt;24&lt;/prefix&gt;&#13;&#10; &lt;incrementBy type=&quot;String&quot;&gt;0.0.0.1&lt;/incrementBy&gt;&#13;&#10; &lt;count type=&quot;Int&quot;&gt;1&lt;/count&gt;&#13;&#10; &lt;autoCountEnabled type=&quot;Bool&quot;&gt;0&lt;/autoCountEnabled&gt;&#13;&#10; &lt;gatewayAddress type=&quot;String&quot;&gt;152.16.40.10&lt;/gatewayAddress&gt;&#13;&#10; &lt;gatewayIncrement type=&quot;String&quot;&gt;0.0.0.0&lt;/gatewayIncrement&gt;&#13;&#10; &lt;gatewayIncrementMode type=&quot;String&quot;&gt;perSubnet&lt;/gatewayIncrementMode&gt;&#13;&#10; &lt;enableGatewayArp type=&quot;Bool&quot;&gt;0&lt;/enableGatewayArp&gt;&#13;&#10; &lt;generateStatistics type=&quot;Bool&quot;&gt;0&lt;/generateStatistics&gt;&#13;&#10; &lt;mss type=&quot;Int&quot;&gt;1460&lt;/mss&gt;&#13;&#10; &lt;randomizeAddress type=&quot;Bool&quot;&gt;0&lt;/randomizeAddress&gt;&#13;&#10; &lt;randomizeSeed type=&quot;Int&quot;&gt;463911585&lt;/randomizeSeed&gt;&#13;&#10; &lt;autoMacGeneration type=&quot;Bool&quot;&gt;1&lt;/autoMacGeneration&gt;&#13;&#10; &lt;macRange type=&quot;Ixia.Aptixia.StackManager.MacRange&quot; objectid=&quot;f91c9f52-8150-4d0f-b657-498ed241835c&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;vlanRange type=&quot;Ixia.Aptixia.StackManager.VlanIdRange&quot; objectid=&quot;57fa3f41-7695-42d7-ac26-68924bb1e8bb&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;atmRange type=&quot;Ixia.Aptixia.StackManager.AtmRange&quot; objectid=&quot;00000000-0000-0000-0000-000000000000&quot; /&gt;&#13;&#10; &lt;pvcRange type=&quot;Ixia.Aptixia.StackManager.PvcRange&quot; objectid=&quot;00000000-0000-0000-0000-000000000000&quot; /&gt;&#13;&#10; &lt;autoIpTypeEnabled type=&quot;Bool&quot;&gt;0&lt;/autoIpTypeEnabled&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IpV4V6Range&gt;&#13;&#10; &lt;/rangeList&gt;&#13;&#10; &lt;rangeGroups type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.RangeGroup type=&quot;Ixia.Aptixia.StackManager.RangeGroup&quot; objectid=&quot;b2c21c73-bfe3-4fbc-9804-b5a8b307d893&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;distribType type=&quot;Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType&quot;&gt;0&lt;/distribType&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;DistGroup1&lt;/name&gt;&#13;&#10; &lt;rangeList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IpV4V6Range type=&quot;Ixia.Aptixia.StackManager.IpV4V6Range&quot; objectid=&quot;1d9bf537-0c3d-4fdf-9b85-0a622cc77649&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;/rangeList&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.RangeGroup&gt;&#13;&#10; &lt;/rangeGroups&gt;&#13;&#10; &lt;childrenList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;extensionList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;dscMode type=&quot;Bool&quot;&gt;0&lt;/dscMode&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;IP-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IpV4V6Plugin&gt;&#13;&#10; &lt;/childrenList&gt;&#13;&#10; &lt;extensionList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;dscMode type=&quot;Bool&quot;&gt;0&lt;/dscMode&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;MAC/VLAN-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.L2EthernetPlugin&gt;&#13;&#10; &lt;/childrenList&gt;&#13;&#10; &lt;extensionList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;dscMode type=&quot;Bool&quot;&gt;0&lt;/dscMode&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Ethernet-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/stack&gt;&#13;&#10; &lt;globalPluginList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type=&quot;Ixia.Aptixia.StackManager.IxLoadSettingsPlugin&quot; objectid=&quot;993e33c6-e1f7-4967-982e-82a032f8c61a&quot; version=&quot;1.0.0&quot;&gt;&#13;&#10; &lt;teardownInterfaceWithUser type=&quot;Bool&quot;&gt;0&lt;/teardownInterfaceWithUser&gt;&#13;&#10; &lt;interfaceBehavior type=&quot;Int&quot;&gt;0&lt;/interfaceBehavior&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Settings-4&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IxLoadSettingsPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.DnsPlugin type=&quot;Ixia.Aptixia.StackManager.DnsPlugin&quot; objectid=&quot;36ca84d7-ff44-45b7-b75d-aec38b753161&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;domain type=&quot;String&quot; /&gt;&#13;&#10; &lt;timeout type=&quot;Int&quot;&gt;30000&lt;/timeout&gt;&#13;&#10; &lt;nameServerList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;searchList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;hostList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;DNS-4&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.DnsPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.FilterPlugin type=&quot;Ixia.Aptixia.StackManager.FilterPlugin&quot; objectid=&quot;25c5acdd-9dd3-4802-93b6-b10651820b66&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;auto type=&quot;Bool&quot;&gt;1&lt;/auto&gt;&#13;&#10; &lt;all type=&quot;Bool&quot;&gt;0&lt;/all&gt;&#13;&#10; &lt;pppoecontrol type=&quot;Bool&quot;&gt;0&lt;/pppoecontrol&gt;&#13;&#10; &lt;pppoenetwork type=&quot;Bool&quot;&gt;0&lt;/pppoenetwork&gt;&#13;&#10; &lt;isis type=&quot;Bool&quot;&gt;0&lt;/isis&gt;&#13;&#10; &lt;ip type=&quot;String&quot; /&gt;&#13;&#10; &lt;tcp type=&quot;String&quot; /&gt;&#13;&#10; &lt;udp type=&quot;String&quot; /&gt;&#13;&#10; &lt;mac type=&quot;String&quot; /&gt;&#13;&#10; &lt;icmp type=&quot;String&quot; /&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Filter-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.FilterPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.TCPPlugin type=&quot;Ixia.Aptixia.StackManager.TCPPlugin&quot; objectid=&quot;6259328b-97c2-4390-8ab1-f16bf3459219&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;bestPerfSettings type=&quot;Bool&quot;&gt;0&lt;/bestPerfSettings&gt;&#13;&#10; &lt;accept_ra_all type=&quot;Bool&quot;&gt;0&lt;/accept_ra_all&gt;&#13;&#10; &lt;tcp_abort_on_overflow type=&quot;Bool&quot;&gt;0&lt;/tcp_abort_on_overflow&gt;&#13;&#10; &lt;tcp_adv_win_scale type=&quot;Int&quot;&gt;2&lt;/tcp_adv_win_scale&gt;&#13;&#10; &lt;tcp_app_win type=&quot;Int&quot;&gt;31&lt;/tcp_app_win&gt;&#13;&#10; &lt;tcp_bic type=&quot;Int&quot;&gt;0&lt;/tcp_bic&gt;&#13;&#10; &lt;tcp_bic_fast_convergence type=&quot;Int&quot;&gt;1&lt;/tcp_bic_fast_convergence&gt;&#13;&#10; &lt;tcp_bic_low_window type=&quot;Int&quot;&gt;14&lt;/tcp_bic_low_window&gt;&#13;&#10; &lt;tcp_dsack type=&quot;Bool&quot;&gt;1&lt;/tcp_dsack&gt;&#13;&#10; &lt;tcp_ecn type=&quot;Bool&quot;&gt;0&lt;/tcp_ecn&gt;&#13;&#10; &lt;tcp_fack type=&quot;Bool&quot;&gt;1&lt;/tcp_fack&gt;&#13;&#10; &lt;tcp_fin_timeout type=&quot;Int&quot;&gt;60&lt;/tcp_fin_timeout&gt;&#13;&#10; &lt;tcp_frto type=&quot;Int&quot;&gt;0&lt;/tcp_frto&gt;&#13;&#10; &lt;tcp_keepalive_intvl type=&quot;Int&quot;&gt;7200&lt;/tcp_keepalive_intvl&gt;&#13;&#10; &lt;tcp_keepalive_probes type=&quot;Int&quot;&gt;75&lt;/tcp_keepalive_probes&gt;&#13;&#10; &lt;tcp_keepalive_time type=&quot;Int&quot;&gt;9&lt;/tcp_keepalive_time&gt;&#13;&#10; &lt;tcp_low_latency type=&quot;Int&quot;&gt;0&lt;/tcp_low_latency&gt;&#13;&#10; &lt;tcp_max_orphans type=&quot;Int&quot;&gt;8192&lt;/tcp_max_orphans&gt;&#13;&#10; &lt;tcp_max_syn_backlog type=&quot;Int&quot;&gt;1024&lt;/tcp_max_syn_backlog&gt;&#13;&#10; &lt;tcp_max_tw_buckets type=&quot;Int&quot;&gt;180000&lt;/tcp_max_tw_buckets&gt;&#13;&#10; &lt;tcp_mem_low type=&quot;Int&quot;&gt;24576&lt;/tcp_mem_low&gt;&#13;&#10; &lt;tcp_mem_pressure type=&quot;Int&quot;&gt;32768&lt;/tcp_mem_pressure&gt;&#13;&#10; &lt;tcp_mem_high type=&quot;Int&quot;&gt;49152&lt;/tcp_mem_high&gt;&#13;&#10; &lt;tcp_moderate_rcvbuf type=&quot;Int&quot;&gt;0&lt;/tcp_moderate_rcvbuf&gt;&#13;&#10; &lt;tcp_no_metrics_save type=&quot;Bool&quot;&gt;0&lt;/tcp_no_metrics_save&gt;&#13;&#10; &lt;tcp_orphan_retries type=&quot;Int&quot;&gt;0&lt;/tcp_orphan_retries&gt;&#13;&#10; &lt;tcp_reordering type=&quot;Int&quot;&gt;3&lt;/tcp_reordering&gt;&#13;&#10; &lt;tcp_retrans_collapse type=&quot;Bool&quot;&gt;1&lt;/tcp_retrans_collapse&gt;&#13;&#10; &lt;tcp_retries1 type=&quot;Int&quot;&gt;3&lt;/tcp_retries1&gt;&#13;&#10; &lt;tcp_retries2 type=&quot;Int&quot;&gt;15&lt;/tcp_retries2&gt;&#13;&#10; &lt;tcp_rfc1337 type=&quot;Bool&quot;&gt;0&lt;/tcp_rfc1337&gt;&#13;&#10; &lt;tcp_rmem_min type=&quot;Int&quot;&gt;4096&lt;/tcp_rmem_min&gt;&#13;&#10; &lt;tcp_rmem_default type=&quot;Int&quot;&gt;1024&lt;/tcp_rmem_default&gt;&#13;&#10; &lt;tcp_rmem_max type=&quot;Int&quot;&gt;262144&lt;/tcp_rmem_max&gt;&#13;&#10; &lt;tcp_sack type=&quot;Bool&quot;&gt;1&lt;/tcp_sack&gt;&#13;&#10; &lt;tcp_stdurg type=&quot;Bool&quot;&gt;0&lt;/tcp_stdurg&gt;&#13;&#10; &lt;tcp_synack_retries type=&quot;Int&quot;&gt;5&lt;/tcp_synack_retries&gt;&#13;&#10; &lt;tcp_syn_retries type=&quot;Int&quot;&gt;5&lt;/tcp_syn_retries&gt;&#13;&#10; &lt;tcp_timestamps type=&quot;Bool&quot;&gt;1&lt;/tcp_timestamps&gt;&#13;&#10; &lt;tcp_tw_recycle type=&quot;Bool&quot;&gt;1&lt;/tcp_tw_recycle&gt;&#13;&#10; &lt;tcp_tw_reuse type=&quot;Bool&quot;&gt;0&lt;/tcp_tw_reuse&gt;&#13;&#10; &lt;tcp_vegas_alpha type=&quot;Int&quot;&gt;2&lt;/tcp_vegas_alpha&gt;&#13;&#10; &lt;tcp_vegas_beta type=&quot;Int&quot;&gt;6&lt;/tcp_vegas_beta&gt;&#13;&#10; &lt;tcp_vegas_cong_avoid type=&quot;Int&quot;&gt;0&lt;/tcp_vegas_cong_avoid&gt;&#13;&#10; &lt;tcp_vegas_gamma type=&quot;Int&quot;&gt;2&lt;/tcp_vegas_gamma&gt;&#13;&#10; &lt;tcp_westwood type=&quot;Int&quot;&gt;0&lt;/tcp_westwood&gt;&#13;&#10; &lt;tcp_window_scaling type=&quot;Bool&quot;&gt;0&lt;/tcp_window_scaling&gt;&#13;&#10; &lt;ip_no_pmtu_disc type=&quot;Bool&quot;&gt;1&lt;/ip_no_pmtu_disc&gt;&#13;&#10; &lt;tcp_wmem_min type=&quot;Int&quot;&gt;4096&lt;/tcp_wmem_min&gt;&#13;&#10; &lt;tcp_wmem_default type=&quot;Int&quot;&gt;1024&lt;/tcp_wmem_default&gt;&#13;&#10; &lt;tcp_wmem_max type=&quot;Int&quot;&gt;262144&lt;/tcp_wmem_max&gt;&#13;&#10; &lt;tcp_ipfrag_time type=&quot;Int&quot;&gt;30&lt;/tcp_ipfrag_time&gt;&#13;&#10; &lt;tcp_port_min type=&quot;Int&quot;&gt;1024&lt;/tcp_port_min&gt;&#13;&#10; &lt;tcp_port_max type=&quot;Int&quot;&gt;65535&lt;/tcp_port_max&gt;&#13;&#10; &lt;tcp_rto_min type=&quot;Int&quot;&gt;1000&lt;/tcp_rto_min&gt;&#13;&#10; &lt;tcp_rto_max type=&quot;Int&quot;&gt;120000&lt;/tcp_rto_max&gt;&#13;&#10; &lt;tcp_tw_rfc1323_strict type=&quot;Bool&quot;&gt;0&lt;/tcp_tw_rfc1323_strict&gt;&#13;&#10; &lt;udp_port_randomization type=&quot;Bool&quot;&gt;0&lt;/udp_port_randomization&gt;&#13;&#10; &lt;disable_min_max_buffer_size type=&quot;Bool&quot;&gt;1&lt;/disable_min_max_buffer_size&gt;&#13;&#10; &lt;llm_hdr_gap type=&quot;Int&quot;&gt;8&lt;/llm_hdr_gap&gt;&#13;&#10; &lt;llm_hdr_gap_ns type=&quot;Int&quot;&gt;10&lt;/llm_hdr_gap_ns&gt;&#13;&#10; &lt;inter_packet_granular_delay type=&quot;Double&quot;&gt;0&lt;/inter_packet_granular_delay&gt;&#13;&#10; &lt;delayed_acks type=&quot;Bool&quot;&gt;1&lt;/delayed_acks&gt;&#13;&#10; &lt;accept_ra_default type=&quot;Bool&quot;&gt;0&lt;/accept_ra_default&gt;&#13;&#10; &lt;rps_needed type=&quot;Bool&quot;&gt;0&lt;/rps_needed&gt;&#13;&#10; &lt;delayed_acks_segments type=&quot;Int&quot;&gt;0&lt;/delayed_acks_segments&gt;&#13;&#10; &lt;delayed_acks_timeout type=&quot;Int&quot;&gt;0&lt;/delayed_acks_timeout&gt;&#13;&#10; &lt;tcp_large_icwnd type=&quot;Int&quot;&gt;0&lt;/tcp_large_icwnd&gt;&#13;&#10; &lt;tcp_mgmt_rmem type=&quot;Int&quot;&gt;87380&lt;/tcp_mgmt_rmem&gt;&#13;&#10; &lt;tcp_mgmt_wmem type=&quot;Int&quot;&gt;32768&lt;/tcp_mgmt_wmem&gt;&#13;&#10; &lt;adjust_tcp_buffers type=&quot;Bool&quot;&gt;1&lt;/adjust_tcp_buffers&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;TCP-4&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.TCPPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.GratArpPlugin type=&quot;Ixia.Aptixia.StackManager.GratArpPlugin&quot; objectid=&quot;3eedf749-efa4-43a0-87ae-e110a77c88d4&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;forwardGratArp type=&quot;Bool&quot;&gt;0&lt;/forwardGratArp&gt;&#13;&#10; &lt;rateControlEnabled type=&quot;Bool&quot;&gt;0&lt;/rateControlEnabled&gt;&#13;&#10; &lt;maxFramesPerSecond type=&quot;Int&quot;&gt;0&lt;/maxFramesPerSecond&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;GratARP-2&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.GratArpPlugin&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.MeshingPlugin type=&quot;Ixia.Aptixia.StackManager.MeshingPlugin&quot; objectid=&quot;284f9992-65d8-4027-a155-709f1965f892&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;trafficMaps type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;activityRangeMapInfoList type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;Meshing-1&lt;/name&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.MeshingPlugin&gt;&#13;&#10; &lt;/globalPluginList&gt;&#13;&#10; &lt;portList type=&quot;Ixia.RpFramework.Server.Core.ShadowedPropertyStringList&quot;&gt;&#13;&#10; &lt;String&gt;10.223.166.127;2;14&lt;/String&gt;&#13;&#10; &lt;/portList&gt;&#13;&#10; &lt;typeSpecificData type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IPSecPortGroupData type=&quot;Ixia.Aptixia.StackManager.IPSecPortGroupData&quot; objectid=&quot;f65f12f2-018c-46f5-a9c5-a1f6f7151909&quot; version=&quot;8.1.7&quot;&gt;&#13;&#10; &lt;role type=&quot;String&quot;&gt;Initiator&lt;/role&gt;&#13;&#10; &lt;associates type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;overrideGlobalOptions type=&quot;Bool&quot;&gt;0&lt;/overrideGlobalOptions&gt;&#13;&#10; &lt;useMaxInitiationRate type=&quot;Bool&quot;&gt;0&lt;/useMaxInitiationRate&gt;&#13;&#10; &lt;maxInitiationRate type=&quot;Int&quot;&gt;50&lt;/maxInitiationRate&gt;&#13;&#10; &lt;useMaxPendingTunnels type=&quot;Bool&quot;&gt;0&lt;/useMaxPendingTunnels&gt;&#13;&#10; &lt;maxPendingTunnels type=&quot;Int&quot;&gt;50&lt;/maxPendingTunnels&gt;&#13;&#10; &lt;teardownRate type=&quot;Int&quot;&gt;10&lt;/teardownRate&gt;&#13;&#10; &lt;enableESPPerStreamStats type=&quot;Bool&quot;&gt;0&lt;/enableESPPerStreamStats&gt;&#13;&#10; &lt;enableESPReplayStats type=&quot;Bool&quot;&gt;0&lt;/enableESPReplayStats&gt;&#13;&#10; &lt;activities type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;pcpuLogLevel type=&quot;String&quot;&gt;0&lt;/pcpuLogLevel&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IPSecPortGroupData&gt;&#13;&#10; &lt;/typeSpecificData&gt;&#13;&#10; &lt;virtualMode type=&quot;Bool&quot;&gt;0&lt;/virtualMode&gt;&#13;&#10; &lt;allowedVirtualModeTypes type=&quot;Ixia.RpFramework.Server.Core.ShadowedPropertyStringList&quot; /&gt;&#13;&#10; &lt;doOwnership type=&quot;Bool&quot;&gt;0&lt;/doOwnership&gt;&#13;&#10; &lt;branchToNicMap type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;cpuAggregation type=&quot;Bool&quot;&gt;0&lt;/cpuAggregation&gt;&#13;&#10; &lt;activePort type=&quot;String&quot; /&gt;&#13;&#10; &lt;networkLayersManager type=&quot;Ixia.Aptixia.StackManager.NetworkLayersManager&quot; objectid=&quot;60b1273d-78d3-4813-8cea-ec9a7101b8a3&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.PortGroup&gt;&#13;&#10; &lt;/portGroupList&gt;&#13;&#10; &lt;externalProperties type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyManager&quot; objectid=&quot;1f2452bf-e52a-4db2-ba47-e5cc8bf61b5e&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;properties type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;145671ff-93a5-4ecc-8c83-59b2c3c67be9&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IxCatLTEUEUeRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;9f07a941-ad2f-46b0-8c75-911862a21039&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;SixRdRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;a221ab5c-faae-4940-bfad-5d41d44f1427&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;L2tpRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;d811442b-bfb8-42f0-bbf8-6bdb6fc9b66b&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;DHCPServerRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;f252cff3-b919-4e74-9f62-9e9c5ab5d324&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;MobileSubscribersRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;493ce043-b982-4a43-a2d4-619e51fbc5a6&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IPSecRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;500dfc8b-2e6a-401f-84c0-f6907f60c00e&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPSgsnS3RangeUe&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;693cb176-f3d8-4073-8a02-fabdc0bdd3fb&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPRange_SGW&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;ec983bf9-07f0-46b2-99a0-354114f42501&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EmulatedRouterRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;5d0f0eb8-40af-4292-8ff2-a57e7903601d&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;PppoxRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;653fae09-ba19-443c-8f8b-9483c0b86b9a&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;GTPNGAPRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;c886be8c-c207-4bb4-90d5-17be54556d58&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IxCatRNCIuPSUeRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;00e75214-5166-406b-90e5-2b83567ae5cf&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;GTPNGUERange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;50d10ee7-45ce-46d2-ae8d-ecd3b1806067&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPUERange_S5S8_SGW&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;c2f310a4-6ea4-4459-be3b-f3b3365c590a&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;GTPGRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;7e458bed-5e36-42d6-812d-3794be52766e&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPPcrfRange_S5S8_PGW&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;7d225fda-6432-4de3-9750-c19bbc957703&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;DSLiteRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;e25dd669-ffc5-493d-a2b5-fd5627bf2ee8&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPSGSNRangeUe&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;7ac0b7d4-6df9-4e1f-86d2-f0a494b3f20b&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;SlaacRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;25699a2c-ab22-417b-9072-894523e98008&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPUERange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;05f1053a-5774-409f-b07e-add07df64338&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;PSTNDigitalRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;482a10c3-0ac7-44d9-9fa9-b43ba3a9901d&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;DHCPRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;a0f03753-923d-4421-8c4f-0ed78f00fc44&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;AtmRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;fb5cd68e-b4b0-4fd4-ae18-4100c0035642&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IxCatMMEApnRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;62677b6a-080e-4cc3-919b-71fa90ae410f&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IxCatENodeBUuApnRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;2e0fd6e3-470e-48df-ab8d-cc21b9d80393&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;GTPSUERange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;175f3104-0d2a-44f9-b712-fed3b170f8cb&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IpV4V6Range&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;d1f37e1e-db44-4bac-acb8-b242dee8e371&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;MacRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;61ccdebc-84e6-464d-be14-2b3ddedab9d2&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;DualStackIPRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;d0678cd8-998e-42ab-8f0d-bfcb5370eac2&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPUERange_S2a_TWAN&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;d8350364-51c6-4a1b-af9f-72c9c235a636&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IxCatSGSNIuPSApnRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;613d02a1-db1e-415d-b4bb-8b73b4477cf4&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;IxCatENodeBSimUeRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;9a41f718-b55e-44c7-a0cc-b1fcf8204c20&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;S6dRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;4c26fe62-a63d-4c40-8e15-c58ad8fba8d0&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;UERangeBase&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;5c2ca63f-3335-4ab7-963e-440817448538&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;EGTPMmeS10RangeUe&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;51a5eccc-a68d-4730-8a48-32019c547c28&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;S6aRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;3010c4ad-f31e-4676-9e61-bb25cf9c1bbb&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;BmScRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;ef1677e4-f390-4a78-b61a-f7650cf5faea&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;MBmsGwRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalPropertyInfo type=&quot;Ixia.Aptixia.StackManager.ExternalPropertyInfo&quot; objectid=&quot;24322b98-7a2a-4d2d-a4ee-4cde0f0e8b64&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;targetType type=&quot;String&quot;&gt;PptpRange&lt;/targetType&gt;&#13;&#10; &lt;valueType type=&quot;String&quot;&gt;ExternalValueBoolean&lt;/valueType&gt;&#13;&#10; &lt;description type=&quot;String&quot;&gt;Enable collection of interface statistics on this range&lt;/description&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalPropertyInfo&gt;&#13;&#10; &lt;/properties&gt;&#13;&#10; &lt;values type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalProperty type=&quot;Ixia.Aptixia.StackManager.ExternalProperty&quot; objectid=&quot;6804ae67-3bd7-471b-8796-ee1e4773c2f1&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;target type=&quot;Ixia.Aptixia.StackManager.IpV4V6Range&quot; objectid=&quot;a3559674-8d95-4020-90b3-b42eacaef105&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;value type=&quot;Ixia.Aptixia.StackManager.ExternalValueBoolean&quot; objectid=&quot;7efcd429-2c48-41bd-bdc5-489dbfcfc49a&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;value type=&quot;Bool&quot;&gt;0&lt;/value&gt;&#13;&#10; &lt;/value&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalProperty&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalProperty type=&quot;Ixia.Aptixia.StackManager.ExternalProperty&quot; objectid=&quot;a63d8276-65bc-4bc2-8202-6461c6399ef9&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;target type=&quot;Ixia.Aptixia.StackManager.IpV4V6Range&quot; objectid=&quot;1d9bf537-0c3d-4fdf-9b85-0a622cc77649&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;value type=&quot;Ixia.Aptixia.StackManager.ExternalValueBoolean&quot; objectid=&quot;09d7b134-2921-4759-bbdb-ff3a5a1966d7&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;value type=&quot;Bool&quot;&gt;0&lt;/value&gt;&#13;&#10; &lt;/value&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;1&lt;/enabled&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalProperty&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalProperty type=&quot;Ixia.Aptixia.StackManager.ExternalProperty&quot; objectid=&quot;0cd9f099-242e-4b03-965f-d343c60181e6&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;target type=&quot;Ixia.Aptixia.StackManager.MacRange&quot; objectid=&quot;3011c8a8-a9fd-4b76-a27d-91948113ed4f&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;value type=&quot;Ixia.Aptixia.StackManager.ExternalValueBoolean&quot; objectid=&quot;503aa008-2481-419f-a223-c90b2c25c17e&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;value type=&quot;Bool&quot;&gt;0&lt;/value&gt;&#13;&#10; &lt;/value&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;0&lt;/enabled&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalProperty&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ExternalProperty type=&quot;Ixia.Aptixia.StackManager.ExternalProperty&quot; objectid=&quot;0b8d2c01-19ac-4f28-924e-660676d978da&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;propertyName type=&quot;String&quot;&gt;Publish Statistics&lt;/propertyName&gt;&#13;&#10; &lt;target type=&quot;Ixia.Aptixia.StackManager.MacRange&quot; objectid=&quot;f91c9f52-8150-4d0f-b657-498ed241835c&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;value type=&quot;Ixia.Aptixia.StackManager.ExternalValueBoolean&quot; objectid=&quot;41c694b3-bb55-48fe-9604-8b003540242f&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;value type=&quot;Bool&quot;&gt;0&lt;/value&gt;&#13;&#10; &lt;/value&gt;&#13;&#10; &lt;enabled type=&quot;Bool&quot;&gt;0&lt;/enabled&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ExternalProperty&gt;&#13;&#10; &lt;/values&gt;&#13;&#10; &lt;/externalProperties&gt;&#13;&#10; &lt;availableNetworkTimelines type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;typeSpecificData type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.MacSessionData type=&quot;Ixia.Aptixia.StackManager.MacSessionData&quot; objectid=&quot;a9c7aa59-e015-4ffd-bb82-5d877ae9c1a8&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;duplicateCheckingScope type=&quot;Ixia.Aptixia.StackManager.MacSessionDataSkeleton+eMacValidationOptions&quot;&gt;2&lt;/duplicateCheckingScope&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.MacSessionData&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IpSessionData type=&quot;Ixia.Aptixia.StackManager.IpSessionData&quot; objectid=&quot;34a78d72-1fc5-4875-9fe1-b4db66b1b4c4&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;duplicateCheckingScope type=&quot;Ixia.Aptixia.StackManager.IpSessionDataSkeleton+eIpValidationOptions&quot;&gt;2&lt;/duplicateCheckingScope&gt;&#13;&#10; &lt;enableGatewayArp type=&quot;Bool&quot;&gt;0&lt;/enableGatewayArp&gt;&#13;&#10; &lt;gatewayArpRequestRate type=&quot;Int&quot;&gt;300&lt;/gatewayArpRequestRate&gt;&#13;&#10; &lt;maxOutstandingGatewayArpRequests type=&quot;Int&quot;&gt;300&lt;/maxOutstandingGatewayArpRequests&gt;&#13;&#10; &lt;ignoreUnresolvedIPs type=&quot;Bool&quot;&gt;0&lt;/ignoreUnresolvedIPs&gt;&#13;&#10; &lt;sendAllRequests type=&quot;Bool&quot;&gt;0&lt;/sendAllRequests&gt;&#13;&#10; &lt;individualARPTimeOut type=&quot;Int&quot;&gt;500&lt;/individualARPTimeOut&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;2&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IpSessionData&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IxLoadSessionData type=&quot;Ixia.Aptixia.StackManager.IxLoadSessionData&quot; objectid=&quot;1e24447f-69f1-4030-8b2d-25a18c7160ca&quot; version=&quot;1.0.0&quot;&gt;&#13;&#10; &lt;portGroupList type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.PortGroup type=&quot;Ixia.Aptixia.StackManager.PortGroup&quot; objectid=&quot;c4ecfc60-64ac-4dc2-9410-e0f58d84f229&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.PortGroup type=&quot;Ixia.Aptixia.StackManager.PortGroup&quot; objectid=&quot;865be042-32d5-426a-9e75-0908c943801f&quot; version=&quot;6.70.420&quot; /&gt;&#13;&#10; &lt;/portGroupList&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IxLoadSessionData&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ImpairSessionData type=&quot;Ixia.Aptixia.StackManager.ImpairSessionData&quot; objectid=&quot;94b53c2c-0747-41c2-838d-0e0e15f31766&quot; version=&quot;6.70.13&quot;&gt;&#13;&#10; &lt;profiles type=&quot;ListNode&quot;&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.ImpairProfile type=&quot;Ixia.Aptixia.StackManager.ImpairProfile&quot; objectid=&quot;90dd3511-93c1-49fa-8e38-db774db9fe17&quot; version=&quot;6.70.13&quot;&gt;&#13;&#10; &lt;name type=&quot;String&quot;&gt;DefaultProfile&lt;/name&gt;&#13;&#10; &lt;defaultp type=&quot;Bool&quot;&gt;1&lt;/defaultp&gt;&#13;&#10; &lt;seed type=&quot;Int&quot;&gt;0&lt;/seed&gt;&#13;&#10; &lt;addDelay type=&quot;Bool&quot;&gt;1&lt;/addDelay&gt;&#13;&#10; &lt;delay type=&quot;Int&quot;&gt;20&lt;/delay&gt;&#13;&#10; &lt;jitter type=&quot;Int&quot;&gt;0&lt;/jitter&gt;&#13;&#10; &lt;addDrop type=&quot;Bool&quot;&gt;0&lt;/addDrop&gt;&#13;&#10; &lt;drop type=&quot;Double&quot;&gt;10&lt;/drop&gt;&#13;&#10; &lt;addDropSequence type=&quot;Bool&quot;&gt;0&lt;/addDropSequence&gt;&#13;&#10; &lt;dropSequenceSkip type=&quot;Int&quot;&gt;10&lt;/dropSequenceSkip&gt;&#13;&#10; &lt;dropSequenceLength type=&quot;Int&quot;&gt;1&lt;/dropSequenceLength&gt;&#13;&#10; &lt;addReorder type=&quot;Bool&quot;&gt;0&lt;/addReorder&gt;&#13;&#10; &lt;gap type=&quot;Int&quot;&gt;10&lt;/gap&gt;&#13;&#10; &lt;reorder type=&quot;Int&quot;&gt;20&lt;/reorder&gt;&#13;&#10; &lt;reorderLength type=&quot;Int&quot;&gt;1&lt;/reorderLength&gt;&#13;&#10; &lt;addReorderPI type=&quot;Bool&quot;&gt;0&lt;/addReorderPI&gt;&#13;&#10; &lt;reorderPISkip type=&quot;Int&quot;&gt;10&lt;/reorderPISkip&gt;&#13;&#10; &lt;reorderPILength type=&quot;Int&quot;&gt;1&lt;/reorderPILength&gt;&#13;&#10; &lt;reorderPIInterval type=&quot;Int&quot;&gt;1&lt;/reorderPIInterval&gt;&#13;&#10; &lt;reorderPITimeout type=&quot;Int&quot;&gt;1000&lt;/reorderPITimeout&gt;&#13;&#10; &lt;addDuplicate type=&quot;Bool&quot;&gt;0&lt;/addDuplicate&gt;&#13;&#10; &lt;duplicate type=&quot;Double&quot;&gt;10&lt;/duplicate&gt;&#13;&#10; &lt;addFragment type=&quot;Bool&quot;&gt;0&lt;/addFragment&gt;&#13;&#10; &lt;fragment type=&quot;Double&quot;&gt;10&lt;/fragment&gt;&#13;&#10; &lt;mtu type=&quot;Int&quot;&gt;1000&lt;/mtu&gt;&#13;&#10; &lt;addFragmentSequence type=&quot;Bool&quot;&gt;0&lt;/addFragmentSequence&gt;&#13;&#10; &lt;fragmentSequenceSkip type=&quot;Int&quot;&gt;10&lt;/fragmentSequenceSkip&gt;&#13;&#10; &lt;fragmentSequenceLength type=&quot;Int&quot;&gt;1&lt;/fragmentSequenceLength&gt;&#13;&#10; &lt;mtuSequence type=&quot;Int&quot;&gt;1000&lt;/mtuSequence&gt;&#13;&#10; &lt;sendFragmentsInReverseOrder type=&quot;Bool&quot;&gt;0&lt;/sendFragmentsInReverseOrder&gt;&#13;&#10; &lt;sendFirstFragmentOnly type=&quot;Bool&quot;&gt;0&lt;/sendFirstFragmentOnly&gt;&#13;&#10; &lt;sendOverlappingFragments type=&quot;Bool&quot;&gt;0&lt;/sendOverlappingFragments&gt;&#13;&#10; &lt;addBandwidth type=&quot;Bool&quot;&gt;0&lt;/addBandwidth&gt;&#13;&#10; &lt;bandwidth type=&quot;Double&quot;&gt;1&lt;/bandwidth&gt;&#13;&#10; &lt;bandwidthUnits type=&quot;String&quot;&gt;mbps&lt;/bandwidthUnits&gt;&#13;&#10; &lt;addBandwidthIn type=&quot;Bool&quot;&gt;0&lt;/addBandwidthIn&gt;&#13;&#10; &lt;bandwidthIn type=&quot;Double&quot;&gt;1&lt;/bandwidthIn&gt;&#13;&#10; &lt;bandwidthUnitsIn type=&quot;String&quot;&gt;mbps&lt;/bandwidthUnitsIn&gt;&#13;&#10; &lt;destinationIp type=&quot;String&quot;&gt;any&lt;/destinationIp&gt;&#13;&#10; &lt;sourceIp type=&quot;String&quot;&gt;any&lt;/sourceIp&gt;&#13;&#10; &lt;sourcePort type=&quot;Int&quot;&gt;0&lt;/sourcePort&gt;&#13;&#10; &lt;destinationPort type=&quot;Int&quot;&gt;0&lt;/destinationPort&gt;&#13;&#10; &lt;protocol type=&quot;String&quot;&gt;any&lt;/protocol&gt;&#13;&#10; &lt;typeOfService type=&quot;String&quot;&gt;any&lt;/typeOfService&gt;&#13;&#10; &lt;addTcpFlagsFilter type=&quot;Bool&quot;&gt;0&lt;/addTcpFlagsFilter&gt;&#13;&#10; &lt;selectTcpFlags type=&quot;String&quot;&gt;SYN;RST;ACK&lt;/selectTcpFlags&gt;&#13;&#10; &lt;expectTcpFlags type=&quot;String&quot;&gt;SYN&lt;/expectTcpFlags&gt;&#13;&#10; &lt;impairOrder type=&quot;String&quot;&gt;Delay;Drop;DropSeq;Reorder;ReorderPI;Duplicate;Fragment;FragmentSeq;Bandwidth&lt;/impairOrder&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ImpairProfile&gt;&#13;&#10; &lt;/profiles&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.ImpairSessionData&gt;&#13;&#10; &lt;Ixia.Aptixia.StackManager.IPSecSessionData type=&quot;Ixia.Aptixia.StackManager.IPSecSessionData&quot; objectid=&quot;bd2f0ea4-4278-49c8-9600-18cd2c8ed639&quot; version=&quot;8.1.7&quot;&gt;&#13;&#10; &lt;ipsecTunnelSetup type=&quot;Ixia.Aptixia.StackManager.IPSecTunnelSetup&quot; objectid=&quot;1bacc8a0-dda0-4e0c-b013-4d8618dc80b6&quot; version=&quot;8.1.7&quot;&gt;&#13;&#10; &lt;tunnelSetupTimeout type=&quot;Int&quot;&gt;30&lt;/tunnelSetupTimeout&gt;&#13;&#10; &lt;tunnelRetransmissionTimeout type=&quot;Int&quot;&gt;30&lt;/tunnelRetransmissionTimeout&gt;&#13;&#10; &lt;numRetries type=&quot;Int&quot;&gt;0&lt;/numRetries&gt;&#13;&#10; &lt;retryInterval type=&quot;Int&quot;&gt;10&lt;/retryInterval&gt;&#13;&#10; &lt;retryDelay type=&quot;Int&quot;&gt;10&lt;/retryDelay&gt;&#13;&#10; &lt;testType type=&quot;String&quot;&gt;P2D&lt;/testType&gt;&#13;&#10; &lt;sendCiscoVid type=&quot;Bool&quot;&gt;0&lt;/sendCiscoVid&gt;&#13;&#10; &lt;useMaxInitiationRate type=&quot;Bool&quot;&gt;0&lt;/useMaxInitiationRate&gt;&#13;&#10; &lt;useMaxPendingTunnels type=&quot;Bool&quot;&gt;0&lt;/useMaxPendingTunnels&gt;&#13;&#10; &lt;enableRekey type=&quot;Bool&quot;&gt;1&lt;/enableRekey&gt;&#13;&#10; &lt;rekeyRetries type=&quot;Int&quot;&gt;3&lt;/rekeyRetries&gt;&#13;&#10; &lt;rekeyFuzzPercentage type=&quot;Int&quot;&gt;0&lt;/rekeyFuzzPercentage&gt;&#13;&#10; &lt;rekeyMargin type=&quot;Int&quot;&gt;10&lt;/rekeyMargin&gt;&#13;&#10; &lt;/ipsecTunnelSetup&gt;&#13;&#10; &lt;ipsecCertificates type=&quot;Ixia.Aptixia.StackManager.IPSecCertificates&quot; objectid=&quot;2e324324-bf74-4ad3-afbb-62e44f01c31a&quot; version=&quot;8.1.7&quot;&gt;&#13;&#10; &lt;uniqueCert type=&quot;Bool&quot;&gt;0&lt;/uniqueCert&gt;&#13;&#10; &lt;certSource type=&quot;String&quot;&gt;kNewCert&lt;/certSource&gt;&#13;&#10; &lt;caURL type=&quot;String&quot; /&gt;&#13;&#10; &lt;caDN type=&quot;String&quot; /&gt;&#13;&#10; &lt;certSubjectDN type=&quot;String&quot; /&gt;&#13;&#10; &lt;certSubjectAltDN type=&quot;String&quot; /&gt;&#13;&#10; &lt;remoteIkeId type=&quot;String&quot; /&gt;&#13;&#10; &lt;bitSize type=&quot;String&quot;&gt;k512&lt;/bitSize&gt;&#13;&#10; &lt;saveCert type=&quot;Bool&quot;&gt;1&lt;/saveCert&gt;&#13;&#10; &lt;cacheCertFolder type=&quot;String&quot;&gt;C:\Program Files\Ixia\CachedCerts&lt;/cacheCertFolder&gt;&#13;&#10; &lt;certParentFolder type=&quot;String&quot;&gt;C:\Program Files\Ixia\CachedCerts&lt;/certParentFolder&gt;&#13;&#10; &lt;certNumber type=&quot;String&quot; /&gt;&#13;&#10; &lt;caCertNumber type=&quot;String&quot; /&gt;&#13;&#10; &lt;earlyExpDate type=&quot;String&quot; /&gt;&#13;&#10; &lt;lateExpDate type=&quot;String&quot; /&gt;&#13;&#10; &lt;usePerRangeCertNameExp type=&quot;Bool&quot;&gt;0&lt;/usePerRangeCertNameExp&gt;&#13;&#10; &lt;checkCrl type=&quot;Bool&quot;&gt;0&lt;/checkCrl&gt;&#13;&#10; &lt;crlOverrideEnable type=&quot;Bool&quot;&gt;0&lt;/crlOverrideEnable&gt;&#13;&#10; &lt;crlOverrideUrl type=&quot;String&quot; /&gt;&#13;&#10; &lt;checkOcsp type=&quot;Bool&quot;&gt;0&lt;/checkOcsp&gt;&#13;&#10; &lt;ocspOverrideEnable type=&quot;Bool&quot;&gt;0&lt;/ocspOverrideEnable&gt;&#13;&#10; &lt;ocspOverrideUrl type=&quot;String&quot; /&gt;&#13;&#10; &lt;unknownIsRevoked type=&quot;Bool&quot;&gt;0&lt;/unknownIsRevoked&gt;&#13;&#10; &lt;certProto type=&quot;String&quot;&gt;kSCEP&lt;/certProto&gt;&#13;&#10; &lt;/ipsecCertificates&gt;&#13;&#10; &lt;ipsecCertManager type=&quot;Ixia.Aptixia.StackManager.IPSecCertManager&quot; objectid=&quot;f3dc4ef0-e9a1-48a2-b69f-c5d2b485e897&quot; version=&quot;8.1.7&quot;&gt;&#13;&#10; &lt;caURL type=&quot;String&quot; /&gt;&#13;&#10; &lt;caDN type=&quot;String&quot;&gt;CN=RootCA,C=RO,L=Bucharest,O=Ixia,OU=IxLoad,IP:201.121.87.2,email:ixia@ixiacom.com&lt;/caDN&gt;&#13;&#10; &lt;certSubjectDN type=&quot;String&quot;&gt;CN=IxiaVPN,C=RO,L=Bucharest,O=Ixia&lt;/certSubjectDN&gt;&#13;&#10; &lt;keyGenAlgo type=&quot;String&quot;&gt;kRSA_512&lt;/keyGenAlgo&gt;&#13;&#10; &lt;cacheCertFolder type=&quot;String&quot;&gt;C:\Program Files\Ixia\CachedCerts&lt;/cacheCertFolder&gt;&#13;&#10; &lt;caKeyFile type=&quot;String&quot;&gt;C:\Program Files\Ixia\ca-priv.key&lt;/caKeyFile&gt;&#13;&#10; &lt;caCrtFile type=&quot;String&quot;&gt;C:\Program Files\Ixia\ca-cert.crt&lt;/caCrtFile&gt;&#13;&#10; &lt;certNumber type=&quot;Int&quot;&gt;1&lt;/certNumber&gt;&#13;&#10; &lt;certProto type=&quot;String&quot;&gt;kSCEP&lt;/certProto&gt;&#13;&#10; &lt;createRootCA type=&quot;Bool&quot;&gt;0&lt;/createRootCA&gt;&#13;&#10; &lt;uniqueCert type=&quot;Bool&quot;&gt;0&lt;/uniqueCert&gt;&#13;&#10; &lt;descFilePath type=&quot;String&quot;&gt;C:\Program Files\Ixia\CachedCerts\sample.desc&lt;/descFilePath&gt;&#13;&#10; &lt;useDescFile type=&quot;Bool&quot;&gt;0&lt;/useDescFile&gt;&#13;&#10; &lt;/ipsecCertManager&gt;&#13;&#10; &lt;eapSimTuples type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;eapAkaTuples type=&quot;ListNode&quot; /&gt;&#13;&#10; &lt;maxInitiationRate type=&quot;Int&quot;&gt;50&lt;/maxInitiationRate&gt;&#13;&#10; &lt;maxPendingTunnels type=&quot;Int&quot;&gt;50&lt;/maxPendingTunnels&gt;&#13;&#10; &lt;negotiationStartDelay type=&quot;Int&quot;&gt;0&lt;/negotiationStartDelay&gt;&#13;&#10; &lt;teardownRate type=&quot;Int&quot;&gt;10&lt;/teardownRate&gt;&#13;&#10; &lt;burstInitiation type=&quot;Bool&quot;&gt;0&lt;/burstInitiation&gt;&#13;&#10; &lt;parallelInitiation type=&quot;Bool&quot;&gt;0&lt;/parallelInitiation&gt;&#13;&#10; &lt;enableExtraPortLogging type=&quot;Bool&quot;&gt;0&lt;/enableExtraPortLogging&gt;&#13;&#10; &lt;enableWildcardTsi type=&quot;Bool&quot;&gt;0&lt;/enableWildcardTsi&gt;&#13;&#10; &lt;enableWildcardTsr type=&quot;Bool&quot;&gt;0&lt;/enableWildcardTsr&gt;&#13;&#10; &lt;enablePlutoWildcardTsi type=&quot;Bool&quot;&gt;0&lt;/enablePlutoWildcardTsi&gt;&#13;&#10; &lt;enablePlutoModeCfgWildcardTsr type=&quot;Bool&quot;&gt;1&lt;/enablePlutoModeCfgWildcardTsr&gt;&#13;&#10; &lt;enablePlutoS2SWildcardTsr type=&quot;Bool&quot;&gt;0&lt;/enablePlutoS2SWildcardTsr&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.IPSecSessionData&gt;&#13;&#10; &lt;/typeSpecificData&gt;&#13;&#10; &lt;statViewManager type=&quot;Ixia.Aptixia.StackManager.StatViewManager&quot; objectid=&quot;7256ce27-286c-475d-b198-09b4ae306f73&quot; version=&quot;6.70.420&quot;&gt;&#13;&#10; &lt;enableStats type=&quot;Bool&quot;&gt;1&lt;/enableStats&gt;&#13;&#10; &lt;enableOverviewStats type=&quot;Bool&quot;&gt;1&lt;/enableOverviewStats&gt;&#13;&#10; &lt;enablePerSessionStats type=&quot;Bool&quot;&gt;1&lt;/enablePerSessionStats&gt;&#13;&#10; &lt;/statViewManager&gt;&#13;&#10; &lt;waitForLinkUp type=&quot;Bool&quot;&gt;0&lt;/waitForLinkUp&gt;&#13;&#10; &lt;overloadProtection type=&quot;Bool&quot;&gt;1&lt;/overloadProtection&gt;&#13;&#10; &lt;ixLoadRestObjectId type=&quot;Int&quot;&gt;1&lt;/ixLoadRestObjectId&gt;&#13;&#10; &lt;/Ixia.Aptixia.StackManager.SMSession&gt;&#13;&#10;&lt;/rpf&gt;</xml>
+ </_smSessionXml>
+ <_composerConfig ver="[0, [1, [0, [0]]]]" type="ixComposerConfig">
+ <xml type="str"></xml>
+ </_composerConfig>
+ <_quickTestConfig ver="[0, [1, [0, [0]]]]" type="ixQuickTestConfig">
+ <xml type="str">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&#13;&#10;&lt;Config&gt;&#13;&#10; &lt;configs Version=&quot;5.0&quot; /&gt;&#13;&#10;&lt;/Config&gt;</xml>
+ </_quickTestConfig>
+ <lastApiUniqueId type="int">15330</lastApiUniqueId>
+ <version type="str">8.01.106.3</version>
+ <name type="str">HTTP-vFW_IPv4_2Ports.rxf</name>
+ <comment type="str"></comment>
+ <path type="str">C:\Results</path>
+ <last type="str">HTTP-vFW_IPv4_2Ports.rxf</last>
+ <activeTest type="str">Test1</activeTest>
+ <chassisChain ver="[2, [1, [0, [0]]]]" oid="3" type="ixChassisChain">
+ <chassisList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixChassisSequenceContainer" itemtype="ixChassis">
+ <item ver="[1, [1, [0, [0]]]]" oid="0" type="ixChassis">
+ <name type="str">10.223.166.127</name>
+ <id type="int">1</id>
+ <hiddenCards type="NoneType">None</hiddenCards>
+ </item>
+ </chassisList>
+ <_apiUniqueId type="int">12991</_apiUniqueId>
+ <chassisMap type="dict">
+ <item>
+ <key type="int">1</key>
+ <value ref="0"/>
+ </item>
+ </chassisMap>
+ <hiddenChassis type="NoneType">None</hiddenChassis>
+ </chassisChain>
+ <AfmPortPacketRewriteConfigList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixAfmPortPacketRewriteConfigList" itemtype="ixAfmPortPacketRewriteConfig"/>
+ <networkList ver="[0, [0, [1, [0, [3, [0, [0, [0], [0]], [0]]]]]]]" type="ixRepositoryNetworkList" itemtype="ixNullNetwork"/>
+ <dutList ver="[0, [0, [1, [0, [3, [0, [0, [0], [0]], [0]]]]]]]" type="ixDutList" itemtype="ixDut"/>
+ <trafficList ver="[0, [0, [1, [0, [3, [0, [0, [0], [0]], [0]]]]]]]" type="ixTrafficList" itemtype="ixActivityModel"/>
+ <testList ver="[0, [0, [1, [0, [3, [0, [0, [0], [0]], [0]]]]]]]" type="ixTestList" itemtype="ixTestEnvelope">
+ <item ver="[18, [1, [0, [0]]]]" type="ixTestEnvelope">
+ <name type="str">Test1</name>
+ <comment type="str"></comment>
+ <enableForceOwnership type="bool">False</enableForceOwnership>
+ <enableResetPorts type="bool">False</enableResetPorts>
+ <statsRequired type="int">1</statsRequired>
+ <enableConditionalView type="bool">False</enableConditionalView>
+ <conditionalViewType type="int">0</conditionalViewType>
+ <conditionalViewList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixConditionalViewList" itemtype="ixConditionalView"/>
+ <enableReleaseConfigAfterRun type="int">0</enableReleaseConfigAfterRun>
+ <csvInterval type="int">4</csvInterval>
+ <networkFailureThreshold type="int">0</networkFailureThreshold>
+ <captureViewOptions ver="[1, [1, [0, [0]]]]" oid="9" type="ixViewOptions">
+ <runMode type="int">1</runMode>
+ <collectScheme type="int">0</collectScheme>
+ <allocatedBufferMemoryPercentage type="long">30</allocatedBufferMemoryPercentage>
+ <captureRunAfter type="int">0</captureRunAfter>
+ <captureRunDuration type="int">0</captureRunDuration>
+ <_apiUniqueId type="int">12941</_apiUniqueId>
+ </captureViewOptions>
+ <scenarioList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixScenarioList" itemtype="ixScenario">
+ <item ver="[3, [1, [0, [0]]]]" type="ixScenario">
+ <name type="str">TrafficFlow1</name>
+ <columnList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixTrafficColumnList" itemtype="ixTrafficColumn">
+ <item ver="[0, [1, [0, [0]]]]" type="ixTrafficColumn">
+ <name type="str">Client</name>
+ <elementList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixScenarioElementList" itemtype="ixScenarioElement">
+ <item ver="[1, [22, [0, [1, [0, [0]]]]]]" oid="1" type="ixNetTraffic">
+ <name type="str">HTTP client@client network</name>
+ <column type="NoneType">None</column>
+ <scenarioElementType type="str">netTraffic</scenarioElementType>
+ <enable type="int">1</enable>
+ <role type="str">Client</role>
+ <networkType type="str">ethernet</networkType>
+ <activityFunction type="str">ipTrafficAgent</activityFunction>
+ <activeRole type="str">Client</activeRole>
+ <networkActivityList ver="[0, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixNetworkActivityList" itemtype="ixNetworkActivity"/>
+ <activityGroupList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixActivityGroupList" itemtype="ixActivityGroup"/>
+ <traffic ver="[0, [6, [1, [0, [0]]]]]" type="ixTraffic">
+ <resourceSyncTimeStamp type="NoneType">None</resourceSyncTimeStamp>
+ <name type="str">HTTP client</name>
+ <role type="str">Client</role>
+ <activityFunction type="str">ipTrafficAgent</activityFunction>
+ <payload type="NoneType">None</payload>
+ <agentList ver="[2, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="_agentListSequenceContainer" itemtype="ixAgent">
+ <item ver="[33, [0, [0, [0, [5, [1, [0, [0]]]]], [0, [0]]]], [5, [0, [0, [5, [1, [0, [0]]]]], [0, [0]]]]]" oid="15" type="HTTP_Client_plugin">
+ <enable type="int">1</enable>
+ <name type="str">newClientActivity1</name>
+ <activityFunction type="str">ipTrafficAgent</activityFunction>
+ <needToRefreshStatViews type="bool">False</needToRefreshStatViews>
+ <activeRole type="NoneType">None</activeRole>
+ <cmdListLoops type="int">0</cmdListLoops>
+ <cmdPercentagePool ver="[0, [1, [0, [0]]]]" type="ixCommandPercentagePool">
+ <seed type="int">1</seed>
+ <percentageCommandList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixCommandPercentageInfoList" itemtype="ixCommandPercentageInfo"/>
+ <_apiUniqueId type="int">12943</_apiUniqueId>
+ </cmdPercentagePool>
+ <sources ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixSourceList" itemtype="ixSource"/>
+ <destinations ver="[1, [3, [0, [0, [0], [0]], [0]]]]" type="ixDestinationList" itemtype="ixDestination">
+ <item ver="[0, [3, [1, [0, [0]]]]]" type="ixAgentDestination">
+ <name type="str">HTTP server_newServerActivity1</name>
+ <portMapPolicy type="str">portPairs</portMapPolicy>
+ <sameAs type="str"></sameAs>
+ <validPortMapPolicies type="list">
+ <item type="str">portPairs</item>
+ <item type="str">portMesh</item>
+ <item type="str">customMesh</item>
+ </validPortMapPolicies>
+ <inUse type="bool">True</inUse>
+ <customPortMap type="NoneType">None</customPortMap>
+ <sourceCommunity ref="1"/>
+ <destinationCommunity ver="[1, [22, [0, [1, [0, [0]]]]]]" oid="18" type="ixNetTraffic">
+ <name type="str">HTTP server@server network</name>
+ <column type="NoneType">None</column>
+ <scenarioElementType type="str">netTraffic</scenarioElementType>
+ <enable type="int">1</enable>
+ <role type="str">Server</role>
+ <networkType type="str">ethernet</networkType>
+ <activityFunction type="str">ipTrafficAgent</activityFunction>
+ <activeRole type="str">Server</activeRole>
+ <networkActivityList ver="[0, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixNetworkActivityList" itemtype="ixNetworkActivity"/>
+ <activityGroupList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixActivityGroupList" itemtype="ixActivityGroup"/>
+ <traffic ver="[0, [6, [1, [0, [0]]]]]" type="ixTraffic">
+ <resourceSyncTimeStamp type="NoneType">None</resourceSyncTimeStamp>
+ <name type="str">HTTP server</name>
+ <role type="str">Server</role>
+ <activityFunction type="str">ipTrafficAgent</activityFunction>
+ <payload type="NoneType">None</payload>
+ <agentList ver="[2, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="_agentListSequenceContainer" itemtype="ixAgent">
+ <item ver="[17, [0, [0, [0, [5, [1, [0, [0]]]], [0]], [0, [0]]]], [2, [0, [0, [5, [1, [0, [0]]]], [0]], [0, [0]]]]]" oid="7" type="HTTP_Server_plugin">
+ <enable type="int">1</enable>
+ <name type="str">newServerActivity1</name>
+ <activityFunction type="str">ipTrafficAgent</activityFunction>
+ <needToRefreshStatViews type="bool">False</needToRefreshStatViews>
+ <activeRole type="NoneType">None</activeRole>
+ <loopValue type="int">1</loopValue>
+ <cmdListLoops type="int">0</cmdListLoops>
+ <cmdPercentagePool type="NoneType">None</cmdPercentagePool>
+ <sources ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixSourceList" itemtype="ixSource"/>
+ <destinations ver="[1, [3, [0, [0, [0], [0]], [0]]]]" type="ixDestinationList" itemtype="ixDestination"/>
+ <flowPercentage type="float">100.0</flowPercentage>
+ <httpPort type="str">80</httpPort>
+ <httpsPort type="str">443</httpsPort>
+ <requestTimeout type="int">300</requestTimeout>
+ <minResponseDelay type="int">0</minResponseDelay>
+ <maxResponseDelay type="int">0</maxResponseDelay>
+ <acceptSslConnections type="int">0</acceptSslConnections>
+ <enablesslRecordSize type="int">0</enablesslRecordSize>
+ <validateCertificate type="int">0</validateCertificate>
+ <sslRecordSize type="str">16384</sslRecordSize>
+ <urlStatsCount type="int">10</urlStatsCount>
+ <rstTimeout type="int">100</rstTimeout>
+ <enableEsm type="int">0</enableEsm>
+ <esm type="int">1460</esm>
+ <enableTos type="bool">False</enableTos>
+ <enableVlanPriority type="int">0</enableVlanPriority>
+ <vlanPriority type="int">0</vlanPriority>
+ <enableIntegrityCheck type="int">0</enableIntegrityCheck>
+ <tos type="int">0</tos>
+ <precedenceTOS type="int">0</precedenceTOS>
+ <delayTOS type="int">0</delayTOS>
+ <throughputTOS type="int">0</throughputTOS>
+ <reliabilityTOS type="int">0</reliabilityTOS>
+ <enablePerServerPerURLstat type="int">0</enablePerServerPerURLstat>
+ <responseHeaderList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixResponseHeaderList" itemtype="ixResponseHeader">
+ <item ver="[0, [1, [0, [0]]]]" type="ixResponseHeader">
+ <name type="str">200_OK</name>
+ <description type="str">OK</description>
+ <code type="str">200</code>
+ <mimeType type="str">text/plain</mimeType>
+ <dateMode type="int">2</dateMode>
+ <dateTimeValue type="str">2014/11/22 07:27:01</dateTimeValue>
+ <dateIncrementEnable type="bool">False</dateIncrementEnable>
+ <dateIncrementBy type="int">5</dateIncrementBy>
+ <dateIncrementFor type="int">1</dateIncrementFor>
+ <dateZone type="str">GMT</dateZone>
+ <expirationMode type="int">0</expirationMode>
+ <expirationDateTimeValue type="str">2005/03/04 21:55:04</expirationDateTimeValue>
+ <expirationAfterRequestValue type="int">3600</expirationAfterRequestValue>
+ <expirationAfterLastModifiedValue type="int">3600</expirationAfterLastModifiedValue>
+ <lastModifiedMode type="int">1</lastModifiedMode>
+ <lastModifiedDateTimeValue type="str">2005/02/02 21:55:04</lastModifiedDateTimeValue>
+ <lastModifiedIncrementEnable type="bool">False</lastModifiedIncrementEnable>
+ <lastModifiedIncrementBy type="int">5</lastModifiedIncrementBy>
+ <lastModifiedIncrementFor type="int">1</lastModifiedIncrementFor>
+ <responseList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixwebHttpResponseList" itemtype="_httpResponseString"/>
+ <readOnly type="bool">True</readOnly>
+ <enableCustomPutResponse type="bool">False</enableCustomPutResponse>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12972</_apiUniqueId>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixResponseHeader">
+ <name type="str">404_PageNotFound</name>
+ <description type="str">Page not found</description>
+ <code type="str">404</code>
+ <mimeType type="str">text/plain</mimeType>
+ <dateMode type="int">2</dateMode>
+ <dateTimeValue type="str">2014/11/22 07:27:01</dateTimeValue>
+ <dateIncrementEnable type="bool">False</dateIncrementEnable>
+ <dateIncrementBy type="int">5</dateIncrementBy>
+ <dateIncrementFor type="int">1</dateIncrementFor>
+ <dateZone type="str">GMT</dateZone>
+ <expirationMode type="int">0</expirationMode>
+ <expirationDateTimeValue type="str">2005/03/04 21:55:04</expirationDateTimeValue>
+ <expirationAfterRequestValue type="int">3600</expirationAfterRequestValue>
+ <expirationAfterLastModifiedValue type="int">3600</expirationAfterLastModifiedValue>
+ <lastModifiedMode type="int">1</lastModifiedMode>
+ <lastModifiedDateTimeValue type="str">2005/02/02 21:55:04</lastModifiedDateTimeValue>
+ <lastModifiedIncrementEnable type="bool">False</lastModifiedIncrementEnable>
+ <lastModifiedIncrementBy type="int">5</lastModifiedIncrementBy>
+ <lastModifiedIncrementFor type="int">1</lastModifiedIncrementFor>
+ <responseList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixwebHttpResponseList" itemtype="_httpResponseString"/>
+ <readOnly type="bool">True</readOnly>
+ <enableCustomPutResponse type="bool">False</enableCustomPutResponse>
+ <objectID type="int">1</objectID>
+ <_apiUniqueId type="int">12973</_apiUniqueId>
+ </item>
+ </responseHeaderList>
+ <cookieList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixCookieList" itemtype="ixCookieObject">
+ <item ver="[0, [1, [0, [0]]]]" type="ixCookieObject">
+ <name type="str">UserCookie</name>
+ <description type="str">Name of User</description>
+ <type type="int">2</type>
+ <mode type="int">3</mode>
+ <cookieContentList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixCookieContentList" itemtype="ixCookieContent">
+ <item ver="[0, [1, [0, [0]]]]" type="ixCookieContent">
+ <name type="str">firstName</name>
+ <value type="str">Joe</value>
+ <path type="str"></path>
+ <maxAge type="str"></maxAge>
+ <domain type="str"></domain>
+ <other type="str"></other>
+ <objectID type="int">0</objectID>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixCookieContent">
+ <name type="str">lastName</name>
+ <value type="str">Smith</value>
+ <path type="str"></path>
+ <maxAge type="str"></maxAge>
+ <domain type="str"></domain>
+ <other type="str"></other>
+ <objectID type="int">1</objectID>
+ </item>
+ </cookieContentList>
+ <readOnly type="bool">True</readOnly>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12987</_apiUniqueId>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixCookieObject">
+ <name type="str">LoginCookie</name>
+ <description type="str">Login name and password</description>
+ <type type="int">2</type>
+ <mode type="int">2</mode>
+ <cookieContentList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixCookieContentList" itemtype="ixCookieContent">
+ <item ver="[0, [1, [0, [0]]]]" type="ixCookieContent">
+ <name type="str">name</name>
+ <value type="str">joesmith</value>
+ <path type="str"></path>
+ <maxAge type="str"></maxAge>
+ <domain type="str"></domain>
+ <other type="str"></other>
+ <objectID type="int">0</objectID>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixCookieContent">
+ <name type="str">password</name>
+ <value type="str">foobar</value>
+ <path type="str"></path>
+ <maxAge type="str"></maxAge>
+ <domain type="str"></domain>
+ <other type="str"></other>
+ <objectID type="int">1</objectID>
+ </item>
+ </cookieContentList>
+ <readOnly type="bool">True</readOnly>
+ <objectID type="int">1</objectID>
+ <_apiUniqueId type="int">12988</_apiUniqueId>
+ </item>
+ </cookieList>
+ <webPageList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixWebPageList" itemtype="ixWebPageObject">
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/1b.html</page>
+ <response ver="[0, [1, [0, [0]]]]" oid="2" type="ixResponseHeader">
+ <name type="str">200_OK</name>
+ <description type="str">OK</description>
+ <code type="str">200</code>
+ <mimeType type="str">text/plain</mimeType>
+ <dateMode type="int">2</dateMode>
+ <dateTimeValue type="str">2014/11/22 07:27:01</dateTimeValue>
+ <dateIncrementEnable type="bool">False</dateIncrementEnable>
+ <dateIncrementBy type="int">5</dateIncrementBy>
+ <dateIncrementFor type="int">1</dateIncrementFor>
+ <dateZone type="str">GMT</dateZone>
+ <expirationMode type="int">0</expirationMode>
+ <expirationDateTimeValue type="str">2005/03/04 21:55:04</expirationDateTimeValue>
+ <expirationAfterRequestValue type="int">3600</expirationAfterRequestValue>
+ <expirationAfterLastModifiedValue type="int">3600</expirationAfterLastModifiedValue>
+ <lastModifiedMode type="int">1</lastModifiedMode>
+ <lastModifiedDateTimeValue type="str">2005/02/02 21:55:04</lastModifiedDateTimeValue>
+ <lastModifiedIncrementEnable type="bool">False</lastModifiedIncrementEnable>
+ <lastModifiedIncrementBy type="int">5</lastModifiedIncrementBy>
+ <lastModifiedIncrementFor type="int">1</lastModifiedIncrementFor>
+ <responseList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixwebHttpResponseList" itemtype="_httpResponseString"/>
+ <readOnly type="bool">True</readOnly>
+ <enableCustomPutResponse type="bool">False</enableCustomPutResponse>
+ <_apiUniqueId type="int">12984</_apiUniqueId>
+ </response>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">1-1</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12974</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/4k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">4096-4096</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">1</objectID>
+ <_apiUniqueId type="int">12975</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/8k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">8192-8192</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">2</objectID>
+ <_apiUniqueId type="int">12976</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/16k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">16536-16536</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">3</objectID>
+ <_apiUniqueId type="int">12977</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/32k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">32768</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">4</objectID>
+ <_apiUniqueId type="int">12978</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/64k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">65536</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">5</objectID>
+ <_apiUniqueId type="int">12979</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/128k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">131072</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">6</objectID>
+ <_apiUniqueId type="int">12980</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/256k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">262144</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">7</objectID>
+ <_apiUniqueId type="int">12981</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/512k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">524288</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">8</objectID>
+ <_apiUniqueId type="int">12982</_apiUniqueId>
+ </item>
+ <item ver="[1, [1, [0, [0]]]]" type="ixWebPageObject">
+ <page type="str">/1024k.html</page>
+ <response ref="2"/>
+ <payloadType type="str">range</payloadType>
+ <payloadSize type="str">1048576</payloadSize>
+ <payloadFile type="str">&lt;specify file&gt;</payloadFile>
+ <cookie type="NoneType">None</cookie>
+ <customPayloadId type="int">-1</customPayloadId>
+ <Md5Option type="int">3</Md5Option>
+ <chunkSize type="str">512-1024</chunkSize>
+ <objectID type="int">9</objectID>
+ <_apiUniqueId type="int">12983</_apiUniqueId>
+ </item>
+ </webPageList>
+ <ServerCiphers type="str">DEFAULT</ServerCiphers>
+ <privateKeyPassword type="str"></privateKeyPassword>
+ <privateKey type="str"></privateKey>
+ <certificate type="str"></certificate>
+ <caCert type="str"></caCert>
+ <enableDHsupport type="int">0</enableDHsupport>
+ <enableSslSendCloseNotify type="int">0</enableSslSendCloseNotify>
+ <dhParams type="str"></dhParams>
+ <tcpCloseOption type="int">0</tcpCloseOption>
+ <docrootfile type="str"></docrootfile>
+ <customPayloadList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixCustomPayloadList" itemtype="ixCustomPayloadObject">
+ <item ver="[0, [1, [0, [0]]]]" type="ixCustomPayloadObject">
+ <id type="int">0</id>
+ <name type="str">AsciiCustomPayload</name>
+ <payloadPosition type="str">Start With</payloadPosition>
+ <payloadmode type="int">0</payloadmode>
+ <asciiPayloadValue type="str">Ixia-Ixload-Http-Server-Custom-Payload</asciiPayloadValue>
+ <hexPayloadValue type="str"></hexPayloadValue>
+ <repeat type="int">0</repeat>
+ <offset type="int">1</offset>
+ <readOnly type="bool">True</readOnly>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12985</_apiUniqueId>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixCustomPayloadObject">
+ <id type="int">1</id>
+ <name type="str">HexCustomPayload</name>
+ <payloadPosition type="str">Start With</payloadPosition>
+ <payloadmode type="int">1</payloadmode>
+ <asciiPayloadValue type="str"></asciiPayloadValue>
+ <hexPayloadValue type="str">49 78 69 61 2d 49 78 6c 6f 61 64 2d 48 74 74 70 2d 53 65 72 76 65 72 2d 43 75 73 74 6f 6d 2d 50 61 79 6c 6f 61 64</hexPayloadValue>
+ <repeat type="int">0</repeat>
+ <offset type="int">1</offset>
+ <readOnly type="bool">True</readOnly>
+ <objectID type="int">1</objectID>
+ <_apiUniqueId type="int">12986</_apiUniqueId>
+ </item>
+ </customPayloadList>
+ <enableMD5Checksum type="bool">False</enableMD5Checksum>
+ <integrityCheckOption type="str">Custom MD5</integrityCheckOption>
+ <uniqueID type="int">2</uniqueID>
+ <enableChunkEncoding type="bool">False</enableChunkEncoding>
+ <docrootChunkSize type="str">512-1024</docrootChunkSize>
+ <urlPageSize type="int">1024</urlPageSize>
+ <enableChunkedRequest type="bool">False</enableChunkedRequest>
+ <enableNewSslSupport type="bool">False</enableNewSslSupport>
+ <enableHTTP2 type="bool">False</enableHTTP2>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12971</_apiUniqueId>
+ <commandIdCounter type="int">0</commandIdCounter>
+ <networkPluginSettings ver="[0]" type="ixNetworkActivityPluginSupport">
+ <serializedNetworkSettingsMap ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list"/>
+ </serializedNetworkSettingsMap>
+ <protocolName type="str">HTTP</protocolName>
+ </networkPluginSettings>
+ </item>
+ </agentList>
+ </traffic>
+ <network ver="[17, [1, [6, [1, [0, [0]]]]]]" type="ixNetworkGroup">
+ <resourceSyncTimeStamp type="NoneType">None</resourceSyncTimeStamp>
+ <name type="str">server network</name>
+ <role type="str">Server</role>
+ <networkType type="str">none</networkType>
+ <aggregation type="int">0</aggregation>
+ <lineSpeed type="str">Default</lineSpeed>
+ <cpuAggregation type="bool">False</cpuAggregation>
+ <chassisChain ref="3"/>
+ <cardType type="str">FLEXAP1040SQ</cardType>
+ <activePortList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixNetworkPortListSequenceContainer" itemtype="ixConfig"/>
+ <portList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" oid="10" type="ixNetworkPortListSequenceContainer" itemtype="ixConfig">
+ <item ver="[3, [1, [1, [0, [0]]]]]" type="ixPort">
+ <chassisId type="int">1</chassisId>
+ <cardId type="int">2</cardId>
+ <portId type="int">14</portId>
+ <enableCapture type="bool">True</enableCapture>
+ <cardType type="str">FLEXAP10G16S</cardType>
+ <portPersistentSetting ver="[0, [1, [0, [0]]]]" type="ixPortPersistentSetting">
+ <viewFilter ver="[0, [0, [1, [0, [0]]]]]" type="ixViewProtocolFilter">
+ <agentProtoFilterMap type="dict">
+ <item>
+ <key type="str">newServerActivity1</key>
+ <value type="tuple">
+ <item type="str">HTTP</item>
+ <item type="str">tcp port 80</item>
+ </value>
+ </item>
+ </agentProtoFilterMap>
+ <filterString type="str"></filterString>
+ </viewFilter>
+ <_apiUniqueId type="int">15222</_apiUniqueId>
+ </portPersistentSetting>
+ <analyzerPartialCapture type="str">False;8192</analyzerPartialCapture>
+ <name type="str"></name>
+ <_apiUniqueId type="int">15221</_apiUniqueId>
+ <afmPort type="NoneType">None</afmPort>
+ </item>
+ </portList>
+ <comment type="str"></comment>
+ <networkRangeList ver="[0, [2, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixNetworkRangeListSequenceContainer" itemtype="ixNetworkRange">
+ <item ver="[13, [1, [1, [1, [0, [0]]]]]]" oid="4" type="ixNetworkRange">
+ <_smRangeObjectId type="str">1d9bf537-0c3d-4fdf-9b85-0a622cc77649</_smRangeObjectId>
+ <name type="str">Network Range IP-R2 in server network (152.16.40.20+1)</name>
+ <rangeGroup ver="[3, [0, [1, [0, [0]]]]]" oid="5" type="ixIpDistributionGroup">
+ <name type="str">DistGroup1</name>
+ <ipDistributionMethod type="str">consecutiveIps</ipDistributionMethod>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12961</_apiUniqueId>
+ <_networkRangeList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixWeakrefSequenceContainer" itemtype="ixBasicNetworkRange">
+ <item ref="4"/>
+ </_networkRangeList>
+ <_rangeGroupObjectId type="str">b2c21c73-bfe3-4fbc-9804-b5a8b307d893</_rangeGroupObjectId>
+ <_smPluginObjectId type="str">b85b184d-9bb4-48c2-a029-e633fee7a3c8</_smPluginObjectId>
+ </rangeGroup>
+ <enableStats type="bool">False</enableStats>
+ </item>
+ </networkRangeList>
+ <layerPlugins type="NoneType">None</layerPlugins>
+ <stack type="NoneType">None</stack>
+ <rangeGroupList ver="[1, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixIpDistributionGroupList" itemtype="ixIpDistributionGroup">
+ <item ref="5"/>
+ </rangeGroupList>
+ <dynamicControlPlaneSetting type="int">0</dynamicControlPlaneSetting>
+ <linkLayerOptions type="int">0</linkLayerOptions>
+ <ipSourcePortFrom type="int">1024</ipSourcePortFrom>
+ <ipSourcePortTo type="int">65535</ipSourcePortTo>
+ <emulatedRouterGateway type="str">0.0.0.0</emulatedRouterGateway>
+ <emulatedRouterSubnet type="str">255.255.255.0</emulatedRouterSubnet>
+ <emulatedRouterGatewayIPv6 type="str">::</emulatedRouterGatewayIPv6>
+ <emulatedRouterSubnetIPv6 type="str">FFFF:FFFF:FFFF:FFFF:FFFF:FFFF::0</emulatedRouterSubnetIPv6>
+ <emulatedRouterIpAddressPool ver="[3, [0, [0, [0], [0]], [0]]]" type="ixConfigSequenceContainer" itemtype="ixEmulatedRouterIpAddressRange"/>
+ <macMappingMode type="int">0</macMappingMode>
+ <arpSettings ver="[0, [1, [0, [0]]]]" type="ixArpSettings">
+ <gratuitousArp type="bool">True</gratuitousArp>
+ <processGratArp type="bool">False</processGratArp>
+ </arpSettings>
+ <dnsParameters ver="[1, [1, [0, [0]]]]" type="ixDns">
+ <enable type="int">0</enable>
+ <cacheTimeout type="int">30000</cacheTimeout>
+ <serverList ver="[3, [0, [0, [0], [0]], [0]]]" type="ixConfigSequenceContainer" itemtype="_ixDnsServerItem"/>
+ <suffixList ver="[3, [0, [0, [0], [0]], [0]]]" type="ixConfigSequenceContainer" itemtype="_ixDnsSuffixItem"/>
+ </dnsParameters>
+ <tcpParameters ver="[0, [1, [0, [0]]]]" type="ixTcpParameters">
+ <tcpParametersFull ver="[4, [1, [0, [0]]]]" oid="6" type="ixTcpParametersFull">
+ <enableCongestionNotification type="bool">False</enableCongestionNotification>
+ <enableTimeStamp type="bool">True</enableTimeStamp>
+ <timeWaitRecycle type="bool">True</timeWaitRecycle>
+ <timeWaitReuse type="bool">False</timeWaitReuse>
+ <enableTxBwLimit type="bool">False</enableTxBwLimit>
+ <txBwLimitUnit type="int">0</txBwLimitUnit>
+ <txBwLimit type="int">1024</txBwLimit>
+ <enableRxBwLimit type="bool">False</enableRxBwLimit>
+ <rxBwLimitUnit type="int">0</rxBwLimitUnit>
+ <rxBwLimit type="int">1024</rxBwLimit>
+ <finTimeout type="int">60</finTimeout>
+ <keepAliveInterval type="int">7200</keepAliveInterval>
+ <keepAliveProbes type="int">75</keepAliveProbes>
+ <keepAliveTime type="int">9</keepAliveTime>
+ <synRetries type="int">5</synRetries>
+ <synAckRetries type="int">5</synAckRetries>
+ <retransmitRetries type="int">15</retransmitRetries>
+ <transmitBuffer type="int">1024</transmitBuffer>
+ <receiveBuffer type="int">1024</receiveBuffer>
+ <tcpSack type="bool">True</tcpSack>
+ <windowScaling type="bool">False</windowScaling>
+ <rtoMin type="int">1000</rtoMin>
+ <rtoMax type="int">120000</rtoMax>
+ </tcpParametersFull>
+ <tcpParametersFull ref="6"/>
+ </tcpParameters>
+ <impairment ver="[5, [1, [0, [0]]]]" type="ixImpairment">
+ <enable type="bool">False</enable>
+ <addDelay type="bool">True</addDelay>
+ <addReorder type="bool">False</addReorder>
+ <addDrop type="bool">False</addDrop>
+ <addDuplicate type="bool">False</addDuplicate>
+ <randomizeSeed type="bool">False</randomizeSeed>
+ <delay type="int">1</delay>
+ <reorder type="int">1</reorder>
+ <reorderLength type="int">1</reorderLength>
+ <sourcePort type="int">0</sourcePort>
+ <destinationPort type="int">0</destinationPort>
+ <drop type="int">1</drop>
+ <duplicate type="int">1</duplicate>
+ <jitter type="int">0</jitter>
+ <gap type="int">1</gap>
+ <destinationIp type="str">any</destinationIp>
+ <typeOfService type="str">any</typeOfService>
+ <protocol type="str">any</protocol>
+ <addFragmentation type="bool">False</addFragmentation>
+ <fragmentationType type="str">FragmentationPercent</fragmentationType>
+ <fragmentPercent type="int">50</fragmentPercent>
+ <mtu type="int">1000</mtu>
+ <fragmentSequenceSkip type="int">1</fragmentSequenceSkip>
+ <fragmentSequenceLength type="int">1</fragmentSequenceLength>
+ <_seed type="int">1</_seed>
+ </impairment>
+ <_portGroupId type="str">c4ecfc60-64ac-4dc2-9410-e0f58d84f229</_portGroupId>
+ <_smExternalLinks ver="[0, [1, [0, [0]]]]" type="_smExternalLinkersMap">
+ <externalLinks type="dict"/>
+ </_smExternalLinks>
+ <smVersion type="int">1</smVersion>
+ </network>
+ <activityParameters ver="[2, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixActivityParametersList" itemtype="ixActivityParameters">
+ <item ver="[0, [19, [1, [1, [0, [0]]]]]]" type="ixActivity">
+ <agent ref="7"/>
+ <protocolAndType type="str">HTTP Server</protocolAndType>
+ <name type="str">newServerActivity1</name>
+ <enable type="bool">True</enable>
+ <timeline ver="[0, [2, [2, [1, [1, [0, [0]]]]]]]" oid="8" type="ixMatchLongestTimeline"/>
+ <customParameters type="NoneType">None</customParameters>
+ <role type="str">Server</role>
+ <activeRole type="str">Server</activeRole>
+ <objectivePercent type="float">100.0</objectivePercent>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12989</_apiUniqueId>
+ <_objectiveValue type="int">100</_objectiveValue>
+ <timelineScale type="float">1.0</timelineScale>
+ </item>
+ </activityParameters>
+ <timeline ref="8"/>
+ <communityCapture ver="[0, [1, [0, [0]]]]" type="ixViewCommunityCapture">
+ <captureViewOptions ref="9"/>
+ <filter ver="[0, [1, [0, [0]]]]" type="ixViewFilter">
+ <filterString type="str"></filterString>
+ </filter>
+ <portList ref="10"/>
+ <enable type="bool">True</enable>
+ <_apiUniqueId type="int">12970</_apiUniqueId>
+ </communityCapture>
+ <payload type="NoneType">None</payload>
+ <activityIpWiring ver="[0, [1, [0, [0]]]]" oid="11" type="ixRangeAgentEndpointWiring">
+ <rangeAgentConnections type="list"/>
+ <_apiUniqueId type="int">12956</_apiUniqueId>
+ <rangeAgentDict ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list">
+ <item type="tuple">
+ <item ref="4"/>
+ <item ver="[0, [1, [0, [0]]]]" type="ixRangeAgentWiring">
+ <range ref="4"/>
+ <agentEndpointConnections type="list"/>
+ <agentConnectionsDict ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list">
+ <item type="tuple">
+ <item ref="7"/>
+ <item ver="[0, [1, [0, [0]]]]" type="ixAgentEndpointWiring">
+ <agent ref="7"/>
+ <endpoints type="list"/>
+ <endpointsDict ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list">
+ <item type="tuple">
+ <item type="str">HTTP Server</item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixEndpoint">
+ <endpointName type="str">HTTP Server</endpointName>
+ <isAvailable type="bool">True</isAvailable>
+ </item>
+ </item>
+ </_dict>
+ </endpointsDict>
+ </item>
+ </item>
+ </_dict>
+ </agentConnectionsDict>
+ </item>
+ </item>
+ </_dict>
+ </rangeAgentDict>
+ </activityIpWiring>
+ <tcpAccelerationAllowedFlag type="bool">True</tcpAccelerationAllowedFlag>
+ <iterations type="int">1</iterations>
+ <standbyTime type="int">0</standbyTime>
+ <offlineTime type="int">0</offlineTime>
+ <sustainTime type="int">83</sustainTime>
+ <iterationTime type="int">83</iterationTime>
+ <totalTime type="int">83</totalTime>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12955</_apiUniqueId>
+ <isVisible type="bool">True</isVisible>
+ <activityIpWiring ref="11"/>
+ <_portOperationModesAllowed type="dict">
+ <item>
+ <key type="int">0</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">1</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">2</key>
+ <value type="bool">False</value>
+ </item>
+ <item>
+ <key type="int">3</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">4</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">8</key>
+ <value type="bool">True</value>
+ </item>
+ </_portOperationModesAllowed>
+ <_tcpAccelerationAllowed type="dict">
+ <item>
+ <key type="int">0</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">1</key>
+ <value type="bool">False</value>
+ </item>
+ </_tcpAccelerationAllowed>
+ </destinationCommunity>
+ <destinationAgentName type="str">newServerActivity1</destinationAgentName>
+ <portRangeList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixIntRangeList" itemtype="ixIntRange">
+ <item ver="[1, [1, [0, [0]]]]" type="ixIntRange">
+ <intRange type="str">80</intRange>
+ <objectID type="int">0</objectID>
+ <iStartingValue type="int">80</iStartingValue>
+ <iCount type="int">1</iCount>
+ </item>
+ </portRangeList>
+ <count type="int">1</count>
+ </item>
+ </destinations>
+ <flowPercentage type="float">100.0</flowPercentage>
+ <maxSessions type="int">1</maxSessions>
+ <maxStreams type="int">1</maxStreams>
+ <httpVersion type="int">1</httpVersion>
+ <keepAlive type="bool">False</keepAlive>
+ <maxPersistentRequests type="int">0</maxPersistentRequests>
+ <followHttpRedirects type="int">0</followHttpRedirects>
+ <enableCookieSupport type="int">0</enableCookieSupport>
+ <maxPipeline type="int">1</maxPipeline>
+ <urlStatsCount type="int">10</urlStatsCount>
+ <enableHttpProxy type="int">0</enableHttpProxy>
+ <httpProxy type="str">:80</httpProxy>
+ <enableHttpsProxy type="int">0</enableHttpsProxy>
+ <httpsProxy type="str">:443</httpsProxy>
+ <browserEmulation type="int">1</browserEmulation>
+ <browserEmulationName type="str">Custom1</browserEmulationName>
+ <enableSsl type="int">0</enableSsl>
+ <sslVersion type="int">3</sslVersion>
+ <sslReuseMethod type="int">0</sslReuseMethod>
+ <sequentialSessionReuse type="int">0</sequentialSessionReuse>
+ <enablesslRecordSize type="int">0</enablesslRecordSize>
+ <validateCertificate type="int">0</validateCertificate>
+ <sslRecordSize type="str">16384</sslRecordSize>
+ <enableSslSendCloseNotify type="int">0</enableSslSendCloseNotify>
+ <enableUnidirectionalClose type="int">0</enableUnidirectionalClose>
+ <privateKeyPassword type="str"></privateKeyPassword>
+ <privateKey type="str"></privateKey>
+ <certificate type="str"></certificate>
+ <caCert type="str"></caCert>
+ <clientCiphers type="str">DEFAULT</clientCiphers>
+ <enableEsm type="int">0</enableEsm>
+ <enablePerConnCookieSupport type="int">0</enablePerConnCookieSupport>
+ <perHeaderPercentDist type="int">0</perHeaderPercentDist>
+ <enablemetaRedirectSupport type="int">0</enablemetaRedirectSupport>
+ <esm type="int">1460</esm>
+ <enableVlanPriority type="int">0</enableVlanPriority>
+ <vlanPriority type="int">0</vlanPriority>
+ <enableTos type="bool">False</enableTos>
+ <tos type="int">0</tos>
+ <precedenceTOS type="int">0</precedenceTOS>
+ <delayTOS type="int">0</delayTOS>
+ <throughputTOS type="int">0</throughputTOS>
+ <reliabilityTOS type="int">0</reliabilityTOS>
+ <commandTimeout type="int">600</commandTimeout>
+ <commandTimeout_ms type="int">0</commandTimeout_ms>
+ <enableConsecutiveIpsPerSession type="int">0</enableConsecutiveIpsPerSession>
+ <enableAchieveCCFirst type="int">0</enableAchieveCCFirst>
+ <enableTrafficDistributionForCC type="int">0</enableTrafficDistributionForCC>
+ <contentLengthDeviationTolerance type="int">0</contentLengthDeviationTolerance>
+ <actionList ver="[1, [1, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]]" type="ixHttpCommandList" itemtype="ixConfig">
+ <item ver="[0, [0, [0, [0, [1, [0, [0]]]]]]]" type="ixStartCommand">
+ <commandId type="int">-2</commandId>
+ <commandType type="str">START</commandType>
+ <cmdName type="str">Start</cmdName>
+ <outputList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixCommandOutputList" itemtype="ixCommandOutput">
+ <item ver="[1, [1, [0, [0]]]]" type="ixCommandOutput">
+ <name type="str">Output1</name>
+ <outputType type="int">0</outputType>
+ <destCmdId type="int">1</destCmdId>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12948</_apiUniqueId>
+ <destinationCommandIdx type="int">1</destinationCommandIdx>
+ </item>
+ </outputList>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12945</_apiUniqueId>
+ </item>
+ <item ver="[0, [0, [2, [1, [0, [0]]]]], [0, [0, [1, [0, [0]]]]]]" type="ixHttpCommand">
+ <commandId type="int">1</commandId>
+ <commandType type="str">GET</commandType>
+ <cmdName type="str">Get 1</cmdName>
+ <outputList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixCommandOutputList" itemtype="ixCommandOutput">
+ <item ver="[1, [1, [0, [0]]]]" type="ixCommandOutput">
+ <name type="str">Output1</name>
+ <outputType type="int">0</outputType>
+ <destCmdId type="int">-3</destCmdId>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12949</_apiUniqueId>
+ <destinationCommandIdx type="int">2</destinationCommandIdx>
+ </item>
+ </outputList>
+ <destination type="str">HTTP server_newServerActivity1:80</destination>
+ <pageObject type="str">/1b.html</pageObject>
+ <abort type="str">None</abort>
+ <arguments type="str"></arguments>
+ <namevalueargs type="str"></namevalueargs>
+ <profile type="int">-1</profile>
+ <enableDi type="int">0</enableDi>
+ <sendMD5ChkSumHeader type="int">0</sendMD5ChkSumHeader>
+ <sendingChunkSize type="str">None</sendingChunkSize>
+ <sslProfile type="int">-1</sslProfile>
+ <method type="int">-1</method>
+ <useSsl type="bool">False</useSsl>
+ <windowSize type="str">65536</windowSize>
+ <streamIden type="int">3</streamIden>
+ <pingFreq type="int">10</pingFreq>
+ <objectID type="int">1</objectID>
+ <_apiUniqueId type="int">12946</_apiUniqueId>
+ </item>
+ <item ver="[0, [0, [0, [0, [1, [0, [0]]]]]]]" type="ixStopCommand">
+ <commandId type="int">-3</commandId>
+ <commandType type="str">STOP</commandType>
+ <cmdName type="str">Stop</cmdName>
+ <outputList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixCommandOutputList" itemtype="ixCommandOutput"/>
+ <objectID type="int">2</objectID>
+ <_apiUniqueId type="int">12947</_apiUniqueId>
+ </item>
+ </actionList>
+ <headerList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixwebHttpHeaderList" itemtype="_httpHeaderString">
+ <item ver="[1, [0, [0, [0], [0], [0]]], [1, [0, [0]]]]" type="_httpHeaderString">
+ <data type="str">Accept: */*</data>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12950</_apiUniqueId>
+ </item>
+ <item ver="[1, [0, [0, [0], [0], [0]]], [1, [0, [0]]]]" type="_httpHeaderString">
+ <data type="str">Accept-Language: en-us</data>
+ <objectID type="int">1</objectID>
+ <_apiUniqueId type="int">12951</_apiUniqueId>
+ </item>
+ <item ver="[1, [0, [0, [0], [0], [0]]], [1, [0, [0]]]]" type="_httpHeaderString">
+ <data type="str">Accept-Encoding: gzip, deflate</data>
+ <objectID type="int">2</objectID>
+ <_apiUniqueId type="int">12952</_apiUniqueId>
+ </item>
+ <item ver="[1, [0, [0, [0], [0], [0]]], [1, [0, [0]]]]" type="_httpHeaderString">
+ <data type="str">User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)</data>
+ <objectID type="int">3</objectID>
+ <_apiUniqueId type="int">12953</_apiUniqueId>
+ </item>
+ </headerList>
+ <profileList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixHttpCommandProfileList" itemtype="ixHttpCommandProfile"/>
+ <sslProfileList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixHttpCommandSSLProfileList" itemtype="ixHttpCommandSSLProfile"/>
+ <cookieJarSize type="int">10</cookieJarSize>
+ <cookieRejectProbability type="float">0.0</cookieRejectProbability>
+ <ipPreference type="int">2</ipPreference>
+ <tcpCloseOption type="int">0</tcpCloseOption>
+ <piggybackAck type="int">1</piggybackAck>
+ <enableLargeHeader type="int">0</enableLargeHeader>
+ <maxHeaderLen type="int">1024</maxHeaderLen>
+ <useAllIPs type="int">0</useAllIPs>
+ <enableDecompressSupport type="int">0</enableDecompressSupport>
+ <enableIntegrityCheckSupport type="int">0</enableIntegrityCheckSupport>
+ <enableCRCCheckSupport type="int">0</enableCRCCheckSupport>
+ <uniqueID type="int">1</uniqueID>
+ <disableDnsResolutionCache type="int">0</disableDnsResolutionCache>
+ <methodProfileList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixMethodProfileList" itemtype="ixMethodProfile"/>
+ <httpsTunnel type="str">0.0.0.0</httpsTunnel>
+ <enableHttpsTunnel type="int">0</enableHttpsTunnel>
+ <exactTransactions type="int">0</exactTransactions>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12942</_apiUniqueId>
+ <uniqueID type="int">1</uniqueID>
+ <commandIdCounter type="int">1</commandIdCounter>
+ <networkPluginSettings ver="[0]" type="ixNetworkActivityPluginSupport">
+ <serializedNetworkSettingsMap ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list"/>
+ </serializedNetworkSettingsMap>
+ <protocolName type="str">HTTP</protocolName>
+ </networkPluginSettings>
+ </item>
+ </agentList>
+ </traffic>
+ <network ver="[17, [1, [6, [1, [0, [0]]]]]]" type="ixNetworkGroup">
+ <resourceSyncTimeStamp type="NoneType">None</resourceSyncTimeStamp>
+ <name type="str">client network</name>
+ <role type="str">Client</role>
+ <networkType type="str">none</networkType>
+ <aggregation type="int">0</aggregation>
+ <lineSpeed type="str">Default</lineSpeed>
+ <cpuAggregation type="bool">False</cpuAggregation>
+ <chassisChain ref="3"/>
+ <cardType type="str">FLEXAP1040SQ</cardType>
+ <activePortList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixNetworkPortListSequenceContainer" itemtype="ixConfig"/>
+ <portList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixNetworkPortListSequenceContainer" itemtype="ixConfig">
+ <item ver="[3, [1, [1, [0, [0]]]]]" type="ixPort">
+ <chassisId type="int">1</chassisId>
+ <cardId type="int">2</cardId>
+ <portId type="int">13</portId>
+ <enableCapture type="bool">False</enableCapture>
+ <cardType type="str">FLEXAP10G16S</cardType>
+ <portPersistentSetting ver="[0, [1, [0, [0]]]]" type="ixPortPersistentSetting">
+ <viewFilter type="NoneType">None</viewFilter>
+ <_apiUniqueId type="int">15218</_apiUniqueId>
+ </portPersistentSetting>
+ <analyzerPartialCapture type="str">False;8192</analyzerPartialCapture>
+ <name type="str"></name>
+ <_apiUniqueId type="int">15217</_apiUniqueId>
+ <afmPort type="NoneType">None</afmPort>
+ </item>
+ </portList>
+ <comment type="str"></comment>
+ <networkRangeList ver="[0, [2, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixNetworkRangeListSequenceContainer" itemtype="ixNetworkRange">
+ <item ver="[13, [1, [1, [1, [0, [0]]]]]]" oid="12" type="ixNetworkRange">
+ <_smRangeObjectId type="str">a3559674-8d95-4020-90b3-b42eacaef105</_smRangeObjectId>
+ <name type="str">Network Range IP-R1 in client network (152.16.100.20+1)</name>
+ <rangeGroup ver="[3, [0, [1, [0, [0]]]]]" oid="13" type="ixIpDistributionGroup">
+ <name type="str">DistGroup1</name>
+ <ipDistributionMethod type="str">consecutiveIps</ipDistributionMethod>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12931</_apiUniqueId>
+ <_networkRangeList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixWeakrefSequenceContainer" itemtype="ixBasicNetworkRange">
+ <item ref="12"/>
+ </_networkRangeList>
+ <_rangeGroupObjectId type="str">aa33a76b-9c7f-48d9-a537-8d6eeec03662</_rangeGroupObjectId>
+ <_smPluginObjectId type="str">a916ae0f-0731-405d-ad19-eaade6c515f1</_smPluginObjectId>
+ </rangeGroup>
+ <enableStats type="bool">False</enableStats>
+ </item>
+ </networkRangeList>
+ <layerPlugins type="NoneType">None</layerPlugins>
+ <stack type="NoneType">None</stack>
+ <rangeGroupList ver="[1, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixIpDistributionGroupList" itemtype="ixIpDistributionGroup">
+ <item ref="13"/>
+ </rangeGroupList>
+ <dynamicControlPlaneSetting type="int">0</dynamicControlPlaneSetting>
+ <linkLayerOptions type="int">0</linkLayerOptions>
+ <ipSourcePortFrom type="int">1024</ipSourcePortFrom>
+ <ipSourcePortTo type="int">65535</ipSourcePortTo>
+ <emulatedRouterGateway type="str">0.0.0.0</emulatedRouterGateway>
+ <emulatedRouterSubnet type="str">255.255.255.0</emulatedRouterSubnet>
+ <emulatedRouterGatewayIPv6 type="str">::</emulatedRouterGatewayIPv6>
+ <emulatedRouterSubnetIPv6 type="str">FFFF:FFFF:FFFF:FFFF:FFFF:FFFF::0</emulatedRouterSubnetIPv6>
+ <emulatedRouterIpAddressPool ver="[3, [0, [0, [0], [0]], [0]]]" type="ixConfigSequenceContainer" itemtype="ixEmulatedRouterIpAddressRange"/>
+ <macMappingMode type="int">0</macMappingMode>
+ <arpSettings ver="[0, [1, [0, [0]]]]" type="ixArpSettings">
+ <gratuitousArp type="bool">True</gratuitousArp>
+ <processGratArp type="bool">False</processGratArp>
+ </arpSettings>
+ <dnsParameters ver="[1, [1, [0, [0]]]]" type="ixDns">
+ <enable type="int">0</enable>
+ <cacheTimeout type="int">30000</cacheTimeout>
+ <serverList ver="[3, [0, [0, [0], [0]], [0]]]" type="ixConfigSequenceContainer" itemtype="_ixDnsServerItem"/>
+ <suffixList ver="[3, [0, [0, [0], [0]], [0]]]" type="ixConfigSequenceContainer" itemtype="_ixDnsSuffixItem"/>
+ </dnsParameters>
+ <tcpParameters ver="[0, [1, [0, [0]]]]" type="ixTcpParameters">
+ <tcpParametersFull ver="[4, [1, [0, [0]]]]" oid="14" type="ixTcpParametersFull">
+ <enableCongestionNotification type="bool">False</enableCongestionNotification>
+ <enableTimeStamp type="bool">True</enableTimeStamp>
+ <timeWaitRecycle type="bool">True</timeWaitRecycle>
+ <timeWaitReuse type="bool">False</timeWaitReuse>
+ <enableTxBwLimit type="bool">False</enableTxBwLimit>
+ <txBwLimitUnit type="int">0</txBwLimitUnit>
+ <txBwLimit type="int">1024</txBwLimit>
+ <enableRxBwLimit type="bool">False</enableRxBwLimit>
+ <rxBwLimitUnit type="int">0</rxBwLimitUnit>
+ <rxBwLimit type="int">1024</rxBwLimit>
+ <finTimeout type="int">60</finTimeout>
+ <keepAliveInterval type="int">7200</keepAliveInterval>
+ <keepAliveProbes type="int">75</keepAliveProbes>
+ <keepAliveTime type="int">9</keepAliveTime>
+ <synRetries type="int">5</synRetries>
+ <synAckRetries type="int">5</synAckRetries>
+ <retransmitRetries type="int">15</retransmitRetries>
+ <transmitBuffer type="int">1024</transmitBuffer>
+ <receiveBuffer type="int">1024</receiveBuffer>
+ <tcpSack type="bool">True</tcpSack>
+ <windowScaling type="bool">False</windowScaling>
+ <rtoMin type="int">1000</rtoMin>
+ <rtoMax type="int">120000</rtoMax>
+ </tcpParametersFull>
+ <tcpParametersFull ref="14"/>
+ </tcpParameters>
+ <impairment ver="[5, [1, [0, [0]]]]" type="ixImpairment">
+ <enable type="bool">False</enable>
+ <addDelay type="bool">True</addDelay>
+ <addReorder type="bool">False</addReorder>
+ <addDrop type="bool">False</addDrop>
+ <addDuplicate type="bool">False</addDuplicate>
+ <randomizeSeed type="bool">False</randomizeSeed>
+ <delay type="int">1</delay>
+ <reorder type="int">1</reorder>
+ <reorderLength type="int">1</reorderLength>
+ <sourcePort type="int">0</sourcePort>
+ <destinationPort type="int">0</destinationPort>
+ <drop type="int">1</drop>
+ <duplicate type="int">1</duplicate>
+ <jitter type="int">0</jitter>
+ <gap type="int">1</gap>
+ <destinationIp type="str">any</destinationIp>
+ <typeOfService type="str">any</typeOfService>
+ <protocol type="str">any</protocol>
+ <addFragmentation type="bool">False</addFragmentation>
+ <fragmentationType type="str">FragmentationPercent</fragmentationType>
+ <fragmentPercent type="int">50</fragmentPercent>
+ <mtu type="int">1000</mtu>
+ <fragmentSequenceSkip type="int">1</fragmentSequenceSkip>
+ <fragmentSequenceLength type="int">1</fragmentSequenceLength>
+ <_seed type="int">1</_seed>
+ </impairment>
+ <_portGroupId type="str">865be042-32d5-426a-9e75-0908c943801f</_portGroupId>
+ <_smExternalLinks ver="[0, [1, [0, [0]]]]" type="_smExternalLinkersMap">
+ <externalLinks type="dict"/>
+ </_smExternalLinks>
+ <smVersion type="int">1</smVersion>
+ </network>
+ <activityParameters ver="[2, [0, [0, [3, [0, [0, [0], [0]], [0]]]]]]" type="ixActivityParametersList" itemtype="ixActivityParameters">
+ <item ver="[0, [19, [1, [1, [0, [0]]]]]]" type="ixActivity">
+ <agent ref="15"/>
+ <protocolAndType type="str">HTTP Client</protocolAndType>
+ <name type="str">newClientActivity1</name>
+ <enable type="bool">True</enable>
+ <timeline ver="[2, [1, [1, [0, [0]]]]]" oid="16" type="ixTimeline">
+ <name type="str">Timeline1</name>
+ <iterationTime type="int">83</iterationTime>
+ <totalTime type="int">83</totalTime>
+ <iterations type="int">1</iterations>
+ <standbyTime type="int">0</standbyTime>
+ <offlineTime type="int">0</offlineTime>
+ <sustainTime type="int">60</sustainTime>
+ <rampUpType type="int">0</rampUpType>
+ <rampUpValue type="int">30000</rampUpValue>
+ <rampUpInterval type="int">1</rampUpInterval>
+ <rampUpTime type="int">3</rampUpTime>
+ <rampDownTime type="int">20</rampDownTime>
+ <rampDownValue type="int">32000</rampDownValue>
+ <timelineType type="int">0</timelineType>
+ <objectID type="int">0</objectID>
+ </timeline>
+ <customParameters type="NoneType">None</customParameters>
+ <role type="str">Client</role>
+ <activeRole type="str">Client</activeRole>
+ <objectivePercent type="float">100.0</objectivePercent>
+ <objectiveType type="str">simulatedUsers</objectiveType>
+ <objectiveValue type="int">64000</objectiveValue>
+ <userObjectiveType type="str">simulatedUsers</userObjectiveType>
+ <userObjectiveValue type="long">64000</userObjectiveValue>
+ <constraintType type="str">ConnectionRateConstraint</constraintType>
+ <constraintValue type="int">100</constraintValue>
+ <timerGranularity type="int">100</timerGranularity>
+ <enableConstraint type="bool">False</enableConstraint>
+ <secondaryConstraintType type="str">SimulatedUserConstraint</secondaryConstraintType>
+ <secondaryConstraintValue type="int">100</secondaryConstraintValue>
+ <secondaryEnableConstraint type="bool">False</secondaryEnableConstraint>
+ <portMapPolicy type="str">portMesh</portMapPolicy>
+ <concurrentObjectiveBehavior type="int">1</concurrentObjectiveBehavior>
+ <cpsObjectiveBehavior type="int">0</cpsObjectiveBehavior>
+ <userIpMapping type="str">1:1</userIpMapping>
+ <destinationIpMapping type="str">Consecutive</destinationIpMapping>
+ <playlists ver="[1, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixPlaylistList" itemtype="ixPlaylist"/>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12954</_apiUniqueId>
+ <_objectiveValue type="int">64000</_objectiveValue>
+ <timelineScale type="float">1.0</timelineScale>
+ </item>
+ </activityParameters>
+ <timeline ref="16"/>
+ <communityCapture ver="[0, [1, [0, [0]]]]" type="ixViewCommunityCapture">
+ <captureViewOptions ref="9"/>
+ <filter ver="[0, [1, [0, [0]]]]" type="ixViewFilter">
+ <filterString type="str"></filterString>
+ </filter>
+ <portList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="_portListSequenceContainer" itemtype="ixConfig"/>
+ <enable type="bool">False</enable>
+ <_apiUniqueId type="int">12940</_apiUniqueId>
+ </communityCapture>
+ <payload type="NoneType">None</payload>
+ <activityIpWiring ver="[0, [1, [0, [0]]]]" oid="17" type="ixRangeAgentEndpointWiring">
+ <rangeAgentConnections type="list"/>
+ <_apiUniqueId type="int">12926</_apiUniqueId>
+ <rangeAgentDict ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list">
+ <item type="tuple">
+ <item ref="12"/>
+ <item ver="[0, [1, [0, [0]]]]" type="ixRangeAgentWiring">
+ <range ref="12"/>
+ <agentEndpointConnections type="list"/>
+ <agentConnectionsDict ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list">
+ <item type="tuple">
+ <item ref="15"/>
+ <item ver="[0, [1, [0, [0]]]]" type="ixAgentEndpointWiring">
+ <agent ref="15"/>
+ <endpoints type="list"/>
+ <endpointsDict ver="[0, [0, [0]]]" type="ixOrderedDict">
+ <_dict type="list">
+ <item type="tuple">
+ <item type="str">HTTP Client</item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixEndpoint">
+ <endpointName type="str">HTTP Client</endpointName>
+ <isAvailable type="bool">True</isAvailable>
+ </item>
+ </item>
+ </_dict>
+ </endpointsDict>
+ </item>
+ </item>
+ </_dict>
+ </agentConnectionsDict>
+ </item>
+ </item>
+ </_dict>
+ </rangeAgentDict>
+ </activityIpWiring>
+ <tcpAccelerationAllowedFlag type="bool">True</tcpAccelerationAllowedFlag>
+ <iterations type="int">1</iterations>
+ <standbyTime type="int">0</standbyTime>
+ <offlineTime type="int">0</offlineTime>
+ <sustainTime type="int">60</sustainTime>
+ <iterationTime type="int">83</iterationTime>
+ <totalTime type="int">83</totalTime>
+ <portMapPolicy type="str">portPairs</portMapPolicy>
+ <objectiveType type="str">simulatedUsers</objectiveType>
+ <objectiveValue type="int">64000</objectiveValue>
+ <rampUpType type="int">0</rampUpType>
+ <rampUpValue type="int">30000</rampUpValue>
+ <rampUpInterval type="int">1</rampUpInterval>
+ <rampUpTime type="int">3</rampUpTime>
+ <rampDownTime type="int">20</rampDownTime>
+ <userObjectiveType type="str">simulatedUsers</userObjectiveType>
+ <userObjectiveValue type="long">64000</userObjectiveValue>
+ <totalUserObjectiveValue type="long">64000</totalUserObjectiveValue>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12925</_apiUniqueId>
+ <isVisible type="bool">True</isVisible>
+ <activityIpWiring ref="17"/>
+ <_portOperationModesAllowed type="dict">
+ <item>
+ <key type="int">0</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">1</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">2</key>
+ <value type="bool">False</value>
+ </item>
+ <item>
+ <key type="int">3</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">4</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">8</key>
+ <value type="bool">True</value>
+ </item>
+ </_portOperationModesAllowed>
+ <_tcpAccelerationAllowed type="dict">
+ <item>
+ <key type="int">0</key>
+ <value type="bool">True</value>
+ </item>
+ <item>
+ <key type="int">1</key>
+ <value type="bool">False</value>
+ </item>
+ </_tcpAccelerationAllowed>
+ </item>
+ </elementList>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12922</_apiUniqueId>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixTrafficColumn">
+ <name type="str">DUT</name>
+ <elementList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixScenarioElementList" itemtype="ixScenarioElement"/>
+ <objectID type="int">1</objectID>
+ <_apiUniqueId type="int">12923</_apiUniqueId>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixTrafficColumn">
+ <name type="str">Server</name>
+ <elementList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixScenarioElementList" itemtype="ixScenarioElement">
+ <item ref="18"/>
+ </elementList>
+ <objectID type="int">2</objectID>
+ <_apiUniqueId type="int">12924</_apiUniqueId>
+ </item>
+ </columnList>
+ <links ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixActivityLinkList" itemtype="ixActivityLink"/>
+ <appMixList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixAppMixList" itemtype="ixAppMix"/>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12921</_apiUniqueId>
+ </item>
+ </scenarioList>
+ <currentUniqueIDForAgent type="int">2</currentUniqueIDForAgent>
+ <enableNetworkDiagnostics type="bool">True</enableNetworkDiagnostics>
+ <showNetworkDiagnosticsFromApplyConfig type="bool">False</showNetworkDiagnosticsFromApplyConfig>
+ <showNetworkDiagnosticsAfterRunStops type="bool">False</showNetworkDiagnosticsAfterRunStops>
+ <resetNetworkDiagnosticsAtStartRun type="bool">False</resetNetworkDiagnosticsAtStartRun>
+ <enableNetworkDiagnosticsLogging type="bool">False</enableNetworkDiagnosticsLogging>
+ <enableTcpAdvancedStats type="bool">False</enableTcpAdvancedStats>
+ <enableFrameSizeDistributionStats type="bool">False</enableFrameSizeDistributionStats>
+ <isFrameSizeDistributionViewSupported type="bool">False</isFrameSizeDistributionViewSupported>
+ <statViewThroughputUnits type="str">Kbps</statViewThroughputUnits>
+ <totalUserObjectiveInfoList ver="[0, [3, [0, [0, [0], [0]], [0]]]]" type="ixTotalUserObjectiveInfoList" itemtype="ixTotalUserObjectiveInfo"/>
+ <activitiesGroupedByObjective type="bool">False</activitiesGroupedByObjective>
+ <eventHandlerSettings ver="[0, [1, [0, [0]]]]" type="ixEventHandlerSettings">
+ <disabledEventClasses type="str"></disabledEventClasses>
+ <disabledPorts type="str"></disabledPorts>
+ <_apiUniqueId type="int">12990</_apiUniqueId>
+ </eventHandlerSettings>
+ <allowMixedObjectiveTypes type="bool">False</allowMixedObjectiveTypes>
+ <networkProtocolOptions type="NoneType">None</networkProtocolOptions>
+ <seedForRandomBehavior type="int">0</seedForRandomBehavior>
+ <csvThroughputScalingFactor type="int">0</csvThroughputScalingFactor>
+ <reporterThroughputScalingFactor type="int">0</reporterThroughputScalingFactor>
+ <profileDirectory ver="[2, [1, [0, [0]]]]" type="ixProfileDirectory">
+ <categoryList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileCategoryList" itemtype="ixProfileCategory">
+ <item ver="[0, [1, [0, [0]]]]" type="ixProfileCategory">
+ <name type="str">Playlist</name>
+ <categoryId type="str">playlist</categoryId>
+ <profileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <pm ver="[0, [1, [0.1, [1, [0, [0]]]]]]" type="#Plugins.profile.Playlist.ixPropertyMap_PlaylistCategory$ixPropertyMap_PlaylistCategory"/>
+ <temporaryProfileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <objectID type="int">0</objectID>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixProfileCategory">
+ <name type="str">Random Data</name>
+ <categoryId type="str">rdge</categoryId>
+ <profileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <pm ver="[0, [1, [0.1, [1, [0, [0]]]]]]" type="#Plugins.profile.RandomData.ixPropertyMap_RandomDataCategory$ixPropertyMap_RandomDataCategory">
+ <startcore type="int">0</startcore>
+ <totalcores type="int">1</totalcores>
+ </pm>
+ <temporaryProfileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <objectID type="int">1</objectID>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixProfileCategory">
+ <name type="str">Real File</name>
+ <categoryId type="str">realfile</categoryId>
+ <profileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <pm type="NoneType">None</pm>
+ <temporaryProfileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <objectID type="int">2</objectID>
+ </item>
+ <item ver="[0, [1, [0, [0]]]]" type="ixProfileCategory">
+ <name type="str">Unified File System</name>
+ <categoryId type="str">ufs</categoryId>
+ <profileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <pm type="NoneType">None</pm>
+ <temporaryProfileList ver="[0, [0, [3, [0, [0, [0], [0]], [0]]]]]" type="ixProfileList" itemtype="ixProfile"/>
+ <objectID type="int">3</objectID>
+ </item>
+ </categoryList>
+ <_profileMru type="str"></_profileMru>
+ </profileDirectory>
+ <communityList type="NoneType">None</communityList>
+ <autoUpdateAppFlowsToLatest type="bool">True</autoUpdateAppFlowsToLatest>
+ <downgradeAppLibFlowsToLatestValidVersion type="bool">True</downgradeAppLibFlowsToLatestValidVersion>
+ <objectID type="int">0</objectID>
+ <_apiUniqueId type="int">12920</_apiUniqueId>
+ <lastStatViewerConfiguration type="str"></lastStatViewerConfiguration>
+ <statManagerOptions ver="[1, [1, [0, [0]]]]" type="ixStatManagerOptions">
+ <pollingInterval type="int">2</pollingInterval>
+ <allowCsvLogging type="bool">False</allowCsvLogging>
+ <enableDataStore type="bool">False</enableDataStore>
+ <svConfiguration type="str">begin 666 &lt;data&gt;&#10;M&gt;)RE6/MSXC80_E&lt;\=)III_6;5PC)30+DPAP)#'!WG6DZ&amp;6$OQ#UC&lt;Y+,HYW^&#10;M[UW)#PS8)-/^&lt;(&gt;L[]O52EKM(^T/VZ6OK($R+PRN*Z9F5#[&lt;M&quot;&gt;&lt;\&quot;\&gt;;(#N&#10;MH;I6-S1#LVRK@@1@8G;@,:Y\@MUUA:RXM_6(QM;:2D@P#H$#6H[WE9(50BC&lt;&#10;M&amp;3Y-&gt;T]31;]IC\:]&quot;0YOI_WAT_'W2Z_;G][&gt;#7H&quot;Z P?[_I/O6ZV-,M&amp;[S'@&#10;M9/&amp;;]CV%[Q%R=LJ:^!%&lt;5ZR*7(BM!^%BX06+=/Z&gt;^ PD-O66,-D%SAV\DK47&#10;MTI1A9&quot;CC9+D:47 \:5F&quot;VQ+O+2@:(XYUNEM!BID2&amp;^(Q^R%Q1S3DX/&quot;&lt;[)1&amp;&#10;M&lt;&amp;38@^&gt;Z$ A%[-3&amp;7D!F/G0))Q,&gt;4C@EC/:GD[&gt;C6B1]=B4T:!CQ5&lt;2SDWR,&#10;M?.ZM_..]25)W\@;MD6R%VS&amp;TKQ,Q'BX_XIV]9IQZNN:]Y\.(\ R1\[&lt;^4,[2&#10;M7P5].F&quot;M+?.N*Z^&lt;KUJZOMELM(VMA72A6X9AZK\]#B;.*RR)Z@5X:7@8E4S*&#10;M?5M*+JJGJW9A3G!/\IP.OR3M$.[0,/$&quot;&quot;H#HT?&gt;8N%[XD8;1Z@CP GYCM77Q&#10;MT]9+61W?@X#?AW09^60&quot;G*._9'?W]\4/V^X5_G=[=?$]&quot;OG5E_AQQQ^M^,?4&#10;M:O'@UQ.VV$#&quot;_7T/_K$?_K,?QD\&quot;'\0X&quot;H[MN/#YU4'&lt;25&lt;VXH&amp;&quot;7A*Z*)$ &#10;M$9^K9CT&gt;?[A8\*N&lt;9:@J6:4?S,,)4(_XWE]$/*$[LLAY0BS^;G=(+-G[Q/OD&#10;M8]:AC8HBK%R^\.0TT,L]!U_ZBAWS8J;8SQ-9@D#%V!23&gt;GZV6*9#.&quot;Q&quot;NA,,&#10;M\83UA^ETE,GFT5/YSGR1/BQ!Z+2&gt;Q\#0:=FS4**N[[^^]$?KZHLU&quot;M'E-;J=&#10;M2\5'8L5V 4WM=ME^+_O94ZEN)+&gt;JZ*7PPR;QW3.&lt;R5L&lt;8&lt;9P]J&lt;(N&amp;M@YU@/&#10;MWN+5QW^\E)6%5=['D,F]N0=4,.U+ DUS;JO.S&quot;1J=39OJ#.C65=KE[6:!388&#10;MAC.39U*FX'0I]*&amp;\&gt;^!GM5&amp;7.G+(J=AG!G32[PIPHIIJ3;5,U;:KMEVO51N6&#10;M:C7,9LVL-HRFVKRTZ_9EO:::Z-M2&lt;4ZVT![T:&lt;K!'0:&quot;81EF0S5LU;&quot;FEM6R&#10;M[)9I:&amp;:C:EV:U5^,6LLV4EL/I$KTAIBWD:'@$VX%GI\\0XY9,7FA)?&lt;1!\)'&#10;MXKQZ :2'TL?&lt;/U!'G=AWBQAO*+IU79'$!1,W95FV9M;KFFDW]W)S:!JMUJQY&#10;M.&lt;.M.]466 W2&lt;@WG1[-V&amp;+;T,LVG-O2W3\ W(?V6!FQD-37#U$RCKME261'E&#10;MC*(Q^$!8?&quot;C; 58&gt;BJCOE-[MH;(&lt;[8RR7-3 L+:@9*F(J,&quot;4G[;-^L_/?:S+&#10;MGN-5GH75ZL&gt;C5&lt;K#1W\[AA5&amp;'*&quot;Y;=EQ)6HVTIT7&lt;(J?\&gt;?'B4-\B*_/,+)8&#10;ME)L_%9RL&lt;_&quot;G&amp;49M(78P6^B[N5,1SX&lt;]8_1[[H9.M,1;9R&gt;G$M]E%G:9M\02&#10;M*0N^DU$&lt;?\V:]2+&gt;EV$;%G[8#72]Y#45G:+$WI-Y&lt;ADJ-F&quot;X$BFTQ!\[H&gt;]C&#10;MU!3UHTPVP G&gt;MQM[]2%6*CP 0@-P1=86O+FH*_,*CO!2/?=^N)&amp;5$&quot;M4&lt;PB7&#10;M:L'H*YBR A5$&amp;6!R:H[Q&lt;XJ2GN.&lt;KF-*N3IL&quot;$(G]/L!^O&gt;&lt;.%&quot;LL9!5JG0&lt;&#10;M1AS&amp;)%@4:SN&quot;B]0L5R)833-W.3[Z(KS,+\_Z6^R7[BX07HN-7D'^/:!\$17F&#10;M&quot;2E[Z&quot;5EHF#')7W6'OZ'SC2K^$5G%/@[^6V*B8$7? -WWQ'L9?3$$_8C5HB+&#10;M#OJF+1U9&quot;3!775&gt;DMDJN=:\&lt;XG$355%&quot;Z@*5319QT#'8 -;@I]VN+B6PE0Z6&#10;MJ_-]-!*2&quot;D4V2[E&amp;6D&quot;=,)A[BXB2?.LJ3ITAZ&quot; H[R/Y7A,:VQAG&lt;&quot;&amp;?Y'(B&#10;M*['3'.\&quot;&lt;Z@G/20!&lt;W4V:L4,ZF/Z3 L]&lt;=O)0OEU75B_(9!CZ'G+_Z]O2'&amp;Q&#10;,3_&amp;3_6WEYE]ZB+T\&#10; &#10;end&#10;</svConfiguration>
+ <svRestConfiguration type="str"></svRestConfiguration>
+ </statManagerOptions>
+ <currentUniqueIDForAgent type="int">2</currentUniqueIDForAgent>
+ <_scenarioElementFactory ver="[0, [1, [0, [0]]]]" type="ixScenarioElementFactory">
+ <singletonDict type="dict"/>
+ <referenceCountDict type="dict">
+ <item>
+ <key type="str">qovCoprocessor</key>
+ <value type="int">0</value>
+ </item>
+ <item>
+ <key type="str">Impairment</key>
+ <value type="int">0</value>
+ </item>
+ <item>
+ <key type="str">asrCoprocessor</key>
+ <value type="int">0</value>
+ </item>
+ </referenceCountDict>
+ </_scenarioElementFactory>
+ </item>
+ </testList>
+</root> \ No newline at end of file
diff --git a/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_1flows.ixncfg b/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_1flows.ixncfg
new file mode 100644
index 000000000..dc05fc89a
--- /dev/null
+++ b/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_1flows.ixncfg
Binary files differ
diff --git a/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_256Kflows.ixncfg b/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_256Kflows.ixncfg
new file mode 100644
index 000000000..b7e45bfae
--- /dev/null
+++ b/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_256Kflows.ixncfg
Binary files differ
diff --git a/tests/ci/cover.awk b/tests/ci/cover.awk
new file mode 100644
index 000000000..e4bb816dc
--- /dev/null
+++ b/tests/ci/cover.awk
@@ -0,0 +1,25 @@
+BEGIN{
+ template = "%6s %-75s\n"
+ printf template, "Delta", "Module Path"
+}
+
+/^-/{
+ s = substr($1, 2)
+ x[s] = $3;
+};
+
+/^+/{
+ s = substr($1, 2)
+ d = $3
+ if (s in x)
+ d = d - x[s]
+ y[s" "d] = d
+}
+
+END{
+ asorti(y, z1, "@val_num_asc")
+ for (i=1; i <= length(z1); i++){
+ split(z1[i], z2, " ")
+ printf template, z2[2], z2[1]
+ }
+}
diff --git a/tests/ci/cover.sh b/tests/ci/cover.sh
index 822ed2ff2..780a85a22 100644
--- a/tests/ci/cover.sh
+++ b/tests/ci/cover.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
##############################################################################
# Copyright 2015: Mirantis Inc.
# All Rights Reserved.
@@ -17,65 +18,104 @@
# rally/tests/ci/cover.sh
##############################################################################
+if [[ -n $COVER_DIR_NAME ]]; then
+ :
+elif [[ -n $_ ]]; then
+ COVER_DIR_NAME=$( dirname $_ )
+else
+ COVER_DIR_NAME=$( dirname $0 )
+fi
+
show_diff () {
- head -1 $1
- diff -U 0 $1 $2 | sed 1,2d
+ diff -U 0 $1 $2 | awk -f $COVER_DIR_NAME/cover.awk
}
-
run_coverage_test() {
ALLOWED_EXTRA_MISSING=10
-
+ # enable debugging
+ set -x
# Stash uncommitted changes, checkout master and save coverage report
uncommited=$(git status --porcelain | grep -v "^??")
- [[ -n $uncommited ]] && git stash > /dev/null
+ [[ -n ${uncommited} ]] && git stash > /dev/null
git checkout HEAD^
baseline_report=$(mktemp -t yardstick_coverageXXXXXXX)
+ ls -l .testrepository
+
# workaround 'db type could not be determined' bug
# https://bugs.launchpad.net/testrepository/+bug/1229445
rm -rf .testrepository
- find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --slowest --testr-args="$*"
- coverage report > $baseline_report
- baseline_missing=$(awk 'END { print $3 }' $baseline_report)
+ find . -type f -name "*.pyc" -delete
+
+ #python setup.py testr --coverage --testr-args=""
+ python setup.py testr --coverage --slowest --testr-args="$*"
+ testr failing
+ coverage report > ${baseline_report}
+
+ # debug awk
+ tail -1 ${baseline_report}
+ baseline_missing=$(awk 'END { if (int($3) > 0) print $3 }' ${baseline_report})
+
+ if [[ -z $baseline_missing ]]; then
+ echo "Failed to determine baseline missing"
+ exit 1
+ fi
# Checkout back and unstash uncommitted changes (if any)
git checkout -
- [[ -n $uncommited ]] && git stash pop > /dev/null
+ [[ -n ${uncommited} ]] && git stash pop > /dev/null
# Generate and save coverage report
current_report=$(mktemp -t yardstick_coverageXXXXXXX)
+ ls -l .testrepository
+
# workaround 'db type could not be determined' bug
# https://bugs.launchpad.net/testrepository/+bug/1229445
rm -rf .testrepository
- find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --slowest --testr-args="$*"
- coverage report > $current_report
- current_missing=$(awk 'END { print $3 }' $current_report)
+ find . -type f -name "*.pyc" -delete
+
+ #python setup.py testr --coverage --testr-args=""
+ python setup.py testr --coverage --slowest --testr-args="$*"
+ testr failing
+ coverage report > ${current_report}
+
+ rm -rf cover-$PY_VER
+ coverage html -d cover-$PY_VER
+
+ # debug awk
+ tail -1 ${current_report}
+ current_missing=$(awk 'END { if (int($3) > 0) print $3 }' ${current_report})
+
+ if [[ -z $current_missing ]]; then
+ echo "Failed to determine current missing"
+ exit 1
+ fi
# Show coverage details
- allowed_missing=$((baseline_missing+ALLOWED_EXTRA_MISSING))
+ new_missing=$((current_missing - baseline_missing))
- echo "Allowed to introduce missing lines : ${ALLOWED_EXTRA_MISSING}"
+ echo "Missing lines allowed to introduce : ${ALLOWED_EXTRA_MISSING}"
+ echo "Missing lines introduced : ${new_missing}"
echo "Missing lines in master : ${baseline_missing}"
echo "Missing lines in proposed change : ${current_missing}"
- if [ $allowed_missing -gt $current_missing ];
+ if [[ ${new_missing} -gt ${ALLOWED_EXTRA_MISSING} ]];
then
- if [ $baseline_missing -lt $current_missing ];
- then
- show_diff $baseline_report $current_report
- echo "I believe you can cover all your code with 100% coverage!"
- else
- echo "Thank you! You are awesome! Keep writing unit tests! :)"
- fi
- else
- show_diff $baseline_report $current_report
+ show_diff ${baseline_report} ${current_report}
echo "Please write more unit tests, we should keep our test coverage :( "
- rm $baseline_report $current_report
+ rm ${baseline_report} ${current_report}
exit 1
+
+ elif [[ ${new_missing} -gt 0 ]];
+ then
+ show_diff ${baseline_report} ${current_report}
+ echo "I believe you can cover all your code with 100% coverage!"
+
+ else
+ echo "Thank you! You are awesome! Keep writing unit tests! :)"
fi
- rm $baseline_report $current_report
+ rm ${baseline_report} ${current_report}
}
diff --git a/tests/unit/apiserver/__init__.py b/tests/unit/apiserver/__init__.py
index 021415296..1c9d5a672 100644
--- a/tests/unit/apiserver/__init__.py
+++ b/tests/unit/apiserver/__init__.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import os
+import socket
import unittest
import tempfile
@@ -14,7 +15,12 @@ class APITestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.db_path = tempfile.mkstemp()
consts.SQLITE = 'sqlite:///{}'.format(self.db_path)
- from api import server
+
+ try:
+ from api import server
+ except socket.gaierror:
+ self.app = None
+ return
server.app.config['TESTING'] = True
self.app = server.app.test_client()
diff --git a/tests/unit/apiserver/resources/test_env_action.py b/tests/unit/apiserver/resources/test_env_action.py
index 31afa4862..5417ad953 100644
--- a/tests/unit/apiserver/resources/test_env_action.py
+++ b/tests/unit/apiserver/resources/test_env_action.py
@@ -17,6 +17,10 @@ from tests.unit.apiserver import APITestCase
class EnvTestCase(APITestCase):
def test_create_grafana(self):
+ if self.app is None:
+ unittest.skip('host config error')
+ return
+
url = 'yardstick/env/action'
data = {'action': 'create_grafana'}
resp = self._post(url, data)
diff --git a/tests/unit/benchmark/contexts/test_heat.py b/tests/unit/benchmark/contexts/test_heat.py
index ae57402c0..658a8e580 100644
--- a/tests/unit/benchmark/contexts/test_heat.py
+++ b/tests/unit/benchmark/contexts/test_heat.py
@@ -22,21 +22,24 @@ from collections import OrderedDict
import mock
+from itertools import count
from yardstick.benchmark.contexts import heat
from yardstick.benchmark.contexts import model
-
LOG = logging.getLogger(__name__)
class HeatContextTestCase(unittest.TestCase):
+ def __init__(self, *args, **kwargs):
+ super(HeatContextTestCase, self).__init__(*args, **kwargs)
+ self.name_iter = ('vnf{:03}'.format(x) for x in count(0, step=3))
+
def setUp(self):
self.test_context = heat.HeatContext()
self.mock_context = mock.Mock(spec=heat.HeatContext())
- def test_construct(self):
-
+ def test___init__(self):
self.assertIsNone(self.test_context.name)
self.assertIsNone(self.test_context.stack)
self.assertEqual(self.test_context.networks, OrderedDict())
@@ -121,18 +124,63 @@ class HeatContextTestCase(unittest.TestCase):
mock_template.add_router_interface.assert_called_with("bar-fool-network-router-if0", "bar-fool-network-router", "bar-fool-network-subnet")
@mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
+ def test_attrs_get(self, mock_template):
+ image, flavor, user = expected_tuple = 'foo1', 'foo2', 'foo3'
+ self.assertNotEqual(self.test_context.image, image)
+ self.assertNotEqual(self.test_context.flavor, flavor)
+ self.assertNotEqual(self.test_context.user, user)
+ self.test_context._image = image
+ self.test_context._flavor = flavor
+ self.test_context._user = user
+ attr_tuple = self.test_context.image, self.test_context.flavor, self.test_context.user
+ self.assertEqual(attr_tuple, expected_tuple)
+
+ @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
+ def test_attrs_set_negative(self, mock_template):
+ with self.assertRaises(AttributeError):
+ self.test_context.image = 'foo'
+
+ with self.assertRaises(AttributeError):
+ self.test_context.flavor = 'foo'
+
+ with self.assertRaises(AttributeError):
+ self.test_context.user = 'foo'
+
+ @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
@mock.patch('yardstick.benchmark.contexts.heat.get_neutron_client')
- def test_deploy(self, mock_neutron, mock_template):
+ def test_attrs_get(self, mock_neutron, mock_template):
+ image, flavor, user = expected_tuple = 'foo1', 'foo2', 'foo3'
+ self.assertNotEqual(self.test_context.image, image)
+ self.assertNotEqual(self.test_context.flavor, flavor)
+ self.assertNotEqual(self.test_context.user, user)
+ self.test_context._image = image
+ self.test_context._flavor = flavor
+ self.test_context._user = user
+ attr_tuple = self.test_context.image, self.test_context.flavor, self.test_context.user
+ self.assertEqual(attr_tuple, expected_tuple)
+
+ @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
+ def test_attrs_set_negative(self, mock_template):
+ with self.assertRaises(AttributeError):
+ self.test_context.image = 'foo'
+
+ with self.assertRaises(AttributeError):
+ self.test_context.flavor = 'foo'
+
+ with self.assertRaises(AttributeError):
+ self.test_context.user = 'foo'
+ @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
+ def test_deploy(self, mock_template):
self.test_context.name = 'foo'
self.test_context.template_file = '/bar/baz/some-heat-file'
self.test_context.heat_parameters = {'image': 'cirros'}
- self.test_context.heat_timeout = 5
+ self.test_context.get_neutron_info = mock.MagicMock()
self.test_context.deploy()
- mock_template.assert_called_with(self.test_context.name,
- self.test_context.template_file,
- self.test_context.heat_parameters)
+ mock_template.assert_called_with('foo',
+ '/bar/baz/some-heat-file',
+ {'image': 'cirros'})
self.assertIsNotNone(self.test_context.stack)
def test_add_server_port(self):
@@ -190,27 +238,233 @@ class HeatContextTestCase(unittest.TestCase):
@mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
def test_undeploy(self, mock_template):
-
self.test_context.stack = mock_template
self.test_context.undeploy()
-
self.assertTrue(mock_template.delete.called)
- def test__get_server(self):
-
- self.mock_context.name = 'bar'
- self.mock_context.stack.outputs = {'public_ip': '127.0.0.1',
- 'private_ip': '10.0.0.1'}
- self.mock_context.key_uuid = uuid.uuid4()
-
- attr_name = {'name': 'foo.bar',
- 'public_ip_attr': 'public_ip',
- 'private_ip_attr': 'private_ip'}
- result = heat.HeatContext._get_server(self.mock_context, attr_name)
+ @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
+ @mock.patch('yardstick.benchmark.contexts.heat.os')
+ def test_undeploy_key_filename(self, mock_template, mock_os):
+ self.test_context.stack = mock_template
+ mock_os.path.exists.return_value = True
+ self.assertIsNone(self.test_context.undeploy())
+
+ def test__get_server_found_dict(self):
+ """
+ Use HeatContext._get_server to get a server that matches
+ based on a dictionary input.
+ """
+ foo2_server = mock.Mock()
+ foo2_server.key_filename = 'key_file'
+ foo2_server.private_ip = '10.0.0.2'
+ foo2_server.public_ip = '127.0.0.2'
+ foo2_server.context.user = 'oof'
+
+ baz3_server = mock.Mock()
+ baz3_server.key_filename = 'key_filename'
+ baz3_server.private_ip = '10.0.0.3'
+ baz3_server.public_ip = '127.0.0.3'
+ baz3_server.context.user = 'zab'
+
+ self.test_context.name = 'bar'
+ self.test_context._user = 'bot'
+ self.test_context.stack = mock.Mock()
+ self.test_context.stack.outputs = {
+ 'private_ip': '10.0.0.1',
+ 'public_ip': '127.0.0.1',
+ }
+ self.test_context.key_uuid = uuid.uuid4()
+ self.test_context._server_map = {
+ 'baz3': baz3_server,
+ 'foo2': foo2_server,
+ }
+ attr_name = {
+ 'name': 'foo.bar',
+ 'private_ip_attr': 'private_ip',
+ 'public_ip_attr': 'public_ip',
+ }
+ result = self.test_context._get_server(attr_name)
+ self.assertEqual(result['user'], 'bot')
+ self.assertIsNotNone(result['key_filename'])
self.assertEqual(result['ip'], '127.0.0.1')
self.assertEqual(result['private_ip'], '10.0.0.1')
+ def test__get_server_found_dict_no_attrs(self):
+ """
+ Use HeatContext._get_server to get a server that matches
+ based on a dictionary input.
+ """
+ foo2_server = mock.Mock()
+ foo2_server.private_ip = '10.0.0.2'
+ foo2_server.public_ip = '127.0.0.2'
+ foo2_server.context.user = 'oof'
+
+ baz3_server = mock.Mock()
+ baz3_server.private_ip = '10.0.0.3'
+ baz3_server.public_ip = '127.0.0.3'
+ baz3_server.context.user = 'zab'
+
+ self.test_context.name = 'bar'
+ self.test_context._user = 'bot'
+ self.test_context.stack = mock.Mock()
+ self.test_context.stack.outputs = {
+ 'private_ip': '10.0.0.1',
+ 'public_ip': '127.0.0.1',
+ }
+ self.test_context.key_uuid = uuid.uuid4()
+ self.test_context._server_map = {
+ 'baz3': baz3_server,
+ 'foo2': foo2_server,
+ }
+
+ attr_name = {
+ 'name': 'foo.bar',
+ }
+ result = self.test_context._get_server(attr_name)
+ self.assertEqual(result['user'], 'bot')
+ self.assertIsNotNone(result['key_filename'])
+ # no private ip attr mapping in the map results in None value in the result
+ self.assertIsNone(result['private_ip'])
+ # no public ip attr mapping in the map results in no value in the result
+ self.assertNotIn('ip', result)
+
+ def test__get_server_found_not_dict(self):
+ """
+ Use HeatContext._get_server to get a server that matches
+ based on a non-dictionary input
+ """
+ foo2_server = mock.Mock()
+ foo2_server.private_ip = '10.0.0.2'
+ foo2_server.public_ip = '127.0.0.2'
+ foo2_server.context.user = 'oof'
+
+ baz3_server = mock.Mock()
+ baz3_server.private_ip = '10.0.0.3'
+ baz3_server.public_ip = None
+ baz3_server.context.user = 'zab'
+
+ self.test_context.name = 'bar1'
+ self.test_context.stack = mock.Mock()
+ self.test_context.stack.outputs = {
+ 'private_ip': '10.0.0.1',
+ 'public_ip': '127.0.0.1',
+ }
+ self.test_context.key_uuid = uuid.uuid4()
+ self.test_context.generate_routing_table = mock.MagicMock(return_value=[])
+
+ self.test_context._server_map = {
+ 'baz3': baz3_server,
+ 'foo2': foo2_server,
+ }
+
+ attr_name = 'baz3'
+ result = self.test_context._get_server(attr_name)
+ self.assertEqual(result['user'], 'zab')
+ self.assertIsNotNone(result['key_filename'])
+ self.assertEqual(result['private_ip'], '10.0.0.3')
+ # no public_ip on the server results in no value in the result
+ self.assertNotIn('public_ip', result)
+
+ def test__get_server_none_found_not_dict(self):
+ """
+ Use HeatContext._get_server to not get a server due to
+ None value associated with the match to a non-dictionary
+ input
+ """
+ foo2_server = mock.Mock()
+ foo2_server.private_ip = '10.0.0.2'
+ foo2_server.public_ip = '127.0.0.2'
+ foo2_server.context.user = 'oof'
+
+ baz3_server = mock.Mock()
+ baz3_server.private_ip = '10.0.0.3'
+ baz3_server.public_ip = None
+ baz3_server.context.user = 'zab'
+
+ self.test_context.name = 'bar1'
+ self.test_context.stack = mock.Mock()
+ self.test_context.stack.outputs = {
+ 'private_ip': '10.0.0.1',
+ 'public_ip': '127.0.0.1',
+ }
+ self.test_context.key_uuid = uuid.uuid4()
+ self.test_context._server_map = {
+ 'baz3': baz3_server,
+ 'foo2': foo2_server,
+ 'wow4': None,
+ }
+
+ attr_name = 'wow4'
+ result = self.test_context._get_server(attr_name)
+ self.assertIsNone(result)
+
+ def test__get_server_not_found_dict(self):
+ """
+ Use HeatContext._get_server to not get a server for lack
+ of a match to a dictionary input
+ """
+ foo2_server = mock.Mock()
+ foo2_server.private_ip = '10.0.0.2'
+ foo2_server.public_ip = '127.0.0.2'
+ foo2_server.context.user = 'oof'
+
+ baz3_server = mock.Mock()
+ baz3_server.private_ip = '10.0.0.3'
+ baz3_server.public_ip = None
+ baz3_server.context.user = 'zab'
+
+ self.test_context.name = 'bar1'
+ self.test_context.stack = mock.Mock()
+ self.test_context.stack.outputs = {
+ 'private_ip': '10.0.0.1',
+ 'public_ip': '127.0.0.1',
+ }
+ self.test_context.key_uuid = uuid.uuid4()
+ self.test_context._server_map = {
+ 'baz3': baz3_server,
+ 'foo2': foo2_server,
+ }
+
+ attr_name = {
+ 'name': 'foo.wow4',
+ 'private_ip_attr': 'private_ip',
+ 'public_ip_attr': 'public_ip',
+ }
+ result = self.test_context._get_server(attr_name)
+ self.assertIsNone(result)
+
+ def test__get_server_not_found_not_dict(self):
+ """
+ Use HeatContext._get_server to not get a server for lack
+ of a match to a non-dictionary input
+ """
+ foo2_server = mock.Mock()
+ foo2_server.private_ip = '10.0.0.2'
+ foo2_server.public_ip = '127.0.0.2'
+ foo2_server.context.user = 'oof'
+
+ baz3_server = mock.Mock()
+ baz3_server.private_ip = '10.0.0.3'
+ baz3_server.public_ip = None
+ baz3_server.context.user = 'zab'
+
+ self.mock_context.name = 'bar1'
+ self.test_context.stack = mock.Mock()
+ self.mock_context.stack.outputs = {
+ 'private_ip': '10.0.0.1',
+ 'public_ip': '127.0.0.1',
+ }
+ self.mock_context.key_uuid = uuid.uuid4()
+ self.mock_context._server_map = {
+ 'baz3': baz3_server,
+ 'foo2': foo2_server,
+ }
+
+ attr_name = 'foo.wow4'
+ result = self.test_context._get_server(attr_name)
+ self.assertIsNone(result)
+
def test__get_network(self):
network1 = mock.MagicMock()
network1.name = 'net_1'
diff --git a/tests/unit/benchmark/contexts/test_kubernetes.py b/tests/unit/benchmark/contexts/test_kubernetes.py
index f47c07a67..b0ee792db 100644
--- a/tests/unit/benchmark/contexts/test_kubernetes.py
+++ b/tests/unit/benchmark/contexts/test_kubernetes.py
@@ -15,6 +15,7 @@ from __future__ import absolute_import
import unittest
import mock
+from yardstick.benchmark.contexts.base import Context
from yardstick.benchmark.contexts.kubernetes import KubernetesContext
@@ -40,7 +41,11 @@ service ssh restart;while true ; do sleep 10000; done']
prefix = 'yardstick.benchmark.contexts.kubernetes'
-class UndeployTestCase(unittest.TestCase):
+class KubernetesTestCase(unittest.TestCase):
+
+ def tearDown(self):
+ # clear kubernetes contexts from global list so we don't break other tests
+ Context.list = []
@mock.patch('{}.KubernetesContext._delete_ssh_key'.format(prefix))
@mock.patch('{}.KubernetesContext._delete_rcs'.format(prefix))
@@ -57,9 +62,6 @@ class UndeployTestCase(unittest.TestCase):
self.assertTrue(mock_delete_rcs.called)
self.assertTrue(mock_delete_pods.called)
-
-class DeployTestCase(unittest.TestCase):
-
@mock.patch('{}.KubernetesContext._wait_until_running'.format(prefix))
@mock.patch('{}.KubernetesTemplate.get_rc_pods'.format(prefix))
@mock.patch('{}.KubernetesContext._create_rcs'.format(prefix))
@@ -72,15 +74,13 @@ class DeployTestCase(unittest.TestCase):
k8s_context = KubernetesContext()
k8s_context.init(context_cfg)
- k8s_context.deploy()
+ with mock.patch("yardstick.benchmark.contexts.kubernetes.time"):
+ k8s_context.deploy()
self.assertTrue(mock_set_ssh_key.called)
self.assertTrue(mock_create_rcs.called)
self.assertTrue(mock_get_rc_pods.called)
self.assertTrue(mock_wait_until_running.called)
-
-class SSHKeyTestCase(unittest.TestCase):
-
@mock.patch('{}.k8s_utils.delete_config_map'.format(prefix))
@mock.patch('{}.k8s_utils.create_config_map'.format(prefix))
def test_ssh_key(self, mock_create, mock_delete):
@@ -92,9 +92,6 @@ class SSHKeyTestCase(unittest.TestCase):
self.assertTrue(mock_create.called)
self.assertTrue(mock_delete.called)
-
-class WaitUntilRunningTestCase(unittest.TestCase):
-
@mock.patch('{}.k8s_utils.read_pod_status'.format(prefix))
def test_wait_until_running(self, mock_read_pod_status):
@@ -104,9 +101,6 @@ class WaitUntilRunningTestCase(unittest.TestCase):
mock_read_pod_status.return_value = 'Running'
k8s_context._wait_until_running()
-
-class GetServerTestCase(unittest.TestCase):
-
@mock.patch('{}.k8s_utils.get_pod_list'.format(prefix))
def test_get_server(self, mock_get_pod_list):
k8s_context = KubernetesContext()
@@ -116,9 +110,6 @@ class GetServerTestCase(unittest.TestCase):
server = k8s_context._get_server('server')
self.assertIsNone(server)
-
-class CreateRcsTestCase(unittest.TestCase):
-
@mock.patch('{}.KubernetesContext._create_rc'.format(prefix))
def test_create_rcs(self, mock_create_rc):
k8s_context = KubernetesContext()
@@ -126,9 +117,6 @@ class CreateRcsTestCase(unittest.TestCase):
k8s_context._create_rcs()
self.assertTrue(mock_create_rc.called)
-
-class CreateRcTestCase(unittest.TestCase):
-
@mock.patch('{}.k8s_utils.create_replication_controller'.format(prefix))
def test_create_rc(self, mock_create_replication_controller):
k8s_context = KubernetesContext()
@@ -136,9 +124,6 @@ class CreateRcTestCase(unittest.TestCase):
k8s_context._create_rc({})
self.assertTrue(mock_create_replication_controller.called)
-
-class DeleteRcsTestCases(unittest.TestCase):
-
@mock.patch('{}.KubernetesContext._delete_rc'.format(prefix))
def test_delete_rcs(self, mock_delete_rc):
k8s_context = KubernetesContext()
@@ -146,9 +131,6 @@ class DeleteRcsTestCases(unittest.TestCase):
k8s_context._delete_rcs()
self.assertTrue(mock_delete_rc.called)
-
-class DeleteRcTestCase(unittest.TestCase):
-
@mock.patch('{}.k8s_utils.delete_replication_controller'.format(prefix))
def test_delete_rc(self, mock_delete_replication_controller):
k8s_context = KubernetesContext()
diff --git a/tests/unit/benchmark/contexts/test_node.py b/tests/unit/benchmark/contexts/test_node.py
index d5ce8c5cb..9b5761c8d 100644
--- a/tests/unit/benchmark/contexts/test_node.py
+++ b/tests/unit/benchmark/contexts/test_node.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
+# Copyright (c) 2015-2017 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -14,36 +14,128 @@
from __future__ import absolute_import
import os
import unittest
+import errno
import mock
+from yardstick.common import constants as consts
from yardstick.benchmark.contexts import node
class NodeContextTestCase(unittest.TestCase):
+ PREFIX = 'yardstick.benchmark.contexts.node'
+
NODES_SAMPLE = "nodes_sample.yaml"
NODES_DUPLICATE_SAMPLE = "nodes_duplicate_sample.yaml"
def setUp(self):
self.test_context = node.NodeContext()
+ self.os_path_join = os.path.join
- def test_construct(self):
+ def _get_file_abspath(self, filename):
+ curr_path = os.path.dirname(os.path.abspath(__file__))
+ file_path = self.os_path_join(curr_path, filename)
+ return file_path
+ def test___init__(self):
self.assertIsNone(self.test_context.name)
self.assertIsNone(self.test_context.file_path)
self.assertEqual(self.test_context.nodes, [])
self.assertEqual(self.test_context.controllers, [])
self.assertEqual(self.test_context.computes, [])
self.assertEqual(self.test_context.baremetals, [])
+ self.assertEqual(self.test_context.env, {})
+ self.assertEqual(self.test_context.attrs, {})
+
+ @mock.patch('{}.os.path.join'.format(PREFIX))
+ def test_init_negative(self, mock_path_join):
+ special_path = '/foo/bar/error_file'
+ error_path = self._get_file_abspath("error_file")
- def test_unsuccessful_init(self):
+ def path_join(*args):
+ if args == (consts.YARDSTICK_ROOT_PATH, error_path):
+ return special_path
+ return self.os_path_join(*args)
+
+ # we can't count mock_path_join calls because
+ # it can catch join calls for .pyc files.
+ mock_path_join.side_effect = path_join
+ self.test_context.read_config_file = read_mock = mock.Mock()
+ read_calls = 0
+
+ with self.assertRaises(KeyError):
+ self.test_context.init({})
+
+ self.assertEqual(read_mock.call_count, read_calls)
attrs = {
'name': 'foo',
- 'file': self._get_file_abspath("error_file")
+ 'file': error_path,
}
+ read_mock.side_effect = IOError(errno.EBUSY, 'busy')
+ with self.assertRaises(IOError) as raised:
+ self.test_context.init(attrs)
+
+ read_calls += 1
+ self.assertEqual(read_mock.called, read_calls)
+ self.assertIn(attrs['file'], self.test_context.file_path)
+ self.assertEqual(raised.exception.errno, errno.EBUSY)
+ self.assertEqual(str(raised.exception), str(read_mock.side_effect))
+
+ read_mock.side_effect = IOError(errno.ENOENT, 'not found')
+ with self.assertRaises(IOError) as raised:
+ self.test_context.init(attrs)
+
+ read_calls += 2
+ self.assertEqual(read_mock.call_count, read_calls)
+ self.assertEqual(self.test_context.file_path, special_path)
+ self.assertEqual(raised.exception.errno, errno.ENOENT)
+ self.assertEqual(str(raised.exception), str(read_mock.side_effect))
+
+ def test_read_config_file(self):
+
+ attrs = {
+ 'name': 'foo',
+ 'file': self._get_file_abspath(self.NODES_SAMPLE)
+ }
+
+ self.test_context.init(attrs)
+
+ self.assertIsNotNone(self.test_context.read_config_file())
+
+ def test__dispatch_script(self):
+
+ attrs = {
+ 'name': 'foo',
+ 'file': self._get_file_abspath(self.NODES_SAMPLE)
+ }
+
+ self.test_context.init(attrs)
+
+ self.test_context.env = {'bash': [{'script': 'dummy'}]}
+ self.test_context._execute_script = mock.Mock()
+ self.assertEqual(self.test_context._dispatch_script('bash'), None)
+
+ def test__dispatch_ansible(self):
+
+ attrs = {
+ 'name': 'foo',
+ 'file': self._get_file_abspath(self.NODES_SAMPLE)
+ }
+
+ self.test_context.init(attrs)
- self.assertRaises(IOError, self.test_context.init, attrs)
+ self.test_context.env = {'ansible': [{'script': 'dummy'}]}
+ self.test_context._do_ansible_job = mock.Mock()
+ self.assertEqual(self.test_context._dispatch_ansible('ansible'), None)
+ self.test_context.env = {}
+ self.assertEqual(self.test_context._dispatch_ansible('ansible'), None)
+
+ @mock.patch("{}.subprocess".format(PREFIX))
+ def test__do_ansible_job(self, mock_subprocess):
+ mock_subprocess.Popen = mock.MagicMock()
+ mock_subprocess.communicate = mock.Mock()
+ self.assertEqual(None, self.test_context._do_ansible_job('dummy'))
def test_successful_init(self):
@@ -90,6 +182,20 @@ class NodeContextTestCase(unittest.TestCase):
self.assertEqual(result, None)
+ def test__get_server_mismatch(self):
+
+ attrs = {
+ 'name': 'foo',
+ 'file': self._get_file_abspath(self.NODES_SAMPLE)
+ }
+
+ self.test_context.init(attrs)
+
+ attr_name = 'bar.foo1'
+ result = self.test_context._get_server(attr_name)
+
+ self.assertEqual(result, None)
+
def test__get_server_duplicate(self):
attrs = {
@@ -100,8 +206,8 @@ class NodeContextTestCase(unittest.TestCase):
self.test_context.init(attrs)
attr_name = 'node1.foo'
-
- self.assertRaises(ValueError, self.test_context._get_server, attr_name)
+ with self.assertRaises(ValueError):
+ self.test_context._get_server(attr_name)
def test__get_server_found(self):
@@ -120,14 +226,7 @@ class NodeContextTestCase(unittest.TestCase):
self.assertEqual(result['user'], 'root')
self.assertEqual(result['key_filename'], '/root/.yardstick_key')
- def _get_file_abspath(self, filename):
- curr_path = os.path.dirname(os.path.abspath(__file__))
- file_path = os.path.join(curr_path, filename)
- return file_path
-
- prefix = 'yardstick.benchmark.contexts.node'
-
- @mock.patch('{}.NodeContext._dispatch_script'.format(prefix))
+ @mock.patch('{}.NodeContext._dispatch_script'.format(PREFIX))
def test_deploy(self, dispatch_script_mock):
obj = node.NodeContext()
obj.env = {
@@ -136,7 +235,16 @@ class NodeContextTestCase(unittest.TestCase):
obj.deploy()
self.assertTrue(dispatch_script_mock.called)
- @mock.patch('{}.NodeContext._dispatch_script'.format(prefix))
+ @mock.patch('{}.NodeContext._dispatch_ansible'.format(PREFIX))
+ def test_deploy_anisible(self, dispatch_ansible_mock):
+ obj = node.NodeContext()
+ obj.env = {
+ 'type': 'ansible'
+ }
+ obj.deploy()
+ self.assertTrue(dispatch_ansible_mock.called)
+
+ @mock.patch('{}.NodeContext._dispatch_script'.format(PREFIX))
def test_undeploy(self, dispatch_script_mock):
obj = node.NodeContext()
obj.env = {
@@ -145,8 +253,17 @@ class NodeContextTestCase(unittest.TestCase):
obj.undeploy()
self.assertTrue(dispatch_script_mock.called)
- @mock.patch('{}.ssh.SSH._put_file_shell'.format(prefix))
- @mock.patch('{}.ssh.SSH.execute'.format(prefix))
+ @mock.patch('{}.NodeContext._dispatch_ansible'.format(PREFIX))
+ def test_undeploy_anisble(self, dispatch_ansible_mock):
+ obj = node.NodeContext()
+ obj.env = {
+ 'type': 'ansible'
+ }
+ obj.undeploy()
+ self.assertTrue(dispatch_ansible_mock.called)
+
+ @mock.patch('{}.ssh.SSH._put_file_shell'.format(PREFIX))
+ @mock.patch('{}.ssh.SSH.execute'.format(PREFIX))
def test_execute_remote_script(self, execute_mock, put_file_mock):
obj = node.NodeContext()
obj.env = {'prefix': 'yardstick.benchmark.scenarios.compute'}
@@ -165,14 +282,14 @@ class NodeContextTestCase(unittest.TestCase):
self.assertTrue(put_file_mock.called)
self.assertTrue(execute_mock.called)
- @mock.patch('{}.NodeContext._execute_local_script'.format(prefix))
+ @mock.patch('{}.NodeContext._execute_local_script'.format(PREFIX))
def test_execute_script_local(self, local_execute_mock):
node_name = 'local'
info = {}
node.NodeContext()._execute_script(node_name, info)
self.assertTrue(local_execute_mock.called)
- @mock.patch('{}.NodeContext._execute_remote_script'.format(prefix))
+ @mock.patch('{}.NodeContext._execute_remote_script'.format(PREFIX))
def test_execute_script_remote(self, remote_execute_mock):
node_name = 'node5'
info = {}
@@ -195,7 +312,7 @@ class NodeContextTestCase(unittest.TestCase):
node_info = obj._get_node_info(node_name_args)
self.assertEqual(node_info.get('check'), node_name_args)
- @mock.patch('{}.ssh.SSH.wait'.format(prefix))
+ @mock.patch('{}.ssh.SSH.wait'.format(PREFIX))
def test_get_client(self, wait_mock):
node_name_args = 'node5'
obj = node.NodeContext()
@@ -208,6 +325,28 @@ class NodeContextTestCase(unittest.TestCase):
obj._get_client(node_name_args)
self.assertTrue(wait_mock.called)
+ def test_get_server(self):
+ self.test_context.name = 'vnf1'
+ self.test_context.nodes = [{'name': 'my', 'value': 100}]
+
+ with self.assertRaises(ValueError):
+ self.test_context.get_server('my.vnf2')
+
+ expected = {'name': 'my.vnf1', 'value': 100, 'interfaces': {}}
+ result = self.test_context.get_server('my.vnf1')
+ self.assertDictEqual(result, expected)
+
+ def test_get_context_from_server(self):
+ self.test_context.name = 'vnf1'
+ self.test_context.nodes = [{'name': 'my', 'value': 100}]
+ self.test_context.attrs = {'attr1': 200}
+
+ with self.assertRaises(ValueError):
+ self.test_context.get_context_from_server('my.vnf2')
+
+ result = self.test_context.get_context_from_server('my.vnf1')
+ self.assertIs(result, self.test_context)
+
def test__get_network(self):
network1 = {
'name': 'net_1',
diff --git a/tests/unit/benchmark/contexts/test_standalone.py b/tests/unit/benchmark/contexts/test_standalone.py
index 1fc740393..d13e28470 100644
--- a/tests/unit/benchmark/contexts/test_standalone.py
+++ b/tests/unit/benchmark/contexts/test_standalone.py
@@ -194,8 +194,6 @@ class StandaloneContextTestCase(unittest.TestCase):
result = self.test_context._get_server(attr_name)
self.assertEqual(result, None)
-
-
def test__get_server_duplicate_sriov(self, mock_sriov_time, mock_standlalone_time,
mock_ovsdpdk_time):
attrs = {
@@ -244,6 +242,7 @@ class StandaloneContextTestCase(unittest.TestCase):
ValueError,
self.test_context._get_server,
attr_name)
+
def test__get_server_found_sriov(self, mock_sriov_time, mock_standlalone_time,
mock_ovsdpdk_time):
attrs = {
@@ -453,11 +452,6 @@ class StandaloneContextTestCase(unittest.TestCase):
self.test_context.nfvi_obj.setup_ovs_bridge = mock.Mock()
self.test_context.nfvi_obj.add_oflows = mock.Mock()
- # self.test_context.nfvi_obj.setup_ovs(PORTS)
- # self.test_context.nfvi_obj.start_ovs_serverswitch()
- # self.test_context.nfvi_obj.setup_ovs_bridge()
- # self.test_context.nfvi_obj.add_oflows()
-
result = self.test_context.nfvi_obj.setup_ovs_context(
PORTS,
NIC_DETAILS,
@@ -681,6 +675,7 @@ class StandaloneContextTestCase(unittest.TestCase):
expected = network1
result = self.test_context._get_network(attr_name)
self.assertDictEqual(result, expected)
+
if __name__ == '__main__':
unittest.main()
diff --git a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index c9cd7fed5..84b42c832 100644
--- a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -209,8 +209,9 @@ TRAFFIC_PROFILE = {
class TestNetworkServiceTestCase(unittest.TestCase):
+
def setUp(self):
- self.trexgen__1 = {
+ self.tg__1 = {
'name': 'trafficgen_1.yardstick',
'ip': '10.10.10.11',
'role': 'TrafficGen',
@@ -236,7 +237,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
},
}
- self.trexvnf__1 = {
+ self.vnf__1 = {
'name': 'vnf.yardstick',
'ip': '10.10.10.12',
'host': '10.223.197.164',
@@ -293,8 +294,8 @@ class TestNetworkServiceTestCase(unittest.TestCase):
self.context_cfg = {
'nodes': {
- 'trexgen__1': self.trexgen__1,
- 'trexvnf__1': self.trexvnf__1,
+ 'tg__1': self.tg__1,
+ 'vnf__1': self.vnf__1,
},
'networks': {
'private': {
@@ -321,7 +322,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
],
'type': 'ELAN',
'id': 'private',
- 'name': 'trexgen__1 to trexvnf__1 link 1'
+ 'name': 'tg__1 to vnf__1 link 1'
}
self.vld1 = {
@@ -339,7 +340,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
],
'type': 'ELAN',
'id': 'public',
- 'name': 'trexvnf__1 to trexgen__1 link 2'
+ 'name': 'vnf__1 to tg__1 link 2'
}
self.topology = {
@@ -351,12 +352,12 @@ class TestNetworkServiceTestCase(unittest.TestCase):
{
'member-vnf-index': '1',
'VNF model': 'tg_trex_tpl.yaml',
- 'vnfd-id-ref': 'trexgen__1',
+ 'vnfd-id-ref': 'tg__1',
},
{
'member-vnf-index': '2',
'VNF model': 'tg_trex_tpl.yaml',
- 'vnfd-id-ref': 'trexvnf__1',
+ 'vnfd-id-ref': 'vnf__1',
},
],
'vld': [self.vld0, self.vld1],
@@ -418,12 +419,12 @@ class TestNetworkServiceTestCase(unittest.TestCase):
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.assertEqual(result, self.s._get_traffic_flow(self.scenario_cfg))
+ 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.scenario_cfg))
+ self.assertEqual({}, self.s._get_traffic_flow())
def test_get_vnf_imp(self):
vnfd = COMPLETE_TREX_VNFD['vnfd:vnfd-catalog']['vnfd'][0]['class-name']
@@ -439,9 +440,9 @@ class TestNetworkServiceTestCase(unittest.TestCase):
self.assertIn('found in', exc_str)
def test_load_vnf_models_invalid(self):
- self.context_cfg["nodes"]['trexgen__1']['VNF model'] = \
+ self.context_cfg["nodes"]['tg__1']['VNF model'] = \
self._get_file_abspath("tg_trex_tpl.yaml")
- self.context_cfg["nodes"]['trexvnf__1']['VNF model'] = \
+ self.context_cfg["nodes"]['vnf__1']['VNF model'] = \
self._get_file_abspath("tg_trex_tpl.yaml")
vnf = mock.Mock(autospec=GenericVNF)
@@ -456,15 +457,14 @@ class TestNetworkServiceTestCase(unittest.TestCase):
ssh_mock.execute = \
mock.Mock(return_value=(0, SYS_CLASS_NET + IP_ADDR_SHOW, ""))
ssh.from_node.return_value = ssh_mock
- self.s.map_topology_to_infrastructure(self.context_cfg,
- self.topology)
+ self.s.map_topology_to_infrastructure()
nodes = self.context_cfg["nodes"]
- self.assertEqual("tg_trex_tpl.yaml", nodes['trexgen__1']['VNF model'])
- self.assertEqual("tg_trex_tpl.yaml", nodes['trexvnf__1']['VNF model'])
+ self.assertEqual("../../vnf_descriptors/tg_rfc2544_tpl.yaml", nodes['tg__1']['VNF model'])
+ self.assertEqual("../../vnf_descriptors/vpe_vnf.yaml", nodes['vnf__1']['VNF model'])
def test_map_topology_to_infrastructure_insufficient_nodes(self):
- del self.context_cfg['nodes']['trexvnf__1']
+ del self.context_cfg['nodes']['vnf__1']
with mock.patch("yardstick.ssh.SSH") as ssh:
ssh_mock = mock.Mock(autospec=ssh.SSH)
ssh_mock.execute = \
@@ -472,11 +472,11 @@ class TestNetworkServiceTestCase(unittest.TestCase):
ssh.from_node.return_value = ssh_mock
with self.assertRaises(IncorrectSetup):
- self.s.map_topology_to_infrastructure(self.context_cfg, self.topology)
+ self.s.map_topology_to_infrastructure()
def test_map_topology_to_infrastructure_config_invalid(self):
cfg = dict(self.context_cfg)
- del cfg['nodes']['trexvnf__1']['interfaces']['xe0']['local_mac']
+ del cfg['nodes']['vnf__1']['interfaces']['xe0']['local_mac']
with mock.patch("yardstick.ssh.SSH") as ssh:
ssh_mock = mock.Mock(autospec=ssh.SSH)
ssh_mock.execute = \
@@ -484,7 +484,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
ssh.from_node.return_value = ssh_mock
with self.assertRaises(IncorrectConfig):
- self.s.map_topology_to_infrastructure(self.context_cfg, self.topology)
+ self.s.map_topology_to_infrastructure()
def test__resolve_topology_invalid_config(self):
with mock.patch("yardstick.ssh.SSH") as ssh:
@@ -494,31 +494,41 @@ class TestNetworkServiceTestCase(unittest.TestCase):
ssh.from_node.return_value = ssh_mock
# purge an important key from the data structure
- for interface in self.trexgen__1['interfaces'].values():
+ for interface in self.tg__1['interfaces'].values():
del interface['local_mac']
- with self.assertRaises(IncorrectConfig) as raised:
- self.s._resolve_topology(self.context_cfg, self.topology)
+ with mock.patch(
+ "yardstick.benchmark.scenarios.networking.vnf_generic.LOG") as mock_log:
+ with self.assertRaises(IncorrectConfig) as raised:
+ self.s._resolve_topology()
self.assertIn('not found', str(raised.exception))
+ # restore local_mac
+ for index, interface in enumerate(self.tg__1['interfaces'].values()):
+ interface['local_mac'] = '00:00:00:00:00:{:2x}'.format(index)
+
# make a connection point ref with 3 points
- self.vld0['vnfd-connection-point-ref'].append(
- self.vld0['vnfd-connection-point-ref'][0])
+ self.s.topology["vld"][0]['vnfd-connection-point-ref'].append(
+ self.s.topology["vld"][0]['vnfd-connection-point-ref'][0])
- with self.assertRaises(IncorrectConfig) as raised:
- self.s._resolve_topology(self.context_cfg, self.topology)
+ with mock.patch(
+ "yardstick.benchmark.scenarios.networking.vnf_generic.LOG") as mock_log:
+ with self.assertRaises(IncorrectConfig) as raised:
+ self.s._resolve_topology()
- self.assertIn('wrong number of endpoints', str(raised.exception))
+ self.assertIn('wrong endpoint count', str(raised.exception))
# make a connection point ref with 1 point
- self.vld0['vnfd-connection-point-ref'] = \
- self.vld0['vnfd-connection-point-ref'][:1]
+ self.s.topology["vld"][0]['vnfd-connection-point-ref'] = \
+ self.s.topology["vld"][0]['vnfd-connection-point-ref'][:1]
- with self.assertRaises(IncorrectConfig) as raised:
- self.s._resolve_topology(self.context_cfg, self.topology)
+ with mock.patch(
+ "yardstick.benchmark.scenarios.networking.vnf_generic.LOG") as mock_log:
+ with self.assertRaises(IncorrectConfig) as raised:
+ self.s._resolve_topology()
- self.assertIn('wrong number of endpoints', str(raised.exception))
+ self.assertIn('wrong endpoint count', str(raised.exception))
def test_run(self):
tgen = mock.Mock(autospec=GenericTrafficGen)
@@ -567,19 +577,16 @@ class TestNetworkServiceTestCase(unittest.TestCase):
def test__get_traffic_profile(self):
self.scenario_cfg["traffic_profile"] = \
self._get_file_abspath("ipv4_throughput_vpe.yaml")
- self.assertIsNotNone(self.s._get_traffic_profile(self.scenario_cfg,
- self.context_cfg))
+ self.assertIsNotNone(self.s._get_traffic_profile())
def test__get_traffic_profile_exception(self):
- cfg = dict(self.scenario_cfg)
- cfg["traffic_profile"] = ""
- with self.assertRaises(IOError):
- self.s._get_traffic_profile(cfg, self.context_cfg)
+ with mock.patch.dict(self.scenario_cfg, {'traffic_profile': ''}):
+ with self.assertRaises(IOError):
+ self.s._get_traffic_profile()
def test___get_traffic_imix_exception(self):
- cfg = dict(self.scenario_cfg)
- cfg["traffic_options"]["imix"] = ""
- self.assertEqual({}, self.s._get_traffic_imix(cfg))
+ with mock.patch.dict(self.scenario_cfg["traffic_options"], {'imix': ''}):
+ self.assertEqual({}, self.s._get_traffic_imix())
def test__fill_traffic_profile(self):
with mock.patch.dict("sys.modules", STL_MOCKS):
@@ -589,8 +596,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")
self.scenario_cfg["traffic_options"]["imix"] = \
self._get_file_abspath("imix_voice.yaml")
- self.assertIsNotNone(self.s._fill_traffic_profile(self.scenario_cfg,
- self.context_cfg))
+ self.assertIsNotNone(self.s._fill_traffic_profile())
def test_teardown(self):
vnf = mock.Mock(autospec=GenericVNF)
@@ -604,31 +610,32 @@ class TestNetworkServiceTestCase(unittest.TestCase):
self.assertIsNone(self.s.teardown())
SAMPLE_NETDEVS = {
- 'enp11s0': {
- 'address': '0a:de:ad:be:ef:f5',
- 'device': '0x1533',
- 'driver': 'igb',
- 'ifindex': '2',
- 'interface_name': 'enp11s0',
- 'operstate': 'down',
- 'pci_bus_id': '0000:0b:00.0',
- 'subsystem_device': '0x1533',
- 'subsystem_vendor': '0x15d9',
- 'vendor': '0x8086'
- },
- 'lan': {
- 'address': '0a:de:ad:be:ef:f4',
- 'device': '0x153a',
- 'driver': 'e1000e',
- 'ifindex': '3',
- 'interface_name': 'lan',
- 'operstate': 'up',
- 'pci_bus_id': '0000:00:19.0',
- 'subsystem_device': '0x153a',
- 'subsystem_vendor': '0x15d9',
- 'vendor': '0x8086'
- }
+ 'enp11s0': {
+ 'address': '0a:de:ad:be:ef:f5',
+ 'device': '0x1533',
+ 'driver': 'igb',
+ 'ifindex': '2',
+ 'interface_name': 'enp11s0',
+ 'operstate': 'down',
+ 'pci_bus_id': '0000:0b:00.0',
+ 'subsystem_device': '0x1533',
+ 'subsystem_vendor': '0x15d9',
+ 'vendor': '0x8086'
+ },
+ 'lan': {
+ 'address': '0a:de:ad:be:ef:f4',
+ 'device': '0x153a',
+ 'driver': 'e1000e',
+ 'ifindex': '3',
+ 'interface_name': 'lan',
+ 'operstate': 'up',
+ 'pci_bus_id': '0000:00:19.0',
+ 'subsystem_device': '0x153a',
+ 'subsystem_vendor': '0x15d9',
+ 'vendor': '0x8086'
}
+ }
+
SAMPLE_VM_NETDEVS = {
'eth1': {
'address': 'fa:de:ad:be:ef:5b',
@@ -681,19 +688,18 @@ class TestNetworkServiceTestCase(unittest.TestCase):
def test_sort_dpdk_port_num(self):
netdevs = self.SAMPLE_NETDEVS.copy()
NetworkServiceTestCase._sort_dpdk_port_num(netdevs)
- assert netdevs['lan']['dpdk_port_num'] == 1
- assert netdevs['enp11s0']['dpdk_port_num'] == 2
+ assert netdevs['lan']['dpdk_port_num'] == 0
+ assert netdevs['enp11s0']['dpdk_port_num'] == 1
def test_probe_missing_values(self):
netdevs = self.SAMPLE_NETDEVS.copy()
- NetworkServiceTestCase._sort_dpdk_port_num(netdevs)
network = {'local_mac': '0a:de:ad:be:ef:f5'}
NetworkServiceTestCase._probe_missing_values(netdevs, network, set())
- assert network['dpdk_port_num'] == 2
+ assert network['vpci'] == '0000:0b:00.0'
network = {'local_mac': '0a:de:ad:be:ef:f4'}
NetworkServiceTestCase._probe_missing_values(netdevs, network, set())
- assert network['dpdk_port_num'] == 1
+ assert network['vpci'] == '0000:00:19.0'
def test_open_relative_path(self):
mock_open = mock.mock_open()
diff --git a/tests/unit/benchmark/scenarios/networking/test_vsperf.py b/tests/unit/benchmark/scenarios/networking/test_vsperf.py
index 348aa4a63..cbbfc2b34 100644
--- a/tests/unit/benchmark/scenarios/networking/test_vsperf.py
+++ b/tests/unit/benchmark/scenarios/networking/test_vsperf.py
@@ -28,8 +28,6 @@ from yardstick.benchmark.scenarios.networking import vsperf
@mock.patch('yardstick.benchmark.scenarios.networking.vsperf.subprocess')
@mock.patch('yardstick.benchmark.scenarios.networking.vsperf.ssh')
-@mock.patch("yardstick.benchmark.scenarios.networking.vsperf.open",
- mock.mock_open())
class VsperfTestCase(unittest.TestCase):
def setUp(self):
diff --git a/tests/unit/common/test_utils.py b/tests/unit/common/test_utils.py
index e21e5fa3a..53b56523e 100644
--- a/tests/unit/common/test_utils.py
+++ b/tests/unit/common/test_utils.py
@@ -10,9 +10,15 @@
# Unittest for yardstick.common.utils
from __future__ import absolute_import
+
+import ipaddress
import os
-import mock
import unittest
+from copy import deepcopy
+from itertools import product, chain
+
+import mock
+from six.moves import configparser
from yardstick.common import utils
@@ -142,6 +148,13 @@ class CommonUtilTestCase(unittest.TestCase):
self.assertEqual(result, line)
+class TestMacAddressToHex(unittest.TestCase):
+
+ def test_mac_address_to_hex_list(self):
+ self.assertEqual(utils.mac_address_to_hex_list("ea:3e:e1:9a:99:e8"),
+ ['0xea', '0x3e', '0xe1', '0x9a', '0x99', '0xe8'])
+
+
class TranslateToStrTestCase(unittest.TestCase):
def test_translate_to_str_unicode(self):
@@ -162,6 +175,596 @@ class TranslateToStrTestCase(unittest.TestCase):
}
self.assertEqual(result, output_str)
+ def test_translate_to_str_non_string(self):
+ input_value = object()
+ result = utils.translate_to_str(input_value)
+ self.assertIs(input_value, result)
+
+
+class TestParseCpuInfo(unittest.TestCase):
+
+ def test_single_socket_no_hyperthread(self):
+ cpuinfo = """\
+processor : 2
+vendor_id : GenuineIntel
+cpu family : 6
+model : 60
+model name : Intel Core Processor (Haswell, no TSX)
+stepping : 1
+microcode : 0x1
+cpu MHz : 2294.684
+cache size : 4096 KB
+physical id : 0
+siblings : 5
+core id : 2
+cpu cores : 5
+apicid : 2
+initial apicid : 2
+fpu : yes
+fpu_exception : yes
+cpuid level : 13
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat
+bugs :
+bogomips : 4589.36
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 3
+vendor_id : GenuineIntel
+cpu family : 6
+model : 60
+model name : Intel Core Processor (Haswell, no TSX)
+stepping : 1
+microcode : 0x1
+cpu MHz : 2294.684
+cache size : 4096 KB
+physical id : 0
+siblings : 5
+core id : 3
+cpu cores : 5
+apicid : 3
+initial apicid : 3
+fpu : yes
+fpu_exception : yes
+cpuid level : 13
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat
+bugs :
+bogomips : 4589.36
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 4
+vendor_id : GenuineIntel
+cpu family : 6
+model : 60
+model name : Intel Core Processor (Haswell, no TSX)
+stepping : 1
+microcode : 0x1
+cpu MHz : 2294.684
+cache size : 4096 KB
+physical id : 0
+siblings : 5
+core id : 4
+cpu cores : 5
+apicid : 4
+initial apicid : 4
+fpu : yes
+fpu_exception : yes
+cpuid level : 13
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat
+bugs :
+bogomips : 4589.36
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+"""
+ socket_map = utils.parse_cpuinfo(cpuinfo)
+ assert sorted(socket_map.keys()) == [0]
+ assert sorted(socket_map[0].keys()) == [2, 3, 4]
+
+ def test_single_socket_hyperthread(self):
+ cpuinfo = """\
+processor : 5
+vendor_id : GenuineIntel
+cpu family : 6
+model : 60
+model name : Intel(R) Xeon(R) CPU E3-1275 v3 @ 3.50GHz
+stepping : 3
+microcode : 0x1d
+cpu MHz : 3501.708
+cache size : 8192 KB
+physical id : 0
+siblings : 8
+core id : 1
+cpu cores : 4
+apicid : 3
+initial apicid : 3
+fpu : yes
+fpu_exception : yes
+cpuid level : 13
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
+bugs :
+bogomips : 6987.36
+clflush size : 64
+cache_alignment : 64
+address sizes : 39 bits physical, 48 bits virtual
+power management:
+
+processor : 6
+vendor_id : GenuineIntel
+cpu family : 6
+model : 60
+model name : Intel(R) Xeon(R) CPU E3-1275 v3 @ 3.50GHz
+stepping : 3
+microcode : 0x1d
+cpu MHz : 3531.829
+cache size : 8192 KB
+physical id : 0
+siblings : 8
+core id : 2
+cpu cores : 4
+apicid : 5
+initial apicid : 5
+fpu : yes
+fpu_exception : yes
+cpuid level : 13
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
+bugs :
+bogomips : 6987.36
+clflush size : 64
+cache_alignment : 64
+address sizes : 39 bits physical, 48 bits virtual
+power management:
+
+processor : 7
+vendor_id : GenuineIntel
+cpu family : 6
+model : 60
+model name : Intel(R) Xeon(R) CPU E3-1275 v3 @ 3.50GHz
+stepping : 3
+microcode : 0x1d
+cpu MHz : 3500.213
+cache size : 8192 KB
+physical id : 0
+siblings : 8
+core id : 3
+cpu cores : 4
+apicid : 7
+initial apicid : 7
+fpu : yes
+fpu_exception : yes
+cpuid level : 13
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
+bugs :
+bogomips : 6987.24
+clflush size : 64
+cache_alignment : 64
+address sizes : 39 bits physical, 48 bits virtual
+power management:
+
+"""
+ socket_map = utils.parse_cpuinfo(cpuinfo)
+ assert sorted(socket_map.keys()) == [0]
+ assert sorted(socket_map[0].keys()) == [1, 2, 3]
+ assert sorted(socket_map[0][1]) == [5]
+ assert sorted(socket_map[0][2]) == [6]
+ assert sorted(socket_map[0][3]) == [7]
+
+ def test_dual_socket_hyperthread(self):
+ cpuinfo = """\
+processor : 1
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.976
+cache size : 56320 KB
+physical id : 0
+siblings : 44
+core id : 1
+cpu cores : 22
+apicid : 2
+initial apicid : 2
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4401.07
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 2
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1226.892
+cache size : 56320 KB
+physical id : 0
+siblings : 44
+core id : 2
+cpu cores : 22
+apicid : 4
+initial apicid : 4
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4400.84
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 43
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.305
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 28
+cpu cores : 22
+apicid : 120
+initial apicid : 120
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4411.31
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 44
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.305
+cache size : 56320 KB
+physical id : 0
+siblings : 44
+core id : 0
+cpu cores : 22
+apicid : 1
+initial apicid : 1
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4410.61
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 85
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.573
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 26
+cpu cores : 22
+apicid : 117
+initial apicid : 117
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4409.07
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 86
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.305
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 27
+cpu cores : 22
+apicid : 119
+initial apicid : 119
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4406.62
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 87
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.708
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 28
+cpu cores : 22
+apicid : 121
+initial apicid : 121
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4413.48
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+"""
+ socket_map = utils.parse_cpuinfo(cpuinfo)
+ assert sorted(socket_map.keys()) == [0, 1]
+ assert sorted(socket_map[0].keys()) == [0, 1, 2]
+ assert sorted(socket_map[1].keys()) == [26, 27, 28]
+ assert sorted(socket_map[0][0]) == [44]
+ assert sorted(socket_map[0][1]) == [1]
+ assert sorted(socket_map[0][2]) == [2]
+ assert sorted(socket_map[1][26]) == [85]
+ assert sorted(socket_map[1][27]) == [86]
+ assert sorted(socket_map[1][28]) == [43, 87]
+
+ def test_dual_socket_no_hyperthread(self):
+ cpuinfo = """\
+processor : 1
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.976
+cache size : 56320 KB
+physical id : 0
+siblings : 44
+core id : 1
+cpu cores : 22
+apicid : 2
+initial apicid : 2
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4401.07
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 2
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1226.892
+cache size : 56320 KB
+physical id : 0
+siblings : 44
+core id : 2
+cpu cores : 22
+apicid : 4
+initial apicid : 4
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4400.84
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 43
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.305
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 28
+cpu cores : 22
+apicid : 120
+initial apicid : 120
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4411.31
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 44
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.305
+cache size : 56320 KB
+physical id : 0
+siblings : 44
+core id : 0
+cpu cores : 22
+apicid : 1
+initial apicid : 1
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4410.61
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 85
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.573
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 26
+cpu cores : 22
+apicid : 117
+initial apicid : 117
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4409.07
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 86
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.305
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 27
+cpu cores : 22
+apicid : 119
+initial apicid : 119
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4406.62
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+processor : 87
+vendor_id : GenuineIntel
+cpu family : 6
+model : 79
+model name : Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
+stepping : 1
+microcode : 0xb00001f
+cpu MHz : 1200.708
+cache size : 56320 KB
+physical id : 1
+siblings : 44
+core id : 28
+cpu cores : 22
+apicid : 121
+initial apicid : 121
+fpu : yes
+fpu_exception : yes
+cpuid level : 20
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
+bugs :
+bogomips : 4413.48
+clflush size : 64
+cache_alignment : 64
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
+"""
+ socket_map = utils.parse_cpuinfo(cpuinfo)
+ processors = socket_map.processors()
+ assert processors == [1, 2, 43, 44, 85, 86, 87]
+ cores = socket_map.cores()
+ assert cores == [0, 1, 2, 26, 27, 28]
+ sockets = socket_map.sockets()
+ assert sockets == [0, 1]
+
class ChangeObjToDictTestCase(unittest.TestCase):
@@ -195,6 +798,249 @@ class RemoveFileTestCase(unittest.TestCase):
self.assertTrue(isinstance(e, OSError))
+class TestUtils(unittest.TestCase):
+
+ @mock.patch('yardstick.common.utils.jsonify')
+ def test_result_handler(self, mock_jsonify):
+ mock_jsonify.return_value = 432
+
+ self.assertEqual(utils.result_handler('x', 234), 432)
+ mock_jsonify.assert_called_once_with({'status': 'x', 'result': 234})
+
+ @mock.patch('random.randint')
+ @mock.patch('socket.socket')
+ def test_get_free_port(self, mock_socket, mock_randint):
+ mock_randint.return_value = 7777
+ s = mock_socket('x', 'y')
+ s.connect_ex.side_effect = iter([0, 1])
+ result = utils.get_free_port('10.20.30.40')
+ self.assertEqual(result, 7777)
+ self.assertEqual(s.connect_ex.call_count, 2)
+
+ @mock.patch('subprocess.check_output')
+ def test_execute_command(self, mock_check_output):
+ expected = ['hello world', '1234']
+ mock_check_output.return_value = os.linesep.join(expected)
+ result = utils.execute_command('my_command arg1 arg2')
+ self.assertEqual(result, expected)
+
+ @mock.patch('subprocess.Popen')
+ def test_source_env(self, mock_popen):
+ base_env = deepcopy(os.environ)
+ mock_process = mock_popen()
+ output_list = [
+ 'garbage line before',
+ 'NEW_ENV_VALUE=234',
+ 'garbage line after',
+ ]
+ mock_process.communicate.return_value = os.linesep.join(output_list), '', 0
+ expected = {'NEW_ENV_VALUE': '234'}
+ result = utils.source_env('my_file')
+ self.assertDictEqual(result, expected)
+ os.environ.clear()
+ os.environ.update(base_env)
+
+ @mock.patch('yardstick.common.utils.configparser.ConfigParser')
+ def test_parse_ini_file(self, mock_config_parser_type):
+ defaults = {
+ 'default1': 'value1',
+ 'default2': 'value2',
+ }
+ s1 = {
+ 'key1': 'value11',
+ 'key2': 'value22',
+ }
+ s2 = {
+ 'key1': 'value123',
+ 'key2': 'value234',
+ }
+
+ mock_config_parser = mock_config_parser_type()
+ mock_config_parser.read.return_value = True
+ mock_config_parser.sections.return_value = ['s1', 's2']
+ mock_config_parser.items.side_effect = iter([
+ defaults.items(),
+ s1.items(),
+ s2.items(),
+ ])
+
+ expected = {
+ 'DEFAULT': defaults,
+ 's1': s1,
+ 's2': s2,
+ }
+ result = utils.parse_ini_file('my_path')
+ self.assertDictEqual(result, expected)
+
+ @mock.patch('yardstick.common.utils.configparser.ConfigParser')
+ def test_parse_ini_file_missing_section_header(self, mock_config_parser_type):
+ mock_config_parser = mock_config_parser_type()
+ mock_config_parser.read.side_effect = \
+ configparser.MissingSectionHeaderError(mock.Mock(), 321, mock.Mock())
+
+ with self.assertRaises(configparser.MissingSectionHeaderError):
+ utils.parse_ini_file('my_path')
+
+ @mock.patch('yardstick.common.utils.configparser.ConfigParser')
+ def test_parse_ini_file_no_file(self, mock_config_parser_type):
+ mock_config_parser = mock_config_parser_type()
+ mock_config_parser.read.return_value = False
+ with self.assertRaises(RuntimeError):
+ utils.parse_ini_file('my_path')
+
+ @mock.patch('yardstick.common.utils.configparser.ConfigParser')
+ def test_parse_ini_file_no_default_section_header(self, mock_config_parser_type):
+ s1 = {
+ 'key1': 'value11',
+ 'key2': 'value22',
+ }
+ s2 = {
+ 'key1': 'value123',
+ 'key2': 'value234',
+ }
+
+ mock_config_parser = mock_config_parser_type()
+ mock_config_parser.read.return_value = True
+ mock_config_parser.sections.return_value = ['s1', 's2']
+ mock_config_parser.items.side_effect = iter([
+ configparser.NoSectionError(mock.Mock()),
+ s1.items(),
+ s2.items(),
+ ])
+
+ expected = {
+ 'DEFAULT': {},
+ 's1': s1,
+ 's2': s2,
+ }
+ result = utils.parse_ini_file('my_path')
+ self.assertDictEqual(result, expected)
+
+
+class TestUtilsIpAddrMethods(unittest.TestCase):
+
+ GOOD_IP_V4_ADDRESS_STR_LIST = [
+ u'0.0.0.0',
+ u'10.20.30.40',
+ u'127.0.0.1',
+ u'10.20.30.40',
+ u'172.29.50.75',
+ u'192.168.230.9',
+ u'255.255.255.255',
+ ]
+
+ GOOD_IP_V4_MASK_STR_LIST = [
+ u'/1',
+ u'/8',
+ u'/13',
+ u'/19',
+ u'/24',
+ u'/32',
+ ]
+
+ GOOD_IP_V6_ADDRESS_STR_LIST = [
+ u'::1',
+ u'fe80::250:56ff:fe89:91ff',
+ u'123:4567:89ab:cdef:123:4567:89ab:cdef',
+ ]
+
+ GOOD_IP_V6_MASK_STR_LIST = [
+ u'/1',
+ u'/16',
+ u'/29',
+ u'/64',
+ u'/99',
+ u'/128',
+ ]
+
+ INVALID_IP_ADDRESS_STR_LIST = [
+ 1,
+ u'w.x.y.z',
+ u'10.20.30.40/33',
+ u'123:4567:89ab:cdef:123:4567:89ab:cdef/129',
+ ]
+
+ def test_safe_ip_address(self):
+ addr_list = self.GOOD_IP_V4_ADDRESS_STR_LIST
+ for addr in addr_list:
+ # test with no mask
+ expected = ipaddress.ip_address(addr)
+ self.assertEqual(utils.safe_ip_address(addr), expected, addr)
+
+ def test_safe_ip_address_v6_ip(self):
+ addr_list = self.GOOD_IP_V6_ADDRESS_STR_LIST
+ for addr in addr_list:
+ # test with no mask
+ expected = ipaddress.ip_address(addr)
+ self.assertEqual(utils.safe_ip_address(addr), expected, addr)
+
+ @mock.patch("yardstick.common.utils.logging")
+ def test_safe_ip_address_negative(self, mock_logging):
+ for value in self.INVALID_IP_ADDRESS_STR_LIST:
+ self.assertIsNone(utils.safe_ip_address(value), value)
+
+ addr_list = self.GOOD_IP_V4_ADDRESS_STR_LIST
+ mask_list = self.GOOD_IP_V4_MASK_STR_LIST
+ for addr_mask_pair in product(addr_list, mask_list):
+ value = ''.join(addr_mask_pair)
+ self.assertIsNone(utils.safe_ip_address(value), value)
+
+ addr_list = self.GOOD_IP_V6_ADDRESS_STR_LIST
+ mask_list = self.GOOD_IP_V6_MASK_STR_LIST
+ for addr_mask_pair in product(addr_list, mask_list):
+ value = ''.join(addr_mask_pair)
+ self.assertIsNone(utils.safe_ip_address(value), value)
+
+ def test_get_ip_version(self):
+ addr_list = self.GOOD_IP_V4_ADDRESS_STR_LIST
+ for addr in addr_list:
+ # test with no mask
+ self.assertEqual(utils.get_ip_version(addr), 4, addr)
+
+ def test_get_ip_version_v6_ip(self):
+ addr_list = self.GOOD_IP_V6_ADDRESS_STR_LIST
+ for addr in addr_list:
+ # test with no mask
+ self.assertEqual(utils.get_ip_version(addr), 6, addr)
+
+ @mock.patch("yardstick.common.utils.logging")
+ def test_get_ip_version_negative(self, mock_logging):
+ for value in self.INVALID_IP_ADDRESS_STR_LIST:
+ self.assertIsNone(utils.get_ip_version(value), value)
+
+ addr_list = self.GOOD_IP_V4_ADDRESS_STR_LIST
+ mask_list = self.GOOD_IP_V4_MASK_STR_LIST
+ for addr_mask_pair in product(addr_list, mask_list):
+ value = ''.join(addr_mask_pair)
+ self.assertIsNone(utils.get_ip_version(value), value)
+
+ addr_list = self.GOOD_IP_V6_ADDRESS_STR_LIST
+ mask_list = self.GOOD_IP_V6_MASK_STR_LIST
+ for addr_mask_pair in product(addr_list, mask_list):
+ value = ''.join(addr_mask_pair)
+ self.assertIsNone(utils.get_ip_version(value), value)
+
+ def test_ip_to_hex(self):
+ self.assertEqual(utils.ip_to_hex('0.0.0.0'), '00000000')
+ self.assertEqual(utils.ip_to_hex('10.20.30.40'), '0a141e28')
+ self.assertEqual(utils.ip_to_hex('127.0.0.1'), '7f000001')
+ self.assertEqual(utils.ip_to_hex('172.31.90.100'), 'ac1f5a64')
+ self.assertEqual(utils.ip_to_hex('192.168.254.253'), 'c0a8fefd')
+ self.assertEqual(utils.ip_to_hex('255.255.255.255'), 'ffffffff')
+
+ def test_ip_to_hex_v6_ip(self):
+ for value in self.GOOD_IP_V6_ADDRESS_STR_LIST:
+ self.assertEqual(utils.ip_to_hex(value), value)
+
+ @mock.patch("yardstick.common.utils.logging")
+ def test_ip_to_hex_negative(self, mock_logging):
+ addr_list = self.GOOD_IP_V4_ADDRESS_STR_LIST
+ mask_list = self.GOOD_IP_V4_MASK_STR_LIST
+ value_iter = (''.join(pair) for pair in product(addr_list, mask_list))
+ for value in chain(value_iter, self.INVALID_IP_ADDRESS_STR_LIST):
+ self.assertEqual(utils.ip_to_hex(value), value)
+
+
def main():
unittest.main()
diff --git a/tests/unit/network_services/helpers/__init__.py b/tests/unit/network_services/helpers/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/unit/network_services/helpers/__init__.py
diff --git a/tests/unit/network_services/helpers/test_cpu.py b/tests/unit/network_services/helpers/test_cpu.py
new file mode 100644
index 000000000..7ea6bd0fc
--- /dev/null
+++ b/tests/unit/network_services/helpers/test_cpu.py
@@ -0,0 +1,119 @@
+#!/usr/bin/env python
+
+# 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.
+#
+
+from __future__ import absolute_import
+from __future__ import division
+import unittest
+import mock
+import subprocess
+
+from yardstick.network_services.helpers.cpu import \
+ CpuSysCores
+
+
+class TestCpuSysCores(unittest.TestCase):
+
+ def test___init__(self):
+ with mock.patch("yardstick.ssh.SSH") as ssh:
+ ssh_mock = mock.Mock(autospec=ssh.SSH)
+ ssh_mock.execute = \
+ mock.Mock(return_value=(1, "", ""))
+ ssh_mock.put = \
+ mock.Mock(return_value=(1, "", ""))
+ cpu_topo = CpuSysCores(ssh_mock)
+ self.assertIsNotNone(cpu_topo.connection)
+
+ def test__get_core_details(self):
+ with mock.patch("yardstick.ssh.SSH") as ssh:
+ ssh_mock = mock.Mock(autospec=ssh.SSH)
+ ssh_mock.execute = \
+ mock.Mock(return_value=(1, "", ""))
+ ssh_mock.put = \
+ mock.Mock(return_value=(1, "", ""))
+ cpu_topo = CpuSysCores(ssh_mock)
+ subprocess.check_output = mock.Mock(return_value=0)
+ lines = ["cpu:1", "topo:2", ""]
+ self.assertEqual([{'topo': '2', 'cpu': '1'}],
+ cpu_topo._get_core_details(lines))
+
+ def test_get_core_socket(self):
+ with mock.patch("yardstick.ssh.SSH") as ssh:
+ ssh_mock = mock.Mock(autospec=ssh.SSH)
+ ssh_mock.execute = \
+ mock.Mock(return_value=(1, "cpu:1\ntest:2\n \n", ""))
+ ssh_mock.put = \
+ mock.Mock(return_value=(1, "", ""))
+ cpu_topo = CpuSysCores(ssh_mock)
+ subprocess.check_output = mock.Mock(return_value=0)
+ cpu_topo._get_core_details = \
+ mock.Mock(side_effect=[[{'Core(s) per socket': '2', 'Thread(s) per core': '1'}],
+ [{'physical id': '2', 'processor': '1'}]])
+ self.assertEqual({'thread_per_core': '1', '2': ['1'],
+ 'cores_per_socket': '2'},
+ cpu_topo.get_core_socket())
+
+ def test_validate_cpu_cfg(self):
+ with mock.patch("yardstick.ssh.SSH") as ssh:
+ ssh_mock = mock.Mock(autospec=ssh.SSH)
+ ssh_mock.execute = \
+ mock.Mock(return_value=(1, "cpu:1\ntest:2\n \n", ""))
+ ssh_mock.put = \
+ mock.Mock(return_value=(1, "", ""))
+ cpu_topo = CpuSysCores(ssh_mock)
+ subprocess.check_output = mock.Mock(return_value=0)
+ cpu_topo._get_core_details = \
+ mock.Mock(side_effect=[[{'Core(s) per socket': '2', 'Thread(s) per core': '1'}],
+ [{'physical id': '2', 'processor': '1'}]])
+ cpu_topo.core_map = \
+ {'thread_per_core': '1', '2':['1'], 'cores_per_socket': '2'}
+ self.assertEqual(-1, cpu_topo.validate_cpu_cfg())
+
+ def test_validate_cpu_cfg_2t(self):
+ with mock.patch("yardstick.ssh.SSH") as ssh:
+ ssh_mock = mock.Mock(autospec=ssh.SSH)
+ ssh_mock.execute = \
+ mock.Mock(return_value=(1, "cpu:1\ntest:2\n \n", ""))
+ ssh_mock.put = \
+ mock.Mock(return_value=(1, "", ""))
+ cpu_topo = CpuSysCores(ssh_mock)
+ subprocess.check_output = mock.Mock(return_value=0)
+ cpu_topo._get_core_details = \
+ mock.Mock(side_effect=[[{'Core(s) per socket': '2', 'Thread(s) per core': '1'}],
+ [{'physical id': '2', 'processor': '1'}]])
+ cpu_topo.core_map = \
+ {'thread_per_core': 1, '2':['1'], 'cores_per_socket': '2'}
+ vnf_cfg = {'lb_config': 'SW', 'lb_count': 1, 'worker_config':
+ '1C/2T', 'worker_threads': 1}
+ self.assertEqual(-1, cpu_topo.validate_cpu_cfg(vnf_cfg))
+
+ def test_validate_cpu_cfg_fail(self):
+ with mock.patch("yardstick.ssh.SSH") as ssh:
+ ssh_mock = mock.Mock(autospec=ssh.SSH)
+ ssh_mock.execute = \
+ mock.Mock(return_value=(1, "cpu:1\ntest:2\n \n", ""))
+ ssh_mock.put = \
+ mock.Mock(return_value=(1, "", ""))
+ cpu_topo = CpuSysCores(ssh_mock)
+ subprocess.check_output = mock.Mock(return_value=0)
+ cpu_topo._get_core_details = \
+ mock.Mock(side_effect=[[{'Core(s) per socket': '2', 'Thread(s) per core': '1'}],
+ [{'physical id': '2', 'processor': '1'}]])
+ cpu_topo.core_map = \
+ {'thread_per_core': 1, '2':[1], 'cores_per_socket': 2}
+ vnf_cfg = {'lb_config': 'SW', 'lb_count': 1, 'worker_config':
+ '1C/1T', 'worker_threads': 1}
+ self.assertEqual(-1, cpu_topo.validate_cpu_cfg(vnf_cfg))
diff --git a/tests/unit/network_services/helpers/test_samplevnf_helper.py b/tests/unit/network_services/helpers/test_samplevnf_helper.py
new file mode 100644
index 000000000..b89668577
--- /dev/null
+++ b/tests/unit/network_services/helpers/test_samplevnf_helper.py
@@ -0,0 +1,1082 @@
+#!/usr/bin/env python
+
+# 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.
+#
+
+from __future__ import absolute_import
+from __future__ import division
+
+import os
+import unittest
+
+import mock
+
+from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig
+
+
+class TestMultiPortConfig(unittest.TestCase):
+ VNFD = {'vnfd:vnfd-catalog':
+ {'vnfd':
+ [{'short-name': 'VpeVnf',
+ 'vdu':
+ [{'routing_table':
+ [{'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'},
+ {'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'}],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl':
+ [{'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'},
+ {'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'}],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface':
+ [
+ {'virtual-interface':
+ {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'driver': "i40e",
+ 'dst_ip': '152.16.100.20',
+ 'ifname': 'xe0',
+ 'local_iface_name': 'eth0',
+ 'local_mac': '00:00:00:00:00:02',
+ 'vld_id': 'private_1',
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'},
+ {'virtual-interface':
+ {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'driver': "i40e",
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'ifname': 'xe1',
+ 'local_iface_name': 'eth1',
+ 'local_mac': '00:00:00:00:00:01',
+ 'vld_id': 'public_1',
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'}
+ ]}],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface':
+ {'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.2.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.2.1.1'},
+ 'benchmark':
+ {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']},
+ 'connection-point': [{'type': 'VPORT', 'name': 'xe0'},
+ {'type': 'VPORT', 'name': 'xe1'}],
+ 'id': 'AclApproxVnf', 'name': 'VPEVnfSsh'}]}}
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test___init__(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ self.assertEqual(0, opnfv_vnf.swq)
+ mock_os.path = mock.MagicMock()
+ mock_os.path.isfile = mock.Mock(return_value=False)
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ self.assertEqual(0, opnfv_vnf.swq)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_update_timer(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ self.assertEqual(None, opnfv_vnf.update_timer())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_script(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ self.assertIsNotNone(opnfv_vnf.generate_script(self.VNFD))
+ opnfv_vnf.lb_config = 'HW'
+ self.assertIsNotNone(opnfv_vnf.generate_script(self.VNFD))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_script_data(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.vnf_type = 'ACL'
+ opnfv_vnf.generate_link_config = mock.Mock()
+ opnfv_vnf.generate_arp_config = mock.Mock()
+ opnfv_vnf.generate_arp_config6 = mock.Mock()
+ opnfv_vnf.generate_action_config = mock.Mock()
+ opnfv_vnf.generate_rule_config = mock.Mock()
+ self.assertIsNotNone(opnfv_vnf.generate_script_data())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_rule_config(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'ACL'
+ opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.get_ports_gateway6 = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway6 = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ self.assertIsNotNone(opnfv_vnf.generate_rule_config())
+ opnfv_vnf.rules = 'new'
+ self.assertIsNotNone(opnfv_vnf.generate_rule_config())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_action_config(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.get_ports_gateway6 = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway6 = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ self.assertIsNotNone(opnfv_vnf.generate_action_config())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_arp_config6(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.get_ports_gateway6 = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway6 = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.interfaces = mock.MagicMock()
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ self.assertIsNotNone(opnfv_vnf.generate_arp_config6())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_arp_config(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.get_ports_gateway6 = mock.Mock(return_value=u'1.1.1.1')
+ opnfv_vnf.get_netmask_gateway6 = mock.Mock(return_value=u'255.255.255.0')
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.interfaces = mock.MagicMock()
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ self.assertIsNotNone(opnfv_vnf.generate_arp_config())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_get_ports_gateway(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.interfaces = mock.MagicMock()
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ self.assertIsNotNone(opnfv_vnf.get_ports_gateway('xe0'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_get_ports_gateway6(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.interfaces = mock.MagicMock()
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ self.assertIsNotNone(opnfv_vnf.get_ports_gateway6('xe0'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_get_netmask_gateway(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.interfaces = mock.MagicMock()
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ self.assertIsNotNone(opnfv_vnf.get_netmask_gateway('xe0'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_get_netmask_gateway6(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.interfaces = mock.MagicMock()
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ self.assertIsNotNone(opnfv_vnf.get_netmask_gateway6('xe0'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_link_config(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.get_port_pairs = mock.Mock()
+ opnfv_vnf.vnf_type = 'VFW'
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ self.assertIsNotNone(opnfv_vnf.generate_link_config())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ def test_generate_config(self, mock_open, mock_os, ConfigParser):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.get_config_tpl_data = mock.MagicMock()
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.update_write_parser = mock.MagicMock()
+ opnfv_vnf.generate_script_data = \
+ mock.Mock(return_value={'link_config': 0, 'arp_config': '',
+ 'arp_config6': '', 'actions': '',
+ 'rules': ''})
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.get_ports_gateway6 = mock.Mock()
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.generate_lb_to_port_pair_mapping = mock.Mock()
+ opnfv_vnf.generate_config_data = mock.Mock()
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.is_openstack = True
+ self.assertIsNone(opnfv_vnf.generate_config())
+ opnfv_vnf.is_openstack = False
+ self.assertIsNone(opnfv_vnf.generate_config())
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_get_config_tpl_data(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=True)
+ opnfv_vnf.read_parser.get = mock.Mock(return_value='filename')
+
+ self.assertIsNotNone(opnfv_vnf.get_config_tpl_data('filename'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_get_txrx_tpl_data(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=True)
+ opnfv_vnf.read_parser.get = mock.Mock(return_value='filename')
+
+ self.assertIsNotNone(opnfv_vnf.get_txrx_tpl_data('filename'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_init_write_parser_template(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=True)
+ opnfv_vnf.read_parser.get = mock.Mock(return_value='filename')
+
+ self.assertIsNone(opnfv_vnf.init_write_parser_template('filename'))
+ opnfv_vnf.write_parser.add_section = mock.MagicMock()
+ opnfv_vnf.read_parser.item = mock.Mock(return_value=[1, 2, 3])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=False)
+ opnfv_vnf.write_parser.set = mock.Mock()
+ self.assertIsNone(opnfv_vnf.init_write_parser_template('filename'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_init_write_parser_template_2(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ self.assertIsNone(opnfv_vnf.init_write_parser_template('filename'))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_update_write_parser(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ self.assertIsNone(opnfv_vnf.update_write_parser({'filename': 1}))
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_get_worker_threads(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ result = opnfv_vnf.get_worker_threads(1)
+ self.assertEqual(1, result)
+ opnfv_vnf.worker_config = '2t'
+ result = opnfv_vnf.get_worker_threads(2)
+ self.assertEqual(2, result)
+ opnfv_vnf.worker_config = '2t'
+ result = opnfv_vnf.get_worker_threads(3)
+ self.assertEqual(2, result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_next_core_id(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ result = opnfv_vnf.generate_next_core_id()
+ self.assertEqual(None, result)
+ opnfv_vnf.worker_config = '2t'
+ opnfv_vnf.start_core = 'a'
+ self.assertRaises(ValueError, opnfv_vnf.generate_next_core_id)
+ opnfv_vnf.worker_config = '2t'
+ opnfv_vnf.start_core = 1
+ result = opnfv_vnf.generate_next_core_id()
+ self.assertEqual(None, result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_lb_to_port_pair_mapping(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ result = opnfv_vnf.generate_lb_to_port_pair_mapping()
+ self.assertEqual(None, result)
+ result = opnfv_vnf.set_priv_to_pub_mapping()
+ self.assertEqual('(0, 1)', result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_set_priv_que_handler(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ result = opnfv_vnf.set_priv_que_handler()
+ self.assertEqual(None, result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_arpicmp_data(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ result = opnfv_vnf.generate_arpicmp_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.nfv_type = 'ovs'
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ result = opnfv_vnf.generate_arpicmp_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.nfv_type = 'openstack'
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ result = opnfv_vnf.generate_arpicmp_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.lb_config = 'HW'
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ result = opnfv_vnf.generate_arpicmp_data()
+ self.assertIsNotNone(result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_final_txrx_data(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.ports_len = 2
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.pktq_out_os = [1, 2]
+ result = opnfv_vnf.generate_final_txrx_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.nfv_type = 'openstack'
+ opnfv_vnf.pktq_out_os = [1, 2]
+ opnfv_vnf.lb_index = 1
+ result = opnfv_vnf.generate_final_txrx_data()
+ self.assertIsNotNone(result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_initial_txrx_data(self, mock_open, mock_os,
+ ConfigParser, OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.ports_len = 2
+ result = opnfv_vnf.generate_initial_txrx_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.nfv_type = 'openstack'
+ opnfv_vnf.pktq_out_os = [1, 2]
+ result = opnfv_vnf.generate_initial_txrx_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.nfv_type = 'ovs'
+ opnfv_vnf.init_ovs = False
+ opnfv_vnf.ovs_pktq_out = ''
+ opnfv_vnf.pktq_out_os = [1, 2]
+ opnfv_vnf.lb_index = 1
+ result = opnfv_vnf.generate_initial_txrx_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.nfv_type = 'ovs'
+ opnfv_vnf.init_ovs = True
+ opnfv_vnf.pktq_out_os = [1, 2]
+ opnfv_vnf.ovs_pktq_out = ''
+ opnfv_vnf.lb_index = 1
+ result = opnfv_vnf.generate_initial_txrx_data()
+ self.assertIsNotNone(result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_lb_data(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.ports_len = 2
+ opnfv_vnf.prv_que_handler = 0
+ result = opnfv_vnf.generate_lb_data()
+ self.assertIsNotNone(result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_vnf_data(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.ports_len = 1
+ opnfv_vnf.pktq_out = ['1', '2']
+ opnfv_vnf.vnf_tpl = {'public_ip_port_range': '98164810',
+ 'vnf_set': '(2,4,5)'}
+ opnfv_vnf.prv_que_handler = 0
+ result = opnfv_vnf.generate_vnf_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.lb_config = 'HW'
+ opnfv_vnf.mul = 0.1
+ result = opnfv_vnf.generate_vnf_data()
+ self.assertIsNotNone(result)
+ opnfv_vnf.lb_config = 'HW'
+ opnfv_vnf.mul = 0.1
+ opnfv_vnf.vnf_type = 'ACL'
+ result = opnfv_vnf.generate_vnf_data()
+ self.assertIsNotNone(result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_generate_config_data(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.ports_len = 1
+ opnfv_vnf.pktq_out = ['1', '2']
+ opnfv_vnf.prv_que_handler = 0
+ opnfv_vnf.init_write_parser_template = mock.Mock()
+ opnfv_vnf.arpicmp_tpl = mock.MagicMock()
+ opnfv_vnf.txrx_tpl = mock.MagicMock()
+ opnfv_vnf.loadb_tpl = mock.MagicMock()
+ opnfv_vnf.vnf_tpl = {'public_ip_port_range': '98164810 (1,65535)',
+ 'vnf_set': "(2,4,5)"}
+ opnfv_vnf.generate_vnf_data = mock.Mock(return_value={})
+ opnfv_vnf.update_write_parser = mock.Mock()
+ result = opnfv_vnf.generate_config_data()
+ self.assertIsNone(result)
+ opnfv_vnf.generate_final_txrx_data = mock.Mock()
+ opnfv_vnf.update_write_parser = mock.Mock()
+ result = opnfv_vnf.generate_config_data()
+ self.assertIsNone(result)
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.ports_len = 1
+ opnfv_vnf.pktq_out = ['1', '2']
+ opnfv_vnf.prv_que_handler = 0
+ opnfv_vnf.init_write_parser_template = mock.Mock()
+ opnfv_vnf.arpicmp_tpl = mock.MagicMock()
+ opnfv_vnf.txrx_tpl = mock.MagicMock()
+ opnfv_vnf.loadb_tpl = mock.MagicMock()
+ opnfv_vnf.vnf_type = 'CGNAPT'
+ opnfv_vnf.update_timer = mock.Mock()
+ opnfv_vnf.port_pair_list = [[[0], [1], [2]]]
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.generate_arpicmp_data = mock.Mock()
+ result = opnfv_vnf.generate_config_data()
+ self.assertIsNone(result)
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_get_port_pairs(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.ports_len = 1
+ opnfv_vnf.pktq_out = ['1', '2']
+ opnfv_vnf.prv_que_handler = 0
+ opnfv_vnf.init_write_parser_template = mock.Mock()
+ opnfv_vnf.arpicmp_tpl = mock.MagicMock()
+ opnfv_vnf.txrx_tpl = mock.MagicMock()
+ opnfv_vnf.loadb_tpl = mock.MagicMock()
+ opnfv_vnf.vnf_tpl = {'public_ip_port_range': '98164810 (1,65535)',
+ 'vnf_set': '(2,4,5)'}
+ opnfv_vnf.generate_vnf_data = mock.Mock(return_value={})
+ opnfv_vnf.update_write_parser = mock.Mock()
+
+ curr_path = os.path.dirname(os.path.abspath(__file__))
+ opnfv_vnf.topology_file = \
+ os.path.join(curr_path, 'acl_vnf_topology_ixia.yaml')
+ opnfv_vnf.lb_count = 10
+ result = opnfv_vnf.get_port_pairs(opnfv_vnf.interfaces)
+ self.assertEqual(result[0], [('xe0', 'xe1')])
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser')
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict')
+ def test_init_eal(self, mock_open, mock_os, ConfigParser,
+ OrderedDict):
+ topology_file = mock.Mock()
+ config_tpl = mock.Mock()
+ tmp_file = mock.Mock()
+ opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file)
+ opnfv_vnf.socket = 0
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.port_pair_list = [[[0], [1]]]
+ opnfv_vnf.port_pairs = [[[0], [1]]]
+ opnfv_vnf.txrx_pipeline = ''
+ opnfv_vnf.rules = ''
+ opnfv_vnf.write_parser = mock.MagicMock()
+ opnfv_vnf.read_parser = mock.MagicMock()
+ opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER'])
+ opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[])
+ opnfv_vnf.write_parser.set = mock.Mock()
+ opnfv_vnf.write_parser.add_section = mock.Mock()
+ opnfv_vnf.read_parser.items = mock.MagicMock()
+ opnfv_vnf.pipeline_counter = 0
+ opnfv_vnf.worker_config = '1t'
+ opnfv_vnf.start_core = 0
+ opnfv_vnf.lb_count = 1
+ opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface']
+ opnfv_vnf.lb_to_port_pair_mapping = [0, 1]
+ opnfv_vnf.lb_index = 1
+ opnfv_vnf.ports_len = 1
+ opnfv_vnf.pktq_out = ['1', '2']
+ opnfv_vnf.prv_que_handler = 0
+ opnfv_vnf.init_write_parser_template = mock.Mock()
+ opnfv_vnf.arpicmp_tpl = mock.MagicMock()
+ opnfv_vnf.txrx_tpl = mock.MagicMock()
+ opnfv_vnf.loadb_tpl = mock.MagicMock()
+ opnfv_vnf.vnf_tpl = {'public_ip_port_range': '98164810 (1,65535)'}
+ opnfv_vnf.generate_vnf_data = mock.Mock(return_value={})
+ opnfv_vnf.update_write_parser = mock.Mock()
+ opnfv_vnf.tmp_file = "/tmp/config"
+ result = opnfv_vnf.init_eal()
+ self.assertIsNone(result)
diff --git a/tests/unit/network_services/test_utils.py b/tests/unit/network_services/test_utils.py
index 8d9e74adf..993adbeae 100644
--- a/tests/unit/network_services/test_utils.py
+++ b/tests/unit/network_services/test_utils.py
@@ -27,7 +27,7 @@ from yardstick.network_services import utils
class UtilsTestCase(unittest.TestCase):
"""Test all VNF helper methods."""
- DPDK_PATH = os.path.join(utils.NSB_ROOT, "dpdk_nic_bind.py")
+ DPDK_PATH = os.path.join(utils.NSB_ROOT, "dpdk-devbind.py")
def setUp(self):
super(UtilsTestCase, self).setUp()
diff --git a/tests/unit/network_services/test_yang_model.py b/tests/unit/network_services/test_yang_model.py
new file mode 100644
index 000000000..28367f316
--- /dev/null
+++ b/tests/unit/network_services/test_yang_model.py
@@ -0,0 +1,135 @@
+# 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.
+#
+
+# Unittest for yardstick.network_services.utils
+
+from __future__ import absolute_import
+
+import unittest
+import mock
+
+import yaml
+
+from yardstick.network_services.yang_model import YangModel
+
+
+class YangModelTestCase(unittest.TestCase):
+ """Test all Yang Model methods."""
+
+ ENTRIES = {
+ 'access-list1': {
+ 'acl': {
+ 'access-list-entries': [{
+ 'ace': {
+ 'ace-oper-data': {
+ 'match-counter': 0},
+ 'actions': 'drop,count',
+ 'matches': {
+ 'destination-ipv4-network':
+ '152.16.40.20/24',
+ 'destination-port-range': {
+ 'lower-port': 0,
+ 'upper-port': 65535},
+ 'source-ipv4-network': '0.0.0.0/0',
+ 'source-port-range': {
+ 'lower-port': 0,
+ 'upper-port': 65535}},
+ 'rule-name': 'rule1588'}},
+ {
+ 'ace': {
+ 'ace-oper-data': {
+ 'match-counter': 0},
+ 'actions': 'drop,count',
+ 'matches': {
+ 'destination-ipv4-network':
+ '0.0.0.0/0',
+ 'destination-port-range': {
+ 'lower-port': 0,
+ 'upper-port': 65535},
+ 'source-ipv4-network':
+ '152.16.100.20/24',
+ 'source-port-range': {
+ 'lower-port': 0,
+ 'upper-port': 65535}},
+ 'rule-name': 'rule1589'}}],
+ 'acl-name': 'sample-ipv4-acl',
+ 'acl-type': 'ipv4-acl'}
+ }
+ }
+
+ def test__init__(self):
+ cfg = "yang.yaml"
+ y = YangModel(cfg)
+ self.assertEqual(y.config_file, cfg)
+
+ def test_config_file_setter(self):
+ cfg = "yang.yaml"
+ y = YangModel(cfg)
+ self.assertEqual(y.config_file, cfg)
+ cfg2 = "yang2.yaml"
+ y.config_file = cfg2
+ self.assertEqual(y.config_file, cfg2)
+
+ def test__get_entries(self):
+ cfg = "yang.yaml"
+ y = YangModel(cfg)
+ y._options = self.ENTRIES
+ y._get_entries()
+ self.assertIn("p acl add", y._rules)
+
+ def test__get_entries_no_options(self):
+ cfg = "yang.yaml"
+ y = YangModel(cfg)
+ y._get_entries()
+ self.assertEqual(y._rules, '')
+
+ @mock.patch('yaml.safe_load')
+ @mock.patch('yardstick.network_services.yang_model.open')
+ def test__read_config(self, mock_open, mock_safe_load):
+ cfg = "yang.yaml"
+ y = YangModel(cfg)
+ mock_safe_load.return_value = expected = {'key1': 'value1', 'key2': 'value2'}
+ y._read_config()
+ self.assertDictEqual(y._options, expected)
+
+ @mock.patch('yardstick.network_services.yang_model.open')
+ def test__read_config_open_error(self, mock_open):
+ cfg = "yang.yaml"
+ y = YangModel(cfg)
+ mock_open.side_effect = IOError('my error')
+
+ self.assertEqual(y._options, {})
+ with self.assertRaises(IOError) as raised:
+ y._read_config()
+
+ self.assertIn('my error', str(raised.exception))
+ self.assertEqual(y._options, {})
+
+ def test_get_rules(self):
+ cfg = "yang.yaml"
+ y = YangModel(cfg)
+ y._read_config = read_mock = mock.Mock()
+ y._get_entries = get_mock = mock.Mock()
+
+ y._rules = None
+ self.assertIsNone(y.get_rules())
+ self.assertEqual(read_mock.call_count, 1)
+ self.assertEqual(get_mock.call_count, 1)
+
+ # True value should prevent calling read and get
+ y._rules = 999
+ self.assertEqual(y.get_rules(), 999)
+ self.assertEqual(read_mock.call_count, 1)
+ self.assertEqual(get_mock.call_count, 1)
diff --git a/tests/unit/network_services/traffic_profile/test_rfc2544.py b/tests/unit/network_services/traffic_profile/test_rfc2544.py
index 1e9409b2a..dcaf43dc5 100644
--- a/tests/unit/network_services/traffic_profile/test_rfc2544.py
+++ b/tests/unit/network_services/traffic_profile/test_rfc2544.py
@@ -106,7 +106,7 @@ class TestRFC2544Profile(unittest.TestCase):
'name': 'rfc2544',
'traffic_profile': {'traffic_type': 'RFC2544Profile',
'frame_rate': 100},
- 'public': {'ipv4':
+ 'public_1': {'ipv4':
{'outer_l2': {'framesize':
{'64B': '100', '1518B': '0',
'128B': '0', '1400B': '0',
@@ -118,7 +118,7 @@ class TestRFC2544Profile(unittest.TestCase):
'dscp': 0, 'ttl': 32},
'outer_l4': {'srcport': '2001',
'dsrport': '1234'}}},
- 'private': {'ipv4':
+ 'private_1': {'ipv4':
{'outer_l2': {'framesize':
{'64B': '100', '1518B': '0',
'128B': '0', '1400B': '0',
@@ -139,6 +139,8 @@ class TestRFC2544Profile(unittest.TestCase):
def test_execute(self):
traffic_generator = mock.Mock(autospec=TrexProfile)
traffic_generator.my_ports = [0, 1]
+ traffic_generator.priv_ports = [-1]
+ traffic_generator.pub_ports = [1]
traffic_generator.client = \
mock.Mock(return_value=True)
r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
@@ -149,66 +151,101 @@ class TestRFC2544Profile(unittest.TestCase):
def test_get_drop_percentage(self):
traffic_generator = mock.Mock(autospec=TrexProfile)
traffic_generator.my_ports = [0, 1]
- traffic_generator.client = \
- mock.Mock(return_value=True)
+ traffic_generator.priv_ports = [0]
+ traffic_generator.pub_ports = [1]
+ traffic_generator.client = mock.Mock(return_value=True)
+
r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
r_f_c2544_profile.params = self.PROFILE
- self.assertEqual(None, r_f_c2544_profile.execute(traffic_generator))
+ r_f_c2544_profile.register_generator(traffic_generator)
+ self.assertIsNone(r_f_c2544_profile.execute(traffic_generator))
+
samples = {}
for ifname in range(1):
name = "xe{}".format(ifname)
- samples[name] = {"rx_throughput_fps": 20,
- "tx_throughput_fps": 20,
- "rx_throughput_mbps": 10,
- "tx_throughput_mbps": 10,
- "in_packets": 1000,
- "out_packets": 1000}
- tol_min = 100.0
- tolerance = 0.0
- expected = {'DropPercentage': 0.0, 'RxThroughput': 100/3.0,
- 'TxThroughput': 100/3.0, 'CurrentDropPercentage': 0.0,
- 'Throughput': 100/3.0,
- 'xe0': {'tx_throughput_fps': 20, 'in_packets': 1000,
- 'out_packets': 1000, 'rx_throughput_mbps': 10,
- 'tx_throughput_mbps': 10, 'rx_throughput_fps': 20}}
- self.assertDictEqual(expected,
- r_f_c2544_profile.get_drop_percentage(
- traffic_generator, samples,
- tol_min, tolerance))
+ samples[name] = {
+ "rx_throughput_fps": 20,
+ "tx_throughput_fps": 20,
+ "rx_throughput_mbps": 10,
+ "tx_throughput_mbps": 10,
+ "in_packets": 1000,
+ "out_packets": 1000,
+ }
+
+ expected = {
+ 'DropPercentage': 0.0,
+ 'RxThroughput': 100 / 3.0,
+ 'TxThroughput': 100 / 3.0,
+ 'CurrentDropPercentage': 0.0,
+ 'Throughput': 66.66666666666667,
+ 'xe0': {
+ 'tx_throughput_fps': 20,
+ 'in_packets': 1000,
+ 'out_packets': 1000,
+ 'rx_throughput_mbps': 10,
+ 'tx_throughput_mbps': 10,
+ 'rx_throughput_fps': 20,
+ },
+ }
+ traffic_generator.generate_samples = mock.MagicMock(return_value=samples)
+ traffic_generator.RUN_DURATION = 30
+ traffic_generator.rfc2544_helper.tolerance_low = 0.0001
+ traffic_generator.rfc2544_helper.tolerance_high = 0.0001
+ result = r_f_c2544_profile.get_drop_percentage(traffic_generator)
+ self.assertDictEqual(result, expected)
def test_get_drop_percentage_update(self):
- traffic_generator = mock.Mock(autospec=TrexProfile)
+ traffic_generator = mock.Mock(autospec=RFC2544Profile)
traffic_generator.my_ports = [0, 1]
- traffic_generator.client = \
- mock.Mock(return_value=True)
+ traffic_generator.priv_ports = [0]
+ traffic_generator.pub_ports = [1]
+ traffic_generator.client = mock.Mock(return_value=True)
+
r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
r_f_c2544_profile.params = self.PROFILE
- self.assertEqual(None, r_f_c2544_profile.execute(traffic_generator))
+ r_f_c2544_profile.register_generator(traffic_generator)
+ self.assertIsNone(r_f_c2544_profile.execute())
+
samples = {}
for ifname in range(1):
name = "xe{}".format(ifname)
- samples[name] = {"rx_throughput_fps": 20,
- "tx_throughput_fps": 20,
- "rx_throughput_mbps": 10,
- "tx_throughput_mbps": 10,
- "in_packets": 1000,
- "out_packets": 1002}
+ samples[name] = {
+ "rx_throughput_fps": 20,
+ "tx_throughput_fps": 20,
+ "rx_throughput_mbps": 10,
+ "tx_throughput_mbps": 10,
+ "in_packets": 1000,
+ "out_packets": 1002,
+ }
tol_min = 0.0
tolerance = 1.0
- expected = {'DropPercentage': 0.2, 'RxThroughput': 100/3.0,
- 'TxThroughput': 33.4, 'CurrentDropPercentage': 0.2,
- 'Throughput': 100/3.0,
- 'xe0': {'tx_throughput_fps': 20, 'in_packets': 1000,
- 'out_packets': 1002, 'rx_throughput_mbps': 10,
- 'tx_throughput_mbps': 10, 'rx_throughput_fps': 20}}
- self.assertDictEqual(expected,
- r_f_c2544_profile.get_drop_percentage(
- traffic_generator, samples,
- tol_min, tolerance))
+ expected = {
+ 'DropPercentage': 0.1996,
+ 'RxThroughput': 33.333333333333336,
+ 'TxThroughput': 33.4,
+ 'CurrentDropPercentage': 0.1996,
+ 'Throughput': 66.66666666666667,
+ 'xe0': {
+ 'tx_throughput_fps': 20,
+ 'in_packets': 1000,
+ 'out_packets': 1002,
+ 'rx_throughput_mbps': 10,
+ 'tx_throughput_mbps': 10,
+ 'rx_throughput_fps': 20,
+ },
+ }
+ traffic_generator.generate_samples = mock.MagicMock(return_value=samples)
+ traffic_generator.RUN_DURATION = 30
+ traffic_generator.rfc2544_helper.tolerance_low = 0.0001
+ traffic_generator.rfc2544_helper.tolerance_high = 0.0001
+ result = r_f_c2544_profile.get_drop_percentage(traffic_generator)
+ self.assertDictEqual(expected, result)
def test_get_drop_percentage_div_zero(self):
traffic_generator = mock.Mock(autospec=TrexProfile)
traffic_generator.my_ports = [0, 1]
+ traffic_generator.priv_ports = [0]
+ traffic_generator.pub_ports = [1]
traffic_generator.client = \
mock.Mock(return_value=True)
r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
@@ -225,17 +262,23 @@ class TestRFC2544Profile(unittest.TestCase):
"out_packets": 0}
tol_min = 0.0
tolerance = 0.0
- r_f_c2544_profile.tmp_throughput = 0
- expected = {'DropPercentage': 100.0, 'RxThroughput': 100/3.0,
- 'TxThroughput': 0.0, 'CurrentDropPercentage': 100.0,
- 'Throughput': 100/3.0,
- 'xe0': {'tx_throughput_fps': 20, 'in_packets': 1000,
- 'out_packets': 0, 'rx_throughput_mbps': 10,
- 'tx_throughput_mbps': 10, 'rx_throughput_fps': 20}}
+ r_f_c2544_profile.throughput_max = 0
+ expected = {
+ 'DropPercentage': 100.0, 'RxThroughput': 100 / 3.0,
+ 'TxThroughput': 0.0, 'CurrentDropPercentage': 100.0,
+ 'Throughput': 66.66666666666667,
+ 'xe0': {
+ 'tx_throughput_fps': 20, 'in_packets': 1000,
+ 'out_packets': 0, 'rx_throughput_mbps': 10,
+ 'tx_throughput_mbps': 10, 'rx_throughput_fps': 20
+ }
+ }
+ traffic_generator.generate_samples = mock.MagicMock(return_value=samples)
+ traffic_generator.RUN_DURATION = 30
+ traffic_generator.rfc2544_helper.tolerance_low = 0.0001
+ traffic_generator.rfc2544_helper.tolerance_high = 0.0001
self.assertDictEqual(expected,
- r_f_c2544_profile.get_drop_percentage(
- traffic_generator, samples,
- tol_min, tolerance))
+ r_f_c2544_profile.get_drop_percentage(traffic_generator))
def test_get_multiplier(self):
r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
@@ -243,5 +286,56 @@ class TestRFC2544Profile(unittest.TestCase):
r_f_c2544_profile.min_rate = 100
self.assertEqual("1.0", r_f_c2544_profile.get_multiplier())
+ def test_calculate_pps(self):
+ r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
+ r_f_c2544_profile.rate = 100
+ r_f_c2544_profile.pps = 100
+ samples = {'Throughput': 4549093.33}
+ self.assertEqual((2274546.67, 1.0),
+ r_f_c2544_profile.calculate_pps(samples))
+
+ def test_create_single_stream(self):
+ r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
+ r_f_c2544_profile._create_single_packet = mock.MagicMock()
+ r_f_c2544_profile.pg_id = 1
+ self.assertIsNotNone(
+ r_f_c2544_profile.create_single_stream(64, 2274546.67))
+
+ def test_create_single_stream_no_pg_id(self):
+ r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
+ r_f_c2544_profile._create_single_packet = mock.MagicMock()
+ r_f_c2544_profile.pg_id = 0
+ self.assertIsNotNone(
+ r_f_c2544_profile.create_single_stream(64, 2274546.67))
+
+ def test_execute_latency(self):
+ traffic_generator = mock.Mock(autospec=TrexProfile)
+ traffic_generator.my_ports = [0, 1]
+ traffic_generator.priv_ports = [-1]
+ traffic_generator.pub_ports = [1]
+ traffic_generator.client = \
+ mock.Mock(return_value=True)
+ r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
+ r_f_c2544_profile.params = self.PROFILE
+ r_f_c2544_profile.first_run = True
+ samples = {}
+ for ifname in range(1):
+ name = "xe{}".format(ifname)
+ samples[name] = {"rx_throughput_fps": 20,
+ "tx_throughput_fps": 20,
+ "rx_throughput_mbps": 10,
+ "tx_throughput_mbps": 10,
+ "in_packets": 1000,
+ "out_packets": 0}
+
+ samples['Throughput'] = 4549093.33
+ r_f_c2544_profile.calculate_pps = mock.Mock(return_value=[2274546.67,
+ 1.0])
+
+ self.assertEqual(None,
+ r_f_c2544_profile.execute_latency(traffic_generator,
+ samples))
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/tests/unit/network_services/traffic_profile/test_traffic_profile.py b/tests/unit/network_services/traffic_profile/test_traffic_profile.py
index ec07e83a6..fd769e6e0 100644
--- a/tests/unit/network_services/traffic_profile/test_traffic_profile.py
+++ b/tests/unit/network_services/traffic_profile/test_traffic_profile.py
@@ -307,15 +307,15 @@ class TestTrexProfile(unittest.TestCase):
trex_profile = \
TrexProfile(TrafficProfile)
trex_profile.params = self.PROFILE
- trex_profile.profile_data = self.PROFILE["private"]
- self.assertIsNotNone(trex_profile.get_streams())
+ profile_data = self.PROFILE["private"]
+ self.assertIsNotNone(trex_profile.get_streams(profile_data))
trex_profile.pg_id = 1
- self.assertIsNotNone(trex_profile.get_streams())
+ self.assertIsNotNone(trex_profile.get_streams(profile_data))
trex_profile.params = self.PROFILE_v6
trex_profile.profile_data = self.PROFILE_v6["private"]
- self.assertIsNotNone(trex_profile.get_streams())
+ self.assertIsNotNone(trex_profile.get_streams(profile_data))
trex_profile.pg_id = 1
- self.assertIsNotNone(trex_profile.get_streams())
+ self.assertIsNotNone(trex_profile.get_streams(profile_data))
def test_generate_packets(self):
trex_profile = \
diff --git a/tests/unit/network_services/vnf_generic/test_vnfdgen.py b/tests/unit/network_services/vnf_generic/test_vnfdgen.py
index 6d5fb0c7a..be51e4a43 100644
--- a/tests/unit/network_services/vnf_generic/test_vnfdgen.py
+++ b/tests/unit/network_services/vnf_generic/test_vnfdgen.py
@@ -185,26 +185,21 @@ class TestVnfdGen(unittest.TestCase):
generated_tp = vnfdgen.generate_vnfd(TRAFFIC_PROFILE_TPL, {"imix": {}})
self.assertDictEqual(TRAFFIC_PROFILE, generated_tp)
- def test_dict_flatten_empty_dict(self):
- self.assertEqual(vnfdgen.dict_key_flatten({}), {})
+ def test_deepgetitem(self):
+ d = {'a': 1, 'b': 2}
+ self.assertEqual(vnfdgen.deepgetitem(d, "a"), 1)
def test_dict_flatten_int(self):
d = {'a': 1, 'b': 2}
- self.assertEqual(vnfdgen.dict_key_flatten(d), d)
-
- def test_dict_flatten_str(self):
- d = {'a': "1", 'b': '2'}
- self.assertEqual(vnfdgen.dict_key_flatten(d), d)
+ self.assertEqual(vnfdgen.deepgetitem(d, "a"), 1)
def test_dict_flatten_list(self):
d = {'a': 1, 'b': list(range(2))}
- self.assertEqual(vnfdgen.dict_key_flatten(d),
- {'a': 1, 'b0': 0, 'b1': 1})
+ self.assertEqual(vnfdgen.deepgetitem(d, "b.0"), 0)
def test_dict_flatten_dict(self):
d = {'a': 1, 'b': {x: x for x in list(range(2))}}
- self.assertEqual(vnfdgen.dict_key_flatten(d),
- {'a': 1, 'b.0': 0, 'b.1': 1})
+ self.assertEqual(vnfdgen.deepgetitem(d, "b.0"), 0)
def test_generate_tp_single_var(self):
""" Function to verify traffic profile generation with imix """
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_base.py b/tests/unit/network_services/vnf_generic/vnf/test_base.py
index 9f2912d1b..e4f4450ce 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_base.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_base.py
@@ -19,6 +19,7 @@
from __future__ import absolute_import
import unittest
+import os
import mock
from multiprocessing import Queue
@@ -34,6 +35,34 @@ IP_PIPELINE_ND_CFG_FILE_TPL = """
nd_route_tbl = ({port1_dst_ip_hex6},"""
"""{port1_dst_netmask_hex6},1,{port1_dst_ip_hex6})"""
+_LOCAL_OBJECT = object()
+
+
+class FileAbsPath(object):
+ def __init__(self, module_file):
+ super(FileAbsPath, self).__init__()
+ self.module_path = os.path.dirname(os.path.abspath(module_file))
+
+ def get_path(self, filename):
+ file_path = os.path.join(self.module_path, filename)
+ return file_path
+
+
+def mock_ssh(ssh, spec=None, exec_result=_LOCAL_OBJECT, run_result=_LOCAL_OBJECT):
+ if spec is None:
+ spec = ssh.SSH
+
+ if exec_result is _LOCAL_OBJECT:
+ exec_result = 0, "", ""
+
+ if run_result is _LOCAL_OBJECT:
+ run_result = 0, "", ""
+
+ ssh_mock = mock.Mock(autospec=spec)
+ ssh_mock.execute = mock.Mock(return_value=exec_result)
+ ssh_mock.run = mock.Mock(return_value=run_result)
+ ssh.from_node.return_value = ssh_mock
+
class TestQueueFileWrapper(unittest.TestCase):
def setUp(self):
@@ -52,6 +81,7 @@ class TestQueueFileWrapper(unittest.TestCase):
queue_file_wrapper.bufsize = 5
queue_file_wrapper.write("pipeline>")
queue_file_wrapper.close()
+ self.assertIsNone(queue_file_wrapper.clear())
self.assertIsNotNone(queue_file_wrapper.q_out.empty())
def test_close(self):
@@ -73,198 +103,168 @@ class TestQueueFileWrapper(unittest.TestCase):
class TestGenericVNF(unittest.TestCase):
- VNFD = {'vnfd:vnfd-catalog':
- {'vnfd':
- [{'short-name': 'VpeVnf',
- 'vdu':
- [{'routing_table':
- [{'network': '152.16.100.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.100.20',
- 'if': 'xe0'},
- {'network': '152.16.40.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.40.20',
- 'if': 'xe1'}],
- 'description': 'VPE approximation using DPDK',
- 'name': 'vpevnf-baremetal',
- 'nd_route_tbl':
- [{'network': '0064:ff9b:0:0:0:0:9810:6414',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
- 'if': 'xe0'},
- {'network': '0064:ff9b:0:0:0:0:9810:2814',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
- 'if': 'xe1'}],
- 'id': 'vpevnf-baremetal',
- 'external-interface':
- [{'virtual-interface':
- {'dst_mac': '00:00:00:00:00:03',
- 'vpci': '0000:05:00.0',
- 'local_ip': '152.16.100.19',
- 'type': 'PCI-PASSTHROUGH',
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '0',
- 'bandwidth': '10 Gbps',
- 'dst_ip': '152.16.100.20',
- 'local_mac': '00:00:00:00:00:01'},
- 'vnfd-connection-point-ref': 'xe0',
- 'name': 'xe0'},
- {'virtual-interface':
- {'dst_mac': '00:00:00:00:00:04',
- 'vpci': '0000:05:00.1',
- 'local_ip': '152.16.40.19',
- 'type': 'PCI-PASSTHROUGH',
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '1',
- 'bandwidth': '10 Gbps',
- 'dst_ip': '152.16.40.20',
- 'local_mac': '00:00:00:00:00:02'},
- 'vnfd-connection-point-ref': 'xe1',
- 'name': 'xe1'}]}],
- 'description': 'Vpe approximation using DPDK',
- 'mgmt-interface':
- {'vdu-id': 'vpevnf-baremetal',
- 'host': '1.1.1.1',
- 'password': 'r00t',
- 'user': 'root',
- 'ip': '1.1.1.1'},
- 'benchmark':
- {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']},
- 'connection-point': [{'type': 'VPORT', 'name': 'xe0'},
- {'type': 'VPORT', 'name': 'xe1'}],
- 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}}
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.100.20',
+ 'local_mac': '00:00:00:00:00:01'
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1'
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ]
+ }
+ }
def test___init__(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- assert generic_vn_f.kpi
+ generic_vnf = GenericVNF('vnf1', self.VNFD_0)
+ assert generic_vnf.kpi
def test_collect_kpi(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- self.assertRaises(NotImplementedError, generic_vn_f.collect_kpi)
-
- def test_get_ip_version(self):
- ip_addr = "152.16.1.1"
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- self.assertEqual(4, generic_vn_f.get_ip_version(ip_addr))
-
- @mock.patch('yardstick.network_services.vnf_generic.vnf.base.LOG')
- def test_get_ip_version_error(self, mock_LOG):
- ip_addr = "152.16.1.1.1"
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- self.assertRaises(ValueError, generic_vn_f.get_ip_version(ip_addr))
-
- def test_ip_to_hex(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- hex_ip = generic_vn_f._ip_to_hex("192.168.10.1")
- self.assertEqual("C0A80A01", hex_ip)
-
- def test_append_routes(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- arp_route = generic_vn_f._append_routes(IP_PIPELINE_CFG_FILE_TPL)
- expected = '\narp_route_tbl = (98106414,FFFFFF00,0,98106414)' \
- ' (98102814,FFFFFF00,1,98102814)\n,'
- self.assertEqual(expected, arp_route)
-
- def test_append_nd_routes(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- nd_route = generic_vn_f._append_nd_routes(IP_PIPELINE_ND_CFG_FILE_TPL)
- expected = '\nnd_route_tbl = (0064:ff9b:0:0:0:0:9810:6414,112,0,' \
- '0064:ff9b:0:0:0:0:9810:6414) '\
- '(0064:ff9b:0:0:0:0:9810:2814,112,'\
- '1,0064:ff9b:0:0:0:0:9810:2814)\n,'
- self.assertEqual(expected, nd_route)
-
- def test_get_port0localip6(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- port0_v6 = generic_vn_f._get_port0localip6()
- expected = '0064:ff9b:0:0:0:0:9810:6414'
- self.assertEqual(expected, port0_v6)
-
- def test_get_port1localip6(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- port1_v6 = generic_vn_f._get_port1localip6()
- expected = '0064:ff9b:0:0:0:0:9810:2814'
- self.assertEqual(expected, port1_v6)
-
- def test_get_port0prefixip6(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- port0_v6 = generic_vn_f._get_port0prefixlen6()
- self.assertEqual('112', port0_v6)
-
- def test_get_port1prefixip6(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- port1_v6 = generic_vn_f._get_port1prefixlen6()
- self.assertEqual('112', port1_v6)
-
- def test_get_port0gateway6(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- port0_v6 = generic_vn_f._get_port0gateway6()
- self.assertEqual('0064:ff9b:0:0:0:0:9810:6414', port0_v6)
-
- def test_get_port1gateway6(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- port1_v6 = generic_vn_f._get_port1gateway6()
- self.assertEqual('0064:ff9b:0:0:0:0:9810:2814', port1_v6)
-
- def test_get_dpdk_port_num(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- port_num = generic_vn_f._get_dpdk_port_num('xe0')
- self.assertEqual('0', port_num)
+ generic_vnf = GenericVNF('vnf1', self.VNFD_0)
+ self.assertRaises(NotImplementedError, generic_vnf.collect_kpi)
def test__get_kpi_definition(self):
vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- generic_vn_f = GenericVNF(vnfd)
- kpi = \
- generic_vn_f._get_kpi_definition(vnfd)
+ generic_vnf = GenericVNF('vnf1', vnfd)
+ kpi = generic_vnf._get_kpi_definition()
self.assertEqual(kpi, ['packets_in', 'packets_fwd', 'packets_dropped'])
def test_instantiate(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- self.assertRaises(NotImplementedError,
- generic_vn_f.instantiate, {}, {})
+ generic_vnf = GenericVNF('vnf1', self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
+ with self.assertRaises(NotImplementedError):
+ generic_vnf.instantiate({}, {})
def test_scale(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- self.assertRaises(NotImplementedError, generic_vn_f.scale)
+ generic_vnf = GenericVNF('vnf1', self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
+ with self.assertRaises(NotImplementedError):
+ generic_vnf.scale()
def test_terminate(self):
- generic_vn_f = GenericVNF(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- self.assertRaises(NotImplementedError, generic_vn_f.terminate)
+ generic_vnf = GenericVNF('vnf1', self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
+ with self.assertRaises(NotImplementedError):
+ generic_vnf.terminate()
class TestGenericTrafficGen(unittest.TestCase):
def test___init__(self):
vnfd = TestGenericVNF.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- generic_traffic_gen = \
- GenericTrafficGen(vnfd)
- assert generic_traffic_gen.name == "tgen__1"
+ generic_traffic_gen = GenericTrafficGen('vnf1', vnfd)
+ assert generic_traffic_gen.name == "vnf1"
def test_listen_traffic(self):
vnfd = TestGenericVNF.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- generic_traffic_gen = \
- GenericTrafficGen(vnfd)
+ generic_traffic_gen = GenericTrafficGen('vnf1', vnfd)
traffic_profile = {}
self.assertIsNone(generic_traffic_gen.listen_traffic(traffic_profile))
def test_run_traffic(self):
vnfd = TestGenericVNF.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- generic_traffic_gen = \
- GenericTrafficGen(vnfd)
+ generic_traffic_gen = GenericTrafficGen('vnf1', vnfd)
traffic_profile = {}
self.assertRaises(NotImplementedError,
generic_traffic_gen.run_traffic, traffic_profile)
def test_terminate(self):
vnfd = TestGenericVNF.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- generic_traffic_gen = \
- GenericTrafficGen(vnfd)
+ generic_traffic_gen = GenericTrafficGen('vnf1', vnfd)
self.assertRaises(NotImplementedError, generic_traffic_gen.terminate)
def test_verify_traffic(self):
vnfd = TestGenericVNF.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- generic_traffic_gen = \
- GenericTrafficGen(vnfd)
+ generic_traffic_gen = GenericTrafficGen('vnf1', vnfd)
traffic_profile = {}
self.assertIsNone(generic_traffic_gen.verify_traffic(traffic_profile))
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
new file mode 100644
index 000000000..af0d2ddde
--- /dev/null
+++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
@@ -0,0 +1,2239 @@
+#!/usr/bin/env python
+
+# Copyright (c) 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.
+#
+
+# Unittest for yardstick.network_services.vnf_generic.vnf.sample_vnf
+
+from __future__ import absolute_import
+import unittest
+import mock
+from copy import deepcopy
+
+from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh
+from yardstick.benchmark.contexts.base import Context
+from yardstick.network_services.nfvi.resource import ResourceProfile
+from yardstick.network_services.traffic_profile.base import TrafficProfile
+from yardstick.network_services.vnf_generic.vnf.base import VnfdHelper
+from yardstick.ssh import SSHError
+
+
+class MockError(BaseException):
+ pass
+
+
+STL_MOCKS = {
+ 'stl': mock.MagicMock(),
+ 'stl.trex_stl_lib': mock.MagicMock(),
+ 'stl.trex_stl_lib.base64': mock.MagicMock(),
+ 'stl.trex_stl_lib.binascii': mock.MagicMock(),
+ 'stl.trex_stl_lib.collections': mock.MagicMock(),
+ 'stl.trex_stl_lib.copy': mock.MagicMock(),
+ 'stl.trex_stl_lib.datetime': mock.MagicMock(),
+ 'stl.trex_stl_lib.functools': mock.MagicMock(),
+ 'stl.trex_stl_lib.imp': mock.MagicMock(),
+ 'stl.trex_stl_lib.inspect': mock.MagicMock(),
+ 'stl.trex_stl_lib.json': mock.MagicMock(),
+ 'stl.trex_stl_lib.linecache': mock.MagicMock(),
+ 'stl.trex_stl_lib.math': mock.MagicMock(),
+ 'stl.trex_stl_lib.os': mock.MagicMock(),
+ 'stl.trex_stl_lib.platform': mock.MagicMock(),
+ 'stl.trex_stl_lib.pprint': mock.MagicMock(),
+ 'stl.trex_stl_lib.random': mock.MagicMock(),
+ 'stl.trex_stl_lib.re': mock.MagicMock(),
+ 'stl.trex_stl_lib.scapy': mock.MagicMock(),
+ 'stl.trex_stl_lib.socket': mock.MagicMock(),
+ 'stl.trex_stl_lib.string': mock.MagicMock(),
+ 'stl.trex_stl_lib.struct': mock.MagicMock(),
+ 'stl.trex_stl_lib.sys': mock.MagicMock(),
+ 'stl.trex_stl_lib.threading': mock.MagicMock(),
+ 'stl.trex_stl_lib.time': mock.MagicMock(),
+ 'stl.trex_stl_lib.traceback': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_async_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_exceptions': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_ext': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_jsonrpc_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_packet_builder_interface': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_packet_builder_scapy': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_port': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_stats': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_streams': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_types': mock.MagicMock(),
+ 'stl.trex_stl_lib.types': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.argparse': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.collections': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.common': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.json': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.os': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.parsing_opts': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.pwd': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.random': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.re': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.string': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.sys': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.text_opts': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.text_tables': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.texttable': mock.MagicMock(),
+ 'stl.trex_stl_lib.warnings': mock.MagicMock(),
+ 'stl.trex_stl_lib.yaml': mock.MagicMock(),
+ 'stl.trex_stl_lib.zlib': mock.MagicMock(),
+ 'stl.trex_stl_lib.zmq': mock.MagicMock(),
+}
+
+STLClient = mock.MagicMock()
+stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
+stl_patch.start()
+
+if stl_patch:
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import VnfSshHelper
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFDeployHelper
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import ScenarioHelper
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import ResourceHelper
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import Rfc2544ResourceHelper
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import SetupEnvHelper
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTrafficGen
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import DpdkVnfSetupEnvHelper
+
+
+class TestVnfSshHelper(unittest.TestCase):
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.100.20',
+ 'local_mac': '00:00:00:00:00:01'
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1'
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ]
+ }
+ }
+
+ def assertAll(self, iterable, message=None):
+ self.assertTrue(all(iterable), message)
+
+ def test_get_class(self):
+ self.assertIs(VnfSshHelper.get_class(), VnfSshHelper)
+
+ @mock.patch('yardstick.ssh.paramiko')
+ def test_copy(self, _):
+ ssh_helper = VnfSshHelper(self.VNFD_0['mgmt-interface'], 'my/bin/path')
+ ssh_helper._run = mock.Mock()
+
+ ssh_helper.execute('ls')
+ self.assertTrue(ssh_helper.is_connected)
+ result = ssh_helper.copy()
+ self.assertIsInstance(result, VnfSshHelper)
+ self.assertFalse(result.is_connected)
+ self.assertEqual(result.bin_path, ssh_helper.bin_path)
+ self.assertEqual(result.host, ssh_helper.host)
+ self.assertEqual(result.port, ssh_helper.port)
+ self.assertEqual(result.user, ssh_helper.user)
+ self.assertEqual(result.password, ssh_helper.password)
+ self.assertEqual(result.key_filename, ssh_helper.key_filename)
+
+ @mock.patch('yardstick.ssh.paramiko')
+ def test_upload_config_file(self, mock_paramiko):
+ ssh_helper = VnfSshHelper(self.VNFD_0['mgmt-interface'], 'my/bin/path')
+
+ self.assertFalse(ssh_helper.is_connected)
+ cfg_file = ssh_helper.upload_config_file('my/prefix', 'my content')
+ self.assertTrue(ssh_helper.is_connected)
+ self.assertEqual(mock_paramiko.SSHClient.call_count, 1)
+ self.assertTrue(cfg_file.startswith('/tmp'))
+
+ cfg_file = ssh_helper.upload_config_file('/my/prefix', 'my content')
+ self.assertTrue(ssh_helper.is_connected)
+ self.assertEqual(mock_paramiko.SSHClient.call_count, 1)
+ self.assertEqual(cfg_file, '/my/prefix')
+
+ def test_join_bin_path(self):
+ ssh_helper = VnfSshHelper(self.VNFD_0['mgmt-interface'], 'my/bin/path')
+
+ expected_start = 'my'
+ expected_middle_list = ['bin']
+ expected_end = 'path'
+ result = ssh_helper.join_bin_path()
+ self.assertTrue(result.startswith(expected_start))
+ self.assertAll(middle in result for middle in expected_middle_list)
+ self.assertTrue(result.endswith(expected_end))
+
+ expected_middle_list.append(expected_end)
+ expected_end = 'some_file.sh'
+ result = ssh_helper.join_bin_path('some_file.sh')
+ self.assertTrue(result.startswith(expected_start))
+ self.assertAll(middle in result for middle in expected_middle_list)
+ self.assertTrue(result.endswith(expected_end))
+
+ expected_middle_list.append('some_dir')
+ expected_end = 'some_file.sh'
+ result = ssh_helper.join_bin_path('some_dir', 'some_file.sh')
+ self.assertTrue(result.startswith(expected_start))
+ self.assertAll(middle in result for middle in expected_middle_list)
+ self.assertTrue(result.endswith(expected_end))
+
+ @mock.patch('yardstick.ssh.paramiko')
+ @mock.patch('yardstick.ssh.provision_tool')
+ def test_provision_tool(self, mock_provision_tool, mock_paramiko):
+ ssh_helper = VnfSshHelper(self.VNFD_0['mgmt-interface'], 'my/bin/path')
+
+ self.assertFalse(ssh_helper.is_connected)
+ ssh_helper.provision_tool()
+ self.assertTrue(ssh_helper.is_connected)
+ self.assertEqual(mock_paramiko.SSHClient.call_count, 1)
+ self.assertEqual(mock_provision_tool.call_count, 1)
+
+ ssh_helper.provision_tool(tool_file='my_tool.sh')
+ self.assertTrue(ssh_helper.is_connected)
+ self.assertEqual(mock_paramiko.SSHClient.call_count, 1)
+ self.assertEqual(mock_provision_tool.call_count, 2)
+
+ ssh_helper.provision_tool('tool_path', 'my_tool.sh')
+ self.assertTrue(ssh_helper.is_connected)
+ self.assertEqual(mock_paramiko.SSHClient.call_count, 1)
+ self.assertEqual(mock_provision_tool.call_count, 3)
+
+
+class TestSetupEnvHelper(unittest.TestCase):
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.100.20',
+ 'local_mac': '00:00:00:00:00:01'
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1'
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'
+ }
+
+ def test_build_config(self):
+ setup_env_helper = SetupEnvHelper(mock.Mock(), mock.Mock(), mock.Mock())
+
+ with self.assertRaises(NotImplementedError):
+ setup_env_helper.build_config()
+
+ def test__get_ports_gateway(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ setup_env_helper = SetupEnvHelper(vnfd_helper, mock.Mock(), mock.Mock())
+ result = setup_env_helper._get_ports_gateway("xe0")
+ self.assertEqual(result, "152.16.100.20")
+
+ result = setup_env_helper._get_ports_gateway("xe123")
+ self.assertIsNone(result)
+
+ def test_setup_vnf_environment(self):
+ setup_env_helper = SetupEnvHelper(mock.Mock(), mock.Mock(), mock.Mock())
+ self.assertIsNone(setup_env_helper.setup_vnf_environment())
+
+ def test_tear_down(self):
+ setup_env_helper = SetupEnvHelper(mock.Mock(), mock.Mock(), mock.Mock())
+
+ with self.assertRaises(NotImplementedError):
+ setup_env_helper.tear_down()
+
+
+class TestDpdkVnfSetupEnvHelper(unittest.TestCase):
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.0',
+ 'driver': 'i40e',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.100.20',
+ 'local_mac': '00:00:00:00:00:01'
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.1',
+ 'driver': 'ixgbe',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1'
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ]
+ }
+ }
+
+ def test__update_packet_type(self):
+ ip_pipeline_cfg = 'pkt_type = ipv4'
+ pkt_type = {'pkt_type': '1'}
+
+ expected = "pkt_type = 1"
+ result = DpdkVnfSetupEnvHelper._update_packet_type(ip_pipeline_cfg, pkt_type)
+ self.assertEqual(result, expected)
+
+ def test__update_packet_type_no_op(self):
+ ip_pipeline_cfg = 'pkt_type = ipv6'
+ pkt_type = {'pkt_type': '1'}
+
+ expected = "pkt_type = ipv6"
+ result = DpdkVnfSetupEnvHelper._update_packet_type(ip_pipeline_cfg, pkt_type)
+ self.assertEqual(result, expected)
+
+ def test__update_packet_type_multi_op(self):
+ ip_pipeline_cfg = 'pkt_type = ipv4\npkt_type = 1\npkt_type = ipv4'
+ pkt_type = {'pkt_type': '1'}
+
+ expected = 'pkt_type = 1\npkt_type = 1\npkt_type = 1'
+ result = DpdkVnfSetupEnvHelper._update_packet_type(ip_pipeline_cfg, pkt_type)
+ self.assertEqual(result, expected)
+
+ def test__update_traffic_type(self):
+ ip_pipeline_cfg = 'pkt_type = ipv4'
+
+ traffic_options = {"vnf_type": DpdkVnfSetupEnvHelper.APP_NAME, 'traffic_type': 4}
+ expected = "pkt_type = ipv4"
+ result = DpdkVnfSetupEnvHelper._update_traffic_type(ip_pipeline_cfg, traffic_options)
+ self.assertEqual(result, expected)
+
+ def test__update_traffic_type_ipv6(self):
+ ip_pipeline_cfg = 'pkt_type = ipv4'
+
+ traffic_options = {"vnf_type": DpdkVnfSetupEnvHelper.APP_NAME, 'traffic_type': 6}
+ expected = "pkt_type = ipv6"
+ result = DpdkVnfSetupEnvHelper._update_traffic_type(ip_pipeline_cfg, traffic_options)
+ self.assertEqual(result, expected)
+
+ def test__update_traffic_type_not_app_name(self):
+ ip_pipeline_cfg = 'traffic_type = 4'
+
+ vnf_type = ''.join(["Not", DpdkVnfSetupEnvHelper.APP_NAME])
+ traffic_options = {"vnf_type": vnf_type, 'traffic_type': 8}
+ expected = "traffic_type = 8"
+ result = DpdkVnfSetupEnvHelper._update_traffic_type(ip_pipeline_cfg, traffic_options)
+ self.assertEqual(result, expected)
+
+ def test__setup_hugepages(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.return_value = 0, '', ''
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+
+ result = dpdk_setup_helper._setup_hugepages()
+ expect_start_list = ['awk', 'awk', 'echo']
+ expect_in_list = ['meminfo', 'nr_hugepages', '16']
+ call_args_iter = (args[0][0] for args in ssh_helper.execute.call_args_list)
+ self.assertIsNone(result)
+ self.assertEqual(ssh_helper.execute.call_count, 3)
+ for expect_start, expect_in, arg0 in zip(expect_start_list, expect_in_list, call_args_iter):
+ self.assertTrue(arg0.startswith(expect_start))
+ self.assertIn(expect_in, arg0)
+
+ def test__setup_hugepages_2_mb(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.return_value = 0, '2048kB ', ''
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+
+ result = dpdk_setup_helper._setup_hugepages()
+ expect_start_list = ['awk', 'awk', 'echo']
+ expect_in_list = ['meminfo', 'nr_hugepages', '16384']
+ call_args_iter = (args[0][0] for args in ssh_helper.execute.call_args_list)
+ self.assertIsNone(result)
+ self.assertEqual(ssh_helper.execute.call_count, 3)
+ for expect_start, expect_in, arg0 in zip(expect_start_list, expect_in_list, call_args_iter):
+ self.assertTrue(arg0.startswith(expect_start))
+ self.assertIn(expect_in, arg0)
+
+ def test__get_dpdk_port_num(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ expected = '0'
+ result = dpdk_setup_helper._get_dpdk_port_num('xe0')
+ self.assertEqual(result, expected)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.open')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.find_relative_file')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.MultiPortConfig')
+ def test_build_config(self, mock_multi_port_config_class, mock_find, _):
+ mock_multi_port_config = mock_multi_port_config_class()
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ scenario_helper.vnf_cfg = {}
+ scenario_helper.all_options = {}
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper.all_ports = []
+
+ dpdk_setup_helper.PIPELINE_COMMAND = expected = 'pipeline command'
+ result = dpdk_setup_helper.build_config()
+ self.assertEqual(result, expected)
+ self.assertGreaterEqual(ssh_helper.upload_config_file.call_count, 2)
+ self.assertGreaterEqual(mock_find.call_count, 1)
+ self.assertGreaterEqual(mock_multi_port_config.generate_config.call_count, 1)
+ self.assertGreaterEqual(mock_multi_port_config.generate_script.call_count, 1)
+
+ def test__build_pipeline_kwargs(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.provision_tool.return_value = 'tool_path'
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper.CFG_CONFIG = 'config'
+ dpdk_setup_helper.CFG_SCRIPT = 'script'
+ dpdk_setup_helper.all_ports = [3, 4, 5]
+ dpdk_setup_helper.pipeline_kwargs = {}
+
+ expected = {
+ 'cfg_file': 'config',
+ 'script': 'script',
+ 'ports_len_hex': '0xf',
+ 'tool_path': 'tool_path',
+ }
+ dpdk_setup_helper._build_pipeline_kwargs()
+ self.assertDictEqual(dpdk_setup_helper.pipeline_kwargs, expected)
+
+ def test__get_app_cpu(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.provision_tool.return_value = 'tool_path'
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+
+ dpdk_setup_helper.CORES = expected = [5, 4, 3]
+ result = dpdk_setup_helper._get_app_cpu()
+ self.assertEqual(result, expected)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.CpuSysCores')
+ def test__get_app_cpu_no_cores_sw(self, mock_cpu_sys_cores_class):
+ mock_cpu_sys_cores = mock_cpu_sys_cores_class()
+ mock_cpu_sys_cores.get_core_socket.return_value = {
+ 'socket': [2, 4, 8, 10, 12],
+ }
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.provision_tool.return_value = 'tool_path'
+ scenario_helper = mock.Mock()
+ scenario_helper.vnf_cfg = {
+ 'worker_threads': '2',
+ }
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper.CORES = []
+ dpdk_setup_helper.SW_DEFAULT_CORE = 1
+ dpdk_setup_helper.HW_DEFAULT_CORE = 2
+ dpdk_setup_helper.socket = 'socket'
+
+ expected = [2, 4, 8]
+ result = dpdk_setup_helper._get_app_cpu()
+ self.assertEqual(result, expected)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.CpuSysCores')
+ def test__get_app_cpu_no_cores_hw(self, mock_cpu_sys_cores_class):
+ mock_cpu_sys_cores = mock_cpu_sys_cores_class()
+ mock_cpu_sys_cores.get_core_socket.return_value = {
+ 'socket': [2, 4, 8, 10, 12],
+ }
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ scenario_helper.vnf_cfg = {
+ 'worker_threads': '2',
+ 'lb_config': 'HW',
+ }
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper.CORES = []
+ dpdk_setup_helper.SW_DEFAULT_CORE = 1
+ dpdk_setup_helper.HW_DEFAULT_CORE = 2
+ dpdk_setup_helper.socket = 'socket'
+
+ expected = [2, 4, 8, 10]
+ result = dpdk_setup_helper._get_app_cpu()
+ self.assertEqual(result, expected)
+
+ def test__get_cpu_sibling_list(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.side_effect = iter([(0, '5', ''), (0, '3,4', ''), (0, '10', '')])
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._get_app_cpu = mock.Mock(return_value=[])
+
+ expected = ['5', '3', '4', '10']
+ result = dpdk_setup_helper._get_cpu_sibling_list([1, 3, 7])
+ self.assertEqual(result, expected)
+
+ def test__get_cpu_sibling_list_no_core_arg(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.side_effect = iter([(0, '5', ''), (0, '3,4', ''), (0, '10', '')])
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._get_app_cpu = mock.Mock(return_value=[1, 7])
+
+ expected = ['5', '3', '4']
+ result = dpdk_setup_helper._get_cpu_sibling_list()
+ self.assertEqual(result, expected)
+
+ def test__get_cpu_sibling_list_ssh_failure(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.side_effect = iter([(0, '5', ''), SSHError, (0, '10', '')])
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._get_app_cpu = mock.Mock(return_value=[])
+
+ expected = []
+ result = dpdk_setup_helper._get_cpu_sibling_list([1, 3, 7])
+ self.assertEqual(result, expected)
+
+ def test__validate_cpu_cfg(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.side_effect = iter([(0, '5', ''), (0, '3,4', ''), (0, '10', '')])
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._get_app_cpu = mock.Mock(return_value=[1, 3, 7])
+
+ expected = ['5', '3', '4', '10']
+ result = dpdk_setup_helper._validate_cpu_cfg()
+ self.assertEqual(result, expected)
+
+ def test__find_used_drivers(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ stdout = '''
+00:01.2 foo drv=name1
+00:01.4 drv foo=name2
+00:02.2 drv=name3
+00:02.3 drv=name4
+'''
+ ssh_helper.execute.return_value = 0, stdout, ''
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper.used_drivers = None
+ dpdk_setup_helper._dpdk_nic_bind = ''
+ dpdk_setup_helper.bound_pci = [
+ 'pci 00:01.2',
+ 'pci 00:02.3',
+ ]
+
+ expected = {
+ '00:01.2': (0, 'name1'),
+ '00:02.3': (2, 'name4'),
+ }
+ dpdk_setup_helper._find_used_drivers()
+ self.assertEqual(dpdk_setup_helper.used_drivers, expected)
+
+ def test_dpdk_nic_bind(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.provision_tool.return_value = nic_bind = object()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+
+ self.assertIsNone(dpdk_setup_helper._dpdk_nic_bind)
+ self.assertIs(dpdk_setup_helper.dpdk_nic_bind, nic_bind)
+ self.assertIs(dpdk_setup_helper.dpdk_nic_bind, nic_bind)
+ self.assertEqual(ssh_helper.provision_tool.call_count, 1)
+
+ # ensure provision tool is not called a second time
+ self.assertIs(dpdk_setup_helper.dpdk_nic_bind, nic_bind)
+ self.assertEqual(ssh_helper.provision_tool.call_count, 1)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
+ @mock.patch('yardstick.ssh.SSH')
+ def test_setup_vnf_environment(self, _, mock_time):
+ cores = ['3', '4']
+
+ vnfd_helper = VnfdHelper(deepcopy(self.VNFD_0))
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.return_value = 1, 'bad output', 'error output'
+ ssh_helper.join_bin_path.return_value = 'joined_path'
+ ssh_helper.provision_tool.return_value = 'provision string'
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._setup_hugepages = mock.Mock()
+ dpdk_setup_helper._validate_cpu_cfg = mock.Mock(return_value=cores)
+ dpdk_setup_helper._find_used_drivers = mock.Mock()
+ dpdk_setup_helper.used_drivers = {
+ '0000:05:00.0': (1, ''),
+ '0000:05:01.0': (3, ''),
+ }
+
+ result = dpdk_setup_helper.setup_vnf_environment()
+ self.assertIsInstance(result, ResourceProfile)
+ self.assertEqual(result.cores, cores)
+ self.assertEqual(vnfd_helper.interfaces[0]['dpdk_port_num'], 1)
+ self.assertNotIn('dpdk_port_num', vnfd_helper.interfaces[1])
+
+ def test__setup_dpdk_early_success(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.return_value = 0, 'output', ''
+ ssh_helper.join_bin_path.return_value = 'joined_path'
+ ssh_helper.provision_tool.return_value = 'provision string'
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._setup_hugepages = mock.Mock()
+
+ self.assertIsNone(dpdk_setup_helper._setup_dpdk())
+ self.assertEqual(dpdk_setup_helper.ssh_helper.execute.call_count, 2)
+
+ @mock.patch('yardstick.ssh.SSH')
+ def test__setup_dpdk_short(self, _):
+ def execute_side(cmd, *args, **kwargs):
+ if 'joined_path' in cmd:
+ return 0, 'output', ''
+ return 1, 'bad output', 'error output'
+
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.side_effect = execute_side
+ ssh_helper.join_bin_path.return_value = 'joined_path'
+ ssh_helper.provision_tool.return_value = 'provision string'
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._setup_hugepages = mock.Mock()
+
+ self.assertIsNone(dpdk_setup_helper._setup_dpdk())
+ self.assertEqual(dpdk_setup_helper.ssh_helper.execute.call_count, 3)
+
+ @mock.patch('yardstick.ssh.SSH')
+ def test__setup_resources(self, _):
+ vnfd_helper = VnfdHelper(deepcopy(self.VNFD_0))
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._validate_cpu_cfg = mock.Mock()
+
+ result = dpdk_setup_helper._setup_resources()
+ self.assertIsInstance(result, ResourceProfile)
+ self.assertEqual(dpdk_setup_helper.socket, 0)
+
+ @mock.patch('yardstick.ssh.SSH')
+ def test__setup_resources_socket_1(self, _):
+ vnfd_helper = VnfdHelper(deepcopy(self.VNFD_0))
+ vnfd_helper.interfaces[0]['virtual-interface']['vpci'] = '0000:55:00.0'
+ vnfd_helper.interfaces[1]['virtual-interface']['vpci'] = '0000:35:00.0'
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._validate_cpu_cfg = mock.Mock()
+
+ result = dpdk_setup_helper._setup_resources()
+ self.assertIsInstance(result, ResourceProfile)
+ self.assertEqual(dpdk_setup_helper.socket, 1)
+
+ def test__bind_dpdk_unforced(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+
+ dpdk_setup_helper._bind_dpdk('x', 'y', force=False)
+ self.assertNotIn('--force', ssh_helper.execute.call_args_list[0][0][0])
+
+ def test__detect_and_bind_dpdk_short(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.return_value = 0, 'output', ''
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+
+ self.assertIsNone(dpdk_setup_helper._detect_and_bind_dpdk('a', 'b'))
+ self.assertEqual(ssh_helper.execute.call_count, 1)
+
+ def test__detect_and_bind_dpdk_fail_to_bind(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.return_value = 1, 'bad output', 'error output'
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._bind_dpdk = mock.Mock()
+
+ self.assertIsNone(dpdk_setup_helper._detect_and_bind_dpdk('a', 'b'))
+ self.assertEqual(ssh_helper.execute.call_count, 2)
+
+ def test__detect_and_bind_dpdk(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ ssh_helper.execute.side_effect = iter([
+ (1, 'bad output', 'error output'),
+ (0, 'output', ''),
+ ])
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._bind_dpdk = mock.Mock()
+
+ self.assertEqual(dpdk_setup_helper._detect_and_bind_dpdk('a', 'b'), 'output')
+ self.assertEqual(ssh_helper.execute.call_count, 2)
+
+ def test__bind_kernel_devices(self):
+ bind_iter = iter([
+ None,
+ 'output',
+ ])
+
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._detect_and_bind_dpdk = mock.Mock(side_effect=bind_iter)
+
+ self.assertIsNone(dpdk_setup_helper._bind_kernel_devices())
+
+ def test_tear_down(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper._dpdk_nic_bind = 'a'
+ dpdk_setup_helper.used_drivers = {
+ '0000:05:00.0': (1, 'd1'),
+ '0000:05:01.0': (3, 'd3'),
+ }
+
+ self.assertIsNone(dpdk_setup_helper.tear_down())
+
+
+class TestResourceHelper(unittest.TestCase):
+
+ def test_setup(self):
+ resource = object()
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ dpdk_setup_helper.setup_vnf_environment = mock.Mock(return_value=resource)
+ resource_helper = ResourceHelper(dpdk_setup_helper)
+
+ self.assertIsNone(resource_helper.setup())
+ self.assertIs(resource_helper.resource, resource)
+
+ def test_generate_cfg(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ resource_helper = ResourceHelper(dpdk_setup_helper)
+
+ self.assertIsNone(resource_helper.generate_cfg())
+
+ def test_stop_collect(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ resource_helper = ResourceHelper(dpdk_setup_helper)
+ resource_helper.resource = mock.Mock()
+
+ self.assertIsNone(resource_helper.stop_collect())
+
+ def test_stop_collect_none(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ resource_helper = ResourceHelper(dpdk_setup_helper)
+ resource_helper.resource = None
+
+ self.assertIsNone(resource_helper.stop_collect())
+
+class TestClientResourceHelper(unittest.TestCase):
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.0',
+ 'driver': 'i40e',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.100.20',
+ 'local_mac': '00:00:00:00:00:01'
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.1',
+ 'driver': 'ixgbe',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:13',
+ 'vpci': '0000:05:00.2',
+ 'driver': 'ixgbe',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.30',
+ 'local_mac': '00:00:00:00:00:11'
+ },
+ 'vnfd-connection-point-ref': 'xe2',
+ 'name': 'xe2'
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1'
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ],
+ },
+ }
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.LOG')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.STLStateError',
+ new_callable=lambda: MockError)
+ def test_get_stats_not_connected(self, mock_state_error, mock_logger):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.MagicMock()
+ client_resource_helper.client.get_stats.side_effect = mock_state_error
+
+ self.assertEqual(client_resource_helper.get_stats(), {})
+ self.assertEqual(client_resource_helper.client.get_stats.call_count, 1)
+
+ def test_generate_samples(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.MagicMock()
+ client_resource_helper._vpci_ascending = [
+ '0000:05:00.0',
+ '0000:05:00.1',
+ '0000:05:00.2',
+ ]
+ client_resource_helper.client.get_stats.return_value = {
+ 0: {
+ 'rx_pps': 5.5,
+ 'tx_pps': 4.9,
+ 'rx_bps': 234.78,
+ 'tx_bps': 243.11,
+ 'ipackets': 34251,
+ 'opackets': 52342,
+ },
+ 1: {
+ 'tx_pps': 5.9,
+ 'rx_bps': 434.78,
+ 'opackets': 48791,
+ },
+ }
+
+ expected = {
+ 'xe0': {
+ "rx_throughput_fps": 5.5,
+ "tx_throughput_fps": 4.9,
+ "rx_throughput_mbps": 234.78,
+ "tx_throughput_mbps": 243.11,
+ "in_packets": 34251,
+ "out_packets": 52342,
+ },
+ 'xe1': {
+ "rx_throughput_fps": 0.0,
+ "tx_throughput_fps": 5.9,
+ "rx_throughput_mbps": 434.78,
+ "tx_throughput_mbps": 0.0,
+ "in_packets": 0,
+ "out_packets": 48791,
+ },
+ 'xe2': {
+ "rx_throughput_fps": 0.0,
+ "tx_throughput_fps": 0.0,
+ "rx_throughput_mbps": 0.0,
+ "tx_throughput_mbps": 0.0,
+ "in_packets": 0,
+ "out_packets": 0,
+ },
+ }
+ result = client_resource_helper.generate_samples()
+ self.assertDictEqual(result, expected)
+
+ def test_generate_samples_with_key(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.MagicMock()
+ client_resource_helper._vpci_ascending = [
+ '0000:05:00.0',
+ '0000:05:00.1',
+ ]
+ client_resource_helper.client.get_stats.return_value = {
+ 'key_name': 'key_value',
+ 0: {
+ 'rx_pps': 5.5,
+ 'tx_pps': 4.9,
+ 'rx_bps': 234.78,
+ 'tx_bps': 243.11,
+ 'ipackets': 34251,
+ 'opackets': 52342,
+ },
+ 1: {
+ 'tx_pps': 5.9,
+ 'rx_bps': 434.78,
+ 'opackets': 48791,
+ },
+ }
+
+ expected = {
+ 'xe0': {
+ 'key_name': 'key_value',
+ "rx_throughput_fps": 5.5,
+ "tx_throughput_fps": 4.9,
+ "rx_throughput_mbps": 234.78,
+ "tx_throughput_mbps": 243.11,
+ "in_packets": 34251,
+ "out_packets": 52342,
+ },
+ 'xe1': {
+ 'key_name': 'key_value',
+ "rx_throughput_fps": 0.0,
+ "tx_throughput_fps": 5.9,
+ "rx_throughput_mbps": 434.78,
+ "tx_throughput_mbps": 0.0,
+ "in_packets": 0,
+ "out_packets": 48791,
+ },
+ }
+ result = client_resource_helper.generate_samples('key_name')
+ self.assertDictEqual(result, expected)
+
+ def test_generate_samples_with_key_and_default(self):
+ vnfd_helper = VnfdHelper(self.VNFD_0)
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.MagicMock()
+ client_resource_helper._vpci_ascending = [
+ '0000:05:00.0',
+ '0000:05:00.1',
+ ]
+ client_resource_helper.client.get_stats.return_value = {
+ 0: {
+ 'rx_pps': 5.5,
+ 'tx_pps': 4.9,
+ 'rx_bps': 234.78,
+ 'tx_bps': 243.11,
+ 'ipackets': 34251,
+ 'opackets': 52342,
+ },
+ 1: {
+ 'tx_pps': 5.9,
+ 'rx_bps': 434.78,
+ 'opackets': 48791,
+ },
+ }
+
+ expected = {
+ 'xe0': {
+ 'key_name': 'default',
+ "rx_throughput_fps": 5.5,
+ "tx_throughput_fps": 4.9,
+ "rx_throughput_mbps": 234.78,
+ "tx_throughput_mbps": 243.11,
+ "in_packets": 34251,
+ "out_packets": 52342,
+ },
+ 'xe1': {
+ 'key_name': 'default',
+ "rx_throughput_fps": 0.0,
+ "tx_throughput_fps": 5.9,
+ "rx_throughput_mbps": 434.78,
+ "tx_throughput_mbps": 0.0,
+ "in_packets": 0,
+ "out_packets": 48791,
+ },
+ }
+ result = client_resource_helper.generate_samples('key_name', 'default')
+ self.assertDictEqual(result, expected)
+
+ def test_clear_stats(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.Mock()
+
+ self.assertIsNone(client_resource_helper.clear_stats())
+ self.assertEqual(client_resource_helper.client.clear_stats.call_count, 1)
+
+ def test_clear_stats_of_ports(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.Mock()
+
+ self.assertIsNone(client_resource_helper.clear_stats([3, 4]))
+ self.assertEqual(client_resource_helper.client.clear_stats.call_count, 1)
+
+ def test_start(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.Mock()
+
+ self.assertIsNone(client_resource_helper.start())
+ self.assertEqual(client_resource_helper.client.start.call_count, 1)
+
+ def test_start_ports(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper.client = mock.Mock()
+
+ self.assertIsNone(client_resource_helper.start([3, 4]))
+ self.assertEqual(client_resource_helper.client.start.call_count, 1)
+
+ def test_collect_kpi_with_queue(self):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client_resource_helper._result = {'existing': 43, 'replaceable': 12}
+ client_resource_helper._queue = mock.Mock()
+ client_resource_helper._queue.empty.return_value = False
+ client_resource_helper._queue.get.return_value = {'incoming': 34, 'replaceable': 99}
+
+ expected = {
+ 'existing': 43,
+ 'incoming': 34,
+ 'replaceable': 99,
+ }
+ result = client_resource_helper.collect_kpi()
+ self.assertDictEqual(result, expected)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.LOG')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.STLError',
+ new_callable=lambda: MockError)
+ def test__connect_with_failures(self, mock_error, mock_logger, mock_time):
+ vnfd_helper = VnfdHelper({})
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
+ client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
+ client = mock.MagicMock()
+ client.connect.side_effect = mock_error
+
+ self.assertIs(client_resource_helper._connect(client), client)
+
+
+class TestRfc2544ResourceHelper(unittest.TestCase):
+
+ RFC2544_CFG_1 = {
+ 'latency': True,
+ 'correlated_traffic': True,
+ 'allowed_drop_rate': '0.1 - 0.15',
+ }
+
+ RFC2544_CFG_2 = {
+ 'allowed_drop_rate': ' 0.25 - 0.05 ',
+ }
+
+ RFC2544_CFG_3 = {
+ 'allowed_drop_rate': '0.2',
+ }
+
+ RFC2544_CFG_4 = {
+ 'latency': True,
+ }
+
+ SCENARIO_CFG_1 = {
+ 'options': {
+ 'rfc2544': RFC2544_CFG_1,
+ }
+ }
+
+ SCENARIO_CFG_2 = {
+ 'options': {
+ 'rfc2544': RFC2544_CFG_2,
+ }
+ }
+
+ SCENARIO_CFG_3 = {
+ 'options': {
+ 'rfc2544': RFC2544_CFG_3,
+ }
+ }
+
+ SCENARIO_CFG_4 = {
+ 'options': {
+ 'rfc2544': RFC2544_CFG_4,
+ }
+ }
+
+ def test_property_rfc2544(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_1
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertIsNone(rfc2544_resource_helper._rfc2544)
+ self.assertDictEqual(rfc2544_resource_helper.rfc2544, self.RFC2544_CFG_1)
+ self.assertDictEqual(rfc2544_resource_helper._rfc2544, self.RFC2544_CFG_1)
+ scenario_helper.scenario_cfg = {} # ensure that resource_helper caches
+ self.assertDictEqual(rfc2544_resource_helper.rfc2544, self.RFC2544_CFG_1)
+
+ def test_property_tolerance_high(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_1
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertIsNone(rfc2544_resource_helper._tolerance_high)
+ self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.15)
+ self.assertEqual(rfc2544_resource_helper._tolerance_high, 0.15)
+ scenario_helper.scenario_cfg = {} # ensure that resource_helper caches
+ self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.15)
+
+ def test_property_tolerance_low(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_1
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertIsNone(rfc2544_resource_helper._tolerance_low)
+ self.assertEqual(rfc2544_resource_helper.tolerance_low, 0.1)
+ self.assertEqual(rfc2544_resource_helper._tolerance_low, 0.1)
+ scenario_helper.scenario_cfg = {} # ensure that resource_helper caches
+ self.assertEqual(rfc2544_resource_helper.tolerance_low, 0.1)
+
+ def test_property_tolerance_high_range_swap(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_2
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.25)
+
+ def test_property_tolerance_low_range_swap(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_2
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertEqual(rfc2544_resource_helper.tolerance_low, 0.05)
+
+ def test_property_tolerance_high_not_range(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_3
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.2)
+
+ def test_property_tolerance_low_not_range(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_3
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertEqual(rfc2544_resource_helper.tolerance_low, 0.2)
+
+ def test_property_tolerance_high_default(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_4
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.0001)
+
+ def test_property_tolerance_low_default(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_4
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertEqual(rfc2544_resource_helper.tolerance_low, 0.0001)
+
+ def test_property_latency(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_1
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertIsNone(rfc2544_resource_helper._latency)
+ self.assertTrue(rfc2544_resource_helper.latency)
+ self.assertTrue(rfc2544_resource_helper._latency)
+ scenario_helper.scenario_cfg = {} # ensure that resource_helper caches
+ self.assertTrue(rfc2544_resource_helper.latency)
+
+ def test_property_latency_default(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_2
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertFalse(rfc2544_resource_helper.latency)
+
+ def test_property_correlated_traffic(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_1
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertIsNone(rfc2544_resource_helper._correlated_traffic)
+ self.assertTrue(rfc2544_resource_helper.correlated_traffic)
+ self.assertTrue(rfc2544_resource_helper._correlated_traffic)
+ scenario_helper.scenario_cfg = {} # ensure that resource_helper caches
+ self.assertTrue(rfc2544_resource_helper.correlated_traffic)
+
+ def test_property_correlated_traffic_default(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = self.SCENARIO_CFG_2
+ rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
+
+ self.assertFalse(rfc2544_resource_helper.correlated_traffic)
+
+
+class TestSampleVNFDeployHelper(unittest.TestCase):
+
+ @mock.patch('subprocess.check_output')
+ def test_deploy_vnfs_disabled(self, mock_check_output):
+ vnfd_helper = mock.Mock()
+ ssh_helper = mock.Mock()
+ ssh_helper.join_bin_path.return_value = 'joined_path'
+ ssh_helper.execute.return_value = 1, 'bad output', 'error output'
+ ssh_helper.put.return_value = None
+ sample_vnf_deploy_helper = SampleVNFDeployHelper(vnfd_helper, ssh_helper)
+
+ self.assertIsNone(sample_vnf_deploy_helper.deploy_vnfs('name1'))
+ self.assertEqual(ssh_helper.execute.call_count, 0)
+ self.assertEqual(ssh_helper.put.call_count, 0)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
+ @mock.patch('subprocess.check_output')
+ def test_deploy_vnfs(self, mock_check_output, mock_time):
+ vnfd_helper = mock.Mock()
+ ssh_helper = mock.Mock()
+ ssh_helper.join_bin_path.return_value = 'joined_path'
+ ssh_helper.execute.return_value = 1, 'bad output', 'error output'
+ ssh_helper.put.return_value = None
+ sample_vnf_deploy_helper = SampleVNFDeployHelper(vnfd_helper, ssh_helper)
+ sample_vnf_deploy_helper.DISABLE_DEPLOY = False
+
+ self.assertIsNone(sample_vnf_deploy_helper.deploy_vnfs('name1'))
+ self.assertEqual(ssh_helper.execute.call_count, 5)
+ self.assertEqual(ssh_helper.put.call_count, 1)
+
+ @mock.patch('subprocess.check_output')
+ def test_deploy_vnfs_early_success(self, mock_check_output):
+ vnfd_helper = mock.Mock()
+ ssh_helper = mock.Mock()
+ ssh_helper.join_bin_path.return_value = 'joined_path'
+ ssh_helper.execute.return_value = 0, 'output', ''
+ ssh_helper.put.return_value = None
+ sample_vnf_deploy_helper = SampleVNFDeployHelper(vnfd_helper, ssh_helper)
+ sample_vnf_deploy_helper.DISABLE_DEPLOY = False
+
+ self.assertIsNone(sample_vnf_deploy_helper.deploy_vnfs('name1'))
+ self.assertEqual(ssh_helper.execute.call_count, 1)
+ self.assertEqual(ssh_helper.put.call_count, 0)
+
+
+class TestScenarioHelper(unittest.TestCase):
+
+ def test_property_task_path(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = {
+ 'task_path': 'my_path',
+ }
+
+ self.assertEqual(scenario_helper.task_path, 'my_path')
+
+ def test_property_nodes(self):
+ nodes = ['node1', 'node2']
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = {
+ 'nodes': nodes,
+ }
+
+ self.assertEqual(scenario_helper.nodes, nodes)
+
+ def test_property_all_options(self):
+ data = {
+ 'name1': {
+ 'key3': 'value3',
+ },
+ 'name2': {}
+ }
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = {
+ 'options': data,
+ }
+
+ self.assertDictEqual(scenario_helper.all_options, data)
+
+ def test_property_options(self):
+ data = {
+ 'key1': 'value1',
+ 'key2': 'value2',
+ }
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = {
+ 'options': {
+ 'name1': data,
+ },
+ }
+
+ self.assertDictEqual(scenario_helper.options, data)
+
+ def test_property_vnf_cfg(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = {
+ 'options': {
+ 'name1': {
+ 'vnf_config': 'my_config',
+ },
+ },
+ }
+
+ self.assertEqual(scenario_helper.vnf_cfg, 'my_config')
+
+ def test_property_vnf_cfg_default(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = {
+ 'options': {
+ 'name1': {},
+ },
+ }
+
+ self.assertDictEqual(scenario_helper.vnf_cfg, ScenarioHelper.DEFAULT_VNF_CFG)
+
+ def test_property_topology(self):
+ scenario_helper = ScenarioHelper('name1')
+ scenario_helper.scenario_cfg = {
+ 'topology': 'my_topology',
+ }
+
+ self.assertEqual(scenario_helper.topology, 'my_topology')
+
+
+class TestSampleVnf(unittest.TestCase):
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.100.20',
+ 'local_mac': '00:00:00:00:00:01'
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1'
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ]
+ }
+ }
+
+ TRAFFIC_PROFILE = {
+ "schema": "isb:traffic_profile:0.1",
+ "name": "fixed",
+ "description": "Fixed traffic profile to run UDP traffic",
+ "traffic_profile": {
+ "traffic_type": "FixedTraffic",
+ "frame_rate": 100, # pps
+ "flow_number": 10,
+ "frame_size": 64,
+ },
+ }
+
+ def test___init__(self):
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0)
+
+ self.assertEqual(sample_vnf.name, 'vnf1')
+ self.assertDictEqual(sample_vnf.vnfd_helper, self.VNFD_0)
+
+ # test the default setup helper is SetupEnvHelper, not subclass
+ self.assertEqual(type(sample_vnf.setup_helper), SetupEnvHelper)
+
+ # test the default resource helper is ResourceHelper, not subclass
+ self.assertEqual(type(sample_vnf.resource_helper), ResourceHelper)
+
+ def test___init___alt_types(self):
+ class MySetupEnvHelper(SetupEnvHelper):
+ pass
+
+
+ class MyResourceHelper(ResourceHelper):
+ pass
+
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0, MySetupEnvHelper, MyResourceHelper)
+
+ self.assertEqual(sample_vnf.name, 'vnf1')
+ self.assertDictEqual(sample_vnf.vnfd_helper, self.VNFD_0)
+
+ # test the default setup helper is MySetupEnvHelper, not subclass
+ self.assertEqual(type(sample_vnf.setup_helper), MySetupEnvHelper)
+
+ # test the default resource helper is MyResourceHelper, not subclass
+ self.assertEqual(type(sample_vnf.resource_helper), MyResourceHelper)
+
+ def test__get_port0localip6(self):
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0)
+ expected = '0064:ff9b:0:0:0:0:9810:6414'
+ result = sample_vnf._get_port0localip6()
+ self.assertEqual(result, expected)
+
+ def test__get_port1localip6(self):
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0)
+ expected = '0064:ff9b:0:0:0:0:9810:2814'
+ result = sample_vnf._get_port1localip6()
+ self.assertEqual(result, expected)
+
+ def test__get_port0prefixip6(self):
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0)
+ expected = '112'
+ result = sample_vnf._get_port0prefixlen6()
+ self.assertEqual(result, expected)
+
+ def test__get_port1prefixip6(self):
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0)
+ expected = '112'
+ result = sample_vnf._get_port1prefixlen6()
+ self.assertEqual(result, expected)
+
+ def test__get_port0gateway6(self):
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0)
+ expected = '0064:ff9b:0:0:0:0:9810:6414'
+ result = sample_vnf._get_port0gateway6()
+ self.assertEqual(result, expected)
+
+ def test__get_port1gateway6(self):
+ sample_vnf = SampleVNF('vnf1', self.VNFD_0)
+ expected = '0064:ff9b:0:0:0:0:9810:2814'
+ result = sample_vnf._get_port1gateway6()
+ self.assertEqual(result, expected)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.Process')
+ def test__start_vnf(self, mock_process_type):
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf._run = mock.Mock()
+
+ self.assertIsNone(sample_vnf.queue_wrapper)
+ self.assertIsNone(sample_vnf._vnf_process)
+ self.assertIsNone(sample_vnf._start_vnf())
+ self.assertIsNotNone(sample_vnf.queue_wrapper)
+ self.assertIsNotNone(sample_vnf._vnf_process)
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_instantiate(self, ssh):
+ mock_ssh(ssh)
+
+ nodes = {
+ 'vnf1': 'name1',
+ 'vnf2': 'name2',
+ }
+
+ context1 = mock.Mock()
+ context1._get_server.return_value = None
+ context2 = mock.Mock()
+ context2._get_server.return_value = context2
+
+ try:
+ Context.list.clear()
+ except AttributeError:
+ # clear() but works in Py2.7
+ Context.list[:] = []
+
+ Context.list.extend([
+ context1,
+ context2,
+ ])
+
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf.APP_NAME = 'sample1'
+ sample_vnf._start_server = mock.Mock(return_value=0)
+ sample_vnf._vnf_process = mock.MagicMock()
+ sample_vnf._vnf_process._is_alive.return_value = 1
+ sample_vnf.ssh_helper = mock.MagicMock()
+ sample_vnf.deploy_helper = mock.MagicMock()
+ sample_vnf.resource_helper.ssh_helper = mock.MagicMock()
+ scenario_cfg = {
+ 'nodes': nodes,
+ }
+
+ self.assertIsNone(sample_vnf.instantiate(scenario_cfg, {}))
+ self.assertEqual(sample_vnf.nfvi_context, context2)
+
+ @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time")
+ @mock.patch("yardstick.ssh.SSH")
+ def test_wait_for_instantiate_empty_queue(self, ssh, mock_time):
+ mock_ssh(ssh, exec_result=(1, "", ""))
+
+ queue_size_list = [
+ 0,
+ 1,
+ 0,
+ 1,
+ ]
+
+ queue_get_list = [
+ 'some output',
+ 'pipeline> ',
+ ]
+
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf.APP_NAME = 'sample1'
+ sample_vnf._start_server = mock.Mock(return_value=0)
+ sample_vnf._vnf_process = mock.MagicMock()
+ sample_vnf._vnf_process.exitcode = 0
+ sample_vnf._vnf_process._is_alive.return_value = 1
+ sample_vnf.queue_wrapper = mock.Mock()
+ sample_vnf.q_out = mock.Mock()
+ sample_vnf.q_out.qsize.side_effect = iter(queue_size_list)
+ sample_vnf.q_out.get.side_effect = iter(queue_get_list)
+ sample_vnf.ssh_helper = mock.MagicMock()
+ sample_vnf.resource_helper.ssh_helper = mock.MagicMock()
+ sample_vnf.resource_helper.start_collect = mock.MagicMock()
+
+ self.assertEqual(sample_vnf.wait_for_instantiate(), 0)
+
+ @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time")
+ def test_vnf_execute_with_queue_data(self, mock_time):
+ queue_size_list = [
+ 1,
+ 1,
+ 0,
+ ]
+
+ queue_get_list = [
+ 'hello ',
+ 'world'
+ ]
+
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf.APP_NAME = 'sample1'
+ sample_vnf.q_out = mock.Mock()
+ sample_vnf.q_out.qsize.side_effect = iter(queue_size_list)
+ sample_vnf.q_out.get.side_effect = iter(queue_get_list)
+
+ self.assertEqual(sample_vnf.vnf_execute('my command'), 'hello world')
+
+ def test_terminate_without_vnf_process(self):
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf.APP_NAME = 'sample1'
+ sample_vnf.vnf_execute = mock.Mock()
+ sample_vnf.ssh_helper = mock.Mock()
+ sample_vnf._tear_down = mock.Mock()
+ sample_vnf.resource_helper = mock.Mock()
+
+ self.assertIsNone(sample_vnf.terminate())
+
+ def test_get_stats(self):
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf.APP_NAME = 'sample1'
+ sample_vnf.APP_WORD = 'sample1'
+ sample_vnf.vnf_execute = mock.Mock(return_value='the stats')
+
+ self.assertEqual(sample_vnf.get_stats(), 'the stats')
+
+ def test_collect_kpi(self):
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf.APP_NAME = 'sample1'
+ sample_vnf.COLLECT_KPI = '\s(\d+)\D*(\d+)\D*(\d+)'
+ sample_vnf.COLLECT_MAP = {
+ 'k1': 3,
+ 'k2': 1,
+ 'k3': 2,
+ }
+ sample_vnf.get_stats = mock.Mock(return_value='index0: 34 -- 91, 27')
+ sample_vnf.resource_helper = mock.Mock()
+ sample_vnf.resource_helper.collect_kpi.return_value = {}
+
+ expected = {
+ 'k1': 27,
+ 'k2': 34,
+ 'k3': 91,
+ 'collect_stats': {},
+ }
+ result = sample_vnf.collect_kpi()
+ self.assertDictEqual(result, expected)
+
+ def test_collect_kpi_default(self):
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf.APP_NAME = 'sample1'
+ sample_vnf.COLLECT_KPI = '\s(\d+)\D*(\d+)\D*(\d+)'
+ sample_vnf.get_stats = mock.Mock(return_value='')
+
+ expected = {
+ 'packets_in': 0,
+ 'packets_fwd': 0,
+ 'packets_dropped': 0,
+ }
+ result = sample_vnf.collect_kpi()
+ self.assertDictEqual(result, expected)
+
+
+class TestSampleVNFTrafficGen(unittest.TestCase):
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1'
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0'
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1'
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.0',
+ 'driver': 'i40e',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.100.20',
+ 'local_mac': '00:00:00:00:00:01'
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.1',
+ 'driver': 'ixgbe',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:13',
+ 'vpci': '0000:05:00.2',
+ 'driver': 'ixgbe',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.30',
+ 'local_mac': '00:00:00:00:00:11'
+ },
+ 'vnfd-connection-point-ref': 'xe2',
+ 'name': 'xe2'
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1'
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ],
+ },
+ }
+
+ TRAFFIC_PROFILE = {
+ "schema": "isb:traffic_profile:0.1",
+ "name": "fixed",
+ "description": "Fixed traffic profile to run UDP traffic",
+ "traffic_profile": {
+ "traffic_type": "FixedTraffic",
+ "frame_rate": 100, # pps
+ "flow_number": 10,
+ "frame_size": 64,
+ },
+ }
+
+ def test__check_status(self):
+ sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0)
+
+ with self.assertRaises(NotImplementedError):
+ sample_vnf_tg._check_status()
+
+ def test_listen_traffic(self):
+ sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0)
+
+ sample_vnf_tg.listen_traffic(mock.Mock())
+
+ def test_verify_traffic(self):
+ sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0)
+
+ sample_vnf_tg.verify_traffic(mock.Mock())
+
+ def test_terminate(self):
+ sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0)
+ sample_vnf_tg._traffic_process = mock.Mock()
+
+ sample_vnf_tg.terminate()
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.LOG')
+ def test_wait_for_instantiate(self, mock_logger, mock_time):
+ sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0)
+ sample_vnf_tg._check_status = mock.Mock(side_effect=iter([1, 0]))
+ sample_vnf_tg._tg_process = mock.Mock()
+ sample_vnf_tg._tg_process.is_alive.return_value = True
+ sample_vnf_tg._tg_process.exitcode = 234
+
+ self.assertEqual(sample_vnf_tg.wait_for_instantiate(), 234)
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.LOG')
+ def test_wait_for_instantiate_not_alive(self, mock_logger, mock_time):
+ sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0)
+ sample_vnf_tg._check_status = mock.Mock(return_value=1)
+ sample_vnf_tg._tg_process = mock.Mock()
+ sample_vnf_tg._tg_process.is_alive.side_effect = iter([True, False])
+ sample_vnf_tg._tg_process.exitcode = 234
+
+ with self.assertRaises(RuntimeError):
+ sample_vnf_tg.wait_for_instantiate()
+
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.LOG')
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.Process')
+ def test_wait_for_instantiate_delayed(self, mock_process, mock_logger, mock_time):
+ class MockClientStarted(mock.Mock):
+
+ def __init__(self, *args, **kwargs):
+ super(MockClientStarted, self).__init__(*args, **kwargs)
+ self.iter = iter([0, 0, 1])
+
+ @property
+ def value(self):
+ return next(self.iter)
+
+ mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
+ mock_traffic_profile.get_traffic_definition.return_value = "64"
+ mock_traffic_profile.execute.return_value = "64"
+ mock_traffic_profile.params = self.TRAFFIC_PROFILE
+
+ sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0)
+ sample_vnf_tg._check_status = mock.Mock(side_effect=iter([1, 0]))
+ sample_vnf_tg._tg_process = mock.Mock()
+ sample_vnf_tg._tg_process.is_alive.return_value = True
+ sample_vnf_tg._tg_process.exitcode = 234
+ sample_vnf_tg.resource_helper = mock.Mock()
+ sample_vnf_tg.resource_helper.client_started = MockClientStarted()
+
+ self.assertTrue(sample_vnf_tg.run_traffic(mock_traffic_profile))
+ self.assertEqual(mock_time.sleep.call_count, 2)
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py
index 0c88ee80c..949bfb3d4 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py
@@ -20,9 +20,78 @@ import unittest
import mock
from multiprocessing import Queue
-from yardstick.network_services.vnf_generic.vnf.tg_ping import \
- PingParser, PingTrafficGen
-from yardstick.network_services.traffic_profile.base import TrafficProfile
+from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh
+
+SSH_HELPER = "yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper"
+
+STL_MOCKS = {
+ 'stl': mock.MagicMock(),
+ 'stl.trex_stl_lib': mock.MagicMock(),
+ 'stl.trex_stl_lib.base64': mock.MagicMock(),
+ 'stl.trex_stl_lib.binascii': mock.MagicMock(),
+ 'stl.trex_stl_lib.collections': mock.MagicMock(),
+ 'stl.trex_stl_lib.copy': mock.MagicMock(),
+ 'stl.trex_stl_lib.datetime': mock.MagicMock(),
+ 'stl.trex_stl_lib.functools': mock.MagicMock(),
+ 'stl.trex_stl_lib.imp': mock.MagicMock(),
+ 'stl.trex_stl_lib.inspect': mock.MagicMock(),
+ 'stl.trex_stl_lib.json': mock.MagicMock(),
+ 'stl.trex_stl_lib.linecache': mock.MagicMock(),
+ 'stl.trex_stl_lib.math': mock.MagicMock(),
+ 'stl.trex_stl_lib.os': mock.MagicMock(),
+ 'stl.trex_stl_lib.platform': mock.MagicMock(),
+ 'stl.trex_stl_lib.pprint': mock.MagicMock(),
+ 'stl.trex_stl_lib.random': mock.MagicMock(),
+ 'stl.trex_stl_lib.re': mock.MagicMock(),
+ 'stl.trex_stl_lib.scapy': mock.MagicMock(),
+ 'stl.trex_stl_lib.socket': mock.MagicMock(),
+ 'stl.trex_stl_lib.string': mock.MagicMock(),
+ 'stl.trex_stl_lib.struct': mock.MagicMock(),
+ 'stl.trex_stl_lib.sys': mock.MagicMock(),
+ 'stl.trex_stl_lib.threading': mock.MagicMock(),
+ 'stl.trex_stl_lib.time': mock.MagicMock(),
+ 'stl.trex_stl_lib.traceback': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_async_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_exceptions': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_ext': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_jsonrpc_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_packet_builder_interface': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_packet_builder_scapy': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_port': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_stats': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_streams': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_types': mock.MagicMock(),
+ 'stl.trex_stl_lib.types': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.argparse': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.collections': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.common': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.json': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.os': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.parsing_opts': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.pwd': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.random': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.re': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.string': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.sys': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.text_opts': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.text_tables': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.texttable': mock.MagicMock(),
+ 'stl.trex_stl_lib.warnings': mock.MagicMock(),
+ 'stl.trex_stl_lib.yaml': mock.MagicMock(),
+ 'stl.trex_stl_lib.zlib': mock.MagicMock(),
+ 'stl.trex_stl_lib.zmq': mock.MagicMock(),
+}
+
+STLClient = mock.MagicMock()
+stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
+stl_patch.start()
+
+if stl_patch:
+ from yardstick.network_services.vnf_generic.vnf.tg_ping import PingParser, PingTrafficGen
+ from yardstick.network_services.traffic_profile.base import TrafficProfile
+ from yardstick.network_services.vnf_generic.vnf.sample_vnf import VnfSshHelper
class TestPingParser(unittest.TestCase):
@@ -58,72 +127,122 @@ class TestPingParser(unittest.TestCase):
class TestPingTrafficGen(unittest.TestCase):
- VNFD = {'vnfd:vnfd-catalog':
- {'vnfd':
- [{'short-name': 'VpeVnf',
- 'vdu':
- [{'routing_table':
- [{'network': '152.16.100.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.100.20',
- 'if': 'xe0'},
- {'network': '152.16.40.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.40.20',
- 'if': 'xe1'}],
- 'description': 'VPE approximation using DPDK',
- 'name': 'vpevnf-baremetal',
- 'nd_route_tbl':
- [{'network': '0064:ff9b:0:0:0:0:9810:6414',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
- 'if': 'xe0'},
- {'network': '0064:ff9b:0:0:0:0:9810:2814',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
- 'if': 'xe1'}],
- 'id': 'vpevnf-baremetal',
- 'external-interface':
- [{'virtual-interface':
- {'dst_mac': '00:00:00:00:00:04',
- 'vpci': '0000:05:00.0',
- 'local_ip': '152.16.100.19',
- 'type': 'PCI-PASSTHROUGH',
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '0',
- 'bandwidth': '10 Gbps',
- 'driver': "i40e",
- 'dst_ip': '152.16.100.20',
- 'local_iface_name': 'xe0',
- 'local_mac': '00:00:00:00:00:02'},
- 'vnfd-connection-point-ref': 'xe0',
- 'name': 'xe0'},
- {'virtual-interface':
- {'dst_mac': '00:00:00:00:00:03',
- 'vpci': '0000:05:00.1',
- 'local_ip': '152.16.40.19',
- 'type': 'PCI-PASSTHROUGH',
- 'driver': "i40e",
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '1',
- 'bandwidth': '10 Gbps',
- 'dst_ip': '152.16.40.20',
- 'local_iface_name': 'xe1',
- 'local_mac': '00:00:00:00:00:01'},
- 'vnfd-connection-point-ref': 'xe1',
- 'name': 'xe1'}]}],
- 'description': 'Vpe approximation using DPDK',
- 'mgmt-interface':
- {'vdu-id': 'vpevnf-baremetal',
- 'host': '1.1.1.1',
- 'password': 'r00t',
- 'user': 'root',
- 'ip': '1.1.1.1'},
- 'benchmark':
- {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']},
- 'connection-point': [{'type': 'VPORT', 'name': 'xe0'},
- {'type': 'VPORT', 'name': 'xe1'}],
- 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}}
+
+ VNFD_0_EXT_IF_0 = {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': u'152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'driver': "i40e",
+ 'dst_ip': u'152.16.100.20',
+ 'local_iface_name': 'xe0',
+ 'local_mac': '00:00:00:00:00:02',
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0',
+ }
+
+ VNFD_0_EXT_IF_1 = {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': u'152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'driver': "i40e",
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': u'152.16.40.20',
+ 'local_iface_name': 'xe1',
+ 'local_mac': '00:00:00:00:00:01',
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1',
+ }
+
+ VNFD_0_EXT_IF_LIST = [
+ VNFD_0_EXT_IF_0,
+ VNFD_0_EXT_IF_1,
+ ]
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': u'152.16.100.20',
+ 'netmask': u'255.255.255.0',
+ 'gateway': u'152.16.100.20',
+ 'if': 'xe0',
+ },
+ {
+ 'network': u'152.16.40.20',
+ 'netmask': u'255.255.255.0',
+ 'gateway': u'152.16.40.20',
+ 'if': 'xe1',
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0',
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1',
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': VNFD_0_EXT_IF_LIST,
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1',
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf',
+ 'name': 'VPEVnfSsh',
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ],
+ },
+ }
TRAFFIC_PROFILE = {
"schema": "isb:traffic_profile:0.1",
@@ -133,115 +252,87 @@ class TestPingTrafficGen(unittest.TestCase):
"traffic_type": "FixedTraffic",
"frame_rate": 100, # pps
"flow_number": 10,
- "frame_size": 64}}
+ "frame_size": 64,
+ },
+ }
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test___init__(self, ssh):
+ ssh.from_node.return_value.execute.return_value = 0, "success", ""
+ ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0)
+ self.assertIsNotNone(ping_traffic_gen._queue)
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test__bind_device_kernel_with_failure(self, ssh):
+ mock_ssh(ssh)
+
+ execute_result_data = [
+ (1, 'bad stdout messages', 'error messages'),
+ (0, '', ''),
+ (0, 'if_name_1', ''),
+ (0, 'if_name_2', ''),
+ ]
+ ssh.from_node.return_value.execute.side_effect = iter(execute_result_data)
+ ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0)
+ ext_ifs = ping_traffic_gen.vnfd_helper.interfaces
+ self.assertNotEqual(ext_ifs[0]['virtual-interface']['local_iface_name'], 'if_name_1')
+ self.assertNotEqual(ext_ifs[1]['virtual-interface']['local_iface_name'], 'if_name_2')
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_collect_kpi(self, ssh):
+ mock_ssh(ssh, exec_result=(0, "success", ""))
+ ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0)
+ ping_traffic_gen._queue = Queue()
+ ping_traffic_gen._queue.put({})
+ ping_traffic_gen.collect_kpi()
+ self.assertEqual(ping_traffic_gen._result, {})
+
+ @mock.patch(SSH_HELPER)
+ def test_instantiate(self, ssh):
+ mock_ssh(ssh, spec=VnfSshHelper, exec_result=(0, "success", ""))
+ ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0)
+ ping_traffic_gen.setup_helper.ssh_helper = mock.MagicMock(
+ **{"execute.return_value": (0, "", "")})
+ self.assertIsInstance(ping_traffic_gen.ssh_helper, mock.Mock)
+ self.assertEqual(ping_traffic_gen._result, {})
+ self.assertIsNone(ping_traffic_gen.instantiate({}, {}))
+ self.assertIsNotNone(ping_traffic_gen._result)
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_listen_traffic(self, ssh):
+ ssh.from_node.return_value.execute.return_value = 0, "success", ""
+ ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0)
+ self.assertIsNone(ping_traffic_gen.listen_traffic({}))
+
+ @mock.patch(SSH_HELPER)
+ def test_run_traffic_process(self, ssh):
+ mock_ssh(ssh)
- def test___init__(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ping_traffic_gen = PingTrafficGen(vnfd)
- self.assertEqual(ping_traffic_gen._queue, None)
-
- def test_collect_kpi(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- ping_traffic_gen = PingTrafficGen(vnfd)
- ping_traffic_gen._queue = Queue()
- ping_traffic_gen._queue.put({})
- ping_traffic_gen.collect_kpi()
- self.assertEqual({}, ping_traffic_gen._result)
-
- def test_instantiate(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ping_traffic_gen = PingTrafficGen(vnfd)
- self.assertEqual(None, ping_traffic_gen.instantiate({}, {}))
-
- def test_listen_traffic(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ping_traffic_gen = PingTrafficGen(vnfd)
- self.assertEqual(None, ping_traffic_gen.listen_traffic({}))
-
- @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ping.time")
- def test_run_traffic(self, mock_time):
- mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
- mock_traffic_profile.get_traffic_definition.return_value = "64"
- mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- self.sut = PingTrafficGen(vnfd)
- self.sut.connection = mock.Mock()
- self.sut.connection.run = mock.Mock()
- self.sut._traffic_runner = mock.Mock(return_value=0)
- self.assertIn(self.sut.run_traffic(mock_traffic_profile), {True, False})
-
- def test_run_traffic_process(self):
mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
mock_traffic_profile.get_traffic_definition.return_value = "64"
mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- self.sut = PingTrafficGen(vnfd)
- self.sut.connection = mock.Mock()
- self.sut.connection.run = mock.Mock()
- q = Queue()
- self.sut._traffic_runner(mock_traffic_profile, q)
- self.sut.connection.run.assert_called_with(
- "ping -s 64 152.16.100.20",
- stdout=q, keep_stdin_open=True, pty=True)
-
- def test_scale(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- flavor = ""
- ping_traffic_gen = PingTrafficGen(vnfd)
- self.assertRaises(NotImplementedError, ping_traffic_gen.scale, flavor)
-
- def test_terminate(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ping_traffic_gen = PingTrafficGen(vnfd)
- self.assertEqual(None, ping_traffic_gen.terminate())
+
+ ssh.from_node.return_value.execute.return_value = 0, "success", ""
+ ssh.from_node.return_value.run.return_value = 0, "success", ""
+
+ sut = PingTrafficGen('vnf1', self.VNFD_0)
+ sut._traffic_runner(mock_traffic_profile)
+ sut.ssh_helper.run.assert_called_with(
+ "ping -s 64 152.16.100.20",
+ stdout=sut._parser, keep_stdin_open=True, pty=True)
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_scale_negative(self, ssh):
+ ssh.from_node.return_value.execute.return_value = 0, "success", ""
+ ssh.from_node.return_value.run.return_value = 0, "success", ""
+
+ ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0)
+ ping_traffic_gen.scale()
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_terminate(self, ssh):
+ ssh.from_node.return_value.execute.return_value = 0, "success", ""
+ ssh.from_node.return_value.run.return_value = 0, "success", ""
+
+ ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0)
+ self.assertIsNone(ping_traffic_gen.terminate()) \ No newline at end of file
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
index bca0780dc..7dc303852 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
@@ -18,9 +18,8 @@
from __future__ import absolute_import
import unittest
import mock
-import os
-import multiprocessing
-from multiprocessing import Queue
+
+SSH_HELPER = "yardstick.ssh.SSH"
STL_MOCKS = {
'stl': mock.MagicMock(),
@@ -87,79 +86,146 @@ stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
stl_patch.start()
if stl_patch:
- from yardstick.network_services.vnf_generic.vnf.tg_rfc2544_trex import \
- TrexTrafficGenRFC
+ from yardstick.network_services.vnf_generic.vnf.tg_rfc2544_trex import TrexTrafficGenRFC, \
+ TrexRfcResourceHelper
from yardstick.network_services.vnf_generic.vnf import tg_rfc2544_trex
from yardstick.network_services.traffic_profile.base import TrafficProfile
+ from tests.unit.network_services.vnf_generic.vnf.test_base import FileAbsPath, mock_ssh
+
+MODULE_PATH = FileAbsPath(__file__)
+get_file_abspath = MODULE_PATH.get_path
+
+
+class TestTrexRfcResouceHelper(unittest.TestCase):
+
+ @mock.patch('yardstick.network_services.helpers.samplevnf_helper.MultiPortConfig')
+ @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_trex.time")
+ @mock.patch(SSH_HELPER)
+ def test__run_traffic_once(self, ssh, *_):
+ mock_ssh(ssh)
+
+ mock_traffic_profile = mock.MagicMock(autospec=TrafficProfile,
+ **{'get_drop_percentage.return_value': {}})
+ sut = TrexRfcResourceHelper(mock.MagicMock(), mock.MagicMock())
+ sut.client = mock.MagicMock()
+ sut._run_traffic_once(mock_traffic_profile)
class TestTrexTrafficGenRFC(unittest.TestCase):
- VNFD = {'vnfd:vnfd-catalog':
- {'vnfd':
- [{'short-name': 'VpeVnf',
- 'vdu':
- [{'routing_table':
- [{'network': '152.16.100.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.100.20',
- 'if': 'xe0'},
- {'network': '152.16.40.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.40.20',
- 'if': 'xe1'}],
- 'description': 'VPE approximation using DPDK',
- 'name': 'vpevnf-baremetal',
- 'nd_route_tbl':
- [{'network': '0064:ff9b:0:0:0:0:9810:6414',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
- 'if': 'xe0'},
- {'network': '0064:ff9b:0:0:0:0:9810:2814',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
- 'if': 'xe1'}],
- 'id': 'vpevnf-baremetal',
- 'external-interface':
- [{'virtual-interface':
- {'dst_mac': '00:00:00:00:00:04',
- 'vpci': '0000:05:00.0',
- 'local_ip': '152.16.100.19',
- 'type': 'PCI-PASSTHROUGH',
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '0',
- 'bandwidth': '10 Gbps',
- 'driver': "i40e",
- 'dst_ip': '152.16.100.20',
- 'local_iface_name': 'xe0',
- 'local_mac': '00:00:00:00:00:01'},
- 'vnfd-connection-point-ref': 'xe0',
- 'name': 'xe0'},
- {'virtual-interface':
- {'dst_mac': '00:00:00:00:00:03',
- 'vpci': '0000:05:00.1',
- 'local_ip': '152.16.40.19',
- 'type': 'PCI-PASSTHROUGH',
- 'driver': "i40e",
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '1',
- 'bandwidth': '10 Gbps',
- 'dst_ip': '152.16.40.20',
- 'local_iface_name': 'xe1',
- 'local_mac': '00:00:00:00:00:02'},
- 'vnfd-connection-point-ref': 'xe1',
- 'name': 'xe1'}]}],
- 'description': 'Vpe approximation using DPDK',
- 'mgmt-interface':
- {'vdu-id': 'vpevnf-baremetal',
- 'host': '1.1.1.1',
- 'password': 'r00t',
- 'user': 'root',
- 'ip': '1.1.1.1'},
- 'benchmark':
- {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']},
- 'connection-point': [{'type': 'VPORT', 'name': 'xe0'},
- {'type': 'VPORT', 'name': 'xe1'}],
- 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}}
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0',
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1',
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0',
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1',
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'ifname': 'xe0',
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'vld_id': 'private_1',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'driver': "i40e",
+ 'dst_ip': '152.16.100.20',
+ 'local_iface_name': 'xe0',
+ 'local_mac': '00:00:00:00:00:01',
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0',
+ },
+ {
+ 'virtual-interface': {
+ 'ifname': 'xe1',
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'driver': "i40e",
+ 'netmask': '255.255.255.0',
+ 'vld_id': 'public_1',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_iface_name': 'xe1',
+ 'local_mac': '00:00:00:00:00:02'
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1',
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.1.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.1.1.1',
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf',
+ 'name': 'VPEVnfSsh',
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ],
+ },
+ }
TRAFFIC_PROFILE = {
"schema": "isb:traffic_profile:0.1",
@@ -169,240 +235,170 @@ class TestTrexTrafficGenRFC(unittest.TestCase):
"traffic_type": "FixedTraffic",
"frame_rate": 100, # pps
"flow_number": 10,
- "frame_size": 64}}
+ "frame_size": 64,
+ },
+ }
- TC_YAML = {'scenarios': [{'tc_options':
- {'rfc2544': {'allowed_drop_rate': '0.8 - 1'}},
- 'runner': {'duration': 400,
- 'interval': 35, 'type': 'Duration'},
- 'traffic_options':
- {'flow': 'ipv4_1flow_Packets_vpe.yaml',
- 'imix': 'imix_voice.yaml'},
- 'vnf_options': {'vpe': {'cfg': 'vpe_config'}},
- 'traffic_profile': 'ipv4_throughput_vpe.yaml',
- 'type': 'NSPerf',
- 'nodes': {'tg__1': 'trafficgen_1.yardstick',
- 'vnf__1': 'vnf.yardstick'},
- 'topology': 'vpe_vnf_topology.yaml'}],
- 'context': {'nfvi_type': 'baremetal', 'type': 'Node',
- 'name': 'yardstick',
- 'file': '/etc/yardstick/nodes/pod.yaml'},
- 'schema': 'yardstick:task:0.1'}
+ TC_YAML = {
+ 'scenarios': [
+ {
+ 'tc_options': {
+ 'rfc2544': {
+ 'allowed_drop_rate': '0.8 - 1',
+ },
+ },
+ 'runner': {
+ 'duration': 400,
+ 'interval': 35,
+ 'type': 'Duration',
+ },
+ 'traffic_options': {
+ 'flow': 'ipv4_1flow_Packets_vpe.yaml',
+ 'imix': 'imix_voice.yaml',
+ },
+ 'vnf_options': {
+ 'vpe': {
+ 'cfg': 'vpe_config',
+ },
+ },
+ 'traffic_profile': 'ipv4_throughput_vpe.yaml',
+ 'type': 'NSPerf',
+ 'nodes': {
+ 'tg__1': 'trafficgen_1.yardstick',
+ 'vnf__1': 'vnf.yardstick',
+ },
+ 'topology': 'vpe_vnf_topology.yaml',
+ },
+ ],
+ 'context': {
+ 'nfvi_type': 'baremetal',
+ 'type': 'Node',
+ 'name': 'yardstick',
+ 'file': '/etc/yardstick/nodes/pod.yaml',
+ },
+ 'schema': 'yardstick:task:0.1',
+ }
- def test___init__(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- self.assertIsNotNone(trex_traffic_gen._terminated)
+ @mock.patch(SSH_HELPER)
+ def test___init__(self, ssh):
+ mock_ssh(ssh)
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ self.assertIsNotNone(trex_traffic_gen.resource_helper._terminated.value)
- def test_collect_kpi(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- restult = trex_traffic_gen.collect_kpi()
- self.assertEqual({}, restult)
+ @mock.patch(SSH_HELPER)
+ def test_collect_kpi(self, ssh):
+ mock_ssh(ssh)
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ self.assertIsNone(trex_traffic_gen.collect_kpi())
- def test_listen_traffic(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- self.assertEqual(None, trex_traffic_gen.listen_traffic({}))
+ @mock.patch(SSH_HELPER)
+ def test_listen_traffic(self, ssh):
+ mock_ssh(ssh)
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ self.assertIsNone(trex_traffic_gen.listen_traffic({}))
- def test_instantiate(self):
- mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
- mock_traffic_profile.get_traffic_definition.return_value = "64"
- mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- trex_traffic_gen._start_server = mock.Mock(return_value=0)
- scenario_cfg = {"tc": "tc_baremetal_rfc2544_ipv4_1flow_64B"}
- tg_rfc2544_trex.WAIT_TIME = 0
- self.assertIn(trex_traffic_gen.instantiate(scenario_cfg, {}), {0, None})
+ @mock.patch(SSH_HELPER)
+ def test_instantiate(self, ssh):
+ mock_ssh(ssh)
- def test_instantiate_error(self):
mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
mock_traffic_profile.get_traffic_definition.return_value = "64"
mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(1, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- scenario_cfg = {"tc": "tc_baremetal_rfc2544_ipv4_1flow_64B"}
- tg_rfc2544_trex.WAIT_TIME = 0
- self.assertRaises(RuntimeError,
- trex_traffic_gen.instantiate, scenario_cfg, {})
- def test__get_rfc_tolerance(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- self.assertEqual([0.8, 1.0],
- trex_traffic_gen._get_rfc_tolerance(self.TC_YAML))
- self.TC_YAML["scenarios"][0]["tc_options"]['rfc2544'][
- 'allowed_drop_rate'] = '0.8'
- self.assertEqual([0.8, 0.8],
- trex_traffic_gen._get_rfc_tolerance(self.TC_YAML))
-
- def test__start_server(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- self.assertEqual(None, trex_traffic_gen._start_server())
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ trex_traffic_gen._start_server = mock.Mock(return_value=0)
+ trex_traffic_gen.resource_helper = mock.MagicMock()
+ scenario_cfg = {
+ "tc": "tc_baremetal_rfc2544_ipv4_1flow_64B",
+ "topology": 'nsb_test_case.yaml',
+ 'options': {
+ 'packetsize': 64,
+ 'traffic_type': 4,
+ 'rfc2544': {
+ 'allowed_drop_rate': '0.8 - 1',
+ },
+ 'vnf__1': {
+ 'rules': 'acl_1rule.yaml',
+ 'vnf_config': {
+ 'lb_config': 'SW',
+ 'lb_count': 1,
+ 'worker_config': '1C/1T',
+ 'worker_threads': 1
+ },
+ },
+ },
+ }
+ tg_rfc2544_trex.WAIT_TIME = 3
+ scenario_cfg.update({"nodes": ["tg_1", "vnf_1"]})
+ self.assertIsNone(trex_traffic_gen.instantiate(scenario_cfg, {}))
- def _get_file_abspath(self, filename):
- curr_path = os.path.dirname(os.path.abspath(__file__))
- file_path = os.path.join(curr_path, filename)
- return file_path
+ @mock.patch(SSH_HELPER)
+ def test_instantiate_error(self, ssh):
+ mock_ssh(ssh, exec_result=(1, "", ""))
- @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_trex.time")
- def test__traffic_runner(self, mock_time):
mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
mock_traffic_profile.get_traffic_definition.return_value = "64"
- mock_traffic_profile.execute.return_value = "64"
- mock_traffic_profile.get_drop_percentage.return_value = "64"
mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- self.sut = TrexTrafficGenRFC(vnfd)
- self.sut.connection = mock.Mock()
- self.sut.connection.run = mock.Mock()
- q = Queue()
- client_started = multiprocessing.Value('i', 1)
- self.sut._vpci_ascending = ["0000:05:00.0", "0000:05:00.1"]
- self.sut._connect_client = mock.Mock(autospec=STLClient)
- self.sut._connect_client.get_stats = mock.Mock(return_value="0")
- self.sut.tc_file_name = \
- self._get_file_abspath(
- "tc_baremetal_rfc2544_ipv4_1flow_64B.yaml")
- tg_rfc2544_trex.DURATION = 1
- tg_rfc2544_trex.WAIT_TIME = 0
- self.sut._traffic_runner(mock_traffic_profile, q, client_started,
- self.sut._terminated)
- def test__split_mac_address_into_list(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- result = ['0x00', '0x00', '0x00', '0x00', '0x00', '0x01']
- self.assertEqual(result,
- trex_traffic_gen._split_mac_address_into_list(
- "00:00:00:00:00:01"))
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ trex_traffic_gen.resource_helper = mock.MagicMock()
+ scenario_cfg = {
+ "tc": "tc_baremetal_rfc2544_ipv4_1flow_64B",
+ "nodes": [
+ "tg_1",
+ "vnf_1",
+ ],
+ "topology": 'nsb_test_case.yaml',
+ 'options': {
+ 'packetsize': 64,
+ 'traffic_type': 4,
+ 'rfc2544': {
+ 'allowed_drop_rate': '0.8 - 1',
+ },
+ 'vnf__1': {
+ 'rules': 'acl_1rule.yaml',
+ 'vnf_config': {
+ 'lb_config': 'SW',
+ 'lb_count': 1,
+ 'worker_config': '1C/1T',
+ 'worker_threads': 1,
+ },
+ },
+ },
+ }
+ trex_traffic_gen.instantiate(scenario_cfg, {})
- def test__generate_trex_cfg(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- tg_rfc2544_trex.WAIT_TIME = 0
- self.assertEqual(None, trex_traffic_gen._generate_trex_cfg(vnfd))
+ @mock.patch(SSH_HELPER)
+ def test__start_server(self, ssh):
+ mock_ssh(ssh)
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ trex_traffic_gen.resource_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen._start_server())
- def test_run_traffic(self):
- mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
- mock_traffic_profile.get_traffic_definition.return_value = "64"
- mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- self.sut = TrexTrafficGenRFC(vnfd)
- self.sut.connection = mock.Mock()
- self.sut.connection.run = mock.Mock()
- self.sut._traffic_runner = mock.Mock(return_value=0)
- client_started = multiprocessing.Value('i', 1)
- result = self.sut.run_traffic(mock_traffic_profile, client_started)
- self.sut._traffic_process.terminate()
- self.assertIsNotNone(result)
+ @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_trex.time")
+ @mock.patch(SSH_HELPER)
+ def test__generate_trex_cfg(self, ssh, _):
+ mock_ssh(ssh)
+
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ trex_traffic_gen.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen.resource_helper.generate_cfg())
def test_scale(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
+ with mock.patch(SSH_HELPER) as ssh:
ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
+ ssh_mock.execute = mock.Mock(return_value=(0, "", ""))
+ ssh_mock.run = mock.Mock(return_value=(0, "", ""))
ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- flavor = ""
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- self.assertRaises(NotImplementedError,
- trex_traffic_gen.scale, flavor)
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ trex_traffic_gen.scale('')
def test_terminate(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- self.assertEqual(None, trex_traffic_gen.terminate())
-
- def test__connect_client(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ with mock.patch(SSH_HELPER) as ssh:
ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
+ ssh_mock.execute = mock.Mock(return_value=(0, "", ""))
ssh.from_node.return_value = ssh_mock
- trex_traffic_gen = TrexTrafficGenRFC(vnfd)
- client = mock.Mock(autospec=STLClient)
- client.connect = mock.Mock(return_value=0)
- self.assertIsNotNone(trex_traffic_gen._connect_client(client))
+ trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
+ trex_traffic_gen.resource_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen.terminate())
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
index a1d4ca161..6fb5d080f 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
@@ -18,9 +18,11 @@
from __future__ import absolute_import
import unittest
import mock
-import multiprocessing
-from multiprocessing import Queue
+from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh
+
+
+NAME = 'vnf_1'
STL_MOCKS = {
'stl': mock.MagicMock(),
@@ -88,7 +90,7 @@ stl_patch.start()
if stl_patch:
from yardstick.network_services.vnf_generic.vnf.tg_trex import \
- TrexTrafficGen
+ TrexTrafficGen, TrexResourceHelper
from yardstick.network_services.traffic_profile.base import TrafficProfile
@@ -170,202 +172,144 @@ class TestTrexTrafficGen(unittest.TestCase):
"flow_number": 10,
"frame_size": 64}}
- def test___init__(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertIsNotNone(trex_traffic_gen._terminated)
+ @mock.patch("yardstick.ssh.SSH")
+ def test___init__(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ self.assertIsInstance(trex_traffic_gen.resource_helper, TrexResourceHelper)
- def test_collect_kpi(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- trex_traffic_gen._queue.put({})
- restult = trex_traffic_gen.collect_kpi()
- self.assertEqual({}, restult)
+ @mock.patch("yardstick.ssh.SSH")
+ def test_collect_kpi(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen.resource_helper._queue.put({})
+ result = trex_traffic_gen.collect_kpi()
+ self.assertEqual({}, result)
- def test_listen_traffic(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertEqual(None, trex_traffic_gen.listen_traffic({}))
+ @mock.patch("yardstick.ssh.SSH")
+ def test_listen_traffic(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ self.assertIsNone(trex_traffic_gen.listen_traffic({}))
- @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_trex.time")
- def test_instantiate(self, mock_time):
- mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
- mock_traffic_profile.get_traffic_definition.return_value = "64"
- mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertIn(trex_traffic_gen.instantiate({}, {}), {0, None})
+ @mock.patch("yardstick.ssh.SSH")
+ def test_instantiate(self, ssh):
+ mock_ssh(ssh)
- @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_trex.time")
- def test_instantiate_error(self, mock_time):
- mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
- mock_traffic_profile.get_traffic_definition.return_value = "64"
- mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(1, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertRaises(RuntimeError,
- trex_traffic_gen.instantiate, {}, {})
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen._start_server = mock.Mock(return_value=0)
+ trex_traffic_gen._tg_process = mock.MagicMock()
+ trex_traffic_gen._tg_process.start = mock.Mock()
+ trex_traffic_gen._tg_process.exitcode = 0
+ trex_traffic_gen._tg_process._is_alive = mock.Mock(return_value=1)
+ trex_traffic_gen.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen.instantiate({}, {}))
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_instantiate_error(self, ssh):
+ mock_ssh(ssh, exec_result=(1, "", ""))
+
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen._start_server = mock.Mock(return_value=0)
+ trex_traffic_gen._tg_process = mock.MagicMock()
+ trex_traffic_gen._tg_process.start = mock.Mock()
+ trex_traffic_gen._tg_process._is_alive = mock.Mock(return_value=0)
+ trex_traffic_gen.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen.instantiate({}, {}))
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test__start_server(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen._start_server())
- def test__start_server(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertEqual(None, trex_traffic_gen._start_server())
+ @mock.patch("yardstick.ssh.SSH")
+ def test__traffic_runner(self, ssh):
+ mock_ssh(ssh)
- @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_trex.time")
- def test__traffic_runner(self, mock_time):
mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
mock_traffic_profile.get_traffic_definition.return_value = "64"
mock_traffic_profile.execute.return_value = "64"
mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- self.sut = TrexTrafficGen(vnfd)
- self.sut.connection = mock.Mock()
- self.sut.connection.run = mock.Mock()
- q = Queue()
- client_started = multiprocessing.Value('i', 1)
- self.sut._vpci_ascending = ["0000:05:00.0", "0000:05:00.1"]
- self.sut._connect_client = mock.Mock(autospec=STLClient)
- self.sut._connect_client.get_stats = mock.Mock(return_value="0")
- self.sut._traffic_runner(mock_traffic_profile, q, client_started,
- self.sut._terminated)
- def test__generate_trex_cfg(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertEqual(None, trex_traffic_gen._generate_trex_cfg(vnfd))
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ self.sut = TrexTrafficGen(NAME, vnfd)
+ self.sut.ssh_helper = mock.Mock()
+ self.sut.ssh_helper.run = mock.Mock()
+ self.sut._vpci_ascending = ["0000:05:00.0", "0000:05:00.1"]
+ self.sut._connect_client = mock.Mock(autospec=STLClient)
+ self.sut._connect_client.get_stats = mock.Mock(return_value="0")
+ self.sut.resource_helper.RUN_DURATION = 0
+ self.sut.resource_helper.QUEUE_WAIT_TIME = 0
+ self.sut._traffic_runner(mock_traffic_profile)
- def test__split_mac_address_into_list(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- result = ['0x00', '0x00', '0x00', '0x00', '0x00', '0x01']
- self.assertEqual(
- result, trex_traffic_gen._split_mac_address_into_list(
- "00:00:00:00:00:01"))
+ @mock.patch("yardstick.ssh.SSH")
+ def test__generate_trex_cfg(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen.resource_helper.generate_cfg())
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_run_traffic(self, ssh):
+ mock_ssh(ssh)
- def test_run_traffic(self):
mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
mock_traffic_profile.get_traffic_definition.return_value = "64"
mock_traffic_profile.params = self.TRAFFIC_PROFILE
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- self.sut = TrexTrafficGen(vnfd)
- self.sut.connection = mock.Mock()
- self.sut.connection.run = mock.Mock()
- self.sut._traffic_runner = mock.Mock(return_value=0)
- self.sut.client_started.value = 1
- result = self.sut.run_traffic(mock_traffic_profile)
- self.sut._traffic_process.terminate()
- self.assertIsNotNone(result)
- def test_scale(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(1, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- flavor = ""
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertRaises(NotImplementedError,
- trex_traffic_gen.scale, flavor)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ self.sut = TrexTrafficGen(NAME, vnfd)
+ self.sut.ssh_helper = mock.Mock()
+ self.sut.ssh_helper.run = mock.Mock()
+ self.sut._traffic_runner = mock.Mock(return_value=0)
+ self.sut.resource_helper.client_started.value = 1
+ result = self.sut.run_traffic(mock_traffic_profile)
+ self.sut._traffic_process.terminate()
+ self.assertIsNotNone(result)
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_scale(self, ssh):
+ mock_ssh(ssh, exec_result=(1, "", ""))
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen.scale('')
+
+ @mock.patch("yardstick.ssh.SSH")
+ def test_setup_vnf_environment(self, ssh):
+ mock_ssh(ssh, exec_result=(1, "", ""))
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ self.assertIsNone(trex_traffic_gen.setup_helper.setup_vnf_environment())
- def test_setup_vnf_environment(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(1, "", ""))
- ssh.from_node.return_value = ssh_mock
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertEqual(
- None, trex_traffic_gen.setup_vnf_environment(ssh_mock))
+ @mock.patch("yardstick.ssh.SSH")
+ def test_terminate(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ self.assertIsNone(trex_traffic_gen.terminate())
- def test_terminate(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- trex_traffic_gen = TrexTrafficGen(vnfd)
- self.assertEqual(None, trex_traffic_gen.terminate())
+ @mock.patch("yardstick.ssh.SSH")
+ def test__connect_client(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ client = mock.Mock(autospec=STLClient)
+ client.connect = mock.Mock(return_value=0)
+ self.assertIsNotNone(trex_traffic_gen.resource_helper._connect(client))
- def test__connect_client(self):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- trex_traffic_gen = TrexTrafficGen(vnfd)
- client = mock.Mock(autospec=STLClient)
- client.connect = mock.Mock(return_value=0)
- self.assertIsNotNone(trex_traffic_gen._connect_client(client))
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py
index 54934c2fe..80b4a5108 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py
@@ -20,334 +20,694 @@ from __future__ import absolute_import
import os
import unittest
+import six.moves.configparser as configparser
import mock
+from multiprocessing import Process, Queue
-from yardstick.network_services.nfvi.resource import ResourceProfile
-from yardstick.network_services.vnf_generic.vnf import vpe_vnf
-from yardstick.network_services.vnf_generic.vnf.base import \
- QueueFileWrapper
-from yardstick.network_services.vnf_generic.vnf.vpe_vnf import VpeApproxVnf
+from yardstick.network_services.vnf_generic.vnf.base import QueueFileWrapper
+SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper'
-@mock.patch('yardstick.network_services.vnf_generic.vnf.vpe_vnf.time')
+STL_MOCKS = {
+ 'stl': mock.MagicMock(),
+ 'stl.trex_stl_lib': mock.MagicMock(),
+ 'stl.trex_stl_lib.base64': mock.MagicMock(),
+ 'stl.trex_stl_lib.binascii': mock.MagicMock(),
+ 'stl.trex_stl_lib.collections': mock.MagicMock(),
+ 'stl.trex_stl_lib.copy': mock.MagicMock(),
+ 'stl.trex_stl_lib.datetime': mock.MagicMock(),
+ 'stl.trex_stl_lib.functools': mock.MagicMock(),
+ 'stl.trex_stl_lib.imp': mock.MagicMock(),
+ 'stl.trex_stl_lib.inspect': mock.MagicMock(),
+ 'stl.trex_stl_lib.json': mock.MagicMock(),
+ 'stl.trex_stl_lib.linecache': mock.MagicMock(),
+ 'stl.trex_stl_lib.math': mock.MagicMock(),
+ 'stl.trex_stl_lib.os': mock.MagicMock(),
+ 'stl.trex_stl_lib.platform': mock.MagicMock(),
+ 'stl.trex_stl_lib.pprint': mock.MagicMock(),
+ 'stl.trex_stl_lib.random': mock.MagicMock(),
+ 'stl.trex_stl_lib.re': mock.MagicMock(),
+ 'stl.trex_stl_lib.scapy': mock.MagicMock(),
+ 'stl.trex_stl_lib.socket': mock.MagicMock(),
+ 'stl.trex_stl_lib.string': mock.MagicMock(),
+ 'stl.trex_stl_lib.struct': mock.MagicMock(),
+ 'stl.trex_stl_lib.sys': mock.MagicMock(),
+ 'stl.trex_stl_lib.threading': mock.MagicMock(),
+ 'stl.trex_stl_lib.time': mock.MagicMock(),
+ 'stl.trex_stl_lib.traceback': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_async_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_exceptions': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_ext': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_jsonrpc_client': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_packet_builder_interface': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_packet_builder_scapy': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_port': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_stats': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_streams': mock.MagicMock(),
+ 'stl.trex_stl_lib.trex_stl_types': mock.MagicMock(),
+ 'stl.trex_stl_lib.types': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.argparse': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.collections': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.common': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.json': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.os': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.parsing_opts': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.pwd': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.random': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.re': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.string': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.sys': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.text_opts': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.text_tables': mock.MagicMock(),
+ 'stl.trex_stl_lib.utils.texttable': mock.MagicMock(),
+ 'stl.trex_stl_lib.warnings': mock.MagicMock(),
+ 'stl.trex_stl_lib.yaml': mock.MagicMock(),
+ 'stl.trex_stl_lib.zlib': mock.MagicMock(),
+ 'stl.trex_stl_lib.zmq': mock.MagicMock(),
+}
+
+STLClient = mock.MagicMock()
+stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
+stl_patch.start()
+
+if stl_patch:
+ from yardstick.network_services.vnf_generic.vnf.vpe_vnf import ConfigCreate
+ from yardstick.network_services.nfvi.resource import ResourceProfile
+ from yardstick.network_services.vnf_generic.vnf import vpe_vnf
+ from yardstick.network_services.vnf_generic.vnf.vpe_vnf import VpeApproxVnf
+
+from tests.unit.network_services.vnf_generic.vnf.test_base import FileAbsPath
+from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh
+
+
+TEST_FILE_YAML = 'nsb_test_case.yaml'
+
+NAME = 'vnf_1'
+
+PING_OUTPUT_1 = "Pkts in: 101\r\n\tPkts dropped by AH: 100\r\n\tPkts dropped by other: 100"
+
+MODULE_PATH = FileAbsPath(__file__)
+get_file_abspath = MODULE_PATH.get_path
+
+
+class TestConfigCreate(unittest.TestCase):
+
+ def test___init__(self):
+ config_create = ConfigCreate([0], [1], 2)
+ self.assertEqual(config_create.priv_ports, [0])
+ self.assertEqual(config_create.pub_ports, [1])
+ self.assertEqual(config_create.socket, 2)
+
+ def test_vpe_initialize(self):
+ config_create = ConfigCreate([0], [1], 2)
+ config = configparser.ConfigParser()
+ config_create.vpe_initialize(config)
+ self.assertEqual(config.get('EAL', 'log_level'), '0')
+ self.assertEqual(config.get('PIPELINE0', 'type'), 'MASTER')
+ self.assertEqual(config.get('PIPELINE0', 'core'), 's2C0')
+ self.assertEqual(config.get('MEMPOOL0', 'pool_size'), '256K')
+ self.assertEqual(config.get('MEMPOOL1', 'pool_size'), '2M')
+
+ def test_vpe_rxq(self):
+ config_create = ConfigCreate([0], [1, 2], 3)
+ config = configparser.ConfigParser()
+ config_create.vpe_rxq(config)
+ self.assertEqual(config.get('RXQ1.0', 'mempool'), 'MEMPOOL1')
+ self.assertEqual(config.get('RXQ2.0', 'mempool'), 'MEMPOOL1')
+
+ def test_get_sink_swq(self):
+ config_create = ConfigCreate([0], [1], 2)
+ config = configparser.ConfigParser()
+ config.add_section('PIPELINE0')
+ config.set('PIPELINE0', 'key1', 'value1')
+ config.set('PIPELINE0', 'key2', 'value2 SINK')
+ config.set('PIPELINE0', 'key3', 'TM value3')
+ config.set('PIPELINE0', 'key4', 'value4')
+ config.set('PIPELINE0', 'key5', 'the SINK value5')
+
+ self.assertEqual(config_create.get_sink_swq(config, 'PIPELINE0', 'key1', 5), 'SWQ-1')
+ self.assertEqual(config_create.get_sink_swq(config, 'PIPELINE0', 'key2', 5), 'SWQ-1 SINK0')
+ self.assertEqual(config_create.get_sink_swq(config, 'PIPELINE0', 'key3', 5), 'SWQ-1 TM5')
+ config_create.sw_q += 1
+ self.assertEqual(config_create.get_sink_swq(config, 'PIPELINE0', 'key4', 5), 'SWQ0')
+ self.assertEqual(config_create.get_sink_swq(config, 'PIPELINE0', 'key5', 5), 'SWQ0 SINK1')
+
+ def test_generate_vpe_script(self):
+ vpe_config_vnf = ConfigCreate([0], [0], 0)
+ intf = [
+ {
+ "virtual-interface": {
+ "dst_ip": "1.1.1.1",
+ "dst_mac": "00:00:00:00:00:00:02",
+ },
+ },
+ ]
+ result = vpe_config_vnf.generate_vpe_script(intf)
+ self.assertIsInstance(result, str)
+ self.assertNotEqual(result, '')
+
+ def test_create_vpe_config(self):
+ priv_ports = [
+ {
+ 'index': 0,
+ 'dpdk_port_num': 1,
+ 'peer_intf': {
+ 'dpdk_port_num': 2,
+ 'index': 3,
+ },
+ },
+ ]
+
+ pub_ports = [
+ {
+ 'index': 2,
+ 'dpdk_port_num': 3,
+ 'peer_intf': {
+ 'dpdk_port_num': 0,
+ 'index': 1,
+ },
+ },
+ ]
+
+ config_create = ConfigCreate(priv_ports, pub_ports, 23)
+ curr_path = os.path.dirname(os.path.abspath(__file__))
+ vpe_cfg = "samples/vnf_samples/nsut/vpe/vpe_config"
+ vnf_cfg = os.path.join(curr_path, "../../../../..", vpe_cfg)
+ config_create.create_vpe_config(vnf_cfg)
+ os.system("git checkout -- %s" % vnf_cfg)
+
+
+@mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time')
class TestVpeApproxVnf(unittest.TestCase):
- VNFD = {'vnfd:vnfd-catalog':
- {'vnfd':
- [{'short-name': 'VpeVnf',
- 'vdu':
- [{'routing_table':
- [{'network': '152.16.100.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.100.20',
- 'if': 'xe0'},
- {'network': '152.16.40.20',
- 'netmask': '255.255.255.0',
- 'gateway': '152.16.40.20',
- 'if': 'xe1'}],
- 'description': 'VPE approximation using DPDK',
- 'name': 'vpevnf-baremetal',
- 'nd_route_tbl':
- [{'network': '0064:ff9b:0:0:0:0:9810:6414',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
- 'if': 'xe0'},
- {'network': '0064:ff9b:0:0:0:0:9810:2814',
- 'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
- 'if': 'xe1'}],
- 'id': 'vpevnf-baremetal',
- 'external-interface':
- [{'virtual-interface':
- {'dst_mac': '00:00:00:00:00:04',
- 'vpci': '0000:05:00.0',
- 'local_ip': '152.16.100.19',
- 'type': 'PCI-PASSTHROUGH',
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '0',
- 'bandwidth': '10 Gbps',
- 'driver': "i40e",
- 'dst_ip': '152.16.100.20',
- 'local_iface_name': 'xe0',
- 'local_mac': '00:00:00:00:00:02'},
- 'vnfd-connection-point-ref': 'xe0',
- 'name': 'xe0'},
- {'virtual-interface':
- {'dst_mac': '00:00:00:00:00:03',
- 'vpci': '0000:05:00.1',
- 'local_ip': '152.16.40.19',
- 'type': 'PCI-PASSTHROUGH',
- 'driver': "i40e",
- 'netmask': '255.255.255.0',
- 'dpdk_port_num': '1',
- 'bandwidth': '10 Gbps',
- 'dst_ip': '152.16.40.20',
- 'local_iface_name': 'xe1',
- 'local_mac': '00:00:00:00:00:01'},
- 'vnfd-connection-point-ref': 'xe1',
- 'name': 'xe1'}]}],
- 'description': 'Vpe approximation using DPDK',
- 'mgmt-interface':
- {'vdu-id': 'vpevnf-baremetal',
- 'host': '1.2.1.1',
- 'password': 'r00t',
- 'user': 'root',
- 'ip': '1.2.1.1'},
- 'benchmark':
- {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']},
- 'connection-point': [{'type': 'VPORT', 'name': 'xe0'},
- {'type': 'VPORT', 'name': 'xe1'}],
- 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}}
-
- scenario_cfg = {'tc_options': {'rfc2544':
- {'allowed_drop_rate': '0.8 - 1'}},
- 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7',
- 'tc': 'tc_ipv4_1Mflow_64B_packetsize',
- 'runner': {'object': 'NetworkServiceTestCase',
- 'interval': 35,
- 'output_filename': '/tmp/yardstick.out',
- 'runner_id': 74476, 'duration': 400,
- 'type': 'Duration'},
- 'traffic_profile': 'ipv4_throughput_vpe.yaml',
- 'traffic_options': {'flow': 'ipv4_Packets_vpe.yaml',
- 'imix': 'imix_voice.yaml'},
- 'type': 'ISB',
- 'nodes': {'tg__2': 'trafficgen_2.yardstick',
- 'tg__1': 'trafficgen_1.yardstick',
- 'vnf__1': 'vnf.yardstick'},
- 'topology': 'vpe-tg-topology-baremetal.yaml'}
-
- context_cfg = {'nodes': {'tg__2':
- {'member-vnf-index': '3',
- 'role': 'TrafficGen',
- 'name': 'trafficgen_2.yardstick',
- 'vnfd-id-ref': 'tg__2',
- 'ip': '1.2.1.1',
- 'interfaces':
- {'xe0': {'local_iface_name': 'ens513f0',
- 'vld_id': 'public',
- 'netmask': '255.255.255.0',
- 'local_ip': '152.16.40.20',
- 'dst_mac': '00:00:00:00:00:01',
- 'local_mac': '00:00:00:00:00:03',
- 'dst_ip': '152.16.40.19',
- 'driver': 'ixgbe',
- 'vpci': '0000:02:00.0',
- 'dpdk_port_num': 0},
- 'xe1': {'local_iface_name': 'ens513f1',
- 'netmask': '255.255.255.0',
- 'network': '202.16.100.0',
- 'local_ip': '202.16.100.20',
- 'local_mac': '00:1e:67:d0:60:5d',
- 'driver': 'ixgbe',
- 'vpci': '0000:02:00.1',
- 'dpdk_port_num': 1}},
- 'password': 'r00t',
- 'VNF model': 'l3fwd_vnf.yaml',
- 'user': 'root'},
- 'tg__1':
- {'member-vnf-index': '1',
- 'role': 'TrafficGen',
- 'name': 'trafficgen_1.yardstick',
- 'vnfd-id-ref': 'tg__1',
- 'ip': '1.2.1.1',
- 'interfaces':
- {'xe0': {'local_iface_name': 'ens785f0',
- 'vld_id': 'private',
- 'netmask': '255.255.255.0',
- 'local_ip': '152.16.100.20',
- 'dst_mac': '00:00:00:00:00:02',
- 'local_mac': '00:00:00:00:00:04',
- 'dst_ip': '152.16.100.19',
- 'driver': 'i40e',
- 'vpci': '0000:05:00.0',
- 'dpdk_port_num': 0},
- 'xe1': {'local_iface_name': 'ens785f1',
- 'netmask': '255.255.255.0',
- 'local_ip': '152.16.100.21',
- 'local_mac': '00:00:00:00:00:01',
- 'driver': 'i40e',
- 'vpci': '0000:05:00.1',
- 'dpdk_port_num': 1}},
- 'password': 'r00t',
- 'VNF model': 'tg_rfc2544_tpl.yaml',
- 'user': 'root'},
- 'vnf__1':
- {'name': 'vnf.yardstick',
- 'vnfd-id-ref': 'vnf__1',
- 'ip': '1.2.1.1',
- 'interfaces':
- {'xe0': {'local_iface_name': 'ens786f0',
- 'vld_id': 'private',
- 'netmask': '255.255.255.0',
- 'local_ip': '152.16.100.19',
- 'dst_mac': '00:00:00:00:00:04',
- 'local_mac': '00:00:00:00:00:02',
- 'dst_ip': '152.16.100.20',
- 'driver': 'i40e',
- 'vpci': '0000:05:00.0',
- 'dpdk_port_num': 0},
- 'xe1': {'local_iface_name': 'ens786f1',
- 'vld_id': 'public',
- 'netmask': '255.255.255.0',
- 'local_ip': '152.16.40.19',
- 'dst_mac': '00:00:00:00:00:03',
- 'local_mac': '00:00:00:00:00:01',
- 'dst_ip': '152.16.40.20',
- 'driver': 'i40e',
- 'vpci': '0000:05:00.1',
- 'dpdk_port_num': 1}},
- 'routing_table':
- [{'netmask': '255.255.255.0',
- 'gateway': '152.16.100.20',
- 'network': '152.16.100.20',
- 'if': 'xe0'},
- {'netmask': '255.255.255.0',
- 'gateway': '152.16.40.20',
- 'network': '152.16.40.20',
- 'if': 'xe1'}],
- 'member-vnf-index': '2',
- 'host': '1.2.1.1',
- 'role': 'vnf',
- 'user': 'root',
- 'nd_route_tbl':
- [{'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
- 'network': '0064:ff9b:0:0:0:0:9810:6414',
- 'if': 'xe0'},
- {'netmask': '112',
- 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
- 'network': '0064:ff9b:0:0:0:0:9810:2814',
- 'if': 'xe1'}],
- 'password': 'r00t',
- 'VNF model': 'vpe_vnf.yaml'}}}
-
- def test___init__(self, mock_time):
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
+
+ VNFD_0 = {
+ 'short-name': 'VpeVnf',
+ 'vdu': [
+ {
+ 'routing_table': [
+ {
+ 'network': '152.16.100.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'if': 'xe0',
+ },
+ {
+ 'network': '152.16.40.20',
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'if': 'xe1',
+ },
+ ],
+ 'description': 'VPE approximation using DPDK',
+ 'name': 'vpevnf-baremetal',
+ 'nd_route_tbl': [
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0',
+ },
+ {
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1',
+ },
+ ],
+ 'id': 'vpevnf-baremetal',
+ 'external-interface': [
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'vld_id': '',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '0',
+ 'bandwidth': '10 Gbps',
+ 'driver': "i40e",
+ 'dst_ip': '152.16.100.20',
+ 'local_iface_name': 'xe0',
+ 'local_mac': '00:00:00:00:00:02',
+ },
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0',
+ },
+ {
+ 'virtual-interface': {
+ 'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:05:00.1',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'vld_id': '',
+ 'driver': "i40e",
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': '1',
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_iface_name': 'xe1',
+ 'local_mac': '00:00:00:00:00:01',
+ },
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1',
+ },
+ ],
+ },
+ ],
+ 'description': 'Vpe approximation using DPDK',
+ 'mgmt-interface': {
+ 'vdu-id': 'vpevnf-baremetal',
+ 'host': '1.2.1.1',
+ 'password': 'r00t',
+ 'user': 'root',
+ 'ip': '1.2.1.1',
+ },
+ 'benchmark': {
+ 'kpi': [
+ 'packets_in',
+ 'packets_fwd',
+ 'packets_dropped',
+ ],
+ },
+ 'connection-point': [
+ {
+ 'type': 'VPORT',
+ 'name': 'xe0',
+ },
+ {
+ 'type': 'VPORT',
+ 'name': 'xe1',
+ },
+ ],
+ 'id': 'VpeApproxVnf',
+ 'name': 'VPEVnfSsh',
+ }
+
+ VNFD = {
+ 'vnfd:vnfd-catalog': {
+ 'vnfd': [
+ VNFD_0,
+ ],
+ },
+ }
+
+ SCENARIO_CFG = {
+ 'options': {
+ 'packetsize': 64,
+ 'traffic_type': 4 ,
+ 'rfc2544': {
+ 'allowed_drop_rate': '0.8 - 1',
+ },
+ 'vnf__1': {
+ 'cfg': 'acl_1rule.yaml',
+ 'vnf_config': {
+ 'lb_config': 'SW',
+ 'lb_count': 1,
+ 'worker_config':
+ '1C/1T',
+ 'worker_threads': 1,
+ },
+ }
+ },
+ 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7',
+ 'tc': 'tc_ipv4_1Mflow_64B_packetsize',
+ 'runner': {
+ 'object': 'NetworkServiceTestCase',
+ 'interval': 35,
+ 'output_filename': '/tmp/yardstick.out',
+ 'runner_id': 74476,
+ 'duration': 400,
+ 'type': 'Duration',
+ },
+ 'traffic_profile': 'ipv4_throughput_vpe.yaml',
+ 'traffic_options': {
+ 'flow': 'ipv4_Packets_vpe.yaml',
+ 'imix': 'imix_voice.yaml',
+ },
+ 'type': 'ISB',
+ 'nodes': {
+ 'tg__2': 'trafficgen_2.yardstick',
+ 'tg__1': 'trafficgen_1.yardstick',
+ 'vnf__1': 'vnf.yardstick',
+ },
+ 'topology': 'vpe-tg-topology-baremetal.yaml',
+ }
+
+ CONTEXT_CFG = {
+ 'nodes': {
+ 'tg__2': {
+ 'member-vnf-index': '3',
+ 'role': 'TrafficGen',
+ 'name': 'trafficgen_2.yardstick',
+ 'vnfd-id-ref': 'tg__2',
+ 'ip': '1.2.1.1',
+ 'interfaces': {
+ 'xe0': {
+ 'local_iface_name': 'ens513f0',
+ 'vld_id': 'public',
+ 'netmask': '255.255.255.0',
+ 'local_ip': '152.16.40.20',
+ 'dst_mac': '00:00:00:00:00:01',
+ 'local_mac': '00:00:00:00:00:03',
+ 'dst_ip': '152.16.40.19',
+ 'driver': 'ixgbe',
+ 'vpci': '0000:02:00.0',
+ 'dpdk_port_num': 0,
+ },
+ 'xe1': {
+ 'local_iface_name': 'ens513f1',
+ 'netmask': '255.255.255.0',
+ 'network': '202.16.100.0',
+ 'local_ip': '202.16.100.20',
+ 'local_mac': '00:1e:67:d0:60:5d',
+ 'driver': 'ixgbe',
+ 'vpci': '0000:02:00.1',
+ 'dpdk_port_num': 1,
+ },
+ },
+ 'password': 'r00t',
+ 'VNF model': 'l3fwd_vnf.yaml',
+ 'user': 'root',
+ },
+ 'tg__1': {
+ 'member-vnf-index': '1',
+ 'role': 'TrafficGen',
+ 'name': 'trafficgen_1.yardstick',
+ 'vnfd-id-ref': 'tg__1',
+ 'ip': '1.2.1.1',
+ 'interfaces': {
+ 'xe0': {
+ 'local_iface_name': 'ens785f0',
+ 'vld_id': 'private',
+ 'netmask': '255.255.255.0',
+ 'local_ip': '152.16.100.20',
+ 'dst_mac': '00:00:00:00:00:02',
+ 'local_mac': '00:00:00:00:00:04',
+ 'dst_ip': '152.16.100.19',
+ 'driver': 'i40e',
+ 'vpci': '0000:05:00.0',
+ 'dpdk_port_num': 0,
+ },
+ 'xe1': {
+ 'local_iface_name': 'ens785f1',
+ 'netmask': '255.255.255.0',
+ 'local_ip': '152.16.100.21',
+ 'local_mac': '00:00:00:00:00:01',
+ 'driver': 'i40e',
+ 'vpci': '0000:05:00.1',
+ 'dpdk_port_num': 1,
+ },
+ },
+ 'password': 'r00t',
+ 'VNF model': 'tg_rfc2544_tpl.yaml',
+ 'user': 'root',
+ },
+ 'vnf__1': {
+ 'name': 'vnf.yardstick',
+ 'vnfd-id-ref': 'vnf__1',
+ 'ip': '1.2.1.1',
+ 'interfaces': {
+ 'xe0': {
+ 'local_iface_name': 'ens786f0',
+ 'vld_id': 'private',
+ 'netmask': '255.255.255.0',
+ 'local_ip': '152.16.100.19',
+ 'dst_mac': '00:00:00:00:00:04',
+ 'local_mac': '00:00:00:00:00:02',
+ 'dst_ip': '152.16.100.20',
+ 'driver': 'i40e',
+ 'vpci': '0000:05:00.0',
+ 'dpdk_port_num': 0,
+ },
+ 'xe1': {
+ 'local_iface_name': 'ens786f1',
+ 'vld_id': 'public',
+ 'netmask': '255.255.255.0',
+ 'local_ip': '152.16.40.19',
+ 'dst_mac': '00:00:00:00:00:03',
+ 'local_mac': '00:00:00:00:00:01',
+ 'dst_ip': '152.16.40.20',
+ 'driver': 'i40e',
+ 'vpci': '0000:05:00.1',
+ 'dpdk_port_num': 1,
+ },
+ },
+ 'routing_table': [
+ {
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.100.20',
+ 'network': '152.16.100.20',
+ 'if': 'xe0',
+ },
+ {
+ 'netmask': '255.255.255.0',
+ 'gateway': '152.16.40.20',
+ 'network': '152.16.40.20',
+ 'if': 'xe1',
+ },
+ ],
+ 'member-vnf-index': '2',
+ 'host': '1.2.1.1',
+ 'role': 'vnf',
+ 'user': 'root',
+ 'nd_route_tbl': [
+ {
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:6414',
+ 'network': '0064:ff9b:0:0:0:0:9810:6414',
+ 'if': 'xe0',
+ },
+ {
+ 'netmask': '112',
+ 'gateway': '0064:ff9b:0:0:0:0:9810:2814',
+ 'network': '0064:ff9b:0:0:0:0:9810:2814',
+ 'if': 'xe1',
+ },
+ ],
+ 'password': 'r00t',
+ 'VNF model': 'vpe_vnf.yaml',
+ },
+ },
+ }
+
+ def test___init__(self, _):
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
self.assertIsNone(vpe_approx_vnf._vnf_process)
- def test_collect_kpi(self, mock_time):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- vpe_approx_vnf.resource = mock.Mock(autospec=ResourceProfile)
- vpe_approx_vnf.resource.check_if_sa_running = \
- mock.Mock(return_value=[0, 1])
- vpe_approx_vnf.resource.amqp_collect_nfvi_kpi = \
- mock.Mock(return_value={})
- result = {'pkt_in_down_stream': 0,
- 'pkt_in_up_stream': 0,
- 'collect_stats': {'core': {}},
- 'pkt_drop_down_stream': 0, 'pkt_drop_up_stream': 0}
- # mock execute_command because it sleeps for 3 seconds.
- with mock.patch.object(vpe_approx_vnf, "execute_command", return_value=""):
- self.assertEqual(result, vpe_approx_vnf.collect_kpi())
-
- def test_execute_command(self, mock_time):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- cmd = "quit"
- self.assertEqual("", vpe_approx_vnf.execute_command(cmd))
-
- def test_get_stats_vpe(self, mock_time):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- vpe_approx_vnf.execute_command = \
- mock.Mock(return_value="Pkts in: 101\r\n\tPkts dropped by AH: 100\r\n\tPkts dropped by other: 100")
- result = {'pkt_in_down_stream': 202, 'pkt_in_up_stream': 303,
- 'pkt_drop_down_stream': 400, 'pkt_drop_up_stream': 600}
- self.assertEqual(result, vpe_approx_vnf.get_stats_vpe())
-
- def test_run_vpe(self, mock_time):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh_mock.run = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- curr_path = os.path.dirname(os.path.abspath(__file__))
- vpe_vnf = os.path.join(curr_path, "vpe_config")
- queue_wrapper = \
- QueueFileWrapper(vpe_approx_vnf.q_in,
- vpe_approx_vnf.q_out, "pipeline>")
- self.assertEqual(None,
- vpe_approx_vnf._run_vpe(queue_wrapper, vpe_vnf))
-
- def test_instantiate(self, mock_time):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- self.scenario_cfg['vnf_options'] = {'vpe': {'cfg': ""}}
- vpe_approx_vnf._run_vpe = mock.Mock(return_value=0)
- vpe_approx_vnf._resource_collect_start = mock.Mock(return_value=0)
- vpe_approx_vnf.q_out.put("pipeline>")
- vpe_vnf.WAIT_TIME = 0.1
- # if process it still running exitcode will be None
- self.assertIn(vpe_approx_vnf.instantiate(self.scenario_cfg, self.context_cfg),
- {0, None})
-
- def test_instantiate_panic(self, mock_time):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(1, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- self.scenario_cfg['vnf_options'] = {'vpe': {'cfg': ""}}
- vpe_approx_vnf._run_vpe = mock.Mock(return_value=0)
- vpe_vnf.WAIT_TIME = 0.1
- self.assertRaises(RuntimeError, vpe_approx_vnf.instantiate,
- self.scenario_cfg, self.context_cfg)
-
- def test_scale(self, mock_time):
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- flavor = ""
- self.assertRaises(NotImplementedError, vpe_approx_vnf.scale, flavor)
-
- def test_setup_vnf_environment(self, mock_time):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "", ""))
- ssh.from_node.return_value = ssh_mock
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- self.assertEqual(None,
- vpe_approx_vnf.setup_vnf_environment(ssh_mock))
-
- def test_terminate(self, mock_time):
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- vpe_approx_vnf = VpeApproxVnf(vnfd)
- self.assertEqual(None, vpe_approx_vnf.terminate())
+ @mock.patch(SSH_HELPER)
+ def test_collect_kpi_sa_not_running(self, ssh, _):
+ mock_ssh(ssh)
+
+ resource = mock.Mock(autospec=ResourceProfile)
+ resource.check_if_sa_running.return_value = False, 'error'
+ resource.amqp_collect_nfvi_kpi.return_value = {'foo': 234}
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf.q_in = mock.MagicMock()
+ vpe_approx_vnf.q_out = mock.MagicMock()
+ vpe_approx_vnf.q_out.qsize = mock.Mock(return_value=0)
+ vpe_approx_vnf.resource_helper.resource = resource
+
+ expected = {
+ 'pkt_in_down_stream': 0,
+ 'pkt_in_up_stream': 0,
+ 'pkt_drop_down_stream': 0,
+ 'pkt_drop_up_stream': 0,
+ 'collect_stats': {'core': {}},
+ }
+ self.assertEqual(vpe_approx_vnf.collect_kpi(), expected)
+
+ @mock.patch(SSH_HELPER)
+ def test_collect_kpi_sa_running(self, ssh, _):
+ mock_ssh(ssh)
+
+ resource = mock.Mock(autospec=ResourceProfile)
+ resource.check_if_sa_running.return_value = True, 'good'
+ resource.amqp_collect_nfvi_kpi.return_value = {'foo': 234}
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf.q_in = mock.MagicMock()
+ vpe_approx_vnf.q_out = mock.MagicMock()
+ vpe_approx_vnf.q_out.qsize = mock.Mock(return_value=0)
+ vpe_approx_vnf.resource_helper.resource = resource
+
+ expected = {
+ 'pkt_in_down_stream': 0,
+ 'pkt_in_up_stream': 0,
+ 'pkt_drop_down_stream': 0,
+ 'pkt_drop_up_stream': 0,
+ 'collect_stats': {'core': {'foo': 234}},
+ }
+ self.assertEqual(vpe_approx_vnf.collect_kpi(), expected)
+
+ @mock.patch(SSH_HELPER)
+ def test_vnf_execute(self, ssh, _):
+ mock_ssh(ssh)
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf.q_in = mock.MagicMock()
+ vpe_approx_vnf.q_out = mock.MagicMock()
+ vpe_approx_vnf.q_out.qsize = mock.Mock(return_value=0)
+ self.assertEqual(vpe_approx_vnf.vnf_execute("quit", 0), '')
+
+ @mock.patch(SSH_HELPER)
+ def test_run_vpe(self, ssh, _):
+ mock_ssh(ssh)
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf.tc_file_name = get_file_abspath(TEST_FILE_YAML)
+ vpe_approx_vnf.generate_port_pairs = mock.Mock()
+ vpe_approx_vnf.tg_port_pairs = [[[0], [1]]]
+ vpe_approx_vnf.vnf_port_pairs = [[[0], [1]]]
+ vpe_approx_vnf.vnf_cfg = {
+ 'lb_config': 'SW',
+ 'lb_count': 1,
+ 'worker_config': '1C/1T',
+ 'worker_threads': 1,
+ }
+ vpe_approx_vnf.scenario_helper.scenario_cfg = {
+ 'options': {
+ NAME: {
+ 'traffic_type': '4',
+ 'topology': 'nsb_test_case.yaml',
+ }
+ }
+ }
+ vpe_approx_vnf.topology = "nsb_test_case.yaml"
+ vpe_approx_vnf.nfvi_type = "baremetal"
+ vpe_approx_vnf._provide_config_file = mock.Mock()
+
+ self.assertIsInstance(vpe_approx_vnf.ssh_helper, mock.Mock)
+ self.assertIsNone(vpe_approx_vnf._run())
+
+ @mock.patch(SSH_HELPER)
+ def test_wait_for_instantiate(self, ssh, _):
+ mock_ssh(ssh)
+
+ mock_process = mock.Mock(autospec=Process)
+ mock_process.is_alive.return_value = True
+ mock_process.exitcode = 432
+
+ mock_q_out = mock.Mock(autospec=Queue)
+ mock_q_out.get.side_effect = iter(["pipeline>"])
+ mock_q_out.qsize.side_effect = range(1, -1, -1)
+
+ mock_resource = mock.MagicMock()
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf._vnf_process = mock_process
+ vpe_approx_vnf.q_out = mock_q_out
+ vpe_approx_vnf.queue_wrapper = mock.Mock(autospec=QueueFileWrapper)
+ vpe_approx_vnf.resource_helper.resource = mock_resource
+
+ vpe_approx_vnf.q_out.put("pipeline>")
+ self.assertEqual(vpe_approx_vnf.wait_for_instantiate(), 432)
+
+ @mock.patch(SSH_HELPER)
+ def test_wait_for_instantiate_fragmented(self, ssh, _):
+ mock_ssh(ssh)
+
+ mock_process = mock.Mock(autospec=Process)
+ mock_process.is_alive.return_value = True
+ mock_process.exitcode = 432
+
+ # test that fragmented pipeline prompt is recognized
+ mock_q_out = mock.Mock(autospec=Queue)
+ mock_q_out.get.side_effect = iter(["wow pipel", "ine>"])
+ mock_q_out.qsize.side_effect = range(2, -1, -1)
+
+ mock_resource = mock.MagicMock()
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf._vnf_process = mock_process
+ vpe_approx_vnf.q_out = mock_q_out
+ vpe_approx_vnf.queue_wrapper = mock.Mock(autospec=QueueFileWrapper)
+ vpe_approx_vnf.resource_helper.resource = mock_resource
+
+ self.assertEqual(vpe_approx_vnf.wait_for_instantiate(), 432)
+
+ @mock.patch(SSH_HELPER)
+ def test_wait_for_instantiate_crash(self, ssh, _):
+ mock_ssh(ssh, exec_result=(1, "", ""))
+
+ mock_process = mock.Mock(autospec=Process)
+ mock_process.is_alive.return_value = False
+ mock_process.exitcode = 432
+
+ mock_resource = mock.MagicMock()
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf._vnf_process = mock_process
+ vpe_approx_vnf.resource_helper.resource = mock_resource
+
+ with self.assertRaises(RuntimeError) as raised:
+ vpe_approx_vnf.wait_for_instantiate()
+
+ self.assertIn('VNF process died', str(raised.exception))
+
+ @mock.patch(SSH_HELPER)
+ def test_wait_for_instantiate_panic(self, ssh, _):
+ mock_ssh(ssh, exec_result=(1, "", ""))
+
+ mock_process = mock.Mock(autospec=Process)
+ mock_process.is_alive.return_value = True
+ mock_process.exitcode = 432
+
+ mock_resource = mock.MagicMock()
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf._vnf_process = mock_process
+ vpe_approx_vnf.resource_helper.resource = mock_resource
+
+ vpe_approx_vnf.q_out.put("PANIC")
+ with self.assertRaises(RuntimeError) as raised:
+ vpe_approx_vnf.wait_for_instantiate()
+
+ self.assertIn('Error starting', str(raised.exception))
+
+ @mock.patch(SSH_HELPER)
+ def test_wait_for_instantiate_panic_fragmented(self, ssh, _):
+ mock_ssh(ssh, exec_result=(1, "", ""))
+
+ mock_process = mock.Mock(autospec=Process)
+ mock_process.is_alive.return_value = True
+ mock_process.exitcode = 432
+
+ # test that fragmented PANIC is recognized
+ mock_q_out = mock.Mock(autospec=Queue)
+ mock_q_out.get.side_effect = iter(["omg PA", "NIC this is bad"])
+ mock_q_out.qsize.side_effect = range(2, -1, -1)
+
+ mock_resource = mock.MagicMock()
+
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf._vnf_process = mock_process
+ vpe_approx_vnf.q_out = mock_q_out
+ vpe_approx_vnf.resource_helper.resource = mock_resource
+
+ with self.assertRaises(RuntimeError) as raised:
+ vpe_approx_vnf.wait_for_instantiate()
+
+ self.assertIn('Error starting', str(raised.exception))
+
+ def test_scale(self, _):
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ with self.assertRaises(NotImplementedError):
+ vpe_approx_vnf.scale('')
+
+ def test_terminate(self, _):
+ vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0)
+ vpe_approx_vnf.vnf_execute = mock.Mock()
+ vpe_approx_vnf._vnf_process = mock.MagicMock()
+ vpe_approx_vnf._vnf_process.terminate = mock.Mock()
+ vpe_approx_vnf._resource_collect_stop = mock.Mock()
+ vpe_approx_vnf.resource_helper = mock.MagicMock()
+ vpe_approx_vnf.ssh_helper = mock.MagicMock()
+
+ self.assertIsNone(vpe_approx_vnf.terminate())
+
if __name__ == '__main__':
unittest.main()
diff --git a/tests/unit/network_services/vnf_generic/vnf/vpe_config/action_bulk_512.txt b/tests/unit/network_services/vnf_generic/vnf/vpe_config/action_bulk_512.txt
deleted file mode 100644
index 21731cd45..000000000
--- a/tests/unit/network_services/vnf_generic/vnf/vpe_config/action_bulk_512.txt
+++ /dev/null
@@ -1,512 +0,0 @@
-flow 0 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 1 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 2 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 3 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 4 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 5 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 6 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 7 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 8 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 9 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 10 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 11 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 12 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 13 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 14 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 15 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 16 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 17 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 18 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 19 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 20 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 21 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 22 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 23 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 24 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 25 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 26 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 27 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 28 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 29 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 30 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 31 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 32 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 33 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 34 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 35 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 36 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 37 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 38 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 39 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 40 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 41 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 42 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 43 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 44 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 45 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 46 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 47 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 48 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 49 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 50 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 51 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 52 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 53 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 54 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 55 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 56 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 57 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 58 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 59 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 60 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 61 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 62 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 63 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 64 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 65 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 66 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 67 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 68 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 69 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 70 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 71 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 72 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 73 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 74 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 75 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 76 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 77 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 78 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 79 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 80 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 81 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 82 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 83 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 84 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 85 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 86 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 87 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 88 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 89 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 90 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 91 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 92 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 93 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 94 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 95 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 96 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 97 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 98 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 99 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 100 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 101 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 102 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 103 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 104 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 105 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 106 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 107 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 108 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 109 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 110 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 111 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 112 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 113 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 114 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 115 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 116 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 117 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 118 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 119 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 120 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 121 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 122 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 123 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 124 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 125 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 126 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 127 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 128 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 129 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 130 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 131 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 132 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 133 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 134 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 135 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 136 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 137 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 138 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 139 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 140 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 141 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 142 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 143 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 144 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 145 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 146 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 147 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 148 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 149 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 150 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 151 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 152 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 153 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 154 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 155 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 156 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 157 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 158 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 159 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 160 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 161 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 162 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 163 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 164 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 165 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 166 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 167 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 168 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 169 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 170 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 171 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 172 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 173 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 174 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 175 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 176 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 177 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 178 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 179 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 180 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 181 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 182 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 183 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 184 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 185 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 186 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 187 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 188 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 189 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 190 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 191 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 192 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 193 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 194 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 195 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 196 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 197 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 198 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 199 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 200 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 201 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 202 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 203 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 204 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 205 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 206 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 207 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 208 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 209 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 210 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 211 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 212 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 213 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 214 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 215 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 216 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 217 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 218 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 219 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 220 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 221 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 222 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 223 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 224 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 225 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 226 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 227 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 228 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 229 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 230 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 231 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 232 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 233 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 234 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 235 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 236 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 237 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 238 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 239 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 240 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 241 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 242 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 243 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 244 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 245 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 246 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 247 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 248 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 249 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 250 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 251 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 252 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 253 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 254 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 255 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 256 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 257 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 258 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 259 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 260 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 261 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 262 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 263 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 264 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 265 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 266 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 267 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 268 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 269 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 270 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 271 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 272 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 273 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 274 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 275 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 276 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 277 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 278 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 279 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 280 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 281 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 282 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 283 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 284 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 285 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 286 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 287 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 288 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 289 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 290 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 291 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 292 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 293 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 294 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 295 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 296 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 297 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 298 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 299 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 300 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 301 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 302 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 303 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 304 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 305 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 306 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 307 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 308 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 309 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 310 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 311 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 312 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 313 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 314 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 315 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 316 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 317 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 318 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 319 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 320 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 321 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 322 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 323 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 324 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 325 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 326 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 327 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 328 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 329 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 330 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 331 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 332 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 333 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 334 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 335 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 336 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 337 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 338 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 339 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 340 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 341 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 342 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 343 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 344 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 345 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 346 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 347 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 348 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 349 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 350 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 351 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 352 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 353 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 354 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 355 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 356 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 357 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 358 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 359 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 360 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 361 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 362 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 363 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 364 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 365 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 366 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 367 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 368 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 369 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 370 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 371 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 372 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 373 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 374 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 375 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 376 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 377 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 378 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 379 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 380 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 381 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 382 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 383 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 384 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 385 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 386 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 387 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 388 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 389 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 390 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 391 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 392 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 393 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 394 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 395 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 396 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 397 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 398 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 399 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 400 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 401 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 402 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 403 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 404 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 405 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 406 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 407 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 408 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 409 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 410 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 411 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 412 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 413 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 414 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 415 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 416 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 417 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 418 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 419 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 420 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 421 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 422 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 423 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 424 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 425 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 426 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 427 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 428 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 429 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 430 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 431 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 432 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 433 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 434 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 435 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 436 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 437 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 438 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 439 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 440 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 441 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 442 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 443 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 444 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 445 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 446 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 447 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 448 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 449 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 450 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 451 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 452 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 453 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 454 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 455 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 456 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 457 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 458 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 459 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 460 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 461 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 462 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 463 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 464 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 465 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 466 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 467 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 468 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 469 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 470 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 471 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 472 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 473 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 474 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 475 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 476 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 477 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 478 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 479 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 480 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 481 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 482 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 483 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 484 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 485 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 486 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 487 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 488 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 489 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 490 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 491 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 492 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 493 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 494 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 495 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 496 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 497 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 498 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 499 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 500 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 501 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 502 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 503 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 504 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 505 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 506 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 507 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 508 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 509 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 510 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
-flow 511 meter 0 trtcm 1250000000 1250000000 1000000 1000000 policer 0 g G y Y r R meter 1 trtcm 1250000000 1250000000 1000000 1000000 policer 1 g G y Y r R meter 2 trtcm 1250000000 1250000000 1000000 1000000 policer 2 g G y Y r R meter 3 trtcm 1250000000 1250000000 1000000 1000000 policer 3 g G y Y r R port 0
diff --git a/tests/unit/network_services/vnf_generic/vnf/vpe_config/full_tm_profile_10G.cfg b/tests/unit/network_services/vnf_generic/vnf/vpe_config/full_tm_profile_10G.cfg
deleted file mode 100755
index 502655fd0..000000000
--- a/tests/unit/network_services/vnf_generic/vnf/vpe_config/full_tm_profile_10G.cfg
+++ /dev/null
@@ -1,105 +0,0 @@
-; BSD LICENSE
-;
-; Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-; All rights reserved.
-;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions
-; are met:
-;
-; * Redistributions of source code must retain the above copyright
-; notice, this list of conditions and the following disclaimer.
-; * Redistributions in binary form must reproduce the above copyright
-; notice, this list of conditions and the following disclaimer in
-; the documentation and/or other materials provided with the
-; distribution.
-; * Neither the name of Intel Corporation nor the names of its
-; contributors may be used to endorse or promote products derived
-; from this software without specific prior written permission.
-;
-; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-; This file enables the following hierarchical scheduler configuration for each
-; 10GbE output port:
-; * Single subport (subport 0):
-; - Subport rate set to 100% of port rate
-; - Each of the 4 traffic classes has rate set to 100% of port rate
-; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
-; - Pipe rate set to 1/4K of port rate
-; - Each of the 4 traffic classes has rate set to 100% of pipe rate
-; - Within each traffic class, the byte-level WRR weights for the 4 queues
-; are set to 1:1:1:1
-;
-; For more details, please refer to chapter "Quality of Service (QoS) Framework"
-; of Intel Data Plane Development Kit (Intel DPDK) Programmer's Guide.
-
-; Port configuration
-[port]
-frame overhead = 24 ; frame overhead = Preamble (7) + SFD (1) + FCS (4) + IFG (12)
-mtu = 1522; mtu = Q-in-Q MTU (FCS not included)
-number of subports per port = 1
-number of pipes per subport = 4096
-queue sizes = 64 64 64 64
-
-; Subport configuration
-[subport 0]
-tb rate = 1250000000 ; Bytes per second
-tb size = 1000000 ; Bytes
-
-tc 0 rate = 1250000000 ; Bytes per second
-tc 1 rate = 1250000000 ; Bytes per second
-tc 2 rate = 1250000000 ; Bytes per second
-tc 3 rate = 1250000000 ; Bytes per second
-tc period = 10 ; Milliseconds
-
-pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
-
-; Pipe configuration
-[pipe profile 0]
-tb rate = 1250000000 ; Bytes per second
-tb size = 1000000 ; Bytes
-
-tc 0 rate = 1250000000 ; Bytes per second
-tc 1 rate = 1250000000 ; Bytes per second
-tc 2 rate = 1250000000 ; Bytes per second
-tc 3 rate = 1250000000 ; Bytes per second
-tc period = 40 ; Milliseconds
-
-tc 3 oversubscription weight = 1
-
-tc 0 wrr weights = 1 1 1 1
-tc 1 wrr weights = 1 1 1 1
-tc 2 wrr weights = 1 1 1 1
-tc 3 wrr weights = 1 1 1 1
-
-; RED params per traffic class and color (Green / Yellow / Red)
-[red]
-tc 0 wred min = 48 40 32
-tc 0 wred max = 64 64 64
-tc 0 wred inv prob = 10 10 10
-tc 0 wred weight = 9 9 9
-
-tc 1 wred min = 48 40 32
-tc 1 wred max = 64 64 64
-tc 1 wred inv prob = 10 10 10
-tc 1 wred weight = 9 9 9
-
-tc 2 wred min = 48 40 32
-tc 2 wred max = 64 64 64
-tc 2 wred inv prob = 10 10 10
-tc 2 wred weight = 9 9 9
-
-tc 3 wred min = 48 40 32
-tc 3 wred max = 64 64 64
-tc 3 wred inv prob = 10 10 10
-tc 3 wred weight = 9 9 9
diff --git a/tests/unit/network_services/vnf_generic/vnf/vpe_config/fw_bulk_inst0_256.txt b/tests/unit/network_services/vnf_generic/vnf/vpe_config/fw_bulk_inst0_256.txt
deleted file mode 100644
index 307150789..000000000
--- a/tests/unit/network_services/vnf_generic/vnf/vpe_config/fw_bulk_inst0_256.txt
+++ /dev/null
@@ -1,256 +0,0 @@
-priority 1 ipv4 152.16.0.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.1.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.2.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.3.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.4.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.5.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.6.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.7.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.8.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.9.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.10.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.11.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.12.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.13.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.14.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.15.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.16.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.17.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.18.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.19.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.20.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.21.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.22.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.23.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.24.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.25.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.26.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.27.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.28.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.29.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.30.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.31.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.32.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.33.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.34.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.35.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.36.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.37.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.38.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.39.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.40.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.41.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.42.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.43.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.44.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.45.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.46.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.47.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.48.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.49.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.50.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.51.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.52.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.53.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.54.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.55.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.56.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.57.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.58.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.59.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.60.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.61.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.62.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.63.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.64.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.65.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.66.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.67.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.68.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.69.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.70.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.71.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.72.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.73.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.74.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.75.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.76.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.77.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.78.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.79.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.80.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.81.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.82.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.83.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.84.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.85.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.86.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.87.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.88.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.89.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.90.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.91.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.92.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.93.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.94.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.95.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.96.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.97.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.98.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.99.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.100.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.101.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.102.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.103.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.104.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.105.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.106.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.107.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.108.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.109.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.110.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.111.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.112.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.113.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.114.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.115.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.116.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.117.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.118.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.119.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.120.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.121.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.122.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.123.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.124.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.125.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.126.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.127.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.128.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.129.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.130.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.131.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.132.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.133.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.134.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.135.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.136.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.137.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.138.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.139.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.140.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.141.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.142.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.143.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.144.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.145.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.146.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.147.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.148.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.149.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.150.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.151.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.152.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.153.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.154.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.155.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.156.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.157.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.158.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.159.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.160.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.161.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.162.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.163.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.164.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.165.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.166.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.167.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.168.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.169.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.170.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.171.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.172.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.173.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.174.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.175.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.176.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.177.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.178.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.179.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.180.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.181.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.182.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.183.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.184.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.185.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.186.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.187.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.188.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.189.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.190.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.191.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.192.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.193.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.194.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.195.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.196.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.197.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.198.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.199.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.200.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.201.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.202.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.203.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.204.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.205.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.206.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.207.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.208.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.209.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.210.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.211.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.212.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.213.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.214.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.215.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.216.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.217.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.218.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.219.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.220.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.221.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.222.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.223.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.224.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.225.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.226.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.227.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.228.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.229.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.230.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.231.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.232.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.233.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.234.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.235.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.236.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.237.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.238.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.239.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.240.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.241.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.242.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.243.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.244.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.245.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.246.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.247.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.248.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.249.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.250.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.251.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.252.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.253.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.254.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
-priority 1 ipv4 152.16.255.0 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0
diff --git a/tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_config b/tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_config
deleted file mode 100644
index 17ebc6a76..000000000
--- a/tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_config
+++ /dev/null
@@ -1,101 +0,0 @@
-[EAL]
-log_level = 0
-
-[PIPELINE0]
-type = MASTER
-core = s{socket}c0
-
-[MEMPOOL0]
-pool_size = 256K
-
-[MEMPOOL1]
-pool_size = 2M
-
-[RXQ1.0]
-mempool = MEMPOOL1
-
-;;;;;;;;;;Begin of upstream 0;;;;;;;;;;;;;;;;;;
-[PIPELINE1]
-type = FIREWALL
-core = s{socket}c1
-pktq_in = RXQ0.0
-pktq_out = SWQ0 SINK0
-n_rules = 4096
-pkt_type = qinq_ipv4
-
-[PIPELINE2]
-type = FLOW_CLASSIFICATION
-core = s{socket}c1
-pktq_in = SWQ0
-pktq_out = SWQ1 SINK1
-n_flows = 65536
-key_size = 8; dma_size
-key_offset = 268; dma_dst_offset
-key_mask = 00000FFF00000FFF; qinq
-flowid_offset = 172; mbuf (128) + 64
-
-[PIPELINE3]
-type = FLOW_ACTIONS
-core = s{socket}c1h
-pktq_in = SWQ1
-pktq_out = SWQ2
-n_flows = 65536
-n_meters_per_flow = 1;dscp is not considered for per user metering
-flow_id_offset = 172; mbuf (128) + 64
-ip_hdr_offset = 278 ; should not needed, but who knows?
-color_offset = 176
-
-[PIPELINE4]
-type = FLOW_ACTIONS
-core = s{socket}c1h
-pktq_in = SWQ2
-pktq_out = SWQ3
-n_flows = 65536
-n_meters_per_flow = 4; Use dscp to classify into 1 out of 4 TC
-flow_id_offset = 172; mbuf (128) + 64
-ip_hdr_offset = 278 ; should not needed, but who knows?
-color_offset = 176
-
-[PIPELINE5]
-type = ROUTING
-core = s{socket}c1
-pktq_in = SWQ3
-pktq_out = TXQ1.0 SINK2
-encap = ethernet_mpls
-mpls_color_mark = yes
-ip_hdr_offset = 278 ; should not needed, but who knows?
-color_offset = 176
-
-;;;;;;;;;;Begin of downstream 0;;;;;;;;;;;;;;;;;;
-[PIPELINE6]
-type = ROUTING
-core = s{socket}c2
-pktq_in = RXQ1.0
-pktq_out = SWQ4 SINK3
-encap = ethernet_qinq
-qinq_sched = yes
-ip_hdr_offset = 270; mbuf (128) + headroom (128) + ethernet header (14) = 270
-
-
-[PIPELINE7]
-type = PASS-THROUGH
-core = s{socket}c2h
-pktq_in = SWQ4
-pktq_out = SWQ5
-
-[PIPELINE8]
-type = PASS-THROUGH
-core = s{socket}c2h
-pktq_in = SWQ5 TM0
-pktq_out = TM0 SWQ6
-
-[PIPELINE9]
-type = PASS-THROUGH
-core = s{socket}c2
-pktq_in = SWQ6
-pktq_out = TXQ0.0
-
-[TM0]
-burst_read = 24;dequeue should be slightly slower then enqueue to create buffer
-burst_write = 32
-cfg = /tmp/full_tm_profile_10G.cfg
diff --git a/tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_script b/tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_script
deleted file mode 100644
index 740eb6586..000000000
--- a/tests/unit/network_services/vnf_generic/vnf/vpe_config/vpe_script
+++ /dev/null
@@ -1,384 +0,0 @@
-#=================================================================
-#Pipeline 1 : 256 Firewall Rules for 1 port with 0.0.X.0/24 for destination IP
-#=================================================================
-p 1 firewall add bulk /tmp/fw_bulk_inst0_256.txt
-p 1 firewall add default 1
-
-#=================================================================
-#Pipeline 2 : 512 flow classfication Rules for 1 port using QinQ as input. Flow id = SVLAN * 512 + CVLAN
-#=================================================================
-p 2 flow add qinq 128 512 port 0 id 1
-p 2 flow add default 1
-
-#=================================================================
-#Pipeline 3 : 512 metering Rules for 1 port
-#=================================================================
-p 3 action flow bulk /tmp/action_bulk_512.txt
-p 3 flows 512 ports 1
-
-#=================================================================
-#Pipeline 4 : 512 metering Rules and 4 traffic classes for 1 port
-#=================================================================
-p 4 action flow bulk /tmp/action_bulk_512.txt
-p 4 flows 512 ports 1
-p 4 action dscp 0 class 0 color G
-p 4 action dscp 1 class 1 color Y
-p 4 action dscp 2 class 2 color R
-p 4 action dscp 3 class 3 color G
-p 4 action dscp 4 class 0 color Y
-p 4 action dscp 5 class 1 color R
-p 4 action dscp 6 class 2 color G
-p 4 action dscp 7 class 3 color Y
-p 4 action dscp 8 class 0 color R
-p 4 action dscp 9 class 1 color G
-p 4 action dscp 10 class 2 color Y
-p 4 action dscp 11 class 3 color R
-p 4 action dscp 12 class 0 color G
-p 4 action dscp 13 class 1 color Y
-p 4 action dscp 14 class 2 color R
-p 4 action dscp 15 class 3 color G
-p 4 action dscp 16 class 0 color Y
-p 4 action dscp 17 class 1 color R
-p 4 action dscp 18 class 2 color G
-p 4 action dscp 19 class 3 color Y
-p 4 action dscp 20 class 0 color R
-p 4 action dscp 21 class 1 color G
-p 4 action dscp 22 class 2 color Y
-p 4 action dscp 23 class 3 color R
-p 4 action dscp 24 class 0 color G
-p 4 action dscp 25 class 1 color Y
-p 4 action dscp 26 class 2 color R
-p 4 action dscp 27 class 3 color G
-p 4 action dscp 28 class 0 color Y
-p 4 action dscp 29 class 1 color R
-p 4 action dscp 30 class 2 color G
-p 4 action dscp 31 class 3 color Y
-p 4 action dscp 32 class 0 color R
-p 4 action dscp 33 class 1 color G
-p 4 action dscp 34 class 2 color Y
-p 4 action dscp 35 class 3 color R
-p 4 action dscp 36 class 0 color G
-p 4 action dscp 37 class 1 color Y
-p 4 action dscp 38 class 2 color R
-p 4 action dscp 39 class 3 color G
-p 4 action dscp 40 class 0 color Y
-p 4 action dscp 41 class 1 color R
-p 4 action dscp 42 class 2 color G
-p 4 action dscp 43 class 3 color Y
-p 4 action dscp 44 class 0 color R
-p 4 action dscp 45 class 1 color G
-p 4 action dscp 46 class 2 color Y
-p 4 action dscp 47 class 3 color R
-p 4 action dscp 48 class 0 color G
-p 4 action dscp 49 class 1 color Y
-p 4 action dscp 50 class 2 color R
-p 4 action dscp 51 class 3 color G
-p 4 action dscp 52 class 0 color Y
-p 4 action dscp 53 class 1 color R
-p 4 action dscp 54 class 2 color G
-p 4 action dscp 55 class 3 color Y
-p 4 action dscp 56 class 0 color R
-p 4 action dscp 57 class 1 color G
-p 4 action dscp 58 class 2 color Y
-p 4 action dscp 59 class 3 color R
-p 4 action dscp 60 class 0 color G
-p 4 action dscp 61 class 1 color Y
-p 4 action dscp 62 class 2 color R
-p 4 action dscp 63 class 3 color G
-#=================================================================
-#Pipeline 5 : 32 Upstream Routing Rules for 1 ports with dst_ip : 0.0.0.0 to 0.0.255.255
-#=================================================================
-p 5 route add 152.40.0.0 21 port 0 ether {port1_dst_mac} mpls 0:0
-p 5 route add 152.40.8.0 21 port 0 ether {port1_dst_mac} mpls 0:1
-p 5 route add 152.40.16.0 21 port 0 ether {port1_dst_mac} mpls 0:2
-p 5 route add 152.40.24.0 21 port 0 ether {port1_dst_mac} mpls 0:3
-p 5 route add 152.40.32.0 21 port 0 ether {port1_dst_mac} mpls 0:4
-p 5 route add 152.40.40.0 21 port 0 ether {port1_dst_mac} mpls 0:5
-p 5 route add 152.40.48.0 21 port 0 ether {port1_dst_mac} mpls 0:6
-p 5 route add 152.40.56.0 21 port 0 ether {port1_dst_mac} mpls 0:7
-p 5 route add 152.40.64.0 21 port 0 ether {port1_dst_mac} mpls 0:8
-p 5 route add 152.40.72.0 21 port 0 ether {port1_dst_mac} mpls 0:9
-p 5 route add 152.40.80.0 21 port 0 ether {port1_dst_mac} mpls 0:10
-p 5 route add 152.40.88.0 21 port 0 ether {port1_dst_mac} mpls 0:11
-p 5 route add 152.40.96.0 21 port 0 ether {port1_dst_mac} mpls 0:12
-p 5 route add 152.40.104.0 21 port 0 ether {port1_dst_mac} mpls 0:13
-p 5 route add 152.40.112.0 21 port 0 ether {port1_dst_mac} mpls 0:14
-p 5 route add 152.40.120.0 21 port 0 ether {port1_dst_mac} mpls 0:15
-p 5 route add 152.40.128.0 21 port 0 ether {port1_dst_mac} mpls 0:16
-p 5 route add 152.40.136.0 21 port 0 ether {port1_dst_mac} mpls 0:17
-p 5 route add 152.40.144.0 21 port 0 ether {port1_dst_mac} mpls 0:18
-p 5 route add 152.40.152.0 21 port 0 ether {port1_dst_mac} mpls 0:19
-p 5 route add 152.40.160.0 21 port 0 ether {port1_dst_mac} mpls 0:20
-p 5 route add 152.40.168.0 21 port 0 ether {port1_dst_mac} mpls 0:21
-p 5 route add 152.40.176.0 21 port 0 ether {port1_dst_mac} mpls 0:22
-p 5 route add 152.40.184.0 21 port 0 ether {port1_dst_mac} mpls 0:23
-p 5 route add 152.40.192.0 21 port 0 ether {port1_dst_mac} mpls 0:24
-p 5 route add 152.40.200.0 21 port 0 ether {port1_dst_mac} mpls 0:25
-p 5 route add 152.40.208.0 21 port 0 ether {port1_dst_mac} mpls 0:26
-p 5 route add 152.40.216.0 21 port 0 ether {port1_dst_mac} mpls 0:27
-p 5 route add 152.40.224.0 21 port 0 ether {port1_dst_mac} mpls 0:28
-p 5 route add 152.40.232.0 21 port 0 ether {port1_dst_mac} mpls 0:29
-p 5 route add 152.40.240.0 21 port 0 ether {port1_dst_mac} mpls 0:30
-p 5 route add 152.40.248.0 21 port 0 ether {port1_dst_mac} mpls 0:31
-p 5 route add default 1
-
-#=================================================================
-#Pipeline 6 : 256 Downstream Routing Rules for 1 ports with dst_ip : 0.0.0.0 to 0.0.255.255
-#=================================================================
-p 6 route add 152.16.0.0 24 port 0 ether {port0_dst_mac} qinq 0 0
-p 6 route add 152.16.1.0 24 port 0 ether {port0_dst_mac} qinq 0 1
-p 6 route add 152.16.2.0 24 port 0 ether {port0_dst_mac} qinq 0 2
-p 6 route add 152.16.3.0 24 port 0 ether {port0_dst_mac} qinq 0 3
-p 6 route add 152.16.4.0 24 port 0 ether {port0_dst_mac} qinq 0 4
-p 6 route add 152.16.5.0 24 port 0 ether {port0_dst_mac} qinq 0 5
-p 6 route add 152.16.6.0 24 port 0 ether {port0_dst_mac} qinq 0 6
-p 6 route add 152.16.7.0 24 port 0 ether {port0_dst_mac} qinq 0 7
-p 6 route add 152.16.8.0 24 port 0 ether {port0_dst_mac} qinq 0 8
-p 6 route add 152.16.9.0 24 port 0 ether {port0_dst_mac} qinq 0 9
-p 6 route add 152.16.10.0 24 port 0 ether {port0_dst_mac} qinq 0 10
-p 6 route add 152.16.11.0 24 port 0 ether {port0_dst_mac} qinq 0 11
-p 6 route add 152.16.12.0 24 port 0 ether {port0_dst_mac} qinq 0 12
-p 6 route add 152.16.13.0 24 port 0 ether {port0_dst_mac} qinq 0 13
-p 6 route add 152.16.14.0 24 port 0 ether {port0_dst_mac} qinq 0 14
-p 6 route add 152.16.15.0 24 port 0 ether {port0_dst_mac} qinq 0 15
-p 6 route add 152.16.16.0 24 port 0 ether {port0_dst_mac} qinq 0 16
-p 6 route add 152.16.17.0 24 port 0 ether {port0_dst_mac} qinq 0 17
-p 6 route add 152.16.18.0 24 port 0 ether {port0_dst_mac} qinq 0 18
-p 6 route add 152.16.19.0 24 port 0 ether {port0_dst_mac} qinq 0 19
-p 6 route add 152.16.20.0 24 port 0 ether {port0_dst_mac} qinq 0 20
-p 6 route add 152.16.21.0 24 port 0 ether {port0_dst_mac} qinq 0 21
-p 6 route add 152.16.22.0 24 port 0 ether {port0_dst_mac} qinq 0 22
-p 6 route add 152.16.23.0 24 port 0 ether {port0_dst_mac} qinq 0 23
-p 6 route add 152.16.24.0 24 port 0 ether {port0_dst_mac} qinq 0 24
-p 6 route add 152.16.25.0 24 port 0 ether {port0_dst_mac} qinq 0 25
-p 6 route add 152.16.26.0 24 port 0 ether {port0_dst_mac} qinq 0 26
-p 6 route add 152.16.27.0 24 port 0 ether {port0_dst_mac} qinq 0 27
-p 6 route add 152.16.28.0 24 port 0 ether {port0_dst_mac} qinq 0 28
-p 6 route add 152.16.29.0 24 port 0 ether {port0_dst_mac} qinq 0 29
-p 6 route add 152.16.30.0 24 port 0 ether {port0_dst_mac} qinq 0 30
-p 6 route add 152.16.31.0 24 port 0 ether {port0_dst_mac} qinq 0 31
-p 6 route add 152.16.32.0 24 port 0 ether {port0_dst_mac} qinq 0 32
-p 6 route add 152.16.33.0 24 port 0 ether {port0_dst_mac} qinq 0 33
-p 6 route add 152.16.34.0 24 port 0 ether {port0_dst_mac} qinq 0 34
-p 6 route add 152.16.35.0 24 port 0 ether {port0_dst_mac} qinq 0 35
-p 6 route add 152.16.36.0 24 port 0 ether {port0_dst_mac} qinq 0 36
-p 6 route add 152.16.37.0 24 port 0 ether {port0_dst_mac} qinq 0 37
-p 6 route add 152.16.38.0 24 port 0 ether {port0_dst_mac} qinq 0 38
-p 6 route add 152.16.39.0 24 port 0 ether {port0_dst_mac} qinq 0 39
-p 6 route add 152.16.40.0 24 port 0 ether {port0_dst_mac} qinq 0 40
-p 6 route add 152.16.41.0 24 port 0 ether {port0_dst_mac} qinq 0 41
-p 6 route add 152.16.42.0 24 port 0 ether {port0_dst_mac} qinq 0 42
-p 6 route add 152.16.43.0 24 port 0 ether {port0_dst_mac} qinq 0 43
-p 6 route add 152.16.44.0 24 port 0 ether {port0_dst_mac} qinq 0 44
-p 6 route add 152.16.45.0 24 port 0 ether {port0_dst_mac} qinq 0 45
-p 6 route add 152.16.46.0 24 port 0 ether {port0_dst_mac} qinq 0 46
-p 6 route add 152.16.47.0 24 port 0 ether {port0_dst_mac} qinq 0 47
-p 6 route add 152.16.48.0 24 port 0 ether {port0_dst_mac} qinq 0 48
-p 6 route add 152.16.49.0 24 port 0 ether {port0_dst_mac} qinq 0 49
-p 6 route add 152.16.50.0 24 port 0 ether {port0_dst_mac} qinq 0 50
-p 6 route add 152.16.51.0 24 port 0 ether {port0_dst_mac} qinq 0 51
-p 6 route add 152.16.52.0 24 port 0 ether {port0_dst_mac} qinq 0 52
-p 6 route add 152.16.53.0 24 port 0 ether {port0_dst_mac} qinq 0 53
-p 6 route add 152.16.54.0 24 port 0 ether {port0_dst_mac} qinq 0 54
-p 6 route add 152.16.55.0 24 port 0 ether {port0_dst_mac} qinq 0 55
-p 6 route add 152.16.56.0 24 port 0 ether {port0_dst_mac} qinq 0 56
-p 6 route add 152.16.57.0 24 port 0 ether {port0_dst_mac} qinq 0 57
-p 6 route add 152.16.58.0 24 port 0 ether {port0_dst_mac} qinq 0 58
-p 6 route add 152.16.59.0 24 port 0 ether {port0_dst_mac} qinq 0 59
-p 6 route add 152.16.60.0 24 port 0 ether {port0_dst_mac} qinq 0 60
-p 6 route add 152.16.61.0 24 port 0 ether {port0_dst_mac} qinq 0 61
-p 6 route add 152.16.62.0 24 port 0 ether {port0_dst_mac} qinq 0 62
-p 6 route add 152.16.63.0 24 port 0 ether {port0_dst_mac} qinq 0 63
-p 6 route add 152.16.64.0 24 port 0 ether {port0_dst_mac} qinq 0 64
-p 6 route add 152.16.65.0 24 port 0 ether {port0_dst_mac} qinq 0 65
-p 6 route add 152.16.66.0 24 port 0 ether {port0_dst_mac} qinq 0 66
-p 6 route add 152.16.67.0 24 port 0 ether {port0_dst_mac} qinq 0 67
-p 6 route add 152.16.68.0 24 port 0 ether {port0_dst_mac} qinq 0 68
-p 6 route add 152.16.69.0 24 port 0 ether {port0_dst_mac} qinq 0 69
-p 6 route add 152.16.70.0 24 port 0 ether {port0_dst_mac} qinq 0 70
-p 6 route add 152.16.71.0 24 port 0 ether {port0_dst_mac} qinq 0 71
-p 6 route add 152.16.72.0 24 port 0 ether {port0_dst_mac} qinq 0 72
-p 6 route add 152.16.73.0 24 port 0 ether {port0_dst_mac} qinq 0 73
-p 6 route add 152.16.74.0 24 port 0 ether {port0_dst_mac} qinq 0 74
-p 6 route add 152.16.75.0 24 port 0 ether {port0_dst_mac} qinq 0 75
-p 6 route add 152.16.76.0 24 port 0 ether {port0_dst_mac} qinq 0 76
-p 6 route add 152.16.77.0 24 port 0 ether {port0_dst_mac} qinq 0 77
-p 6 route add 152.16.78.0 24 port 0 ether {port0_dst_mac} qinq 0 78
-p 6 route add 152.16.79.0 24 port 0 ether {port0_dst_mac} qinq 0 79
-p 6 route add 152.16.80.0 24 port 0 ether {port0_dst_mac} qinq 0 80
-p 6 route add 152.16.81.0 24 port 0 ether {port0_dst_mac} qinq 0 81
-p 6 route add 152.16.82.0 24 port 0 ether {port0_dst_mac} qinq 0 82
-p 6 route add 152.16.83.0 24 port 0 ether {port0_dst_mac} qinq 0 83
-p 6 route add 152.16.84.0 24 port 0 ether {port0_dst_mac} qinq 0 84
-p 6 route add 152.16.85.0 24 port 0 ether {port0_dst_mac} qinq 0 85
-p 6 route add 152.16.86.0 24 port 0 ether {port0_dst_mac} qinq 0 86
-p 6 route add 152.16.87.0 24 port 0 ether {port0_dst_mac} qinq 0 87
-p 6 route add 152.16.88.0 24 port 0 ether {port0_dst_mac} qinq 0 88
-p 6 route add 152.16.89.0 24 port 0 ether {port0_dst_mac} qinq 0 89
-p 6 route add 152.16.90.0 24 port 0 ether {port0_dst_mac} qinq 0 90
-p 6 route add 152.16.91.0 24 port 0 ether {port0_dst_mac} qinq 0 91
-p 6 route add 152.16.92.0 24 port 0 ether {port0_dst_mac} qinq 0 92
-p 6 route add 152.16.93.0 24 port 0 ether {port0_dst_mac} qinq 0 93
-p 6 route add 152.16.94.0 24 port 0 ether {port0_dst_mac} qinq 0 94
-p 6 route add 152.16.95.0 24 port 0 ether {port0_dst_mac} qinq 0 95
-p 6 route add 152.16.96.0 24 port 0 ether {port0_dst_mac} qinq 0 96
-p 6 route add 152.16.97.0 24 port 0 ether {port0_dst_mac} qinq 0 97
-p 6 route add 152.16.98.0 24 port 0 ether {port0_dst_mac} qinq 0 98
-p 6 route add 152.16.99.0 24 port 0 ether {port0_dst_mac} qinq 0 99
-p 6 route add 152.16.100.0 24 port 0 ether {port0_dst_mac} qinq 0 100
-p 6 route add 152.16.101.0 24 port 0 ether {port0_dst_mac} qinq 0 101
-p 6 route add 152.16.102.0 24 port 0 ether {port0_dst_mac} qinq 0 102
-p 6 route add 152.16.103.0 24 port 0 ether {port0_dst_mac} qinq 0 103
-p 6 route add 152.16.104.0 24 port 0 ether {port0_dst_mac} qinq 0 104
-p 6 route add 152.16.105.0 24 port 0 ether {port0_dst_mac} qinq 0 105
-p 6 route add 152.16.106.0 24 port 0 ether {port0_dst_mac} qinq 0 106
-p 6 route add 152.16.107.0 24 port 0 ether {port0_dst_mac} qinq 0 107
-p 6 route add 152.16.108.0 24 port 0 ether {port0_dst_mac} qinq 0 108
-p 6 route add 152.16.109.0 24 port 0 ether {port0_dst_mac} qinq 0 109
-p 6 route add 152.16.110.0 24 port 0 ether {port0_dst_mac} qinq 0 110
-p 6 route add 152.16.111.0 24 port 0 ether {port0_dst_mac} qinq 0 111
-p 6 route add 152.16.112.0 24 port 0 ether {port0_dst_mac} qinq 0 112
-p 6 route add 152.16.113.0 24 port 0 ether {port0_dst_mac} qinq 0 113
-p 6 route add 152.16.114.0 24 port 0 ether {port0_dst_mac} qinq 0 114
-p 6 route add 152.16.115.0 24 port 0 ether {port0_dst_mac} qinq 0 115
-p 6 route add 152.16.116.0 24 port 0 ether {port0_dst_mac} qinq 0 116
-p 6 route add 152.16.117.0 24 port 0 ether {port0_dst_mac} qinq 0 117
-p 6 route add 152.16.118.0 24 port 0 ether {port0_dst_mac} qinq 0 118
-p 6 route add 152.16.119.0 24 port 0 ether {port0_dst_mac} qinq 0 119
-p 6 route add 152.16.120.0 24 port 0 ether {port0_dst_mac} qinq 0 120
-p 6 route add 152.16.121.0 24 port 0 ether {port0_dst_mac} qinq 0 121
-p 6 route add 152.16.122.0 24 port 0 ether {port0_dst_mac} qinq 0 122
-p 6 route add 152.16.123.0 24 port 0 ether {port0_dst_mac} qinq 0 123
-p 6 route add 152.16.124.0 24 port 0 ether {port0_dst_mac} qinq 0 124
-p 6 route add 152.16.125.0 24 port 0 ether {port0_dst_mac} qinq 0 125
-p 6 route add 152.16.126.0 24 port 0 ether {port0_dst_mac} qinq 0 126
-p 6 route add 152.16.127.0 24 port 0 ether {port0_dst_mac} qinq 0 127
-p 6 route add 152.16.128.0 24 port 0 ether {port0_dst_mac} qinq 0 128
-p 6 route add 152.16.129.0 24 port 0 ether {port0_dst_mac} qinq 0 129
-p 6 route add 152.16.130.0 24 port 0 ether {port0_dst_mac} qinq 0 130
-p 6 route add 152.16.131.0 24 port 0 ether {port0_dst_mac} qinq 0 131
-p 6 route add 152.16.132.0 24 port 0 ether {port0_dst_mac} qinq 0 132
-p 6 route add 152.16.133.0 24 port 0 ether {port0_dst_mac} qinq 0 133
-p 6 route add 152.16.134.0 24 port 0 ether {port0_dst_mac} qinq 0 134
-p 6 route add 152.16.135.0 24 port 0 ether {port0_dst_mac} qinq 0 135
-p 6 route add 152.16.136.0 24 port 0 ether {port0_dst_mac} qinq 0 136
-p 6 route add 152.16.137.0 24 port 0 ether {port0_dst_mac} qinq 0 137
-p 6 route add 152.16.138.0 24 port 0 ether {port0_dst_mac} qinq 0 138
-p 6 route add 152.16.139.0 24 port 0 ether {port0_dst_mac} qinq 0 139
-p 6 route add 152.16.140.0 24 port 0 ether {port0_dst_mac} qinq 0 140
-p 6 route add 152.16.141.0 24 port 0 ether {port0_dst_mac} qinq 0 141
-p 6 route add 152.16.142.0 24 port 0 ether {port0_dst_mac} qinq 0 142
-p 6 route add 152.16.143.0 24 port 0 ether {port0_dst_mac} qinq 0 143
-p 6 route add 152.16.144.0 24 port 0 ether {port0_dst_mac} qinq 0 144
-p 6 route add 152.16.145.0 24 port 0 ether {port0_dst_mac} qinq 0 145
-p 6 route add 152.16.146.0 24 port 0 ether {port0_dst_mac} qinq 0 146
-p 6 route add 152.16.147.0 24 port 0 ether {port0_dst_mac} qinq 0 147
-p 6 route add 152.16.148.0 24 port 0 ether {port0_dst_mac} qinq 0 148
-p 6 route add 152.16.149.0 24 port 0 ether {port0_dst_mac} qinq 0 149
-p 6 route add 152.16.150.0 24 port 0 ether {port0_dst_mac} qinq 0 150
-p 6 route add 152.16.151.0 24 port 0 ether {port0_dst_mac} qinq 0 151
-p 6 route add 152.16.152.0 24 port 0 ether {port0_dst_mac} qinq 0 152
-p 6 route add 152.16.153.0 24 port 0 ether {port0_dst_mac} qinq 0 153
-p 6 route add 152.16.154.0 24 port 0 ether {port0_dst_mac} qinq 0 154
-p 6 route add 152.16.155.0 24 port 0 ether {port0_dst_mac} qinq 0 155
-p 6 route add 152.16.156.0 24 port 0 ether {port0_dst_mac} qinq 0 156
-p 6 route add 152.16.157.0 24 port 0 ether {port0_dst_mac} qinq 0 157
-p 6 route add 152.16.158.0 24 port 0 ether {port0_dst_mac} qinq 0 158
-p 6 route add 152.16.159.0 24 port 0 ether {port0_dst_mac} qinq 0 159
-p 6 route add 152.16.160.0 24 port 0 ether {port0_dst_mac} qinq 0 160
-p 6 route add 152.16.161.0 24 port 0 ether {port0_dst_mac} qinq 0 161
-p 6 route add 152.16.162.0 24 port 0 ether {port0_dst_mac} qinq 0 162
-p 6 route add 152.16.163.0 24 port 0 ether {port0_dst_mac} qinq 0 163
-p 6 route add 152.16.164.0 24 port 0 ether {port0_dst_mac} qinq 0 164
-p 6 route add 152.16.165.0 24 port 0 ether {port0_dst_mac} qinq 0 165
-p 6 route add 152.16.166.0 24 port 0 ether {port0_dst_mac} qinq 0 166
-p 6 route add 152.16.167.0 24 port 0 ether {port0_dst_mac} qinq 0 167
-p 6 route add 152.16.168.0 24 port 0 ether {port0_dst_mac} qinq 0 168
-p 6 route add 152.16.169.0 24 port 0 ether {port0_dst_mac} qinq 0 169
-p 6 route add 152.16.170.0 24 port 0 ether {port0_dst_mac} qinq 0 170
-p 6 route add 152.16.171.0 24 port 0 ether {port0_dst_mac} qinq 0 171
-p 6 route add 152.16.172.0 24 port 0 ether {port0_dst_mac} qinq 0 172
-p 6 route add 152.16.173.0 24 port 0 ether {port0_dst_mac} qinq 0 173
-p 6 route add 152.16.174.0 24 port 0 ether {port0_dst_mac} qinq 0 174
-p 6 route add 152.16.175.0 24 port 0 ether {port0_dst_mac} qinq 0 175
-p 6 route add 152.16.176.0 24 port 0 ether {port0_dst_mac} qinq 0 176
-p 6 route add 152.16.177.0 24 port 0 ether {port0_dst_mac} qinq 0 177
-p 6 route add 152.16.178.0 24 port 0 ether {port0_dst_mac} qinq 0 178
-p 6 route add 152.16.179.0 24 port 0 ether {port0_dst_mac} qinq 0 179
-p 6 route add 152.16.180.0 24 port 0 ether {port0_dst_mac} qinq 0 180
-p 6 route add 152.16.181.0 24 port 0 ether {port0_dst_mac} qinq 0 181
-p 6 route add 152.16.182.0 24 port 0 ether {port0_dst_mac} qinq 0 182
-p 6 route add 152.16.183.0 24 port 0 ether {port0_dst_mac} qinq 0 183
-p 6 route add 152.16.184.0 24 port 0 ether {port0_dst_mac} qinq 0 184
-p 6 route add 152.16.185.0 24 port 0 ether {port0_dst_mac} qinq 0 185
-p 6 route add 152.16.186.0 24 port 0 ether {port0_dst_mac} qinq 0 186
-p 6 route add 152.16.187.0 24 port 0 ether {port0_dst_mac} qinq 0 187
-p 6 route add 152.16.188.0 24 port 0 ether {port0_dst_mac} qinq 0 188
-p 6 route add 152.16.189.0 24 port 0 ether {port0_dst_mac} qinq 0 189
-p 6 route add 152.16.190.0 24 port 0 ether {port0_dst_mac} qinq 0 190
-p 6 route add 152.16.191.0 24 port 0 ether {port0_dst_mac} qinq 0 191
-p 6 route add 152.16.192.0 24 port 0 ether {port0_dst_mac} qinq 0 192
-p 6 route add 152.16.193.0 24 port 0 ether {port0_dst_mac} qinq 0 193
-p 6 route add 152.16.194.0 24 port 0 ether {port0_dst_mac} qinq 0 194
-p 6 route add 152.16.195.0 24 port 0 ether {port0_dst_mac} qinq 0 195
-p 6 route add 152.16.196.0 24 port 0 ether {port0_dst_mac} qinq 0 196
-p 6 route add 152.16.197.0 24 port 0 ether {port0_dst_mac} qinq 0 197
-p 6 route add 152.16.198.0 24 port 0 ether {port0_dst_mac} qinq 0 198
-p 6 route add 152.16.199.0 24 port 0 ether {port0_dst_mac} qinq 0 199
-p 6 route add 152.16.200.0 24 port 0 ether {port0_dst_mac} qinq 0 200
-p 6 route add 152.16.201.0 24 port 0 ether {port0_dst_mac} qinq 0 201
-p 6 route add 152.16.202.0 24 port 0 ether {port0_dst_mac} qinq 0 202
-p 6 route add 152.16.203.0 24 port 0 ether {port0_dst_mac} qinq 0 203
-p 6 route add 152.16.204.0 24 port 0 ether {port0_dst_mac} qinq 0 204
-p 6 route add 152.16.205.0 24 port 0 ether {port0_dst_mac} qinq 0 205
-p 6 route add 152.16.206.0 24 port 0 ether {port0_dst_mac} qinq 0 206
-p 6 route add 152.16.207.0 24 port 0 ether {port0_dst_mac} qinq 0 207
-p 6 route add 152.16.208.0 24 port 0 ether {port0_dst_mac} qinq 0 208
-p 6 route add 152.16.209.0 24 port 0 ether {port0_dst_mac} qinq 0 209
-p 6 route add 152.16.210.0 24 port 0 ether {port0_dst_mac} qinq 0 210
-p 6 route add 152.16.211.0 24 port 0 ether {port0_dst_mac} qinq 0 211
-p 6 route add 152.16.212.0 24 port 0 ether {port0_dst_mac} qinq 0 212
-p 6 route add 152.16.213.0 24 port 0 ether {port0_dst_mac} qinq 0 213
-p 6 route add 152.16.214.0 24 port 0 ether {port0_dst_mac} qinq 0 214
-p 6 route add 152.16.215.0 24 port 0 ether {port0_dst_mac} qinq 0 215
-p 6 route add 152.16.216.0 24 port 0 ether {port0_dst_mac} qinq 0 216
-p 6 route add 152.16.217.0 24 port 0 ether {port0_dst_mac} qinq 0 217
-p 6 route add 152.16.218.0 24 port 0 ether {port0_dst_mac} qinq 0 218
-p 6 route add 152.16.219.0 24 port 0 ether {port0_dst_mac} qinq 0 219
-p 6 route add 152.16.220.0 24 port 0 ether {port0_dst_mac} qinq 0 220
-p 6 route add 152.16.221.0 24 port 0 ether {port0_dst_mac} qinq 0 221
-p 6 route add 152.16.222.0 24 port 0 ether {port0_dst_mac} qinq 0 222
-p 6 route add 152.16.223.0 24 port 0 ether {port0_dst_mac} qinq 0 223
-p 6 route add 152.16.224.0 24 port 0 ether {port0_dst_mac} qinq 0 224
-p 6 route add 152.16.225.0 24 port 0 ether {port0_dst_mac} qinq 0 225
-p 6 route add 152.16.226.0 24 port 0 ether {port0_dst_mac} qinq 0 226
-p 6 route add 152.16.227.0 24 port 0 ether {port0_dst_mac} qinq 0 227
-p 6 route add 152.16.228.0 24 port 0 ether {port0_dst_mac} qinq 0 228
-p 6 route add 152.16.229.0 24 port 0 ether {port0_dst_mac} qinq 0 229
-p 6 route add 152.16.230.0 24 port 0 ether {port0_dst_mac} qinq 0 230
-p 6 route add 152.16.231.0 24 port 0 ether {port0_dst_mac} qinq 0 231
-p 6 route add 152.16.232.0 24 port 0 ether {port0_dst_mac} qinq 0 232
-p 6 route add 152.16.233.0 24 port 0 ether {port0_dst_mac} qinq 0 233
-p 6 route add 152.16.234.0 24 port 0 ether {port0_dst_mac} qinq 0 234
-p 6 route add 152.16.235.0 24 port 0 ether {port0_dst_mac} qinq 0 235
-p 6 route add 152.16.236.0 24 port 0 ether {port0_dst_mac} qinq 0 236
-p 6 route add 152.16.237.0 24 port 0 ether {port0_dst_mac} qinq 0 237
-p 6 route add 152.16.238.0 24 port 0 ether {port0_dst_mac} qinq 0 238
-p 6 route add 152.16.239.0 24 port 0 ether {port0_dst_mac} qinq 0 239
-p 6 route add 152.16.240.0 24 port 0 ether {port0_dst_mac} qinq 0 240
-p 6 route add 152.16.241.0 24 port 0 ether {port0_dst_mac} qinq 0 241
-p 6 route add 152.16.242.0 24 port 0 ether {port0_dst_mac} qinq 0 242
-p 6 route add 152.16.243.0 24 port 0 ether {port0_dst_mac} qinq 0 243
-p 6 route add 152.16.244.0 24 port 0 ether {port0_dst_mac} qinq 0 244
-p 6 route add 152.16.245.0 24 port 0 ether {port0_dst_mac} qinq 0 245
-p 6 route add 152.16.246.0 24 port 0 ether {port0_dst_mac} qinq 0 246
-p 6 route add 152.16.247.0 24 port 0 ether {port0_dst_mac} qinq 0 247
-p 6 route add 152.16.248.0 24 port 0 ether {port0_dst_mac} qinq 0 248
-p 6 route add 152.16.249.0 24 port 0 ether {port0_dst_mac} qinq 0 249
-p 6 route add 152.16.250.0 24 port 0 ether {port0_dst_mac} qinq 0 250
-p 6 route add 152.16.251.0 24 port 0 ether {port0_dst_mac} qinq 0 251
-p 6 route add 152.16.252.0 24 port 0 ether {port0_dst_mac} qinq 0 252
-p 6 route add 152.16.253.0 24 port 0 ether {port0_dst_mac} qinq 0 253
-p 6 route add 152.16.254.0 24 port 0 ether {port0_dst_mac} qinq 0 254
-p 6 route add 152.16.255.0 24 port 0 ether {port0_dst_mac} qinq 0 255
-p 6 route add default 1
diff --git a/tests/unit/test_ssh.py b/tests/unit/test_ssh.py
index 236736baa..24a9d0c83 100644
--- a/tests/unit/test_ssh.py
+++ b/tests/unit/test_ssh.py
@@ -26,6 +26,9 @@ import mock
from oslo_utils import encodeutils
from yardstick import ssh
+from yardstick.ssh import SSHError
+from yardstick.ssh import SSH
+from yardstick.ssh import AutoConnectSSH
class FakeParamikoException(Exception):
@@ -90,7 +93,7 @@ class SSHTestCase(unittest.TestCase):
test_ssh = ssh.SSH.from_node(node)
self.assertEqual("root", test_ssh.user)
self.assertEqual("example.net", test_ssh.host)
- self.assertEqual(ssh.SSH_PORT, test_ssh.port)
+ self.assertEqual(ssh.SSH.SSH_PORT, test_ssh.port)
self.assertEqual("kf", test_ssh.key_filename)
self.assertEqual("secret", test_ssh.password)
@@ -175,6 +178,45 @@ class SSHTestCase(unittest.TestCase):
]
self.assertEqual(client_calls, client.mock_calls)
+ @mock.patch("yardstick.ssh.SSH._get_pkey")
+ @mock.patch("yardstick.ssh.paramiko")
+ def test__get_client_with_exception(self, mock_paramiko, mock_ssh__get_pkey):
+ class MyError(Exception):
+ pass
+
+ mock_ssh__get_pkey.return_value = "pkey"
+ fake_client = mock.Mock()
+ fake_client.connect.side_effect = MyError
+ fake_client.set_missing_host_key_policy.return_value = None
+ mock_paramiko.SSHClient.return_value = fake_client
+ mock_paramiko.AutoAddPolicy.return_value = "autoadd"
+
+ test_ssh = ssh.SSH("admin", "example.net", pkey="key")
+
+ with self.assertRaises(SSHError) as raised:
+ test_ssh._get_client()
+
+ self.assertEqual(mock_paramiko.SSHClient.call_count, 1)
+ self.assertEqual(mock_paramiko.AutoAddPolicy.call_count, 1)
+ self.assertEqual(fake_client.set_missing_host_key_policy.call_count, 1)
+ self.assertEqual(fake_client.connect.call_count, 1)
+ exc_str = str(raised.exception)
+ self.assertIn('raised during connect', exc_str)
+ self.assertIn('MyError', exc_str)
+
+ @mock.patch("yardstick.ssh.SSH._get_pkey")
+ @mock.patch("yardstick.ssh.paramiko")
+ def test_copy(self, mock_paramiko, mock_ssh__get_pkey):
+ mock_ssh__get_pkey.return_value = "pkey"
+ fake_client = mock.Mock()
+ fake_client.connect.side_effect = IOError
+ mock_paramiko.SSHClient.return_value = fake_client
+ mock_paramiko.AutoAddPolicy.return_value = "autoadd"
+
+ test_ssh = ssh.SSH("admin", "example.net", pkey="key")
+ result = test_ssh.copy()
+ self.assertIsNot(test_ssh, result)
+
def test_close(self):
with mock.patch.object(self.test_client, "_client") as m_client:
self.test_client.close()
@@ -449,6 +491,69 @@ class SSHRunTestCase(unittest.TestCase):
self.test_client._put_file_shell.assert_called_once_with("foo", "bar",
mode=42)
+ @mock.patch("yardstick.ssh.os.stat")
+ def test_put_file_obj_with_mode(self, mock_stat):
+ sftp = self.fake_client.open_sftp.return_value = mock.MagicMock()
+ sftp.__enter__.return_value = sftp
+
+ mock_stat.return_value = os.stat_result([0o753] + [0] * 9)
+
+ self.test_client.put_file_obj("localfile", "remotefile", 'my_mode')
+
+ sftp.__enter__.assert_called_once()
+ sftp.putfo.assert_called_once_with("localfile", "remotefile")
+ sftp.chmod.assert_called_once_with("remotefile", 'my_mode')
+ sftp.__exit__.assert_called_once_with(None, None, None)
+
+
+class TestAutoConnectSSH(unittest.TestCase):
+
+ def test__connect_with_wait(self):
+ auto_connect_ssh = AutoConnectSSH('user1', 'host1', wait=True)
+ auto_connect_ssh._get_client = mock.Mock()
+ auto_connect_ssh.wait = mock_wait = mock.Mock()
+
+ auto_connect_ssh._connect()
+ self.assertEqual(mock_wait.call_count, 1)
+
+ def test__make_dict(self):
+ auto_connect_ssh = AutoConnectSSH('user1', 'host1')
+
+ expected = {
+ 'user': 'user1',
+ 'host': 'host1',
+ 'port': SSH.SSH_PORT,
+ 'pkey': None,
+ 'key_filename': None,
+ 'password': None,
+ 'name': None,
+ 'wait': False,
+ }
+ result = auto_connect_ssh._make_dict()
+ self.assertDictEqual(result, expected)
+
+ def test_get_class(self):
+ auto_connect_ssh = AutoConnectSSH('user1', 'host1')
+
+ self.assertEqual(auto_connect_ssh.get_class(), AutoConnectSSH)
+
+ @mock.patch('yardstick.ssh.SCPClient')
+ def test_put(self, mock_scp_client_type):
+ auto_connect_ssh = AutoConnectSSH('user1', 'host1')
+ auto_connect_ssh._client = mock.Mock()
+
+ auto_connect_ssh.put('a', 'z')
+ with mock_scp_client_type() as mock_scp_client:
+ self.assertEqual(mock_scp_client.put.call_count, 1)
+
+ def test_put_file(self):
+ auto_connect_ssh = AutoConnectSSH('user1', 'host1')
+ auto_connect_ssh._client = mock.Mock()
+ auto_connect_ssh._put_file_sftp = mock_put_sftp = mock.Mock()
+
+ auto_connect_ssh.put_file('a', 'b')
+ self.assertEqual(mock_put_sftp.call_count, 1)
+
def main():
unittest.main()
diff --git a/tox.ini b/tox.ini
index caa11fbe9..54ca1fefb 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,6 +10,12 @@ deps = -rrequirements.txt
commands = /bin/bash ./run_tests.sh
whitelist_externals = /bin/bash
+
+[testenv:py27]
+# don't re-run coverage on both py27 py3, it takes too long
+setenv =
+ SKIP_COVERAGE=1
+
[flake8]
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# The rest of the ignores are TODOs
diff --git a/yardstick/benchmark/contexts/base.py b/yardstick/benchmark/contexts/base.py
index e362c6a3d..c9b5b51c9 100644
--- a/yardstick/benchmark/contexts/base.py
+++ b/yardstick/benchmark/contexts/base.py
@@ -18,6 +18,15 @@ class Context(object):
"""Class that represents a context in the logical model"""
list = []
+ @staticmethod
+ def split_name(name, sep='.'):
+ try:
+ name_iter = iter(name.split(sep))
+ except AttributeError:
+ # name is not a string
+ return None, None
+ return next(name_iter), next(name_iter, None)
+
def __init__(self):
Context.list.append(self)
@@ -71,7 +80,23 @@ class Context(object):
try:
return next(s for s in servers if s)
except StopIteration:
- raise ValueError("context not found for server '%r'" %
+ raise ValueError("context not found for server %r" %
+ attr_name)
+
+ @staticmethod
+ def get_context_from_server(attr_name):
+ """lookup context info by name from node config
+ attr_name: either a name of the node created by yardstick or a dict
+ with attribute name mapping when using external templates
+
+ :returns Context instance
+ """
+ servers = ((context._get_server(attr_name), context)
+ for context in Context.list)
+ try:
+ return next(con for s, con in servers if s)
+ except StopIteration:
+ raise ValueError("context not found for name %r" %
attr_name)
@staticmethod
@@ -85,5 +110,5 @@ class Context(object):
try:
return next(n for n in networks if n)
except StopIteration:
- raise ValueError("context not found for server '%r'" %
+ raise ValueError("context not found for server %r" %
attr_name)
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index d5349eab5..c8d53e324 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -17,7 +17,6 @@ import uuid
from collections import OrderedDict
import ipaddress
-import paramiko
import pkg_resources
from yardstick.benchmark.contexts.base import Context
@@ -28,12 +27,21 @@ from yardstick.benchmark.contexts.model import update_scheduler_hints
from yardstick.common.openstack_utils import get_neutron_client
from yardstick.orchestrator.heat import HeatTemplate, get_short_key_uuid
from yardstick.common.constants import YARDSTICK_ROOT_PATH
+from yardstick.ssh import SSH
LOG = logging.getLogger(__name__)
DEFAULT_HEAT_TIMEOUT = 3600
+def join_args(sep, *args):
+ return sep.join(args)
+
+
+def h_join(*args):
+ return '-'.join(args)
+
+
class HeatContext(Context):
"""Class that represents a context in the logical model"""
@@ -43,12 +51,14 @@ class HeatContext(Context):
self.name = None
self.stack = None
self.networks = OrderedDict()
+ self.heat_timeout = None
self.servers = []
self.placement_groups = []
self.server_groups = []
self.keypair_name = None
self.secgroup_name = None
self._server_map = {}
+ self.attrs = {}
self._image = None
self._flavor = None
self.flavors = set()
@@ -65,7 +75,8 @@ class HeatContext(Context):
get_short_key_uuid(self.key_uuid)])
super(HeatContext, self).__init__()
- def assign_external_network(self, networks):
+ @staticmethod
+ def assign_external_network(networks):
sorted_networks = sorted(networks.items())
external_network = os.environ.get("EXTERNAL_NETWORK", "net04_ext")
@@ -74,8 +85,7 @@ class HeatContext(Context):
# no external net defined, assign it to first network using os.environ
sorted_networks[0][1]["external_network"] = external_network
- self.networks = OrderedDict((name, Network(name, self, attrs))
- for name, attrs in sorted_networks)
+ return sorted_networks
def init(self, attrs):
"""initializes itself from the supplied arguments"""
@@ -88,8 +98,8 @@ class HeatContext(Context):
self.heat_parameters = attrs.get("heat_parameters")
return
- self.keypair_name = self.name + "-key"
- self.secgroup_name = self.name + "-secgroup"
+ self.keypair_name = h_join(self.name, "key")
+ self.secgroup_name = h_join(self.name, "secgroup")
self._image = attrs.get("image")
@@ -97,29 +107,29 @@ class HeatContext(Context):
self.heat_timeout = attrs.get("timeout", DEFAULT_HEAT_TIMEOUT)
- self.placement_groups = [PlacementGroup(name, self, pgattrs["policy"])
- for name, pgattrs in attrs.get(
+ self.placement_groups = [PlacementGroup(name, self, pg_attrs["policy"])
+ for name, pg_attrs in attrs.get(
"placement_groups", {}).items()]
- self.server_groups = [ServerGroup(name, self, sgattrs["policy"])
- for name, sgattrs in attrs.get(
+ self.server_groups = [ServerGroup(name, self, sg_attrs["policy"])
+ for name, sg_attrs in attrs.get(
"server_groups", {}).items()]
# we have to do this first, because we are injecting external_network
# into the dict
- self.assign_external_network(attrs["networks"])
+ sorted_networks = self.assign_external_network(attrs["networks"])
+
+ self.networks = OrderedDict(
+ (name, Network(name, self, net_attrs)) for name, net_attrs in
+ sorted_networks)
- for name, serverattrs in sorted(attrs["servers"].items()):
- server = Server(name, self, serverattrs)
+ for name, server_attrs in sorted(attrs["servers"].items()):
+ server = Server(name, self, server_attrs)
self.servers.append(server)
self._server_map[server.dn] = server
- rsa_key = paramiko.RSAKey.generate(bits=2048, progress_func=None)
- rsa_key.write_private_key_file(self.key_filename)
- print("Writing %s ..." % self.key_filename)
- with open(self.key_filename + ".pub", "w") as pubkey_file:
- pubkey_file.write(
- "%s %s\n" % (rsa_key.get_name(), rsa_key.get_base64()))
+ self.attrs = attrs
+ SSH.gen_keys(self.key_filename)
@property
def image(self):
@@ -188,7 +198,7 @@ class HeatContext(Context):
try:
self.flavors.add(server.flavor["name"])
except KeyError:
- self.flavors.add(server.stack_name + "-flavor")
+ self.flavors.add(h_join(server.stack_name, "flavor"))
# add servers with availability policy
added_servers = []
@@ -286,7 +296,7 @@ class HeatContext(Context):
# let the other failures happen, we want stack trace
raise
- # TODO: use Neutron to get segementation-id
+ # TODO: use Neutron to get segmentation-id
self.get_neutron_info()
# copy some vital stack output into server objects
@@ -311,24 +321,26 @@ class HeatContext(Context):
def make_interface_dict(self, network_name, stack_name, outputs):
private_ip = outputs[stack_name]
- mac_addr = outputs[stack_name + "-mac_address"]
- subnet_cidr_key = "-".join([self.name, network_name, 'subnet', 'cidr'])
- gateway_key = "-".join([self.name, network_name, 'subnet', 'gateway_ip'])
- subnet_cidr = outputs[subnet_cidr_key]
- subnet_ip = ipaddress.ip_network(subnet_cidr)
+ mac_address = outputs[h_join(stack_name, "mac_address")]
+ output_subnet_cidr = outputs[h_join(self.name, network_name,
+ 'subnet', 'cidr')]
+
+ output_subnet_gateway = outputs[h_join(self.name, network_name,
+ 'subnet', 'gateway_ip')]
+
return {
"private_ip": private_ip,
- "subnet_id": outputs[stack_name + "-subnet_id"],
- "subnet_cidr": subnet_cidr,
- "network": str(subnet_ip.network_address),
- "netmask": str(subnet_ip.netmask),
- "gateway_ip": outputs[gateway_key],
- "mac_address": mac_addr,
- "device_id": outputs[stack_name + "-device_id"],
- "network_id": outputs[stack_name + "-network_id"],
+ "subnet_id": outputs[h_join(stack_name, "subnet_id")],
+ "subnet_cidr": output_subnet_cidr,
+ "network": str(ipaddress.ip_network(output_subnet_cidr).network_address),
+ "netmask": str(ipaddress.ip_network(output_subnet_cidr).netmask),
+ "gateway_ip": output_subnet_gateway,
+ "mac_address": mac_address,
+ "device_id": outputs[h_join(stack_name, "device_id")],
+ "network_id": outputs[h_join(stack_name, "network_id")],
"network_name": network_name,
# to match vnf_generic
- "local_mac": mac_addr,
+ "local_mac": mac_address,
"local_ip": private_ip,
"vld_id": self.networks[network_name].vld_id,
}
@@ -357,7 +369,8 @@ class HeatContext(Context):
"network": intf["network"],
"netmask": intf["netmask"],
"if": name,
- "gateway": intf["gateway_ip"],
+ # We have to encode a None gateway as '' for Jinja2 to YAML conversion
+ "gateway": intf["gateway_ip"] if intf["gateway_ip"] else '',
}
for name, intf in server.interfaces.items()
]
@@ -370,31 +383,24 @@ class HeatContext(Context):
"""
key_filename = pkg_resources.resource_filename(
'yardstick.resources',
- 'files/yardstick_key-' + get_short_key_uuid(self.key_uuid))
-
- if not isinstance(attr_name, collections.Mapping):
- server = self._server_map.get(attr_name, None)
+ h_join('files/yardstick_key', get_short_key_uuid(self.key_uuid)))
- else:
- cname = attr_name["name"].split(".")[1]
- if cname != self.name:
+ if isinstance(attr_name, collections.Mapping):
+ node_name, cname = self.split_name(attr_name['name'])
+ if cname is None or cname != self.name:
return None
- public_ip = None
- private_ip = None
- if "public_ip_attr" in attr_name:
- public_ip = self.stack.outputs[attr_name["public_ip_attr"]]
- if "private_ip_attr" in attr_name:
- private_ip = self.stack.outputs[
- attr_name["private_ip_attr"]]
-
# Create a dummy server instance for holding the *_ip attributes
- server = Server(attr_name["name"].split(".")[0], self, {})
- server.public_ip = public_ip
- server.private_ip = private_ip
+ server = Server(node_name, self, {})
+ server.public_ip = self.stack.outputs.get(
+ attr_name.get("public_ip_attr", object()), None)
- if server is None:
- return None
+ server.private_ip = self.stack.outputs.get(
+ attr_name.get("private_ip_attr", object()), None)
+ else:
+ server = self._server_map.get(attr_name, None)
+ if server is None:
+ return None
result = {
"user": server.context.user,
@@ -417,12 +423,9 @@ class HeatContext(Context):
else:
# Don't generalize too much Just support vld_id
- vld_id = attr_name.get('vld_id')
- if vld_id is None:
- return None
-
- network = next((n for n in self.networks.values() if
- getattr(n, "vld_id", None) == vld_id), None)
+ vld_id = attr_name.get('vld_id', {})
+ network_iter = (n for n in self.networks.values() if n.vld_id == vld_id)
+ network = next(network_iter, None)
if network is None:
return None
diff --git a/yardstick/benchmark/contexts/node.py b/yardstick/benchmark/contexts/node.py
index b3f0aca0e..78a2d1f46 100644
--- a/yardstick/benchmark/contexts/node.py
+++ b/yardstick/benchmark/contexts/node.py
@@ -19,7 +19,7 @@ import pkg_resources
from yardstick import ssh
from yardstick.benchmark.contexts.base import Context
-from yardstick.common import constants as consts
+from yardstick.common.constants import ANSIBLE_DIR, YARDSTICK_ROOT_PATH
LOG = logging.getLogger(__name__)
@@ -38,6 +38,7 @@ class NodeContext(Context):
self.computes = []
self.baremetals = []
self.env = {}
+ self.attrs = {}
super(NodeContext, self).__init__()
def read_config_file(self):
@@ -45,24 +46,23 @@ class NodeContext(Context):
with open(self.file_path) as stream:
LOG.info("Parsing pod file: %s", self.file_path)
- cfg = yaml.load(stream)
+ cfg = yaml.safe_load(stream)
return cfg
def init(self, attrs):
"""initializes itself from the supplied arguments"""
self.name = attrs["name"]
- self.file_path = attrs.get("file", "pod.yaml")
+ self.file_path = file_path = attrs.get("file", "pod.yaml")
try:
cfg = self.read_config_file()
- except IOError as ioerror:
- if ioerror.errno == errno.ENOENT:
- self.file_path = \
- os.path.join(consts.YARDSTICK_ROOT_PATH, self.file_path)
- cfg = self.read_config_file()
- else:
+ except IOError as io_error:
+ if io_error.errno != errno.ENOENT:
raise
+ self.file_path = os.path.join(YARDSTICK_ROOT_PATH, file_path)
+ cfg = self.read_config_file()
+
self.nodes.extend(cfg["nodes"])
self.controllers.extend([node for node in cfg["nodes"]
if node["role"] == "Controller"])
@@ -76,6 +76,7 @@ class NodeContext(Context):
LOG.debug("BareMetals: %r", self.baremetals)
self.env = attrs.get('env', {})
+ self.attrs = attrs
LOG.debug("Env: %r", self.env)
# add optional static network definition
@@ -112,19 +113,17 @@ class NodeContext(Context):
def _do_ansible_job(self, path):
cmd = 'ansible-playbook -i inventory.ini %s' % path
- p = subprocess.Popen(cmd, shell=True, cwd=consts.ANSIBLE_DIR)
+ p = subprocess.Popen(cmd, shell=True, cwd=ANSIBLE_DIR)
p.communicate()
def _get_server(self, attr_name):
"""lookup server info by name from context
attr_name: a name for a server listed in nodes config file
"""
- if isinstance(attr_name, collections.Mapping):
+ node_name, name = self.split_name(attr_name)
+ if name is None or self.name != name:
return None
- if self.name != attr_name.split(".")[1]:
- return None
- node_name = attr_name.split(".")[0]
matching_nodes = (n for n in self.nodes if n["name"] == node_name)
try:
@@ -140,9 +139,10 @@ class NodeContext(Context):
pass
else:
raise ValueError("Duplicate nodes!!! Nodes: %s %s",
- (matching_nodes, duplicate))
+ (node, duplicate))
node["name"] = attr_name
+ node.setdefault("interfaces", {})
return node
def _get_network(self, attr_name):
@@ -151,12 +151,10 @@ class NodeContext(Context):
else:
# Don't generalize too much Just support vld_id
- vld_id = attr_name.get('vld_id')
- if vld_id is None:
- return None
-
- network = next((n for n in self.networks.values() if
- n.get("vld_id") == vld_id), None)
+ vld_id = attr_name.get('vld_id', {})
+ # for node context networks are dicts
+ iter1 = (n for n in self.networks.values() if n.get('vld_id') == vld_id)
+ network = next(iter1, None)
if network is None:
return None
@@ -193,7 +191,7 @@ class NodeContext(Context):
def _execute_local_script(self, info):
script, options = self._get_script(info)
- script = os.path.join(consts.YARDSTICK_ROOT_PATH, script)
+ script = os.path.join(YARDSTICK_ROOT_PATH, script)
cmd = ['bash', script, options]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
diff --git a/yardstick/benchmark/contexts/standalone.py b/yardstick/benchmark/contexts/standalone.py
index 2bc1f3755..ae1046974 100644
--- a/yardstick/benchmark/contexts/standalone.py
+++ b/yardstick/benchmark/contexts/standalone.py
@@ -15,6 +15,7 @@
from __future__ import absolute_import
import logging
+import os
import errno
import collections
import yaml
@@ -41,14 +42,15 @@ class StandaloneContext(Context):
self.networks = {}
self.nfvi_node = []
self.nfvi_obj = None
- super(self.__class__, self).__init__()
+ self.attrs = {}
+ super(StandaloneContext, self).__init__()
def read_config_file(self):
"""Read from config file"""
with open(self.file_path) as stream:
LOG.info("Parsing pod file: %s", self.file_path)
- cfg = yaml.load(stream)
+ cfg = yaml.safe_load(stream)
return cfg
def get_nfvi_obj(self):
@@ -63,17 +65,15 @@ class StandaloneContext(Context):
"""initializes itself from the supplied arguments"""
self.name = attrs["name"]
- self.file_path = attrs.get("file", "pod.yaml")
- LOG.info("Parsing pod file: %s", self.file_path)
+ self.file_path = file_path = attrs.get("file", "pod.yaml")
try:
cfg = self.read_config_file()
- except IOError as ioerror:
- if ioerror.errno == errno.ENOENT:
- self.file_path = YARDSTICK_ROOT_PATH + self.file_path
- cfg = self.read_config_file()
- else:
+ except IOError as io_error:
+ if io_error.errno != errno.ENOENT:
raise
+ self.file_path = os.path.join(YARDSTICK_ROOT_PATH, file_path)
+ cfg = self.read_config_file()
self.vm_deploy = attrs.get("vm_deploy", True)
self.nodes.extend([node for node in cfg["nodes"]
@@ -90,6 +90,7 @@ class StandaloneContext(Context):
else:
LOG.debug("Node role is other than SRIOV and OVS")
self.nfvi_obj = self.get_nfvi_obj()
+ self.attrs = attrs
# add optional static network definition
self.networks.update(cfg.get("networks", {}))
self.nfvi_obj = self.get_nfvi_obj()
@@ -146,11 +147,10 @@ class StandaloneContext(Context):
Keyword arguments:
attr_name -- A name for a server listed in nodes config file
"""
- if isinstance(attr_name, collections.Mapping):
- return None
- if self.name != attr_name.split(".")[1]:
+ node_name, name = self.split_name(attr_name)
+ if name is None or self.name != name:
return None
- node_name = attr_name.split(".")[0]
+
matching_nodes = (n for n in self.nodes if n["name"] == node_name)
try:
# A clone is created in order to avoid affecting the
@@ -165,7 +165,8 @@ class StandaloneContext(Context):
pass
else:
raise ValueError("Duplicate nodes!!! Nodes: %s %s",
- (matching_nodes, duplicate))
+ (node, duplicate))
+
node["name"] = attr_name
return node
@@ -175,14 +176,10 @@ class StandaloneContext(Context):
else:
# Don't generalize too much Just support vld_id
- vld_id = attr_name.get('vld_id')
- if vld_id is None:
- return None
- try:
- network = next(n for n in self.networks.values() if
- n.get("vld_id") == vld_id)
- except StopIteration:
- return None
+ vld_id = attr_name.get('vld_id', {})
+ # for standalone context networks are dicts
+ iter1 = (n for n in self.networks.values() if n.get('vld_id') == vld_id)
+ network = next(iter1, None)
if network is None:
return None
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index af508496f..2b10c61b3 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -13,6 +13,8 @@ from __future__ import absolute_import
from __future__ import print_function
import sys
import os
+from collections import OrderedDict
+
import yaml
import atexit
import ipaddress
@@ -121,6 +123,7 @@ class Task(object): # pragma: no cover
except KeyboardInterrupt:
raise
except Exception:
+ LOG.exception('')
testcases[case_name] = {'criteria': 'FAIL', 'tc_data': []}
else:
testcases[case_name] = {'criteria': 'PASS', 'tc_data': data}
@@ -591,8 +594,9 @@ def _is_background_scenario(scenario):
def parse_nodes_with_context(scenario_cfg):
"""parse the 'nodes' fields in scenario """
- nodes = scenario_cfg["nodes"]
- return {nodename: Context.get_server(node) for nodename, node in nodes.items()}
+ # ensure consistency in node instantiation order
+ return OrderedDict((nodename, Context.get_server(scenario_cfg["nodes"][nodename]))
+ for nodename in sorted(scenario_cfg["nodes"]))
def get_networks_from_nodes(nodes):
diff --git a/yardstick/benchmark/scenarios/lib/migrate.py b/yardstick/benchmark/scenarios/lib/migrate.py
index 116bae69e..dd244c7ce 100644
--- a/yardstick/benchmark/scenarios/lib/migrate.py
+++ b/yardstick/benchmark/scenarios/lib/migrate.py
@@ -16,7 +16,7 @@ import threading
import time
from datetime import datetime
-import ping
+
from yardstick.common import openstack_utils
from yardstick.common.utils import change_obj_to_dict
@@ -28,6 +28,15 @@ TIMEOUT = 0.05
PACKAGE_SIZE = 64
+try:
+ import ping
+except ImportError:
+ # temp fix for ping module import error on Python3
+ # we need to replace the ping module anyway
+ import mock
+ ping = mock.MagicMock()
+
+
class Migrate(base.Scenario): # pragma: no cover
"""
Execute a live migration for two hosts
diff --git a/yardstick/benchmark/scenarios/networking/vnf_generic.py b/yardstick/benchmark/scenarios/networking/vnf_generic.py
index 9607e3005..af17a3150 100644
--- a/yardstick/benchmark/scenarios/networking/vnf_generic.py
+++ b/yardstick/benchmark/scenarios/networking/vnf_generic.py
@@ -20,11 +20,11 @@ import errno
import os
import re
+from itertools import chain
+import yaml
from operator import itemgetter
from collections import defaultdict
-import yaml
-
from yardstick.benchmark.scenarios import base
from yardstick.common.utils import import_modules_from_package, itersubclasses
from yardstick.network_services.collector.subscriber import Collector
@@ -80,6 +80,22 @@ class SshManager(object):
self.conn.close()
+def find_relative_file(path, task_path):
+ # fixme: create schema to validate all fields have been provided
+ try:
+ with open(path):
+ pass
+ return path
+ except IOError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ else:
+ rel_path = os.path.join(task_path, path)
+ with open(rel_path):
+ pass
+ return rel_path
+
+
def open_relative_file(path, task_path):
try:
return open(path)
@@ -103,166 +119,176 @@ class NetworkServiceTestCase(base.Scenario):
# fixme: create schema to validate all fields have been provided
with open_relative_file(scenario_cfg["topology"],
scenario_cfg['task_path']) as stream:
- topology_yaml = yaml.load(stream)
+ topology_yaml = yaml.safe_load(stream)
self.topology = topology_yaml["nsd:nsd-catalog"]["nsd"][0]
self.vnfs = []
self.collector = None
self.traffic_profile = None
- @classmethod
- def _get_traffic_flow(cls, scenario_cfg):
+ def _get_traffic_flow(self):
try:
- with open(scenario_cfg["traffic_options"]["flow"]) as fflow:
- flow = yaml.load(fflow)
+ with open(self.scenario_cfg["traffic_options"]["flow"]) as fflow:
+ flow = yaml.safe_load(fflow)
except (KeyError, IOError, OSError):
flow = {}
return flow
- @classmethod
- def _get_traffic_imix(cls, scenario_cfg):
+ def _get_traffic_imix(self):
try:
- with open(scenario_cfg["traffic_options"]["imix"]) as fimix:
- imix = yaml.load(fimix)
+ with open(self.scenario_cfg["traffic_options"]["imix"]) as fimix:
+ imix = yaml.safe_load(fimix)
except (KeyError, IOError, OSError):
imix = {}
return imix
- @classmethod
- def _get_traffic_profile(cls, scenario_cfg, context_cfg):
- traffic_profile_tpl = ""
- private = {}
- public = {}
- try:
- with open_relative_file(scenario_cfg["traffic_profile"],
- scenario_cfg["task_path"]) as infile:
- traffic_profile_tpl = infile.read()
-
- except (KeyError, IOError, OSError):
- raise
-
- return [traffic_profile_tpl, private, public]
-
- def _fill_traffic_profile(self, scenario_cfg, context_cfg):
- flow = self._get_traffic_flow(scenario_cfg)
-
- imix = self._get_traffic_imix(scenario_cfg)
-
- traffic_mapping, private, public = \
- self._get_traffic_profile(scenario_cfg, context_cfg)
-
- traffic_profile = vnfdgen.generate_vnfd(traffic_mapping,
- {"imix": imix, "flow": flow,
- "private": private,
- "public": public})
-
- return TrafficProfile.get(traffic_profile)
-
- @classmethod
- def _find_vnf_name_from_id(cls, topology, vnf_id):
+ def _get_traffic_profile(self):
+ profile = self.scenario_cfg["traffic_profile"]
+ path = self.scenario_cfg["task_path"]
+ with open_relative_file(profile, path) as infile:
+ return infile.read()
+
+ def _fill_traffic_profile(self):
+ traffic_mapping = self._get_traffic_profile()
+ traffic_map_data = {
+ 'flow': self._get_traffic_flow(),
+ 'imix': self._get_traffic_imix(),
+ 'private': {},
+ 'public': {},
+ }
+
+ traffic_vnfd = vnfdgen.generate_vnfd(traffic_mapping, traffic_map_data)
+ self.traffic_profile = TrafficProfile.get(traffic_vnfd)
+ return self.traffic_profile
+
+ def _find_vnf_name_from_id(self, vnf_id):
return next((vnfd["vnfd-id-ref"]
- for vnfd in topology["constituent-vnfd"]
+ for vnfd in self.topology["constituent-vnfd"]
if vnf_id == vnfd["member-vnf-index"]), None)
@staticmethod
def get_vld_networks(networks):
return {n['vld_id']: n for n in networks.values()}
- def _resolve_topology(self, context_cfg, topology):
- for vld in topology["vld"]:
+ def _resolve_topology(self):
+ for vld in self.topology["vld"]:
try:
- node_0, node_1 = vld["vnfd-connection-point-ref"]
- except (TypeError, ValueError):
+ node0_data, node1_data = vld["vnfd-connection-point-ref"]
+ except (ValueError, TypeError):
raise IncorrectConfig("Topology file corrupted, "
- "wrong number of endpoints for connection")
+ "wrong endpoint count for connection")
- node_0_name = self._find_vnf_name_from_id(topology,
- node_0["member-vnf-index-ref"])
- node_1_name = self._find_vnf_name_from_id(topology,
- node_1["member-vnf-index-ref"])
+ node0_name = self._find_vnf_name_from_id(node0_data["member-vnf-index-ref"])
+ node1_name = self._find_vnf_name_from_id(node1_data["member-vnf-index-ref"])
- node_0_ifname = node_0["vnfd-connection-point-ref"]
- node_1_ifname = node_1["vnfd-connection-point-ref"]
+ node0_if_name = node0_data["vnfd-connection-point-ref"]
+ node1_if_name = node1_data["vnfd-connection-point-ref"]
- node_0_if = context_cfg["nodes"][node_0_name]["interfaces"][node_0_ifname]
- node_1_if = context_cfg["nodes"][node_1_name]["interfaces"][node_1_ifname]
try:
- vld_networks = self.get_vld_networks(context_cfg["networks"])
+ nodes = self.context_cfg["nodes"]
+ node0_if = nodes[node0_name]["interfaces"][node0_if_name]
+ node1_if = nodes[node1_name]["interfaces"][node1_if_name]
- node_0_if["vld_id"] = vld["id"]
- node_1_if["vld_id"] = vld["id"]
+ # names so we can do reverse lookups
+ node0_if["ifname"] = node0_if_name
+ node1_if["ifname"] = node1_if_name
+
+ node0_if["node_name"] = node0_name
+ node1_if["node_name"] = node1_name
+
+ vld_networks = self.get_vld_networks(self.context_cfg["networks"])
+ node0_if["vld_id"] = vld["id"]
+ node1_if["vld_id"] = vld["id"]
# set peer name
- node_0_if["peer_name"] = node_1_name
- node_1_if["peer_name"] = node_0_name
+ node0_if["peer_name"] = node1_name
+ node1_if["peer_name"] = node0_name
# set peer interface name
- node_0_if["peer_ifname"] = node_1_ifname
- node_1_if["peer_ifname"] = node_0_ifname
+ node0_if["peer_ifname"] = node1_if_name
+ node1_if["peer_ifname"] = node0_if_name
- # just load the whole network dict
- node_0_if["network"] = vld_networks.get(vld["id"], {})
- node_1_if["network"] = vld_networks.get(vld["id"], {})
+ # just load the network
+ node0_if["network"] = vld_networks.get(vld["id"], {})
+ node1_if["network"] = vld_networks.get(vld["id"], {})
- node_0_if["dst_mac"] = node_1_if["local_mac"]
- node_0_if["dst_ip"] = node_1_if["local_ip"]
+ node0_if["dst_mac"] = node1_if["local_mac"]
+ node0_if["dst_ip"] = node1_if["local_ip"]
- node_1_if["dst_mac"] = node_0_if["local_mac"]
- node_1_if["dst_ip"] = node_0_if["local_ip"]
+ node1_if["dst_mac"] = node0_if["local_mac"]
+ node1_if["dst_ip"] = node0_if["local_ip"]
- # add peer interface dict, but remove circular link
- # TODO: don't waste memory
- node_0_copy = node_0_if.copy()
- node_1_copy = node_1_if.copy()
- node_0_if["peer_intf"] = node_1_copy
- node_1_if["peer_intf"] = node_0_copy
except KeyError:
+ LOG.exception("")
raise IncorrectConfig("Required interface not found, "
"topology file corrupted")
- @classmethod
- def _find_list_index_from_vnf_idx(cls, topology, vnf_idx):
- return next((topology["constituent-vnfd"].index(vnfd)
- for vnfd in topology["constituent-vnfd"]
+ for vld in self.topology['vld']:
+ try:
+ node0_data, node1_data = vld["vnfd-connection-point-ref"]
+ except (ValueError, TypeError):
+ raise IncorrectConfig("Topology file corrupted, "
+ "wrong endpoint count for connection")
+
+ node0_name = self._find_vnf_name_from_id(node0_data["member-vnf-index-ref"])
+ node1_name = self._find_vnf_name_from_id(node1_data["member-vnf-index-ref"])
+
+ node0_if_name = node0_data["vnfd-connection-point-ref"]
+ node1_if_name = node1_data["vnfd-connection-point-ref"]
+
+ nodes = self.context_cfg["nodes"]
+ node0_if = nodes[node0_name]["interfaces"][node0_if_name]
+ node1_if = nodes[node1_name]["interfaces"][node1_if_name]
+
+ # add peer interface dict, but remove circular link
+ # TODO: don't waste memory
+ node0_copy = node0_if.copy()
+ node1_copy = node1_if.copy()
+ node0_if["peer_intf"] = node1_copy
+ node1_if["peer_intf"] = node0_copy
+
+ def _find_vnfd_from_vnf_idx(self, vnf_idx):
+ return next((vnfd for vnfd in self.topology["constituent-vnfd"]
if vnf_idx == vnfd["member-vnf-index"]), None)
- def _update_context_with_topology(self, context_cfg, topology):
- for idx in topology["constituent-vnfd"]:
- vnf_idx = idx["member-vnf-index"]
- nodes = context_cfg["nodes"]
- node = self._find_vnf_name_from_id(topology, vnf_idx)
- list_idx = self._find_list_index_from_vnf_idx(topology, vnf_idx)
- nodes[node].update(topology["constituent-vnfd"][list_idx])
+ def _update_context_with_topology(self):
+ for vnfd in self.topology["constituent-vnfd"]:
+ vnf_idx = vnfd["member-vnf-index"]
+ vnf_name = self._find_vnf_name_from_id(vnf_idx)
+ vnfd = self._find_vnfd_from_vnf_idx(vnf_idx)
+ self.context_cfg["nodes"][vnf_name].update(vnfd)
@staticmethod
def _sort_dpdk_port_num(netdevs):
# dpdk_port_num is PCI BUS ID ordering, lowest first
s = sorted(netdevs.values(), key=itemgetter('pci_bus_id'))
- for dpdk_port_num, netdev in enumerate(s, 1):
+ for dpdk_port_num, netdev in enumerate(s):
netdev['dpdk_port_num'] = dpdk_port_num
@classmethod
def _probe_missing_values(cls, netdevs, network, missing):
- mac = network['local_mac']
+ mac_lower = network['local_mac'].lower()
for netdev in netdevs.values():
- if netdev['address'].lower() == mac.lower():
- network['driver'] = netdev['driver']
- network['vpci'] = netdev['pci_bus_id']
- network['dpdk_port_num'] = netdev['dpdk_port_num']
- network['ifindex'] = netdev['ifindex']
+ if netdev['address'].lower() != mac_lower:
+ continue
+ network.update({
+ 'driver': netdev['driver'],
+ 'vpci': netdev['pci_bus_id'],
+ 'ifindex': netdev['ifindex'],
+ })
TOPOLOGY_REQUIRED_KEYS = frozenset({
- "vpci", "local_ip", "netmask", "local_mac", "driver", "dpdk_port_num"})
+ "vpci", "local_ip", "netmask", "local_mac", "driver"})
- def map_topology_to_infrastructure(self, context_cfg, topology):
+ def map_topology_to_infrastructure(self):
""" This method should verify if the available resources defined in pod.yaml
match the topology.yaml file.
+ :param context_cfg:
:param topology:
:return: None. Side effect: context_cfg is updated
"""
-
- for node, node_dict in context_cfg["nodes"].items():
+ for node, node_dict in self.context_cfg["nodes"].items():
cmd = "PATH=$PATH:/sbin:/usr/sbin ip addr show"
with SshManager(node_dict) as conn:
@@ -276,28 +302,28 @@ class NetworkServiceTestCase(base.Scenario):
"Cannot find netdev info in sysfs" % node)
netdevs = node_dict['netdevs'] = self.parse_netdev_info(
stdout)
- self._sort_dpdk_port_num(netdevs)
for network in node_dict["interfaces"].values():
missing = self.TOPOLOGY_REQUIRED_KEYS.difference(network)
+ if not missing:
+ continue
+
+ try:
+ self._probe_missing_values(netdevs, network,
+ missing)
+ except KeyError:
+ pass
+ else:
+ missing = self.TOPOLOGY_REQUIRED_KEYS.difference(
+ network)
if missing:
- try:
- self._probe_missing_values(netdevs, network,
- missing)
- except KeyError:
- pass
- else:
- missing = self.TOPOLOGY_REQUIRED_KEYS.difference(
- network)
- if missing:
- raise IncorrectConfig(
- "Require interface fields '%s' "
- "not found, topology file "
- "corrupted" % ', '.join(missing))
+ raise IncorrectConfig(
+ "Require interface fields '%s' not found, topology file "
+ "corrupted" % ', '.join(missing))
# 3. Use topology file to find connections & resolve dest address
- self._resolve_topology(context_cfg, topology)
- self._update_context_with_topology(context_cfg, topology)
+ self._resolve_topology()
+ self._update_context_with_topology()
FIND_NETDEVICE_STRING = r"""find /sys/devices/pci* -type d -name net -exec sh -c '{ grep -sH ^ \
$1/ifindex $1/address $1/operstate $1/device/vendor $1/device/device \
@@ -361,7 +387,7 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \
node_intf = node['interfaces'][intf['name']]
intf['virtual-interface'].update(node_intf)
- def load_vnf_models(self, scenario_cfg, context_cfg):
+ def load_vnf_models(self, scenario_cfg=None, context_cfg=None):
""" Create VNF objects based on YAML descriptors
:param scenario_cfg:
@@ -369,21 +395,29 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \
:param context_cfg:
:return:
"""
+ if scenario_cfg is None:
+ scenario_cfg = self.scenario_cfg
+
+ if context_cfg is None:
+ context_cfg = self.context_cfg
+
vnfs = []
+ # we assume OrderedDict for consistenct in instantiation
for node_name, node in context_cfg["nodes"].items():
LOG.debug(node)
- with open_relative_file(node["VNF model"],
- scenario_cfg['task_path']) as stream:
+ file_name = node["VNF model"]
+ file_path = scenario_cfg['task_path']
+ with open_relative_file(file_name, file_path) as stream:
vnf_model = stream.read()
vnfd = vnfdgen.generate_vnfd(vnf_model, node)
# TODO: here add extra context_cfg["nodes"] regardless of template
vnfd = vnfd["vnfd:vnfd-catalog"]["vnfd"][0]
self.update_interfaces_from_node(vnfd, node)
vnf_impl = self.get_vnf_impl(vnfd['id'])
- vnf_instance = vnf_impl(vnfd)
- vnf_instance.name = node_name
+ vnf_instance = vnf_impl(node_name, vnfd)
vnfs.append(vnf_instance)
+ self.vnfs = vnfs
return vnfs
def setup(self):
@@ -392,18 +426,25 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \
:return:
"""
# 1. Verify if infrastructure mapping can meet topology
- self.map_topology_to_infrastructure(self.context_cfg, self.topology)
+ self.map_topology_to_infrastructure()
# 1a. Load VNF models
- self.vnfs = self.load_vnf_models(self.scenario_cfg, self.context_cfg)
+ self.load_vnf_models()
# 1b. Fill traffic profile with information from topology
- self.traffic_profile = self._fill_traffic_profile(self.scenario_cfg,
- self.context_cfg)
+ self._fill_traffic_profile()
# 2. Provision VNFs
+
+ # link events will cause VNF application to exit
+ # so we should start traffic runners before VNFs
+ traffic_runners = [vnf for vnf in self.vnfs if vnf.runs_traffic]
+ non_traffic_runners = [vnf for vnf in self.vnfs if not vnf.runs_traffic]
try:
- for vnf in self.vnfs:
+ for vnf in chain(traffic_runners, non_traffic_runners):
LOG.info("Instantiating %s", vnf.name)
vnf.instantiate(self.scenario_cfg, self.context_cfg)
+ for vnf in chain(traffic_runners, non_traffic_runners):
+ LOG.info("Waiting for %s to instantiate", vnf.name)
+ vnf.wait_for_instantiate()
except RuntimeError:
for vnf in self.vnfs:
vnf.terminate()
@@ -411,7 +452,6 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \
# 3. Run experiment
# Start listeners first to avoid losing packets
- traffic_runners = [vnf for vnf in self.vnfs if vnf.runs_traffic]
for traffic_gen in traffic_runners:
traffic_gen.listen_traffic(self.traffic_profile)
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py
index 7a64b8ca2..1059e1ce4 100644
--- a/yardstick/common/utils.py
+++ b/yardstick/common/utils.py
@@ -26,6 +26,7 @@ import sys
import collections
import socket
import random
+import ipaddress
from functools import reduce
from contextlib import closing
@@ -148,7 +149,7 @@ def source_env(env_file):
p = subprocess.Popen(". %s; env" % env_file, stdout=subprocess.PIPE,
shell=True)
output = p.communicate()[0]
- env = dict((line.split('=', 1) for line in output.splitlines()))
+ env = dict(line.split('=', 1) for line in output.splitlines() if '=' in line)
os.environ.update(env)
return env
@@ -221,12 +222,12 @@ def flatten_dict_key(data):
for v in data.values()):
return data
- for k, v in six.iteritems(data):
+ for k, v in data.items():
if isinstance(v, collections.Mapping):
- for n_k, n_v in six.iteritems(v):
+ for n_k, n_v in v.items():
next_data["%s.%s" % (k, n_k)] = n_v
# use list because iterable is too generic
- elif isinstance(v, list):
+ elif isinstance(v, collections.Iterable) and not isinstance(v, six.string_types):
for index, item in enumerate(v):
next_data["%s%d" % (k, index)] = item
else:
@@ -267,7 +268,6 @@ def set_dict_value(dic, keys, value):
return_dic = dic
for key in keys.split('.'):
-
return_dic.setdefault(key, {})
if key == keys.split('.')[-1]:
return_dic[key] = value
@@ -282,3 +282,91 @@ def get_free_port(ip):
port = random.randint(5000, 10000)
if s.connect_ex((ip, port)) != 0:
return port
+
+
+def mac_address_to_hex_list(mac):
+ octets = ["0x{:02x}".format(int(elem, 16)) for elem in mac.split(':')]
+ assert len(octets) == 6 and all(len(octet) == 4 for octet in octets)
+ return octets
+
+
+def safe_ip_address(ip_addr):
+ """ get ip address version v6 or v4 """
+ try:
+ return ipaddress.ip_address(six.text_type(ip_addr))
+ except ValueError:
+ logging.error("%s is not valid", ip_addr)
+ return None
+
+
+def get_ip_version(ip_addr):
+ """ get ip address version v6 or v4 """
+ try:
+ address = ipaddress.ip_address(six.text_type(ip_addr))
+ except ValueError:
+ logging.error("%s is not valid", ip_addr)
+ return None
+ else:
+ return address.version
+
+
+def ip_to_hex(ip_addr):
+ try:
+ address = ipaddress.ip_address(six.text_type(ip_addr))
+ except ValueError:
+ logging.error("%s is not valid", ip_addr)
+ return ip_addr
+
+ if address.version != 4:
+ return ip_addr
+ return '{:08x}'.format(int(address))
+
+
+def try_int(s, *args):
+ """Convert to integer if possible."""
+ try:
+ return int(s)
+ except (TypeError, ValueError):
+ return args[0] if args else s
+
+
+class SocketTopology(dict):
+
+ def sockets(self):
+ return sorted(self.keys())
+
+ def cores(self):
+ return sorted(core for cores in self.values() for core in cores)
+
+ def processors(self):
+ return sorted(
+ proc for cores in self.values() for procs in cores.values() for
+ proc in procs)
+
+
+def parse_cpuinfo(cpuinfo):
+ socket_map = {}
+
+ lines = cpuinfo.splitlines()
+
+ core_details = []
+ core_lines = {}
+ for line in lines:
+ if line.strip():
+ name, value = line.split(":", 1)
+ core_lines[name.strip()] = try_int(value.strip())
+ else:
+ core_details.append(core_lines)
+ core_lines = {}
+
+ for core in core_details:
+ socket_map.setdefault(core["physical id"], {}).setdefault(
+ core["core id"], {})[core["processor"]] = (
+ core["processor"], core["core id"], core["physical id"])
+
+ return SocketTopology(socket_map)
+
+
+def config_to_dict(config):
+ return {section: dict(config.items(section)) for section in
+ config.sections()}
diff --git a/yardstick/network_services/helpers/__init__.py b/yardstick/network_services/helpers/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/yardstick/network_services/helpers/__init__.py
diff --git a/yardstick/network_services/helpers/cpu.py b/yardstick/network_services/helpers/cpu.py
new file mode 100644
index 000000000..a5ba6c31e
--- /dev/null
+++ b/yardstick/network_services/helpers/cpu.py
@@ -0,0 +1,76 @@
+# 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.
+
+
+class CpuSysCores(object):
+
+ def __init__(self, connection=""):
+ self.core_map = {}
+ self.connection = connection
+
+ def _open_cpuinfo(self):
+ lines = []
+ lines = self.connection.execute("cat /proc/cpuinfo")[1].split(u'\n')
+ return lines
+
+ def _get_core_details(self, lines):
+ core_details = []
+ core_lines = {}
+ for line in lines:
+ if line.strip():
+ name, value = line.split(":", 1)
+ core_lines[name.strip()] = value.strip()
+ else:
+ core_details.append(core_lines)
+ core_lines = {}
+
+ return core_details
+
+ def get_core_socket(self):
+ lines = self.connection.execute("lscpu")[1].split(u'\n')
+ num_cores = self._get_core_details(lines)
+ for num in num_cores:
+ self.core_map["cores_per_socket"] = num["Core(s) per socket"]
+ self.core_map["thread_per_core"] = num["Thread(s) per core"]
+
+ lines = self._open_cpuinfo()
+ core_details = self._get_core_details(lines)
+ for core in core_details:
+ for k, v in core.items():
+ if k == "physical id":
+ if core["physical id"] not in self.core_map:
+ self.core_map[core['physical id']] = []
+ self.core_map[core['physical id']].append(
+ core["processor"])
+
+ return self.core_map
+
+ def validate_cpu_cfg(self, vnf_cfg=None):
+ if vnf_cfg is None:
+ vnf_cfg = {
+ 'lb_config': 'SW',
+ 'lb_count': 1,
+ 'worker_config': '1C/1T',
+ 'worker_threads': 1
+ }
+ if self.core_map["thread_per_core"] == 1 and \
+ vnf_cfg["worker_config"] == "1C/2T":
+ return -1
+
+ if vnf_cfg['lb_config'] == 'SW':
+ num_cpu = int(vnf_cfg["worker_threads"]) + 5
+ if int(self.core_map["cores_per_socket"]) < num_cpu:
+ return -1
+
+ return 0
diff --git a/yardstick/network_services/helpers/samplevnf_helper.py b/yardstick/network_services/helpers/samplevnf_helper.py
new file mode 100644
index 000000000..1eefc5ffa
--- /dev/null
+++ b/yardstick/network_services/helpers/samplevnf_helper.py
@@ -0,0 +1,639 @@
+# 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.
+
+from __future__ import absolute_import
+
+import ipaddress
+import logging
+import os
+import sys
+from collections import OrderedDict, defaultdict
+from itertools import chain
+
+import six
+from six.moves.configparser import ConfigParser
+
+from yardstick.common.utils import ip_to_hex
+
+LOG = logging.getLogger(__name__)
+
+LINK_CONFIG_TEMPLATE = """\
+link {0} down
+link {0} config {1} {2}
+link {0} up
+"""
+
+ACTION_TEMPLATE = """\
+p action add {0} accept
+p action add {0} fwd
+p action add {0} count
+"""
+
+FW_ACTION_TEMPLATE = """\
+p action add {0} accept
+p action add {0} fwd
+p action add {0} count
+p action add {0} conntrack
+"""
+
+# This sets up a basic passthrough with no rules
+SCRIPT_TPL = """
+{link_config}
+
+{arp_config}
+
+{arp_config6}
+
+{actions}
+
+{rules}
+
+"""
+
+
+class MultiPortConfig(object):
+
+ HW_LB = "HW"
+
+ @staticmethod
+ def float_x_plus_one_tenth_of_y(x, y):
+ return float(x) + float(y) / 10.0
+
+ @staticmethod
+ def make_str(base, iterator):
+ return ' '.join((base.format(x) for x in iterator))
+
+ @classmethod
+ def make_range_str(cls, base, start, stop=0, offset=0):
+ if offset and not stop:
+ stop = start + offset
+ return cls.make_str(base, range(start, stop))
+
+ @staticmethod
+ def parser_get(parser, section, key, default=None):
+ if parser.has_option(section, key):
+ return parser.get(section, key)
+ return default
+
+ @staticmethod
+ def make_ip_addr(ip, mask_len):
+ try:
+ return ipaddress.ip_interface(six.text_type('/'.join([ip, mask_len])))
+ except ValueError:
+ # None so we can skip later
+ return None
+
+ @classmethod
+ def validate_ip_and_prefixlen(cls, ip_addr, prefixlen):
+ ip_addr = cls.make_ip_addr(ip_addr, prefixlen)
+ return ip_addr.ip.exploded, ip_addr.network.prefixlen
+
+ def __init__(self, topology_file, config_tpl, tmp_file, interfaces=None,
+ vnf_type='CGNAT', lb_count=2, worker_threads=3,
+ worker_config='1C/1T', lb_config='SW', socket=0):
+
+ super(MultiPortConfig, self).__init__()
+ self.topology_file = topology_file
+ self.worker_config = worker_config.split('/')[1].lower()
+ self.worker_threads = self.get_worker_threads(worker_threads)
+ self.vnf_type = vnf_type
+ self.pipe_line = 0
+ self.interfaces = interfaces if interfaces else {}
+ self.networks = {}
+ self.write_parser = ConfigParser()
+ self.read_parser = ConfigParser()
+ self.read_parser.read(config_tpl)
+ self.master_core = self.read_parser.get("PIPELINE0", "core")
+ self.master_tpl = self.get_config_tpl_data('MASTER')
+ self.arpicmp_tpl = self.get_config_tpl_data('ARPICMP')
+ self.txrx_tpl = self.get_config_tpl_data('TXRX')
+ self.loadb_tpl = self.get_config_tpl_data('LOADB')
+ self.vnf_tpl = self.get_config_tpl_data(vnf_type)
+ self.swq = 0
+ self.lb_count = int(lb_count)
+ self.lb_config = lb_config
+ self.tmp_file = os.path.join("/tmp", tmp_file)
+ self.pktq_out_os = []
+ self.socket = socket
+ self.start_core = ""
+ self.pipeline_counter = ""
+ self.txrx_pipeline = ""
+ self.port_pair_list = []
+ self.lb_to_port_pair_mapping = {}
+ self.init_eal()
+
+ self.lb_index = None
+ self.mul = 0
+ self.port_pairs = []
+ self.port_pair_list = []
+ self.ports_len = 0
+ self.prv_que_handler = None
+ self.vnfd = None
+ self.rules = None
+ self.pktq_out = ''
+
+ @staticmethod
+ def gen_core(core):
+ # return "s{}c{}".format(self.socket, core)
+ # don't use sockets for VNFs, because we don't want to have to
+ # adjust VM CPU topology. It is virtual anyway
+ return str(core)
+
+ def make_port_pairs_iter(self, operand, iterable):
+ return (operand(x[-1], y) for y in iterable for x in chain(*self.port_pairs))
+
+ def make_range_port_pairs_iter(self, operand, start, end):
+ return self.make_port_pairs_iter(operand, range(start, end))
+
+ def init_eal(self):
+ vpci = [v['virtual-interface']["vpci"] for v in self.interfaces]
+ with open(self.tmp_file, 'w') as fh:
+ fh.write('[EAL]\n')
+ for item in vpci:
+ fh.write('w = {0}\n'.format(item))
+ fh.write('\n')
+
+ def update_timer(self):
+ timer_tpl = self.get_config_tpl_data('TIMER')
+ timer_tpl['core'] = self.gen_core(self.start_core)
+ self.update_write_parser(timer_tpl)
+ self.start_core += 1
+
+ def get_config_tpl_data(self, type_value):
+ for section in self.read_parser.sections():
+ if self.read_parser.has_option(section, 'type'):
+ if type_value == self.read_parser.get(section, 'type'):
+ tpl = OrderedDict(self.read_parser.items(section))
+ return tpl
+
+ def get_txrx_tpl_data(self, value):
+ for section in self.read_parser.sections():
+ if self.read_parser.has_option(section, 'pipeline_txrx_type'):
+ if value == self.read_parser.get(section, 'pipeline_txrx_type'):
+ tpl = OrderedDict(self.read_parser.items(section))
+ return tpl
+
+ def init_write_parser_template(self, type_value='ARPICMP'):
+ for section in self.read_parser.sections():
+ if type_value == self.parser_get(self.read_parser, section, 'type', object()):
+ self.start_core = self.read_parser.getint(section, 'core')
+ self.pipeline_counter = self.read_parser.getint(section, 'core')
+ self.txrx_pipeline = self.read_parser.getint(section, 'core')
+ return
+ self.write_parser.add_section(section)
+ for name, value in self.read_parser.items(section):
+ self.write_parser.set(section, name, value)
+
+ def update_write_parser(self, data):
+ section = "PIPELINE{0}".format(self.pipeline_counter)
+ self.write_parser.add_section(section)
+ for name, value in data.items():
+ self.write_parser.set(section, name, value)
+
+ def get_worker_threads(self, worker_threads):
+ if self.worker_config == '1t':
+ return worker_threads
+ else:
+ return worker_threads - worker_threads % 2
+
+ def generate_next_core_id(self):
+ if self.worker_config == '1t':
+ self.start_core += 1
+ return
+
+ try:
+ self.start_core = 'h{}'.format(int(self.start_core))
+ except ValueError:
+ self.start_core = int(self.start_core[:-1]) + 1
+
+ @staticmethod
+ def get_port_pairs(interfaces):
+ port_pair_list = []
+ networks = defaultdict(list)
+ for private_intf in interfaces:
+ vintf = private_intf['virtual-interface']
+ networks[vintf['vld_id']].append(vintf)
+
+ for name, net in networks.items():
+ # partition returns a tuple
+ parts = list(name.partition('private'))
+ if parts[0]:
+ # 'private' was not in or not leftmost in the string
+ continue
+ parts[1] = 'public'
+ public_id = ''.join(parts)
+ for private_intf in net:
+ try:
+ public_peer_intfs = networks[public_id]
+ except KeyError:
+ LOG.warning("private network without peer %s, %s not found", name, public_id)
+ continue
+
+ for public_intf in public_peer_intfs:
+ port_pair = private_intf["ifname"], public_intf["ifname"]
+ port_pair_list.append(port_pair)
+
+ return port_pair_list, networks
+
+ def get_lb_count(self):
+ self.lb_count = int(min(len(self.port_pair_list), self.lb_count))
+
+ def generate_lb_to_port_pair_mapping(self):
+ self.lb_to_port_pair_mapping = defaultdict(int)
+ port_pair_count = len(self.port_pair_list)
+ lb_pair_count = int(port_pair_count / self.lb_count)
+ for i in range(self.lb_count):
+ self.lb_to_port_pair_mapping[i + 1] = lb_pair_count
+ for i in range(port_pair_count % self.lb_count):
+ self.lb_to_port_pair_mapping[i + 1] += 1
+
+ def set_priv_to_pub_mapping(self):
+ return "".join(str(y) for y in [(int(x[0][-1]), int(x[1][-1])) for x in
+ self.port_pair_list])
+
+ def set_priv_que_handler(self):
+ # iterated twice, can't be generator
+ priv_to_pub_map = [(int(x[0][-1]), int(x[1][-1])) for x in self.port_pairs]
+ # must be list to use .index()
+ port_list = list(chain.from_iterable(priv_to_pub_map))
+ priv_ports = (x[0] for x in priv_to_pub_map)
+ self.prv_que_handler = '({})'.format(
+ ",".join((str(port_list.index(x)) for x in priv_ports)))
+
+ def generate_arp_route_tbl(self):
+ arp_config = []
+ arp_route_tbl_tmpl = "({port0_dst_ip_hex},{port0_netmask_hex},{port_num}," \
+ "{next_hop_ip_hex})"
+ for port_pair in self.port_pair_list:
+ for port in port_pair:
+ port_num = int(port[-1])
+ interface = self.interfaces[port_num]
+ # port0_ip = ipaddress.ip_interface(six.text_type(
+ # "%s/%s" % (interface["virtual-interface"]["local_ip"],
+ # interface["virtual-interface"]["netmask"])))
+ dst_port0_ip = \
+ ipaddress.ip_interface(six.text_type(
+ "%s/%s" % (interface["virtual-interface"]["dst_ip"],
+ interface["virtual-interface"]["netmask"])))
+ arp_vars = {
+ "port0_dst_ip_hex": ip_to_hex(dst_port0_ip.ip.exploded),
+ "port0_netmask_hex": ip_to_hex(dst_port0_ip.network.netmask.exploded),
+ "port_num": port_num,
+ # next hop is dst in this case
+ "next_hop_ip_hex": ip_to_hex(dst_port0_ip.ip.exploded),
+ }
+ arp_config.append(arp_route_tbl_tmpl.format(**arp_vars))
+
+ return ' '.join(arp_config)
+
+ def generate_arpicmp_data(self):
+ swq_in_str = self.make_range_str('SWQ{}', self.swq, offset=self.lb_count)
+ self.swq += self.lb_count
+ swq_out_str = self.make_range_str('SWQ{}', self.swq, offset=self.lb_count)
+ self.swq += self.lb_count
+ mac_iter = (self.interfaces[int(x[-1])]['virtual-interface']['local_mac']
+ for port_pair in self.port_pair_list for x in port_pair)
+ pktq_in_iter = ('RXQ{}'.format(float(x[0][-1])) for x in self.port_pair_list)
+
+ arpicmp_data = {
+ 'core': self.gen_core(self.start_core),
+ 'pktq_in': swq_in_str,
+ 'pktq_out': swq_out_str,
+ 'ports_mac_list': ' '.join(mac_iter),
+ 'pktq_in_prv': ' '.join(pktq_in_iter),
+ 'prv_to_pub_map': self.set_priv_to_pub_mapping(),
+ 'arp_route_tbl': self.generate_arp_route_tbl(),
+ # can't use empty string, defaul to ()
+ 'nd_route_tbl': "()",
+ }
+ self.pktq_out_os = swq_out_str.split(' ')
+ # why?
+ if self.lb_config == self.HW_LB:
+ arpicmp_data['pktq_in'] = swq_in_str
+ self.swq = 0
+ return arpicmp_data
+
+ def generate_final_txrx_data(self):
+ swq_start = self.swq - self.ports_len * self.worker_threads
+
+ txq_start = 0
+ txq_end = self.worker_threads
+
+ pktq_out_iter = self.make_range_port_pairs_iter(self.float_x_plus_one_tenth_of_y,
+ txq_start, txq_end)
+
+ swq_str = self.make_range_str('SWQ{}', swq_start, self.swq)
+ txq_str = self.make_str('TXQ{}', pktq_out_iter)
+ rxtx_data = {
+ 'pktq_in': swq_str,
+ 'pktq_out': txq_str,
+ 'pipeline_txrx_type': 'TXTX',
+ 'core': self.gen_core(self.start_core),
+ }
+ pktq_in = rxtx_data['pktq_in']
+ pktq_in = '{0} {1}'.format(pktq_in, self.pktq_out_os[self.lb_index - 1])
+ rxtx_data['pktq_in'] = pktq_in
+ self.pipeline_counter += 1
+ return rxtx_data
+
+ def generate_initial_txrx_data(self):
+ pktq_iter = self.make_range_port_pairs_iter(self.float_x_plus_one_tenth_of_y,
+ 0, self.worker_threads)
+
+ rxq_str = self.make_str('RXQ{}', pktq_iter)
+ swq_str = self.make_range_str('SWQ{}', self.swq, offset=self.ports_len)
+ txrx_data = {
+ 'pktq_in': rxq_str,
+ 'pktq_out': swq_str + ' SWQ{0}'.format(self.lb_index - 1),
+ 'pipeline_txrx_type': 'RXRX',
+ 'core': self.gen_core(self.start_core),
+ }
+ self.pipeline_counter += 1
+ return txrx_data
+
+ def generate_lb_data(self):
+ pktq_in = self.make_range_str('SWQ{}', self.swq, offset=self.ports_len)
+ self.swq += self.ports_len
+
+ offset = self.ports_len * self.worker_threads
+ pktq_out = self.make_range_str('SWQ{}', self.swq, offset=offset)
+ self.pktq_out = pktq_out.split()
+
+ self.swq += (self.ports_len * self.worker_threads)
+ lb_data = {
+ 'prv_que_handler': self.prv_que_handler,
+ 'pktq_in': pktq_in,
+ 'pktq_out': pktq_out,
+ 'n_vnf_threads': str(self.worker_threads),
+ 'core': self.gen_core(self.start_core),
+ }
+ self.pipeline_counter += 1
+ return lb_data
+
+ def generate_vnf_data(self):
+ if self.lb_config == self.HW_LB:
+ port_iter = self.make_port_pairs_iter(self.float_x_plus_one_tenth_of_y, [self.mul])
+ pktq_in = self.make_str('RXQ{}', port_iter)
+
+ self.mul += 1
+ port_iter = self.make_port_pairs_iter(self.float_x_plus_one_tenth_of_y, [self.mul])
+ pktq_out = self.make_str('TXQ{}', port_iter)
+
+ pipe_line_data = {
+ 'pktq_in': pktq_in,
+ 'pktq_out': pktq_out + ' SWQ{0}'.format(self.swq),
+ 'prv_que_handler': self.prv_que_handler,
+ 'core': self.gen_core(self.start_core),
+ }
+ self.swq += 1
+ else:
+ pipe_line_data = {
+ 'pktq_in': ' '.join((self.pktq_out.pop(0) for _ in range(self.ports_len))),
+ 'pktq_out': self.make_range_str('SWQ{}', self.swq, offset=self.ports_len),
+ 'prv_que_handler': self.prv_que_handler,
+ 'core': self.gen_core(self.start_core),
+ }
+ self.swq += self.ports_len
+
+ if self.vnf_type in ('ACL', 'VFW'):
+ pipe_line_data.pop('prv_que_handler')
+
+ if self.vnf_tpl.get('vnf_set'):
+ public_ip_port_range_list = self.vnf_tpl['public_ip_port_range'].split(':')
+ ip_in_hex = '{:x}'.format(int(public_ip_port_range_list[0], 16) + self.lb_index - 1)
+ public_ip_port_range_list[0] = ip_in_hex
+ self.vnf_tpl['public_ip_port_range'] = ':'.join(public_ip_port_range_list)
+
+ self.pipeline_counter += 1
+ return pipe_line_data
+
+ def generate_config_data(self):
+ self.init_write_parser_template()
+
+ # use master core for master, don't use self.start_core
+ self.write_parser.set('PIPELINE0', 'core', self.gen_core(self.master_core))
+ arpicmp_data = self.generate_arpicmp_data()
+ self.arpicmp_tpl.update(arpicmp_data)
+ self.update_write_parser(self.arpicmp_tpl)
+
+ self.start_core += 1
+ if self.vnf_type == 'CGNAPT':
+ self.pipeline_counter += 1
+ self.update_timer()
+
+ for lb in self.lb_to_port_pair_mapping:
+ self.lb_index = lb
+ self.mul = 0
+ port_pair_count = self.lb_to_port_pair_mapping[lb]
+ if not self.port_pair_list:
+ continue
+
+ self.port_pairs = self.port_pair_list[:port_pair_count]
+ self.port_pair_list = self.port_pair_list[port_pair_count:]
+ self.ports_len = port_pair_count * 2
+ self.set_priv_que_handler()
+ if self.lb_config == 'SW':
+ txrx_data = self.generate_initial_txrx_data()
+ self.txrx_tpl.update(txrx_data)
+ self.update_write_parser(self.txrx_tpl)
+ self.start_core += 1
+ lb_data = self.generate_lb_data()
+ self.loadb_tpl.update(lb_data)
+ self.update_write_parser(self.loadb_tpl)
+ self.start_core += 1
+
+ for i in range(self.worker_threads):
+ vnf_data = self.generate_vnf_data()
+ if not self.vnf_tpl:
+ self.vnf_tpl = {}
+ self.vnf_tpl.update(vnf_data)
+ self.update_write_parser(self.vnf_tpl)
+ try:
+ self.vnf_tpl.pop('vnf_set')
+ except KeyError:
+ pass
+ else:
+ self.vnf_tpl.pop('public_ip_port_range')
+ self.generate_next_core_id()
+
+ if self.lb_config == 'SW':
+ txrx_data = self.generate_final_txrx_data()
+ self.txrx_tpl.update(txrx_data)
+ self.update_write_parser(self.txrx_tpl)
+ self.start_core += 1
+ self.vnf_tpl = self.get_config_tpl_data(self.vnf_type)
+
+ def generate_config(self):
+ self.port_pair_list, self.networks = self.get_port_pairs(self.interfaces)
+ self.get_lb_count()
+ self.generate_lb_to_port_pair_mapping()
+ self.generate_config_data()
+ self.write_parser.write(sys.stdout)
+ with open(self.tmp_file, 'a') as tfh:
+ self.write_parser.write(tfh)
+
+ def generate_link_config(self):
+
+ link_configs = []
+ for port_pair in self.port_pair_list:
+ for port in port_pair:
+ port = port[-1]
+ virtual_interface = self.interfaces[int(port)]["virtual-interface"]
+ local_ip = virtual_interface["local_ip"]
+ netmask = virtual_interface["netmask"]
+ port_ip, prefix_len = self.validate_ip_and_prefixlen(local_ip, netmask)
+ link_configs.append(LINK_CONFIG_TEMPLATE.format(port, port_ip, prefix_len))
+
+ return ''.join(link_configs)
+
+ def get_route_data(self, src_key, data_key, port):
+ route_list = self.vnfd['vdu'][0].get(src_key, [])
+ return next((route[data_key] for route in route_list if route['if'] == port), None)
+
+ def get_ports_gateway(self, port):
+ return self.get_route_data('routing_table', 'gateway', port)
+
+ def get_ports_gateway6(self, port):
+ return self.get_route_data('nd_route_tbl', 'gateway', port)
+
+ def get_netmask_gateway(self, port):
+ return self.get_route_data('routing_table', 'netmask', port)
+
+ def get_netmask_gateway6(self, port):
+ return self.get_route_data('nd_route_tbl', 'netmask', port)
+
+ def generate_arp_config(self):
+ arp_config = []
+ for port_pair in self.port_pair_list:
+ for port in port_pair:
+ gateway = self.get_ports_gateway(port)
+ # omit entries with no gateway
+ if not gateway:
+ continue
+ dst_mac = self.interfaces[int(port[-1])]["virtual-interface"]["dst_mac"]
+ arp_config.append((port[-1], gateway, dst_mac, self.txrx_pipeline))
+
+ return '\n'.join(('p {3} arpadd {0} {1} {2}'.format(*values) for values in arp_config))
+
+ def generate_arp_config6(self):
+ arp_config6 = []
+ for port_pair in self.port_pair_list:
+ for port in port_pair:
+ gateway6 = self.get_ports_gateway6(port)
+ # omit entries with no gateway
+ if not gateway6:
+ continue
+ dst_mac6 = self.interfaces[int(port[-1])]["virtual-interface"]["dst_mac"]
+ arp_config6.append((port[-1], gateway6, dst_mac6, self.txrx_pipeline))
+
+ return '\n'.join(('p {3} arpadd {0} {1} {2}'.format(*values) for values in arp_config6))
+
+ def generate_action_config(self):
+ port_list = []
+ for port_pair in self.port_pair_list:
+ for port in port_pair:
+ port_list.append(port[-1])
+
+ if self.vnf_type == "VFW":
+ template = FW_ACTION_TEMPLATE
+ else:
+ template = ACTION_TEMPLATE
+
+ return ''.join((template.format(port) for port in port_list))
+
+ def get_ip_from_port(self, port):
+ return self.make_ip_addr(self.get_ports_gateway(port), self.get_netmask_gateway(port))
+
+ def get_ip_and_prefixlen_from_ip_of_port(self, port):
+ ip_addr = self.get_ip_from_port(port)
+ # handle cases with no gateway
+ if ip_addr:
+ return ip_addr.ip.exploded, ip_addr.network.prefixlen
+ else:
+ return None, None
+
+ def generate_rule_config(self):
+ cmd = 'acl' if self.vnf_type == "ACL" else "vfw"
+ rules_config = self.rules if self.rules else ''
+ new_rules = []
+ new_ipv6_rules = []
+ pattern = 'p {0} add {1} {2} {3} {4} {5} 0 65535 0 65535 0 0 {6}'
+ for port_pair in self.port_pair_list:
+ src_port = int(port_pair[0][-1])
+ dst_port = int(port_pair[1][-1])
+
+ src_ip, src_prefix_len = self.get_ip_and_prefixlen_from_ip_of_port(port_pair[0])
+ dst_ip, dst_prefix_len = self.get_ip_and_prefixlen_from_ip_of_port(port_pair[1])
+ # ignore entires with empty values
+ if all((src_ip, src_prefix_len, dst_ip, dst_prefix_len)):
+ new_rules.append((cmd, self.txrx_pipeline, src_ip, src_prefix_len,
+ dst_ip, dst_prefix_len, dst_port))
+ new_rules.append((cmd, self.txrx_pipeline, dst_ip, dst_prefix_len,
+ src_ip, src_prefix_len, src_port))
+
+ src_ip = self.get_ports_gateway6(port_pair[0])
+ src_prefix_len = self.get_netmask_gateway6(port_pair[0])
+ dst_ip = self.get_ports_gateway6(port_pair[1])
+ dst_prefix_len = self.get_netmask_gateway6(port_pair[0])
+ # ignore entires with empty values
+ if all((src_ip, src_prefix_len, dst_ip, dst_prefix_len)):
+ new_ipv6_rules.append((cmd, self.txrx_pipeline, src_ip, src_prefix_len,
+ dst_ip, dst_prefix_len, dst_port))
+ new_ipv6_rules.append((cmd, self.txrx_pipeline, dst_ip, dst_prefix_len,
+ src_ip, src_prefix_len, src_port))
+
+ acl_apply = "\np %s applyruleset" % cmd
+ new_rules_config = '\n'.join(pattern.format(*values) for values
+ in chain(new_rules, new_ipv6_rules))
+ return ''.join([rules_config, new_rules_config, acl_apply])
+
+ def generate_script_data(self):
+ self.port_pair_list, self.networks = self.get_port_pairs(self.interfaces)
+ self.get_lb_count()
+ script_data = {
+ 'link_config': self.generate_link_config(),
+ 'arp_config': self.generate_arp_config(),
+ 'arp_config6': self.generate_arp_config6(),
+ 'actions': '',
+ 'rules': '',
+ }
+
+ if self.vnf_type in ('ACL', 'VFW'):
+ script_data.update({
+ 'actions': self.generate_action_config(),
+ 'rules': self.generate_rule_config(),
+ })
+
+ return script_data
+
+ def generate_script(self, vnfd, rules=None):
+ self.vnfd = vnfd
+ self.rules = rules
+ script_data = self.generate_script_data()
+ script = SCRIPT_TPL.format(**script_data)
+ if self.lb_config == self.HW_LB:
+ script += 'set fwd rxonly'
+ hwlb_tpl = """
+set_sym_hash_ena_per_port {0} enable
+set_hash_global_config {0} simple_xor ipv4-udp enable
+set_sym_hash_ena_per_port {1} enable
+set_hash_global_config {1} simple_xor ipv4-udp enable
+set_hash_input_set {0} ipv4-udp src-ipv4 udp-src-port add
+set_hash_input_set {1} ipv4-udp dst-ipv4 udp-dst-port add
+set_hash_input_set {0} ipv6-udp src-ipv6 udp-src-port add
+set_hash_input_set {1} ipv6-udp dst-ipv6 udp-dst-port add
+"""
+ for port_pair in self.port_pair_list:
+ script += hwlb_tpl.format(port_pair[0][-1], port_pair[1][-1])
+ return script
diff --git a/yardstick/network_services/pipeline.py b/yardstick/network_services/pipeline.py
new file mode 100644
index 000000000..d781ba0cd
--- /dev/null
+++ b/yardstick/network_services/pipeline.py
@@ -0,0 +1,113 @@
+# Copyright (c) 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.
+
+from __future__ import absolute_import
+from __future__ import print_function
+import itertools
+
+from six.moves import zip
+
+FIREWALL_ADD_DEFAULT = "p {0} firewall add default 1"
+FIREWALL_ADD_PRIO = """\
+p {0} firewall add priority 1 ipv4 {1} 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0"""
+
+FLOW_ADD_QINQ_RULES = """\
+p {0} flow add qinq 128 512 port 0 id 1
+p {0} flow add default 1"""
+
+ACTION_FLOW_BULK = "p {0} action flow bulk /tmp/action_bulk_512.txt"
+ACTION_DSCP_CLASS_COLOR = "p {0} action dscp {1} class {2} color {3}"
+ROUTE_ADD_DEFAULT = "p {0} route add default 1"
+ROUTE_ADD_ETHER_QINQ = 'p {0} route add {1} {2} port 0 ether {3} qinq 0 {4}'
+ROUTE_ADD_ETHER_MPLS = "p {0} route add {1} 21 port 0 ether {2} mpls 0:{3}"
+
+
+class PipelineRules(object):
+
+ def __init__(self, pipeline_id=0):
+ super(PipelineRules, self).__init__()
+ self.rule_list = []
+ self.pipeline_id = pipeline_id
+
+ def __str__(self):
+ return '\n'.join(self.rule_list)
+
+ def get_string(self):
+ return str(self)
+
+ def next_pipeline(self, num=1):
+ self.pipeline_id += num
+
+ def add_newline(self):
+ self.rule_list.append('')
+
+ def add_rule(self, base, *args):
+ self.rule_list.append(base.format(self.pipeline_id, *args))
+
+ def add_firewall_prio(self, ip):
+ self.add_rule(FIREWALL_ADD_PRIO, ip)
+
+ def add_firewall_script(self, ip):
+ ip_addr = ip.split('.')
+ assert len(ip_addr) == 4
+ ip_addr[-1] = '0'
+ for i in range(256):
+ ip_addr[-2] = str(i)
+ ip = '.'.join(ip_addr)
+ self.add_firewall_prio(ip)
+ self.add_rule(FIREWALL_ADD_DEFAULT)
+ self.add_newline()
+
+ def add_flow_classification_script(self):
+ self.add_rule(FLOW_ADD_QINQ_RULES)
+
+ def add_flow_action(self):
+ self.add_rule(ACTION_FLOW_BULK)
+
+ def add_dscp_class_color(self, dscp, color):
+ self.add_rule(ACTION_DSCP_CLASS_COLOR, dscp, dscp % 4, color)
+
+ def add_flow_action2(self):
+ self.add_rule(ACTION_FLOW_BULK)
+ for dscp, color in zip(range(64), itertools.cycle('GYR')):
+ self.add_dscp_class_color(dscp, color)
+
+ def add_route_ether_mpls(self, ip, mac_addr, index):
+ self.add_rule(ROUTE_ADD_ETHER_MPLS, ip, mac_addr, index)
+
+ def add_route_script(self, ip, mac_addr):
+ ip_addr = ip.split('.')
+ assert len(ip_addr) == 4
+ ip_addr[-1] = '0'
+ for index in range(0, 256, 8):
+ ip_addr[-2] = str(index)
+ ip = '.'.join(ip_addr)
+ self.add_route_ether_mpls(ip, mac_addr, index)
+ self.add_rule(ROUTE_ADD_DEFAULT)
+ self.add_newline()
+
+ def add_ether_qinq(self, ip, mask, mac_addr, index):
+ self.add_rule(ROUTE_ADD_ETHER_QINQ, ip, mask, mac_addr, index)
+
+ def add_route_script2(self, ip, mac_addr):
+ ip_addr = ip.split('.')
+ assert len(ip_addr) == 4
+ ip_addr[-1] = '0'
+ mask = 24
+ for i in range(0, 256):
+ ip_addr[-2] = str(i)
+ ip = '.'.join(ip_addr)
+ self.add_ether_qinq(ip, mask, mac_addr, i)
+ self.add_rule(ROUTE_ADD_DEFAULT)
+ self.add_newline()
diff --git a/yardstick/network_services/traffic_profile/rfc2544.py b/yardstick/network_services/traffic_profile/rfc2544.py
index 99964d329..b07bc9d5a 100644
--- a/yardstick/network_services/traffic_profile/rfc2544.py
+++ b/yardstick/network_services/traffic_profile/rfc2544.py
@@ -17,6 +17,10 @@ from __future__ import absolute_import
from __future__ import division
import logging
+from stl.trex_stl_lib.trex_stl_client import STLStream
+from stl.trex_stl_lib.trex_stl_streams import STLFlowLatencyStats
+from stl.trex_stl_lib.trex_stl_streams import STLTXCont
+
from yardstick.network_services.traffic_profile.traffic_profile \
import TrexProfile
@@ -28,79 +32,175 @@ class RFC2544Profile(TrexProfile):
def __init__(self, traffic_generator):
super(RFC2544Profile, self).__init__(traffic_generator)
+ self.generator = None
self.max_rate = None
self.min_rate = None
+ self.ports = None
self.rate = 100
- self.tmp_drop = None
- self.tmp_throughput = None
- self.profile_data = None
-
- def execute(self, traffic_generator):
- ''' Generate the stream and run traffic on the given ports '''
- if self.first_run:
- self.profile_data = self.params.get('private', '')
- ports = [traffic_generator.my_ports[0]]
- traffic_generator.client.add_streams(self.get_streams(),
- ports=ports[0])
- profile_data = self.params.get('public', '')
- if profile_data:
- self.profile_data = profile_data
- ports.append(traffic_generator.my_ports[1])
- traffic_generator.client.add_streams(self.get_streams(),
- ports=ports[1])
+ self.drop_percent_at_max_tx = None
+ self.throughput_max = None
- self.max_rate = self.rate
- self.min_rate = 0
- traffic_generator.client.start(ports=ports,
- mult=self.get_multiplier(),
- duration=30, force=True)
- self.tmp_drop = 0
- self.tmp_throughput = 0
+ def register_generator(self, generator):
+ self.generator = generator
+
+ def execute(self, traffic_generator=None):
+ """ Generate the stream and run traffic on the given ports """
+ if traffic_generator is not None and self.generator is None:
+ self.generator = traffic_generator
+
+ if self.ports is not None:
+ return
+
+ self.ports = []
+ priv_ports = self.generator.priv_ports
+ pub_ports = self.generator.pub_ports
+ # start from 1 for private_1, public_1, etc.
+ for index, (priv_port, pub_port) in enumerate(zip(priv_ports, pub_ports), 1):
+ profile_data = self.params.get('private_{}'.format(index), '')
+ self.ports.append(priv_port)
+ # pass profile_data directly, don't use self.profile_data
+ self.generator.client.add_streams(self.get_streams(profile_data), ports=priv_port)
+ profile_data = self.params.get('public_{}'.format(index), '')
+ # correlated traffic doesn't use public traffic?
+ if not profile_data or self.generator.rfc2544_helper.correlated_traffic:
+ continue
+ # just get the pub_port
+ self.ports.append(pub_port)
+ self.generator.client.add_streams(self.get_streams(profile_data), ports=pub_port)
+
+ self.max_rate = self.rate
+ self.min_rate = 0
+ self.generator.client.start(ports=self.ports, mult=self.get_multiplier(),
+ duration=30, force=True)
+ self.drop_percent_at_max_tx = 0
+ self.throughput_max = 0
def get_multiplier(self):
- ''' Get the rate at which next iternation to run '''
+ """ Get the rate at which next iteration to run """
self.rate = round((self.max_rate + self.min_rate) / 2.0, 2)
multiplier = round(self.rate / self.pps, 2)
return str(multiplier)
- def get_drop_percentage(self, traffic_generator,
- samples, tol_min, tolerance):
- ''' Calculate the drop percentage and run the traffic '''
- in_packets = sum([samples[iface]['in_packets'] for iface in samples])
- out_packets = sum([samples[iface]['out_packets'] for iface in samples])
+ def get_drop_percentage(self, generator=None):
+ """ Calculate the drop percentage and run the traffic """
+ if generator is None:
+ generator = self.generator
+ run_duration = self.generator.RUN_DURATION
+ samples = self.generator.generate_samples()
+
+ in_packets = sum([value['in_packets'] for value in samples.values()])
+ out_packets = sum([value['out_packets'] for value in samples.values()])
+
packet_drop = abs(out_packets - in_packets)
drop_percent = 100.0
try:
- drop_percent = round((packet_drop / float(out_packets)) * 100, 2)
+ drop_percent = round((packet_drop / float(out_packets)) * 100, 5)
except ZeroDivisionError:
LOGGING.info('No traffic is flowing')
- samples['TxThroughput'] = out_packets / 30
- samples['RxThroughput'] = in_packets / 30
- samples['CurrentDropPercentage'] = drop_percent
- samples['Throughput'] = self.tmp_throughput
- samples['DropPercentage'] = self.tmp_drop
- if drop_percent > tolerance and self.tmp_throughput == 0:
- samples['Throughput'] = (in_packets / 30)
- samples['DropPercentage'] = drop_percent
- if self.first_run:
- max_supported_rate = out_packets / 30
- self.rate = max_supported_rate
+
+ # TODO(esm): RFC2544 doesn't tolerate packet loss, why do we?
+ tolerance_low = generator.rfc2544_helper.tolerance_low
+ tolerance_high = generator.rfc2544_helper.tolerance_high
+
+ tx_rate = out_packets / run_duration
+ rx_rate = in_packets / run_duration
+
+ throughput_max = self.throughput_max
+ drop_percent_at_max_tx = self.drop_percent_at_max_tx
+
+ if self.drop_percent_at_max_tx is None:
+ self.rate = tx_rate
self.first_run = False
- if drop_percent > tolerance:
+
+ if drop_percent > tolerance_high:
+ # TODO(esm): why don't we discard results that are out of tolerance?
self.max_rate = self.rate
- elif drop_percent < tol_min:
+ if throughput_max == 0:
+ throughput_max = rx_rate
+ drop_percent_at_max_tx = drop_percent
+
+ elif drop_percent >= tolerance_low:
+ # TODO(esm): why do we update the samples dict in this case
+ # and not update our tracking values?
+ throughput_max = rx_rate
+ drop_percent_at_max_tx = drop_percent
+
+ elif drop_percent >= self.drop_percent_at_max_tx:
+ # TODO(esm): why don't we discard results that are out of tolerance?
self.min_rate = self.rate
- if drop_percent >= self.tmp_drop:
- self.tmp_drop = drop_percent
- self.tmp_throughput = (in_packets / 30)
- samples['Throughput'] = (in_packets / 30)
- samples['DropPercentage'] = drop_percent
+ self.drop_percent_at_max_tx = drop_percent_at_max_tx = drop_percent
+ self.throughput_max = throughput_max = rx_rate
+
else:
- samples['Throughput'] = (in_packets / 30)
- samples['DropPercentage'] = drop_percent
+ # TODO(esm): why don't we discard results that are out of tolerance?
+ self.min_rate = self.rate
+
+ generator.clear_client_stats()
+ generator.start_client(mult=self.get_multiplier(),
+ duration=run_duration, force=True)
+
+ # if correlated traffic update the Throughput
+ if generator.rfc2544_helper.correlated_traffic:
+ throughput_max *= 2
+
+ samples.update({
+ 'TxThroughput': tx_rate,
+ 'RxThroughput': rx_rate,
+ 'CurrentDropPercentage': drop_percent,
+ 'Throughput': throughput_max,
+ 'DropPercentage': drop_percent_at_max_tx,
+ })
- traffic_generator.client.clear_stats(ports=traffic_generator.my_ports)
- traffic_generator.client.start(ports=traffic_generator.my_ports,
- mult=self.get_multiplier(),
- duration=30, force=True)
return samples
+
+ def execute_latency(self, generator=None, samples=None):
+ if generator is None:
+ generator = self.generator
+
+ if samples is None:
+ samples = generator.generate_samples()
+
+ self.pps, multiplier = self.calculate_pps(samples)
+ self.ports = []
+ self.pg_id = self.params['traffic_profile'].get('pg_id', 1)
+ priv_ports = generator.priv_ports
+ pub_ports = generator.pub_ports
+ for index, (priv_port, pub_port) in enumerate(zip(priv_ports, pub_ports), 1):
+ profile_data = self.params.get('private_{}'.format(index), '')
+ self.ports.append(priv_port)
+ generator.client.add_streams(self.get_streams(profile_data),
+ ports=priv_port)
+
+ profile_data = self.params.get('public_{}'.format(index), '')
+ if not profile_data or generator.correlated_traffic:
+ continue
+
+ pub_port = generator.pub_ports[index]
+ self.ports.append(pub_port)
+ generator.client.add_streams(self.get_streams(profile_data),
+ ports=pub_port)
+
+ generator.start_client(ports=self.ports, mult=str(multiplier),
+ duration=120, force=True)
+ self.first_run = False
+
+ def calculate_pps(self, samples):
+ pps = round(samples['Throughput'] / 2, 2)
+ multiplier = round(self.rate / self.pps, 2)
+ return pps, multiplier
+
+ def create_single_stream(self, packet_size, pps, isg=0):
+ packet = self._create_single_packet(packet_size)
+ if pps:
+ stl_mode = STLTXCont(pps=pps)
+ else:
+ stl_mode = STLTXCont(pps=self.pps)
+ if self.pg_id:
+ LOGGING.debug("pg_id: %s", self.pg_id)
+ stl_flow_stats = STLFlowLatencyStats(pg_id=self.pg_id)
+ stream = STLStream(isg=isg, packet=packet, mode=stl_mode,
+ flow_stats=stl_flow_stats)
+ self.pg_id += 1
+ else:
+ stream = STLStream(isg=isg, packet=packet, mode=stl_mode)
+ return stream
diff --git a/yardstick/network_services/traffic_profile/traffic_profile.py b/yardstick/network_services/traffic_profile/traffic_profile.py
index 156cc6644..3e1f8d89f 100644
--- a/yardstick/network_services/traffic_profile/traffic_profile.py
+++ b/yardstick/network_services/traffic_profile/traffic_profile.py
@@ -399,16 +399,19 @@ class TrexProfile(TrafficProfile):
logging.debug("Imax: %s rate: %s", imix_count, self.rate)
return imix_count
- def get_streams(self):
- """ generate trex stream """
+ def get_streams(self, profile_data):
+ """ generate trex stream
+ :param profile_data:
+ :type profile_data:
+ """
self.streams = []
self.pps = self.params['traffic_profile'].get('frame_rate', 100)
- for packet_name in self.profile_data:
- outer_l2 = self.profile_data[packet_name].get('outer_l2')
+ for packet_name in profile_data:
+ outer_l2 = profile_data[packet_name].get('outer_l2')
imix_data = self.generate_imix_data(outer_l2)
if not imix_data:
imix_data = {64: self.pps}
- self.generate_vm(self.profile_data[packet_name])
+ self.generate_vm(profile_data[packet_name])
for size in imix_data:
self._generate_streams(size, imix_data[size])
self._generate_profile()
diff --git a/yardstick/network_services/utils.py b/yardstick/network_services/utils.py
index cb71a6029..38fbda47f 100644
--- a/yardstick/network_services/utils.py
+++ b/yardstick/network_services/utils.py
@@ -45,17 +45,19 @@ def get_nsb_option(option, default=None):
return default
-def provision_tool(connection, tool_path):
+def provision_tool(connection, tool_path, tool_file=None):
"""
verify if the tool path exits on the node,
if not push the local binary to remote node
:return - Tool path
"""
+ if tool_file:
+ tool_path = os.path.join(tool_path, tool_file)
bin_path = get_nsb_option("bin_path")
- exit_status, stdout = connection.execute("which %s" % tool_path)[:2]
+ exit_status, stdout = connection.execute("which %s > /dev/null 2>&1" % tool_path)[:2]
if exit_status == 0:
- return encodeutils.safe_decode(stdout, incoming='utf-8').rstrip()
+ return encodeutils.safe_decode(tool_path, incoming='utf-8').rstrip()
logging.warning("%s not found on %s, will try to copy from localhost",
tool_path, connection.host)
diff --git a/yardstick/network_services/vnf_generic/vnf/base.py b/yardstick/network_services/vnf_generic/vnf/base.py
index 2df6037f3..955f9f03d 100644
--- a/yardstick/network_services/vnf_generic/vnf/base.py
+++ b/yardstick/network_services/vnf_generic/vnf/base.py
@@ -15,10 +15,6 @@
from __future__ import absolute_import
import logging
-import ipaddress
-import six
-
-from yardstick.network_services.utils import get_nsb_option
LOG = logging.getLogger(__name__)
@@ -61,192 +57,69 @@ class QueueFileWrapper(object):
self.q_out.get()
-class GenericVNF(object):
+class VnfdHelper(dict):
+
+ @property
+ def mgmt_interface(self):
+ return self["mgmt-interface"]
+
+ @property
+ def vdu(self):
+ return self['vdu']
+
+ @property
+ def vdu0(self):
+ return self.vdu[0]
+
+ @property
+ def interfaces(self):
+ return self.vdu0['external-interface']
+
+ @property
+ def kpi(self):
+ return self['benchmark']['kpi']
+
+ def find_virtual_interface(self, **kwargs):
+ key, value = next(iter(kwargs.items()))
+ for interface in self.interfaces:
+ virtual_intf = interface["virtual-interface"]
+ if virtual_intf[key] == value:
+ return interface
+
+ def find_interface(self, **kwargs):
+ key, value = next(iter(kwargs.items()))
+ for interface in self.interfaces:
+ if interface[key] == value:
+ return interface
+
+
+class VNFObject(object):
+
+ def __init__(self, name, vnfd):
+ super(VNFObject, self).__init__()
+ self.name = name
+ self.vnfd_helper = VnfdHelper(vnfd) # fixme: parse this into a structure
+
+
+class GenericVNF(VNFObject):
+
""" Class providing file-like API for generic VNF implementation """
- def __init__(self, vnfd):
- super(GenericVNF, self).__init__()
- self.vnfd = vnfd # fixme: parse this into a structure
+ def __init__(self, name, vnfd):
+ super(GenericVNF, self).__init__(name, vnfd)
# List of statistics we can obtain from this VNF
# - ETSI MANO 6.3.1.1 monitoring_parameter
- self.kpi = self._get_kpi_definition(vnfd)
+ self.kpi = self._get_kpi_definition()
# Standard dictionary containing params like thread no, buffer size etc
self.config = {}
self.runs_traffic = False
- self.name = "vnf__1" # name in topology file
- self.bin_path = get_nsb_option("bin_path", "")
- @classmethod
- def _get_kpi_definition(cls, vnfd):
+ def _get_kpi_definition(self):
""" Get list of KPIs defined in VNFD
:param vnfd:
:return: list of KPIs, e.g. ['throughput', 'latency']
"""
- return vnfd['benchmark']['kpi']
-
- @classmethod
- def get_ip_version(cls, ip_addr):
- """ get ip address version v6 or v4 """
- try:
- address = ipaddress.ip_address(six.text_type(ip_addr))
- except ValueError:
- LOG.error(ip_addr, " is not valid")
- return
- else:
- return address.version
-
- def _ip_to_hex(self, ip_addr):
- ip_x = ip_addr
- if self.get_ip_version(ip_addr) == 4:
- ip_to_convert = ip_addr.split(".")
- ip_octect = [int(octect) for octect in ip_to_convert]
- ip_x = "{0[0]:02X}{0[1]:02X}{0[2]:02X}{0[3]:02X}".format(ip_octect)
- return ip_x
-
- def _get_dpdk_port_num(self, name):
- for intf in self.vnfd['vdu'][0]['external-interface']:
- if name == intf['name']:
- return intf['virtual-interface']['dpdk_port_num']
-
- def _append_routes(self, ip_pipeline_cfg):
- if 'routing_table' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['routing_table']
-
- where = ip_pipeline_cfg.find("arp_route_tbl")
- link = ip_pipeline_cfg[:where]
- route_add = ip_pipeline_cfg[where:]
-
- tmp = route_add.find('\n')
- route_add = route_add[tmp:]
-
- cmds = "arp_route_tbl ="
-
- for route in routing_table:
- net = self._ip_to_hex(route['network'])
- net_nm = self._ip_to_hex(route['netmask'])
- net_gw = self._ip_to_hex(route['gateway'])
- port = self._get_dpdk_port_num(route['if'])
- cmd = \
- " ({port0_local_ip_hex},{port0_netmask_hex},{dpdk_port},"\
- "{port1_local_ip_hex})".format(port0_local_ip_hex=net,
- port0_netmask_hex=net_nm,
- dpdk_port=port,
- port1_local_ip_hex=net_gw)
- cmds += cmd
-
- cmds += '\n'
- ip_pipeline_cfg = link + cmds + route_add
-
- return ip_pipeline_cfg
-
- def _append_nd_routes(self, ip_pipeline_cfg):
- if 'nd_route_tbl' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['nd_route_tbl']
-
- where = ip_pipeline_cfg.find("nd_route_tbl")
- link = ip_pipeline_cfg[:where]
- route_nd = ip_pipeline_cfg[where:]
-
- tmp = route_nd.find('\n')
- route_nd = route_nd[tmp:]
-
- cmds = "nd_route_tbl ="
-
- for route in routing_table:
- net = route['network']
- net_nm = route['netmask']
- net_gw = route['gateway']
- port = self._get_dpdk_port_num(route['if'])
- cmd = \
- " ({port0_local_ip_hex},{port0_netmask_hex},{dpdk_port},"\
- "{port1_local_ip_hex})".format(port0_local_ip_hex=net,
- port0_netmask_hex=net_nm,
- dpdk_port=port,
- port1_local_ip_hex=net_gw)
- cmds += cmd
-
- cmds += '\n'
- ip_pipeline_cfg = link + cmds + route_nd
-
- return ip_pipeline_cfg
-
- def _get_port0localip6(self):
- return_value = ""
- if 'nd_route_tbl' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['nd_route_tbl']
-
- inc = 0
- for route in routing_table:
- inc += 1
- if inc == 1:
- return_value = route['network']
- LOG.info("_get_port0localip6 : %s", return_value)
- return return_value
-
- def _get_port1localip6(self):
- return_value = ""
- if 'nd_route_tbl' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['nd_route_tbl']
-
- inc = 0
- for route in routing_table:
- inc += 1
- if inc == 2:
- return_value = route['network']
- LOG.info("_get_port1localip6 : %s", return_value)
- return return_value
-
- def _get_port0prefixlen6(self):
- return_value = ""
- if 'nd_route_tbl' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['nd_route_tbl']
-
- inc = 0
- for route in routing_table:
- inc += 1
- if inc == 1:
- return_value = route['netmask']
- LOG.info("_get_port0prefixlen6 : %s", return_value)
- return return_value
-
- def _get_port1prefixlen6(self):
- return_value = ""
- if 'nd_route_tbl' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['nd_route_tbl']
-
- inc = 0
- for route in routing_table:
- inc += 1
- if inc == 2:
- return_value = route['netmask']
- LOG.info("_get_port1prefixlen6 : %s", return_value)
- return return_value
-
- def _get_port0gateway6(self):
- return_value = ""
- if 'nd_route_tbl' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['nd_route_tbl']
-
- inc = 0
- for route in routing_table:
- inc += 1
- if inc == 1:
- return_value = route['network']
- LOG.info("_get_port0gateway6 : %s", return_value)
- return return_value
-
- def _get_port1gateway6(self):
- return_value = ""
- if 'nd_route_tbl' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['nd_route_tbl']
-
- inc = 0
- for route in routing_table:
- inc += 1
- if inc == 2:
- return_value = route['network']
- LOG.info("_get_port1gateway6 : %s", return_value)
- return return_value
+ return self.vnfd_helper.kpi
def instantiate(self, scenario_cfg, context_cfg):
""" Prepare VNF for operation and start the VNF process/VM
@@ -284,11 +157,10 @@ class GenericVNF(object):
class GenericTrafficGen(GenericVNF):
""" Class providing file-like API for generic traffic generator """
- def __init__(self, vnfd):
- super(GenericTrafficGen, self).__init__(vnfd)
+ def __init__(self, name, vnfd):
+ super(GenericTrafficGen, self).__init__(name, vnfd)
self.runs_traffic = True
self.traffic_finished = False
- self.name = "tgen__1" # name in topology file
def run_traffic(self, traffic_profile):
""" Generate traffic on the wire according to the given params.
diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
new file mode 100644
index 000000000..89c086d97
--- /dev/null
+++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
@@ -0,0 +1,994 @@
+# 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.
+""" Base class implementation for generic vnf implementation """
+
+from __future__ import absolute_import
+
+import posixpath
+import time
+import logging
+import os
+import re
+import subprocess
+from collections import Mapping
+
+from multiprocessing import Queue, Value, Process
+
+from six.moves import cStringIO
+
+from yardstick.benchmark.contexts.base import Context
+from yardstick.benchmark.scenarios.networking.vnf_generic import find_relative_file
+from yardstick.network_services.helpers.cpu import CpuSysCores
+from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig
+from yardstick.network_services.nfvi.resource import ResourceProfile
+from yardstick.network_services.vnf_generic.vnf.base import GenericVNF
+from yardstick.network_services.vnf_generic.vnf.base import QueueFileWrapper
+from yardstick.network_services.vnf_generic.vnf.base import GenericTrafficGen
+from yardstick.network_services.utils import get_nsb_option
+
+from stl.trex_stl_lib.trex_stl_client import STLClient
+from stl.trex_stl_lib.trex_stl_client import LoggerApi
+from stl.trex_stl_lib.trex_stl_exceptions import STLError, STLStateError
+
+from yardstick.ssh import AutoConnectSSH
+
+DPDK_VERSION = "dpdk-16.07"
+
+LOG = logging.getLogger(__name__)
+
+
+REMOTE_TMP = "/tmp"
+
+
+class VnfSshHelper(AutoConnectSSH):
+
+ def __init__(self, node, bin_path, wait=None):
+ self.node = node
+ kwargs = self.args_from_node(self.node)
+ if wait:
+ kwargs.setdefault('wait', wait)
+
+ super(VnfSshHelper, self).__init__(**kwargs)
+ self.bin_path = bin_path
+
+ @staticmethod
+ def get_class():
+ # must return static class name, anything else refers to the calling class
+ # i.e. the subclass, not the superclass
+ return VnfSshHelper
+
+ def copy(self):
+ # this copy constructor is different from SSH classes, since it uses node
+ return self.get_class()(self.node, self.bin_path)
+
+ def upload_config_file(self, prefix, content):
+ cfg_file = os.path.join(REMOTE_TMP, prefix)
+ LOG.debug(content)
+ file_obj = cStringIO(content)
+ self.put_file_obj(file_obj, cfg_file)
+ return cfg_file
+
+ def join_bin_path(self, *args):
+ return os.path.join(self.bin_path, *args)
+
+ def provision_tool(self, tool_path=None, tool_file=None):
+ if tool_path is None:
+ tool_path = self.bin_path
+ return super(VnfSshHelper, self).provision_tool(tool_path, tool_file)
+
+
+class SetupEnvHelper(object):
+
+ CFG_CONFIG = os.path.join(REMOTE_TMP, "sample_config")
+ CFG_SCRIPT = os.path.join(REMOTE_TMP, "sample_script")
+ CORES = []
+ DEFAULT_CONFIG_TPL_CFG = "sample.cfg"
+ PIPELINE_COMMAND = ''
+ VNF_TYPE = "SAMPLE"
+
+ def __init__(self, vnfd_helper, ssh_helper, scenario_helper):
+ super(SetupEnvHelper, self).__init__()
+ self.vnfd_helper = vnfd_helper
+ self.ssh_helper = ssh_helper
+ self.scenario_helper = scenario_helper
+
+ def _get_ports_gateway(self, name):
+ routing_table = self.vnfd_helper.vdu0.get('routing_table', [])
+ for route in routing_table:
+ if name == route['if']:
+ return route['gateway']
+ return None
+
+ def build_config(self):
+ raise NotImplementedError
+
+ def setup_vnf_environment(self):
+ pass
+ # raise NotImplementedError
+
+ def tear_down(self):
+ raise NotImplementedError
+
+
+class DpdkVnfSetupEnvHelper(SetupEnvHelper):
+
+ APP_NAME = 'DpdkVnf'
+ DPDK_BIND_CMD = "sudo {dpdk_nic_bind} {force} -b {driver} {vpci}"
+ DPDK_UNBIND_CMD = "sudo {dpdk_nic_bind} --force -b {driver} {vpci}"
+ FIND_NET_CMD = "find /sys/class/net -lname '*{}*' -printf '%f'"
+
+ HW_DEFAULT_CORE = 3
+ SW_DEFAULT_CORE = 2
+
+ DPDK_STATUS_DRIVER_RE = re.compile(r"(\d{2}:\d{2}\.\d).*drv=([-\w]+)")
+
+ @staticmethod
+ def _update_packet_type(ip_pipeline_cfg, traffic_options):
+ match_str = 'pkt_type = ipv4'
+ replace_str = 'pkt_type = {0}'.format(traffic_options['pkt_type'])
+ pipeline_config_str = ip_pipeline_cfg.replace(match_str, replace_str)
+ return pipeline_config_str
+
+ @classmethod
+ def _update_traffic_type(cls, ip_pipeline_cfg, traffic_options):
+ traffic_type = traffic_options['traffic_type']
+
+ if traffic_options['vnf_type'] is not cls.APP_NAME:
+ match_str = 'traffic_type = 4'
+ replace_str = 'traffic_type = {0}'.format(traffic_type)
+
+ elif traffic_type == 4:
+ match_str = 'pkt_type = ipv4'
+ replace_str = 'pkt_type = ipv4'
+
+ else:
+ match_str = 'pkt_type = ipv4'
+ replace_str = 'pkt_type = ipv6'
+
+ pipeline_config_str = ip_pipeline_cfg.replace(match_str, replace_str)
+ return pipeline_config_str
+
+ def __init__(self, vnfd_helper, ssh_helper, scenario_helper):
+ super(DpdkVnfSetupEnvHelper, self).__init__(vnfd_helper, ssh_helper, scenario_helper)
+ self.all_ports = None
+ self.bound_pci = None
+ self._dpdk_nic_bind = None
+ self.socket = None
+
+ @property
+ def dpdk_nic_bind(self):
+ if self._dpdk_nic_bind is None:
+ self._dpdk_nic_bind = self.ssh_helper.provision_tool(tool_file="dpdk-devbind.py")
+ return self._dpdk_nic_bind
+
+ def _setup_hugepages(self):
+ cmd = "awk '/Hugepagesize/ { print $2$3 }' < /proc/meminfo"
+ hugepages = self.ssh_helper.execute(cmd)[1].rstrip()
+
+ memory_path = \
+ '/sys/kernel/mm/hugepages/hugepages-%s/nr_hugepages' % hugepages
+ self.ssh_helper.execute("awk -F: '{ print $1 }' < %s" % memory_path)
+
+ if hugepages == "2048kB":
+ pages = 16384
+ else:
+ pages = 16
+
+ self.ssh_helper.execute("echo %s | sudo tee %s" % (pages, memory_path))
+
+ def _get_dpdk_port_num(self, name):
+ interface = self.vnfd_helper.find_interface(name=name)
+ return interface['virtual-interface']['dpdk_port_num']
+
+ def build_config(self):
+ vnf_cfg = self.scenario_helper.vnf_cfg
+ task_path = self.scenario_helper.task_path
+
+ lb_count = vnf_cfg.get('lb_count', 3)
+ lb_config = vnf_cfg.get('lb_config', 'SW')
+ worker_config = vnf_cfg.get('worker_config', '1C/1T')
+ worker_threads = vnf_cfg.get('worker_threads', 3)
+
+ traffic_type = self.scenario_helper.all_options.get('traffic_type', 4)
+ traffic_options = {
+ 'traffic_type': traffic_type,
+ 'pkt_type': 'ipv%s' % traffic_type,
+ 'vnf_type': self.VNF_TYPE,
+ }
+
+ config_tpl_cfg = find_relative_file(self.DEFAULT_CONFIG_TPL_CFG, task_path)
+ config_basename = posixpath.basename(self.CFG_CONFIG)
+ script_basename = posixpath.basename(self.CFG_SCRIPT)
+ multiport = MultiPortConfig(self.scenario_helper.topology,
+ config_tpl_cfg,
+ config_basename,
+ self.vnfd_helper.interfaces,
+ self.VNF_TYPE,
+ lb_count,
+ worker_threads,
+ worker_config,
+ lb_config,
+ self.socket)
+
+ multiport.generate_config()
+ with open(self.CFG_CONFIG) as handle:
+ new_config = handle.read()
+
+ new_config = self._update_traffic_type(new_config, traffic_options)
+ new_config = self._update_packet_type(new_config, traffic_options)
+
+ self.ssh_helper.upload_config_file(config_basename, new_config)
+ self.ssh_helper.upload_config_file(script_basename,
+ multiport.generate_script(self.vnfd_helper))
+ self.all_ports = multiport.port_pair_list
+
+ LOG.info("Provision and start the %s", self.APP_NAME)
+ self._build_pipeline_kwargs()
+ return self.PIPELINE_COMMAND.format(**self.pipeline_kwargs)
+
+ def _build_pipeline_kwargs(self):
+ tool_path = self.ssh_helper.provision_tool(tool_file=self.APP_NAME)
+ ports_len_hex = hex(2 ** (len(self.all_ports) + 1) - 1)
+ self.pipeline_kwargs = {
+ 'cfg_file': self.CFG_CONFIG,
+ 'script': self.CFG_SCRIPT,
+ 'ports_len_hex': ports_len_hex,
+ 'tool_path': tool_path,
+ }
+
+ def _get_app_cpu(self):
+ if self.CORES:
+ return self.CORES
+
+ vnf_cfg = self.scenario_helper.vnf_cfg
+ sys_obj = CpuSysCores(self.ssh_helper)
+ self.sys_cpu = sys_obj.get_core_socket()
+ num_core = int(vnf_cfg["worker_threads"])
+ if vnf_cfg.get("lb_config", "SW") == 'HW':
+ num_core += self.HW_DEFAULT_CORE
+ else:
+ num_core += self.SW_DEFAULT_CORE
+ app_cpu = self.sys_cpu[str(self.socket)][:num_core]
+ return app_cpu
+
+ def _get_cpu_sibling_list(self, cores=None):
+ if cores is None:
+ cores = self._get_app_cpu()
+ sys_cmd_template = "%s/cpu%s/topology/thread_siblings_list"
+ awk_template = "awk -F: '{ print $1 }' < %s"
+ sys_path = "/sys/devices/system/cpu/"
+ cpu_topology = []
+ try:
+ for core in cores:
+ sys_cmd = sys_cmd_template % (sys_path, core)
+ cpu_id = self.ssh_helper.execute(awk_template % sys_cmd)[1]
+ cpu_topology.extend(cpu.strip() for cpu in cpu_id.split(','))
+
+ return cpu_topology
+ except Exception:
+ return []
+
+ def _validate_cpu_cfg(self):
+ return self._get_cpu_sibling_list()
+
+ def _find_used_drivers(self):
+ cmd = "{0} -s".format(self.dpdk_nic_bind)
+ rc, dpdk_status, _ = self.ssh_helper.execute(cmd)
+
+ self.used_drivers = {
+ vpci: (index, driver)
+ for index, (vpci, driver)
+ in enumerate(self.DPDK_STATUS_DRIVER_RE.findall(dpdk_status))
+ if any(b.endswith(vpci) for b in self.bound_pci)
+ }
+
+ def setup_vnf_environment(self):
+ self._setup_dpdk()
+ resource = self._setup_resources()
+ self._kill_vnf()
+ self._detect_drivers()
+ return resource
+
+ def _kill_vnf(self):
+ self.ssh_helper.execute("sudo pkill %s" % self.APP_NAME)
+
+ def _setup_dpdk(self):
+ """ setup dpdk environment needed for vnf to run """
+
+ self._setup_hugepages()
+ self.ssh_helper.execute("sudo modprobe uio && sudo modprobe igb_uio")
+
+ exit_status = self.ssh_helper.execute("lsmod | grep -i igb_uio")[0]
+ if exit_status == 0:
+ return
+
+ dpdk = self.ssh_helper.join_bin_path(DPDK_VERSION)
+ dpdk_setup = self.ssh_helper.provision_tool(tool_file="nsb_setup.sh")
+ exit_status = self.ssh_helper.execute("which {} >/dev/null 2>&1".format(dpdk))[0]
+ if exit_status != 0:
+ self.ssh_helper.execute("bash %s dpdk >/dev/null 2>&1" % dpdk_setup)
+
+ def _setup_resources(self):
+ interfaces = self.vnfd_helper.interfaces
+ self.bound_pci = [v['virtual-interface']["vpci"] for v in interfaces]
+
+ # what is this magic? how do we know which socket is for which port?
+ # what about quad-socket?
+ if any(v[5] == "0" for v in self.bound_pci):
+ self.socket = 0
+ else:
+ self.socket = 1
+
+ cores = self._validate_cpu_cfg()
+ return ResourceProfile(self.vnfd_helper, cores)
+
+ def _detect_drivers(self):
+ interfaces = self.vnfd_helper.interfaces
+
+ self._find_used_drivers()
+ for vpci, (index, _) in self.used_drivers.items():
+ try:
+ intf1 = next(v for v in interfaces if vpci == v['virtual-interface']['vpci'])
+ except StopIteration:
+ pass
+ else:
+ intf1['dpdk_port_num'] = index
+
+ for vpci in self.bound_pci:
+ self._bind_dpdk('igb_uio', vpci)
+ time.sleep(2)
+
+ def _bind_dpdk(self, driver, vpci, force=True):
+ if force:
+ force = '--force '
+ else:
+ force = ''
+ cmd = self.DPDK_BIND_CMD.format(force=force,
+ dpdk_nic_bind=self.dpdk_nic_bind,
+ driver=driver,
+ vpci=vpci)
+ self.ssh_helper.execute(cmd)
+
+ def _detect_and_bind_dpdk(self, vpci, driver):
+ find_net_cmd = self.FIND_NET_CMD.format(vpci)
+ exit_status, _, _ = self.ssh_helper.execute(find_net_cmd)
+ if exit_status == 0:
+ # already bound
+ return None
+ self._bind_dpdk(driver, vpci)
+ exit_status, stdout, _ = self.ssh_helper.execute(find_net_cmd)
+ if exit_status != 0:
+ # failed to bind
+ return None
+ return stdout
+
+ def _bind_kernel_devices(self):
+ for intf in self.vnfd_helper.interfaces:
+ vi = intf["virtual-interface"]
+ stdout = self._detect_and_bind_dpdk(vi["vpci"], vi["driver"])
+ if stdout is not None:
+ vi["local_iface_name"] = posixpath.basename(stdout)
+
+ def tear_down(self):
+ for vpci, (_, driver) in self.used_drivers.items():
+ self.ssh_helper.execute(self.DPDK_UNBIND_CMD.format(dpdk_nic_bind=self.dpdk_nic_bind,
+ driver=driver,
+ vpci=vpci))
+
+
+class ResourceHelper(object):
+
+ COLLECT_KPI = ''
+ MAKE_INSTALL = 'cd {0} && make && sudo make install'
+ RESOURCE_WORD = 'sample'
+
+ COLLECT_MAP = {}
+
+ def __init__(self, setup_helper):
+ super(ResourceHelper, self).__init__()
+ self.resource = None
+ self.setup_helper = setup_helper
+ self.ssh_helper = setup_helper.ssh_helper
+
+ def setup(self):
+ self.resource = self.setup_helper.setup_vnf_environment()
+
+ def generate_cfg(self):
+ pass
+
+ def _collect_resource_kpi(self):
+ result = {}
+ status = self.resource.check_if_sa_running("collectd")[0]
+ if status:
+ result = self.resource.amqp_collect_nfvi_kpi()
+
+ result = {"core": result}
+ return result
+
+ def start_collect(self):
+ self.resource.initiate_systemagent(self.ssh_helper.bin_path)
+ self.resource.start()
+ self.resource.amqp_process_for_nfvi_kpi()
+
+ def stop_collect(self):
+ if self.resource:
+ self.resource.stop()
+
+ def collect_kpi(self):
+ return self._collect_resource_kpi()
+
+
+class ClientResourceHelper(ResourceHelper):
+
+ RUN_DURATION = 60
+ QUEUE_WAIT_TIME = 5
+ SYNC_PORT = 1
+ ASYNC_PORT = 2
+
+ def __init__(self, setup_helper):
+ super(ClientResourceHelper, self).__init__(setup_helper)
+ self.vnfd_helper = setup_helper.vnfd_helper
+ self.scenario_helper = setup_helper.scenario_helper
+
+ self.client = None
+ self.client_started = Value('i', 0)
+ self.my_ports = None
+ self._queue = Queue()
+ self._result = {}
+ self._terminated = Value('i', 0)
+ self._vpci_ascending = None
+
+ def _build_ports(self):
+ self.my_ports = [0, 1]
+
+ def get_stats(self, *args, **kwargs):
+ try:
+ return self.client.get_stats(*args, **kwargs)
+ except STLStateError:
+ LOG.exception("TRex client not connected")
+ return {}
+
+ def generate_samples(self, key=None, default=None):
+ last_result = self.get_stats(self.my_ports)
+ key_value = last_result.get(key, default)
+
+ if not isinstance(last_result, Mapping): # added for mock unit test
+ self._terminated.value = 1
+ return {}
+
+ samples = {}
+ for vpci_idx, vpci in enumerate(self._vpci_ascending):
+ name = self.vnfd_helper.find_virtual_interface(vpci=vpci)["name"]
+ # fixme: VNFDs KPIs values needs to be mapped to TRex structure
+ xe_value = last_result.get(vpci_idx, {})
+ samples[name] = {
+ "rx_throughput_fps": float(xe_value.get("rx_pps", 0.0)),
+ "tx_throughput_fps": float(xe_value.get("tx_pps", 0.0)),
+ "rx_throughput_mbps": float(xe_value.get("rx_bps", 0.0)),
+ "tx_throughput_mbps": float(xe_value.get("tx_bps", 0.0)),
+ "in_packets": int(xe_value.get("ipackets", 0)),
+ "out_packets": int(xe_value.get("opackets", 0)),
+ }
+ if key:
+ samples[name][key] = key_value
+ return samples
+
+ def _run_traffic_once(self, traffic_profile):
+ traffic_profile.execute(self)
+ self.client_started.value = 1
+ time.sleep(self.RUN_DURATION)
+ samples = self.generate_samples()
+ time.sleep(self.QUEUE_WAIT_TIME)
+ self._queue.put(samples)
+
+ def run_traffic(self, traffic_profile):
+ # fixme: fix passing correct trex config file,
+ # instead of searching the default path
+ self._build_ports()
+ self.client = self._connect()
+ self.client.reset(ports=self.my_ports)
+ self.client.remove_all_streams(self.my_ports) # remove all streams
+ traffic_profile.register_generator(self)
+
+ while self._terminated.value == 0:
+ self._run_traffic_once(traffic_profile)
+
+ self.client.stop(self.my_ports)
+ self.client.disconnect()
+ self._terminated.value = 0
+
+ def terminate(self):
+ self._terminated.value = 1 # stop client
+
+ def clear_stats(self, ports=None):
+ if ports is None:
+ ports = self.my_ports
+ self.client.clear_stats(ports=ports)
+
+ def start(self, ports=None, *args, **kwargs):
+ if ports is None:
+ ports = self.my_ports
+ self.client.start(ports=ports, *args, **kwargs)
+
+ def collect_kpi(self):
+ if not self._queue.empty():
+ kpi = self._queue.get()
+ self._result.update(kpi)
+ LOG.debug("Collect {0} KPIs {1}".format(self.RESOURCE_WORD, self._result))
+ return self._result
+
+ def _connect(self, client=None):
+ if client is None:
+ client = STLClient(username=self.vnfd_helper.mgmt_interface["user"],
+ server=self.vnfd_helper.mgmt_interface["ip"],
+ verbose_level=LoggerApi.VERBOSE_QUIET)
+
+ # try to connect with 5s intervals, 30s max
+ for idx in range(6):
+ try:
+ client.connect()
+ break
+ except STLError:
+ LOG.info("Unable to connect to Trex Server.. Attempt %s", idx)
+ time.sleep(5)
+ return client
+
+
+class Rfc2544ResourceHelper(object):
+
+ DEFAULT_CORRELATED_TRAFFIC = False
+ DEFAULT_LATENCY = False
+ DEFAULT_TOLERANCE = '0.0001 - 0.0001'
+
+ def __init__(self, scenario_helper):
+ super(Rfc2544ResourceHelper, self).__init__()
+ self.scenario_helper = scenario_helper
+ self._correlated_traffic = None
+ self.iteration = Value('i', 0)
+ self._latency = None
+ self._rfc2544 = None
+ self._tolerance_low = None
+ self._tolerance_high = None
+
+ @property
+ def rfc2544(self):
+ if self._rfc2544 is None:
+ self._rfc2544 = self.scenario_helper.all_options['rfc2544']
+ return self._rfc2544
+
+ @property
+ def tolerance_low(self):
+ if self._tolerance_low is None:
+ self.get_rfc_tolerance()
+ return self._tolerance_low
+
+ @property
+ def tolerance_high(self):
+ if self._tolerance_high is None:
+ self.get_rfc_tolerance()
+ return self._tolerance_high
+
+ @property
+ def correlated_traffic(self):
+ if self._correlated_traffic is None:
+ self._correlated_traffic = \
+ self.get_rfc2544('correlated_traffic', self.DEFAULT_CORRELATED_TRAFFIC)
+
+ return self._correlated_traffic
+
+ @property
+ def latency(self):
+ if self._latency is None:
+ self._latency = self.get_rfc2544('latency', self.DEFAULT_LATENCY)
+ return self._latency
+
+ def get_rfc2544(self, name, default=None):
+ return self.rfc2544.get(name, default)
+
+ def get_rfc_tolerance(self):
+ tolerance_str = self.get_rfc2544('allowed_drop_rate', self.DEFAULT_TOLERANCE)
+ tolerance_iter = iter(sorted(float(t.strip()) for t in tolerance_str.split('-')))
+ self._tolerance_low = next(tolerance_iter)
+ self._tolerance_high = next(tolerance_iter, self.tolerance_low)
+
+
+class SampleVNFDeployHelper(object):
+
+ SAMPLE_VNF_REPO = 'https://gerrit.opnfv.org/gerrit/samplevnf'
+ REPO_NAME = posixpath.basename(SAMPLE_VNF_REPO)
+ SAMPLE_REPO_DIR = os.path.join('~/', REPO_NAME)
+
+ def __init__(self, vnfd_helper, ssh_helper):
+ super(SampleVNFDeployHelper, self).__init__()
+ self.ssh_helper = ssh_helper
+ self.vnfd_helper = vnfd_helper
+
+ DISABLE_DEPLOY = True
+
+ def deploy_vnfs(self, app_name):
+ # temp disable for now
+ if self.DISABLE_DEPLOY:
+ return
+
+ vnf_bin = self.ssh_helper.join_bin_path(app_name)
+ exit_status = self.ssh_helper.execute("which %s" % vnf_bin)[0]
+ if not exit_status:
+ return
+
+ subprocess.check_output(["rm", "-rf", self.REPO_NAME])
+ subprocess.check_output(["git", "clone", self.SAMPLE_VNF_REPO])
+ time.sleep(2)
+ self.ssh_helper.execute("rm -rf %s" % self.SAMPLE_REPO_DIR)
+ self.ssh_helper.put(self.REPO_NAME, self.SAMPLE_REPO_DIR, True)
+
+ build_script = os.path.join(self.SAMPLE_REPO_DIR, 'tools/vnf_build.sh')
+ time.sleep(2)
+ http_proxy = os.environ.get('http_proxy', '')
+ https_proxy = os.environ.get('https_proxy', '')
+ cmd = "sudo -E %s --silent '%s' '%s'" % (build_script, http_proxy, https_proxy)
+ LOG.debug(cmd)
+ self.ssh_helper.execute(cmd)
+ vnf_bin_loc = os.path.join(self.SAMPLE_REPO_DIR, "VNFs", app_name, "build", app_name)
+ self.ssh_helper.execute("sudo mkdir -p %s" % self.ssh_helper.bin_path)
+ self.ssh_helper.execute("sudo cp %s %s" % (vnf_bin_loc, vnf_bin))
+
+
+class ScenarioHelper(object):
+
+ DEFAULT_VNF_CFG = {
+ 'lb_config': 'SW',
+ 'lb_count': 1,
+ 'worker_config': '1C/1T',
+ 'worker_threads': 1,
+ }
+
+ def __init__(self, name):
+ self.name = name
+ self.scenario_cfg = None
+
+ @property
+ def task_path(self):
+ return self.scenario_cfg["task_path"]
+
+ @property
+ def nodes(self):
+ return self.scenario_cfg['nodes']
+
+ @property
+ def all_options(self):
+ return self.scenario_cfg["options"]
+
+ @property
+ def options(self):
+ return self.all_options[self.name]
+
+ @property
+ def vnf_cfg(self):
+ return self.options.get('vnf_config', self.DEFAULT_VNF_CFG)
+
+ @property
+ def topology(self):
+ return self.scenario_cfg['topology']
+
+
+class SampleVNF(GenericVNF):
+ """ Class providing file-like API for generic VNF implementation """
+
+ VNF_PROMPT = "pipeline>"
+ WAIT_TIME = 1
+
+ def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
+ super(SampleVNF, self).__init__(name, vnfd)
+ self.bin_path = get_nsb_option('bin_path', '')
+
+ self.scenario_helper = ScenarioHelper(self.name)
+ self.ssh_helper = VnfSshHelper(self.vnfd_helper.mgmt_interface, self.bin_path)
+
+ if setup_env_helper_type is None:
+ setup_env_helper_type = SetupEnvHelper
+
+ self.setup_helper = setup_env_helper_type(self.vnfd_helper,
+ self.ssh_helper,
+ self.scenario_helper)
+
+ self.deploy_helper = SampleVNFDeployHelper(vnfd, self.ssh_helper)
+
+ if resource_helper_type is None:
+ resource_helper_type = ResourceHelper
+
+ self.resource_helper = resource_helper_type(self.setup_helper)
+
+ self.all_ports = None
+ self.context_cfg = None
+ self.nfvi_context = None
+ self.pipeline_kwargs = {}
+ self.priv_ports = None
+ self.pub_ports = None
+ # TODO(esm): make QueueFileWrapper invert-able so that we
+ # never have to manage the queues
+ self.q_in = Queue()
+ self.q_out = Queue()
+ self.queue_wrapper = None
+ self.run_kwargs = {}
+ self.scenario_cfg = None
+ self.tg_port_pairs = None
+ self.used_drivers = {}
+ self.vnf_port_pairs = None
+ self._vnf_process = None
+
+ def _get_route_data(self, route_index, route_type):
+ route_iter = iter(self.vnfd_helper.vdu0.get('nd_route_tbl', []))
+ for _ in range(route_index):
+ next(route_iter, '')
+ return next(route_iter, {}).get(route_type, '')
+
+ def _get_port0localip6(self):
+ return_value = self._get_route_data(0, 'network')
+ LOG.info("_get_port0localip6 : %s", return_value)
+ return return_value
+
+ def _get_port1localip6(self):
+ return_value = self._get_route_data(1, 'network')
+ LOG.info("_get_port1localip6 : %s", return_value)
+ return return_value
+
+ def _get_port0prefixlen6(self):
+ return_value = self._get_route_data(0, 'netmask')
+ LOG.info("_get_port0prefixlen6 : %s", return_value)
+ return return_value
+
+ def _get_port1prefixlen6(self):
+ return_value = self._get_route_data(1, 'netmask')
+ LOG.info("_get_port1prefixlen6 : %s", return_value)
+ return return_value
+
+ def _get_port0gateway6(self):
+ return_value = self._get_route_data(0, 'network')
+ LOG.info("_get_port0gateway6 : %s", return_value)
+ return return_value
+
+ def _get_port1gateway6(self):
+ return_value = self._get_route_data(1, 'network')
+ LOG.info("_get_port1gateway6 : %s", return_value)
+ return return_value
+
+ def _start_vnf(self):
+ self.queue_wrapper = QueueFileWrapper(self.q_in, self.q_out, self.VNF_PROMPT)
+ self._vnf_process = Process(target=self._run)
+ self._vnf_process.start()
+
+ def _vnf_up_post(self):
+ pass
+
+ def instantiate(self, scenario_cfg, context_cfg):
+ self.scenario_helper.scenario_cfg = scenario_cfg
+ self.context_cfg = context_cfg
+ self.nfvi_context = Context.get_context_from_server(self.scenario_helper.nodes[self.name])
+ # self.nfvi_context = None
+
+ self.deploy_helper.deploy_vnfs(self.APP_NAME)
+ self.resource_helper.setup()
+ self._start_vnf()
+
+ def wait_for_instantiate(self):
+ buf = []
+ time.sleep(self.WAIT_TIME) # Give some time for config to load
+ while True:
+ if not self._vnf_process.is_alive():
+ raise RuntimeError("%s VNF process died." % self.APP_NAME)
+
+ # TODO(esm): move to QueueFileWrapper
+ while self.q_out.qsize() > 0:
+ buf.append(self.q_out.get())
+ message = ''.join(buf)
+ if self.VNF_PROMPT in message:
+ LOG.info("%s VNF is up and running.", self.APP_NAME)
+ self._vnf_up_post()
+ self.queue_wrapper.clear()
+ self.resource_helper.start_collect()
+ return self._vnf_process.exitcode
+
+ if "PANIC" in message:
+ raise RuntimeError("Error starting %s VNF." %
+ self.APP_NAME)
+
+ LOG.info("Waiting for %s VNF to start.. ", self.APP_NAME)
+ time.sleep(1)
+
+ def _build_run_kwargs(self):
+ self.run_kwargs = {
+ 'stdin': self.queue_wrapper,
+ 'stdout': self.queue_wrapper,
+ 'keep_stdin_open': True,
+ 'pty': True,
+ }
+
+ def _build_config(self):
+ return self.setup_helper.build_config()
+
+ def _run(self):
+ # we can't share ssh paramiko objects to force new connection
+ self.ssh_helper.drop_connection()
+ cmd = self._build_config()
+ # kill before starting
+ self.ssh_helper.execute("pkill {}".format(self.APP_NAME))
+
+ LOG.debug(cmd)
+ self._build_run_kwargs()
+ self.ssh_helper.run(cmd, **self.run_kwargs)
+
+ def vnf_execute(self, cmd, wait_time=2):
+ """ send cmd to vnf process """
+
+ LOG.info("%s command: %s", self.APP_NAME, cmd)
+ self.q_in.put("{}\r\n".format(cmd))
+ time.sleep(wait_time)
+ output = []
+ while self.q_out.qsize() > 0:
+ output.append(self.q_out.get())
+ return "".join(output)
+
+ def _tear_down(self):
+ pass
+
+ def terminate(self):
+ self.vnf_execute("quit")
+ if self._vnf_process:
+ self._vnf_process.terminate()
+ self.ssh_helper.execute("sudo pkill %s" % self.APP_NAME)
+ self._tear_down()
+ self.resource_helper.stop_collect()
+
+ def get_stats(self, *args, **kwargs):
+ """
+ Method for checking the statistics
+
+ :return:
+ VNF statistics
+ """
+ cmd = 'p {0} stats'.format(self.APP_WORD)
+ out = self.vnf_execute(cmd)
+ return out
+
+ def collect_kpi(self):
+ stats = self.get_stats()
+ m = re.search(self.COLLECT_KPI, stats, re.MULTILINE)
+ if m:
+ result = {k: int(m.group(v)) for k, v in self.COLLECT_MAP.items()}
+ result["collect_stats"] = self.resource_helper.collect_kpi()
+ else:
+ result = {
+ "packets_in": 0,
+ "packets_fwd": 0,
+ "packets_dropped": 0,
+ }
+ LOG.debug("%s collect KPIs %s", self.APP_NAME, result)
+ return result
+
+
+class SampleVNFTrafficGen(GenericTrafficGen):
+ """ Class providing file-like API for generic traffic generator """
+
+ APP_NAME = 'Sample'
+ RUN_WAIT = 1
+
+ def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
+ super(SampleVNFTrafficGen, self).__init__(name, vnfd)
+ self.bin_path = get_nsb_option('bin_path', '')
+ self.name = "tgen__1" # name in topology file
+
+ self.scenario_helper = ScenarioHelper(self.name)
+ self.ssh_helper = VnfSshHelper(self.vnfd_helper.mgmt_interface, self.bin_path, wait=True)
+
+ if setup_env_helper_type is None:
+ setup_env_helper_type = SetupEnvHelper
+
+ self.setup_helper = setup_env_helper_type(self.vnfd_helper,
+ self.ssh_helper,
+ self.scenario_helper)
+
+ if resource_helper_type is None:
+ resource_helper_type = ClientResourceHelper
+
+ self.resource_helper = resource_helper_type(self.setup_helper)
+
+ self.runs_traffic = True
+ self.traffic_finished = False
+ self.tg_port_pairs = None
+ self._tg_process = None
+ self._traffic_process = None
+
+ def _start_server(self):
+ # we can't share ssh paramiko objects to force new connection
+ self.ssh_helper.drop_connection()
+
+ def instantiate(self, scenario_cfg, context_cfg):
+ self.scenario_helper.scenario_cfg = scenario_cfg
+ self.resource_helper.generate_cfg()
+ self.setup_helper.setup_vnf_environment()
+ self.resource_helper.setup()
+
+ LOG.info("Starting %s server...", self.APP_NAME)
+ self._tg_process = Process(target=self._start_server)
+ self._tg_process.start()
+
+ def wait_for_instantiate(self):
+ return self._wait_for_process()
+
+ def _check_status(self):
+ raise NotImplementedError
+
+ def _wait_for_process(self):
+ while True:
+ if not self._tg_process.is_alive():
+ raise RuntimeError("%s traffic generator process died." % self.APP_NAME)
+ LOG.info("Waiting for %s TG Server to start.. ", self.APP_NAME)
+ time.sleep(1)
+ status = self._check_status()
+ if status == 0:
+ LOG.info("%s TG Server is up and running.", self.APP_NAME)
+ return self._tg_process.exitcode
+
+ def _traffic_runner(self, traffic_profile):
+ LOG.info("Starting %s client...", self.APP_NAME)
+ self.resource_helper.run_traffic(traffic_profile)
+
+ def run_traffic(self, traffic_profile):
+ """ Generate traffic on the wire according to the given params.
+ Method is non-blocking, returns immediately when traffic process
+ is running. Mandatory.
+
+ :param traffic_profile:
+ :return: True/False
+ """
+ self._traffic_process = Process(target=self._traffic_runner,
+ args=(traffic_profile,))
+ self._traffic_process.start()
+ # Wait for traffic process to start
+ while self.resource_helper.client_started.value == 0:
+ time.sleep(self.RUN_WAIT)
+
+ return self._traffic_process.is_alive()
+
+ def listen_traffic(self, traffic_profile):
+ """ Listen to traffic with the given parameters.
+ Method is non-blocking, returns immediately when traffic process
+ is running. Optional.
+
+ :param traffic_profile:
+ :return: True/False
+ """
+ pass
+
+ def verify_traffic(self, traffic_profile):
+ """ Verify captured traffic after it has ended. Optional.
+
+ :param traffic_profile:
+ :return: dict
+ """
+ pass
+
+ def collect_kpi(self):
+ result = self.resource_helper.collect_kpi()
+ LOG.debug("%s collect KPIs %s", self.APP_NAME, result)
+ return result
+
+ def terminate(self):
+ """ After this method finishes, all traffic processes should stop. Mandatory.
+
+ :return: True/False
+ """
+ self.traffic_finished = True
+ if self._traffic_process is not None:
+ self._traffic_process.terminate()
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_ping.py b/yardstick/network_services/vnf_generic/vnf/tg_ping.py
index 000a91db4..e65296287 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_ping.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_ping.py
@@ -16,14 +16,13 @@
from __future__ import absolute_import
from __future__ import print_function
import logging
-import multiprocessing
import re
-import time
-import os
-from yardstick import ssh
-from yardstick.network_services.vnf_generic.vnf.base import GenericTrafficGen
-from yardstick.network_services.utils import provision_tool
+from multiprocessing import Queue
+from ipaddress import IPv4Interface
+
+from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTrafficGen
+from yardstick.network_services.vnf_generic.vnf.sample_vnf import DpdkVnfSetupEnvHelper
LOG = logging.getLogger(__name__)
@@ -42,77 +41,59 @@ class PingParser(object):
if match:
# IMPORTANT: in order for the data to be properly taken
# in by InfluxDB, it needs to be converted to numeric types
- self.queue.put({"packets_received": float(match.group(1)),
- "rtt": float(match.group(2))})
+ self.queue.put({
+ "packets_received": float(match.group(1)),
+ "rtt": float(match.group(2)),
+ })
def close(self):
- ''' close the ssh connection '''
- pass
+ """ close the ssh connection """
+ self.closed = True
def clear(self):
- ''' clear queue till Empty '''
+ """ clear queue till Empty """
while self.queue.qsize() > 0:
self.queue.get()
-class PingTrafficGen(GenericTrafficGen):
+class PingSetupEnvHelper(DpdkVnfSetupEnvHelper):
+
+ def setup_vnf_environment(self):
+ self._bind_kernel_devices()
+
+
+class PingTrafficGen(SampleVNFTrafficGen):
"""
This traffic generator can ping a single IP with pingsize
and target given in traffic profile
"""
- def __init__(self, vnfd):
- super(PingTrafficGen, self).__init__(vnfd)
+ TG_NAME = 'Ping'
+ RUN_WAIT = 4
+
+ def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
+ if setup_env_helper_type is None:
+ setup_env_helper_type = PingSetupEnvHelper
+
+ super(PingTrafficGen, self).__init__(name, vnfd, setup_env_helper_type,
+ resource_helper_type)
+ self._queue = Queue()
+ self._parser = PingParser(self._queue)
self._result = {}
- self._parser = None
- self._queue = None
- self._traffic_process = None
-
- mgmt_interface = vnfd["mgmt-interface"]
- self.connection = ssh.SSH.from_node(mgmt_interface)
- self.connection.wait()
-
- def _bind_device_kernel(self, connection):
- dpdk_nic_bind = \
- provision_tool(self.connection,
- os.path.join(self.bin_path, "dpdk_nic_bind.py"))
-
- drivers = {intf["virtual-interface"]["vpci"]:
- intf["virtual-interface"]["driver"]
- for intf in self.vnfd["vdu"][0]["external-interface"]}
-
- commands = \
- ['"{0}" --force -b "{1}" "{2}"'.format(dpdk_nic_bind, value, key)
- for key, value in drivers.items()]
- for command in commands:
- connection.execute(command)
-
- for index, out in enumerate(self.vnfd["vdu"][0]["external-interface"]):
- vpci = out["virtual-interface"]["vpci"]
- net = "find /sys/class/net -lname '*{}*' -printf '%f'".format(vpci)
- out = connection.execute(net)[1]
- ifname = out.split('/')[-1].strip('\n')
- self.vnfd["vdu"][0]["external-interface"][index][
- "virtual-interface"]["local_iface_name"] = ifname
def scale(self, flavor=""):
- ''' scale vnfbased on flavor input '''
- super(PingTrafficGen, self).scale(flavor)
+ """ scale vnf-based on flavor input """
+ pass
- def instantiate(self, scenario_cfg, context_cfg):
- self._result = {"packets_received": 0, "rtt": 0}
- self._bind_device_kernel(self.connection)
+ def _check_status(self):
+ return self._tg_process.is_alive()
- def run_traffic(self, traffic_profile):
- self._queue = multiprocessing.Queue()
- self._parser = PingParser(self._queue)
- self._traffic_process = \
- multiprocessing.Process(target=self._traffic_runner,
- args=(traffic_profile, self._parser))
- self._traffic_process.start()
- # Wait for traffic process to start
- time.sleep(4)
- return self._traffic_process.is_alive()
+ def instantiate(self, scenario_cfg, context_cfg):
+ self._result = {
+ "packets_received": 0,
+ "rtt": 0,
+ }
+ self.setup_helper.setup_vnf_environment()
def listen_traffic(self, traffic_profile):
""" Not needed for ping
@@ -122,38 +103,26 @@ class PingTrafficGen(GenericTrafficGen):
"""
pass
- def _traffic_runner(self, traffic_profile, filewrapper):
-
- mgmt_interface = self.vnfd["mgmt-interface"]
- self.connection = ssh.SSH.from_node(mgmt_interface)
- self.connection.wait()
- external_interface = self.vnfd["vdu"][0]["external-interface"]
- virtual_interface = external_interface[0]["virtual-interface"]
- target_ip = virtual_interface["dst_ip"].split('/')[0]
- local_ip = virtual_interface["local_ip"].split('/')[0]
- local_if_name = \
- virtual_interface["local_iface_name"].split('/')[0]
- packet_size = traffic_profile.params["traffic_profile"]["frame_size"]
-
- run_cmd = []
-
- run_cmd.append("ip addr flush %s" % local_if_name)
- run_cmd.append("ip addr add %s/24 dev %s" % (local_ip, local_if_name))
- run_cmd.append("ip link set %s up" % local_if_name)
-
- for cmd in run_cmd:
- self.connection.execute(cmd)
-
- ping_cmd = ("ping -s %s %s" % (packet_size, target_ip))
- self.connection.run(ping_cmd, stdout=filewrapper,
+ def _traffic_runner(self, traffic_profile):
+ intf = self.vnfd_helper.interfaces[0]["virtual-interface"]
+ profile = traffic_profile.params["traffic_profile"]
+ cmd_kwargs = {
+ 'target_ip': IPv4Interface(intf["dst_ip"]).ip.exploded,
+ 'local_ip': IPv4Interface(intf["local_ip"]).ip.exploded,
+ 'local_if_name': intf["local_iface_name"].split('/')[0],
+ 'packet_size': profile["frame_size"],
+ }
+
+ cmd_list = [
+ "sudo ip addr flush {local_if_name}",
+ "sudo ip addr add {local_ip}/24 dev {local_if_name}",
+ "sudo ip link set {local_if_name} up",
+ ]
+
+ for cmd in cmd_list:
+ self.ssh_helper.execute(cmd.format(**cmd_kwargs))
+
+ ping_cmd = "ping -s {packet_size} {target_ip}"
+ self.ssh_helper.run(ping_cmd.format(**cmd_kwargs),
+ stdout=self._parser,
keep_stdin_open=True, pty=True)
-
- def collect_kpi(self):
- if not self._queue.empty():
- kpi = self._queue.get()
- self._result.update(kpi)
- return self._result
-
- def terminate(self):
- if self._traffic_process is not None:
- self._traffic_process.terminate()
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py
index 7da4b31e9..79e42e0a8 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py
@@ -15,267 +15,98 @@
from __future__ import absolute_import
from __future__ import print_function
-import multiprocessing
import time
import logging
-import os
-import yaml
+from collections import Mapping
+from itertools import chain
-from yardstick import ssh
-from yardstick.network_services.vnf_generic.vnf.base import GenericTrafficGen
-from yardstick.network_services.utils import get_nsb_option
-from stl.trex_stl_lib.trex_stl_client import STLClient
-from stl.trex_stl_lib.trex_stl_client import LoggerApi
-from stl.trex_stl_lib.trex_stl_exceptions import STLError
+from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig
+from yardstick.network_services.vnf_generic.vnf.tg_trex import TrexTrafficGen
+from yardstick.network_services.vnf_generic.vnf.sample_vnf import Rfc2544ResourceHelper
+from yardstick.network_services.vnf_generic.vnf.tg_trex import TrexResourceHelper
LOGGING = logging.getLogger(__name__)
-DURATION = 30
-WAIT_TIME = 3
-TREX_SYNC_PORT = 4500
-TREX_ASYNC_PORT = 4501
+class TrexRfc2544ResourceHelper(Rfc2544ResourceHelper):
-class TrexTrafficGenRFC(GenericTrafficGen):
- """
- This class handles mapping traffic profile and generating
- traffic for rfc2544 testcase.
- """
-
- def __init__(self, vnfd):
- super(TrexTrafficGenRFC, self).__init__(vnfd)
- self._result = {}
- self._terminated = multiprocessing.Value('i', 0)
- self._queue = multiprocessing.Queue()
- self._terminated = multiprocessing.Value('i', 0)
- self._traffic_process = None
- self._vpci_ascending = None
- self.tc_file_name = None
- self.client = None
- self.my_ports = None
-
- mgmt_interface = self.vnfd["mgmt-interface"]
-
- self.connection = ssh.SSH.from_node(mgmt_interface)
- self.connection.wait()
-
- @classmethod
- def _split_mac_address_into_list(cls, mac):
- octets = mac.split(':')
- for i, elem in enumerate(octets):
- octets[i] = "0x" + str(elem)
- return octets
-
- def _generate_trex_cfg(self, vnfd):
- """
-
- :param vnfd: vnfd.yaml
- :return: trex_cfg.yaml file
- """
- trex_cfg = dict(
- port_limit=0,
- version='2',
- interfaces=[],
- port_info=list(dict(
- ))
- )
- trex_cfg["port_limit"] = len(vnfd["vdu"][0]["external-interface"])
- trex_cfg["version"] = '2'
-
- cfg_file = []
- vpci = []
- port = {}
-
- ext_intf = vnfd["vdu"][0]["external-interface"]
- for interface in ext_intf:
- virt_intf = interface["virtual-interface"]
- vpci.append(virt_intf["vpci"])
-
- port["src_mac"] = \
- self._split_mac_address_into_list(virt_intf["local_mac"])
-
- time.sleep(WAIT_TIME)
- port["dest_mac"] = \
- self._split_mac_address_into_list(virt_intf["dst_mac"])
- if virt_intf["dst_mac"]:
- trex_cfg["port_info"].append(port.copy())
-
- trex_cfg["interfaces"] = vpci
- cfg_file.append(trex_cfg)
-
- with open('/tmp/trex_cfg.yaml', 'w') as outfile:
- outfile.write(yaml.safe_dump(cfg_file, default_flow_style=False))
- self.connection.put('/tmp/trex_cfg.yaml', '/etc')
-
- self._vpci_ascending = sorted(vpci)
-
- def scale(self, flavor=""):
- ''' scale vnfbased on flavor input '''
- super(TrexTrafficGenRFC, self).scale(flavor)
-
- def instantiate(self, scenario_cfg, context_cfg):
- self._generate_trex_cfg(self.vnfd)
- self.tc_file_name = '{0}.yaml'.format(scenario_cfg['tc'])
- trex = os.path.join(self.bin_path, "trex")
- err, _, _ = \
- self.connection.execute("ls {} >/dev/null 2>&1".format(trex))
- if err != 0:
- self.connection.put(trex, trex, True)
+ def is_done(self):
+ return self.latency and self.iteration.value > 10
- LOGGING.debug("Starting TRex server...")
- _tg_server = \
- multiprocessing.Process(target=self._start_server)
- _tg_server.start()
- while True:
- LOGGING.info("Waiting for TG Server to start.. ")
- time.sleep(WAIT_TIME)
- status = \
- self.connection.execute("lsof -i:%s" % TREX_SYNC_PORT)[0]
- if status == 0:
- LOGGING.info("TG server is up and running.")
- return _tg_server.exitcode
- if not _tg_server.is_alive():
- raise RuntimeError("Traffic Generator process died.")
+class TrexRfcResourceHelper(TrexResourceHelper):
- def listen_traffic(self, traffic_profile):
- pass
+ LATENCY_TIME_SLEEP = 120
+ RUN_DURATION = 30
+ WAIT_TIME = 3
- def _get_logical_if_name(self, vpci):
- ext_intf = self.vnfd["vdu"][0]["external-interface"]
- for interface in range(len(self.vnfd["vdu"][0]["external-interface"])):
- virtual_intf = ext_intf[interface]["virtual-interface"]
- if virtual_intf["vpci"] == vpci:
- return ext_intf[interface]["name"]
+ def __init__(self, setup_helper, rfc_helper_type=None):
+ super(TrexRfcResourceHelper, self).__init__(setup_helper)
- def run_traffic(self, traffic_profile,
- client_started=multiprocessing.Value('i', 0)):
+ if rfc_helper_type is None:
+ rfc_helper_type = TrexRfc2544ResourceHelper
- self._traffic_process = \
- multiprocessing.Process(target=self._traffic_runner,
- args=(traffic_profile, self._queue,
- client_started, self._terminated))
- self._traffic_process.start()
- # Wait for traffic process to start
- while client_started.value == 0:
- time.sleep(1)
+ self.rfc2544_helper = rfc_helper_type(self.scenario_helper)
+ # self.tg_port_pairs = []
- return self._traffic_process.is_alive()
+ def _build_ports(self):
+ self.tg_port_pairs, self.networks = MultiPortConfig.get_port_pairs(
+ self.vnfd_helper.interfaces)
+ self.priv_ports = [int(x[0][-1]) for x in self.tg_port_pairs]
+ self.pub_ports = [int(x[1][-1]) for x in self.tg_port_pairs]
+ self.my_ports = list(set(chain(self.priv_ports, self.pub_ports)))
- def _start_server(self):
- mgmt_interface = self.vnfd["mgmt-interface"]
-
- _server = ssh.SSH.from_node(mgmt_interface)
- _server.wait()
-
- _server.execute("fuser -n tcp %s %s -k > /dev/null 2>&1" %
- (TREX_SYNC_PORT, TREX_ASYNC_PORT))
- _server.execute("pkill -9 rex > /dev/null 2>&1")
-
- trex_path = os.path.join(self.bin_path, "trex/scripts")
- path = get_nsb_option("trex_path", trex_path)
- trex_cmd = "cd " + path + "; sudo ./t-rex-64 -i > /dev/null 2>&1"
-
- _server.execute(trex_cmd)
-
- def _connect_client(self, client=None):
- if client is None:
- client = STLClient(username=self.vnfd["mgmt-interface"]["user"],
- server=self.vnfd["mgmt-interface"]["ip"],
- verbose_level=LoggerApi.VERBOSE_QUIET)
- for idx in range(6):
- try:
- client.connect()
- break
- except STLError:
- LOGGING.info("Unable to connect to Trex. Attempt %s", idx)
- time.sleep(WAIT_TIME)
- return client
-
- @classmethod
- def _get_rfc_tolerance(cls, tc_yaml):
- tolerance = '0.8 - 1.0'
- if 'tc_options' in tc_yaml['scenarios'][0]:
- tc_options = tc_yaml['scenarios'][0]['tc_options']
- if 'rfc2544' in tc_options:
- tolerance = \
- tc_options['rfc2544'].get('allowed_drop_rate', '0.8 - 1.0')
-
- tolerance = tolerance.split('-')
- min_tol = float(tolerance[0])
- if len(tolerance) == 2:
- max_tol = float(tolerance[1])
- else:
- max_tol = float(tolerance[0])
-
- return [min_tol, max_tol]
-
- def _traffic_runner(self, traffic_profile, queue,
- client_started, terminated):
- LOGGING.info("Starting TRex client...")
- tc_yaml = {}
-
- with open(self.tc_file_name) as tc_file:
- tc_yaml = yaml.load(tc_file.read())
+ def _run_traffic_once(self, traffic_profile):
+ traffic_profile.execute(self)
+ self.client_started.value = 1
+ time.sleep(self.RUN_DURATION)
+ self.client.stop(self.my_ports)
+ time.sleep(self.WAIT_TIME)
+ samples = traffic_profile.get_drop_percentage(self)
+ self._queue.put(samples)
- tolerance = self._get_rfc_tolerance(tc_yaml)
+ if not self.rfc2544_helper.is_done():
+ return
- # fixme: fix passing correct trex config file,
- # instead of searching the default path
- self.my_ports = [0, 1]
- self.client = self._connect_client()
+ self.client.stop(self.my_ports)
self.client.reset(ports=self.my_ports)
- self.client.remove_all_streams(self.my_ports) # remove all streams
- while not terminated.value:
- traffic_profile.execute(self)
- client_started.value = 1
- time.sleep(DURATION)
+ self.client.remove_all_streams(self.my_ports)
+ traffic_profile.execute_latency(samples=samples)
+ multiplier = traffic_profile.calculate_pps(samples)[1]
+ for _ in range(5):
+ time.sleep(self.LATENCY_TIME_SLEEP)
self.client.stop(self.my_ports)
- time.sleep(WAIT_TIME)
+ time.sleep(self.WAIT_TIME)
last_res = self.client.get_stats(self.my_ports)
- samples = {}
- for vpci_idx in range(len(self._vpci_ascending)):
- name = \
- self._get_logical_if_name(self._vpci_ascending[vpci_idx])
- # fixme: VNFDs KPIs values needs to be mapped to TRex structure
- if not isinstance(last_res, dict):
- terminated.value = 1
- last_res = {}
+ if not isinstance(last_res, Mapping):
+ self._terminated.value = 1
+ continue
+ self.generate_samples('latency', {})
+ self._queue.put(samples)
+ self.client.start(mult=str(multiplier),
+ ports=self.my_ports,
+ duration=120, force=True)
- samples[name] = \
- {"rx_throughput_fps":
- float(last_res.get(vpci_idx, {}).get("rx_pps", 0.0)),
- "tx_throughput_fps":
- float(last_res.get(vpci_idx, {}).get("tx_pps", 0.0)),
- "rx_throughput_mbps":
- float(last_res.get(vpci_idx, {}).get("rx_bps", 0.0)),
- "tx_throughput_mbps":
- float(last_res.get(vpci_idx, {}).get("tx_bps", 0.0)),
- "in_packets":
- last_res.get(vpci_idx, {}).get("ipackets", 0),
- "out_packets":
- last_res.get(vpci_idx, {}).get("opackets", 0)}
+ def start_client(self, mult, duration, force=True):
+ self.client.start(ports=self.my_ports, mult=mult, duration=duration, force=force)
- samples = \
- traffic_profile.get_drop_percentage(self, samples,
- tolerance[0], tolerance[1])
- queue.put(samples)
- self.client.stop(self.my_ports)
- self.client.disconnect()
- queue.put(samples)
+ def clear_client_stats(self):
+ self.client.clear_stats(ports=self.my_ports)
def collect_kpi(self):
- if not self._queue.empty():
- result = self._queue.get()
- self._result.update(result)
- LOGGING.debug("trex collect Kpis %s", self._result)
- return self._result
+ self.rfc2544_helper.iteration.value += 1
+ super(TrexRfcResourceHelper, self).collect_kpi()
+
- def terminate(self):
- self._terminated.value = 1 # stop Trex clinet
+class TrexTrafficGenRFC(TrexTrafficGen):
+ """
+ This class handles mapping traffic profile and generating
+ traffic for rfc2544 testcase.
+ """
- self.connection.execute("fuser -n tcp %s %s -k > /dev/null 2>&1" %
- (TREX_SYNC_PORT, TREX_ASYNC_PORT))
+ def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
+ if resource_helper_type is None:
+ resource_helper_type = TrexRfcResourceHelper
- if self._traffic_process:
- self._traffic_process.terminate()
+ super(TrexTrafficGenRFC, self).__init__(name, vnfd, setup_env_helper_type,
+ resource_helper_type)
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
index 058b715fe..616b331ba 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_trex.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
@@ -15,261 +15,136 @@
from __future__ import absolute_import
from __future__ import print_function
-import multiprocessing
-import time
+
import logging
import os
+
import yaml
-from yardstick import ssh
-from yardstick.network_services.vnf_generic.vnf.base import GenericTrafficGen
+from yardstick.common.utils import mac_address_to_hex_list
from yardstick.network_services.utils import get_nsb_option
-from yardstick.network_services.utils import provision_tool
-from stl.trex_stl_lib.trex_stl_client import STLClient
-from stl.trex_stl_lib.trex_stl_client import LoggerApi
-from stl.trex_stl_lib.trex_stl_exceptions import STLError
+from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTrafficGen
+from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper
LOG = logging.getLogger(__name__)
-DURATION = 30
-WAIT_QUEUE = 1
-TREX_SYNC_PORT = 4500
-TREX_ASYNC_PORT = 4501
-class TrexTrafficGen(GenericTrafficGen):
+class TrexResourceHelper(ClientResourceHelper):
+
+ CONF_FILE = '/tmp/trex_cfg.yaml'
+ QUEUE_WAIT_TIME = 1
+ RESOURCE_WORD = 'trex'
+ RUN_DURATION = 0
+
+ SYNC_PORT = 4500
+ ASYNC_PORT = 4501
+
+ def generate_cfg(self):
+ ext_intf = self.vnfd_helper.interfaces
+ vpci_list = []
+ port_list = []
+ trex_cfg = {
+ 'port_limit': 0,
+ 'version': '2',
+ 'interfaces': vpci_list,
+ 'port_info': port_list,
+ "port_limit": len(ext_intf),
+ "version": '2',
+ }
+ cfg_file = [trex_cfg]
+
+ for interface in ext_intf:
+ virtual_interface = interface['virtual-interface']
+ vpci_list.append(virtual_interface["vpci"])
+ dst_mac = virtual_interface["dst_mac"]
+
+ if not dst_mac:
+ continue
+
+ local_mac = virtual_interface["local_mac"]
+ port_list.append({
+ "src_mac": mac_address_to_hex_list(local_mac),
+ "dest_mac": mac_address_to_hex_list(dst_mac),
+ })
+
+ cfg_str = yaml.safe_dump(cfg_file, default_flow_style=False, explicit_start=True)
+ self.ssh_helper.upload_config_file(os.path.basename(self.CONF_FILE), cfg_str)
+ self._vpci_ascending = sorted(vpci_list)
+
+ def check_status(self):
+ status, _, _ = self.ssh_helper.execute("sudo lsof -i:%s" % self.SYNC_PORT)
+ return status
+
+ # temp disable
+ DISABLE_DEPLOY = True
+
+ def setup(self):
+ if self.DISABLE_DEPLOY:
+ return
+
+ trex_path = self.ssh_helper.join_bin_path('trex')
+
+ err = self.ssh_helper.execute("which {}".format(trex_path))[0]
+ if err == 0:
+ return
+
+ LOG.info("Copying %s to destination...", self.RESOURCE_WORD)
+ self.ssh_helper.run("sudo mkdir -p '{}'".format(os.path.dirname(trex_path)))
+ self.ssh_helper.put("~/.bash_profile", "~/.bash_profile")
+ self.ssh_helper.put(trex_path, trex_path, True)
+ ko_src = os.path.join(trex_path, "scripts/ko/src/")
+ self.ssh_helper.execute(self.MAKE_INSTALL.format(ko_src))
+
+ def start(self, ports=None, *args, **kwargs):
+ cmd = "sudo fuser -n tcp {0.SYNC_PORT} {0.ASYNC_PORT} -k > /dev/null 2>&1"
+ self.ssh_helper.execute(cmd.format(self))
+
+ self.ssh_helper.execute("sudo pkill -9 rex > /dev/null 2>&1")
+
+ trex_path = self.ssh_helper.join_bin_path("trex", "scripts")
+ path = get_nsb_option("trex_path", trex_path)
+
+ # cmd = "sudo ./t-rex-64 -i --cfg %s > /dev/null 2>&1" % self.CONF_FILE
+ cmd = "./t-rex-64 -i --cfg '{}'".format(self.CONF_FILE)
+
+ # if there are errors we want to see them
+ # we have to sudo cd because the path might be owned by root
+ trex_cmd = """sudo bash -c "cd '{}' ; {}" >/dev/null""".format(path, cmd)
+ self.ssh_helper.execute(trex_cmd)
+
+ def terminate(self):
+ super(TrexResourceHelper, self).terminate()
+ cmd = "sudo fuser -n tcp %s %s -k > /dev/null 2>&1"
+ self.ssh_helper.execute(cmd % (self.SYNC_PORT, self.ASYNC_PORT))
+
+
+class TrexTrafficGen(SampleVNFTrafficGen):
"""
This class handles mapping traffic profile and generating
traffic for given testcase
"""
- def __init__(self, vnfd):
- super(TrexTrafficGen, self).__init__(vnfd)
- self._result = {}
- self._queue = multiprocessing.Queue()
- self._terminated = multiprocessing.Value('i', 0)
- self._traffic_process = None
- self._vpci_ascending = None
- self.client = None
- self.my_ports = None
- self.client_started = multiprocessing.Value('i', 0)
-
- mgmt_interface = vnfd["mgmt-interface"]
-
- self.connection = ssh.SSH.from_node(mgmt_interface)
- self.connection.wait()
-
- @classmethod
- def _split_mac_address_into_list(cls, mac):
- octets = mac.split(':')
- for i, elem in enumerate(octets):
- octets[i] = "0x" + str(elem)
- return octets
-
- def _generate_trex_cfg(self, vnfd):
- """
-
- :param vnfd: vnfd.yaml
- :return: trex_cfg.yaml file
- """
- trex_cfg = dict(
- port_limit=0,
- version='2',
- interfaces=[],
- port_info=list(dict(
- ))
- )
- trex_cfg["port_limit"] = len(vnfd["vdu"][0]["external-interface"])
- trex_cfg["version"] = '2'
-
- cfg_file = []
- vpci = []
- port = {}
-
- for interface in range(len(vnfd["vdu"][0]["external-interface"])):
- ext_intrf = vnfd["vdu"][0]["external-interface"]
- virtual_interface = ext_intrf[interface]["virtual-interface"]
- vpci.append(virtual_interface["vpci"])
-
- port["src_mac"] = self._split_mac_address_into_list(
- virtual_interface["local_mac"])
- port["dest_mac"] = self._split_mac_address_into_list(
- virtual_interface["dst_mac"])
-
- trex_cfg["port_info"].append(port.copy())
-
- trex_cfg["interfaces"] = vpci
- cfg_file.append(trex_cfg)
-
- with open('/tmp/trex_cfg.yaml', 'w') as outfile:
- outfile.write(yaml.safe_dump(cfg_file, default_flow_style=False))
- self.connection.put('/tmp/trex_cfg.yaml', '/etc')
-
- self._vpci_ascending = sorted(vpci)
-
- @classmethod
- def __setup_hugepages(cls, connection):
- hugepages = \
- connection.execute(
- "awk '/Hugepagesize/ { print $2$3 }' < /proc/meminfo")[1]
- hugepages = hugepages.rstrip()
-
- memory_path = \
- '/sys/kernel/mm/hugepages/hugepages-%s/nr_hugepages' % hugepages
- connection.execute("awk -F: '{ print $1 }' < %s" % memory_path)
-
- pages = 16384 if hugepages.rstrip() == "2048kB" else 16
- connection.execute("echo %s > %s" % (pages, memory_path))
-
- def setup_vnf_environment(self, connection):
- ''' setup dpdk environment needed for vnf to run '''
-
- self.__setup_hugepages(connection)
- connection.execute("modprobe uio && modprobe igb_uio")
-
- exit_status = connection.execute("lsmod | grep -i igb_uio")[0]
- if exit_status == 0:
- return
+ APP_NAME = 'TRex'
- dpdk = os.path.join(self.bin_path, "dpdk-16.07")
- dpdk_setup = \
- provision_tool(self.connection,
- os.path.join(self.bin_path, "nsb_setup.sh"))
- status = connection.execute("ls {} >/dev/null 2>&1".format(dpdk))[0]
- if status:
- connection.execute("bash %s dpdk >/dev/null 2>&1" % dpdk_setup)
+ def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
+ if resource_helper_type is None:
+ resource_helper_type = TrexResourceHelper
- def scale(self, flavor=""):
- ''' scale vnfbased on flavor input '''
- super(TrexTrafficGen, self).scale(flavor)
-
- def instantiate(self, scenario_cfg, context_cfg):
- self._generate_trex_cfg(self.vnfd)
- self.setup_vnf_environment(self.connection)
-
- trex = os.path.join(self.bin_path, "trex")
- err = \
- self.connection.execute("ls {} >/dev/null 2>&1".format(trex))[0]
- if err != 0:
- LOG.info("Copying trex to destination...")
- self.connection.put("/root/.bash_profile", "/root/.bash_profile")
- self.connection.put(trex, trex, True)
- ko_src = os.path.join(trex, "scripts/ko/src/")
- self.connection.execute("cd %s && make && make install" % ko_src)
-
- LOG.info("Starting TRex server...")
- _tg_process = \
- multiprocessing.Process(target=self._start_server)
- _tg_process.start()
- while True:
- if not _tg_process.is_alive():
- raise RuntimeError("Traffic Generator process died.")
- LOG.info("Waiting for TG Server to start.. ")
- time.sleep(1)
- status = \
- self.connection.execute("lsof -i:%s" % TREX_SYNC_PORT)[0]
- if status == 0:
- LOG.info("TG server is up and running.")
- return _tg_process.exitcode
-
- def listen_traffic(self, traffic_profile):
- pass
+ super(TrexTrafficGen, self).__init__(name, vnfd, setup_env_helper_type,
+ resource_helper_type)
- def _get_logical_if_name(self, vpci):
- ext_intf = self.vnfd["vdu"][0]["external-interface"]
- for interface in range(len(self.vnfd["vdu"][0]["external-interface"])):
- virtual_intf = ext_intf[interface]["virtual-interface"]
- if virtual_intf["vpci"] == vpci:
- return ext_intf[interface]["name"]
-
- def run_traffic(self, traffic_profile):
- self._traffic_process = \
- multiprocessing.Process(target=self._traffic_runner,
- args=(traffic_profile, self._queue,
- self.client_started,
- self._terminated))
- self._traffic_process.start()
- # Wait for traffic process to start
- while self.client_started.value == 0:
- time.sleep(1)
-
- return self._traffic_process.is_alive()
+ def _check_status(self):
+ return self.resource_helper.check_status()
def _start_server(self):
- mgmt_interface = self.vnfd["mgmt-interface"]
-
- _server = ssh.SSH.from_node(mgmt_interface)
- _server.wait()
+ super(TrexTrafficGen, self)._start_server()
+ self.resource_helper.start()
- _server.execute("fuser -n tcp %s %s -k > /dev/null 2>&1" %
- (TREX_SYNC_PORT, TREX_ASYNC_PORT))
+ def scale(self, flavor=""):
+ pass
- trex_path = os.path.join(self.bin_path, "trex/scripts")
- path = get_nsb_option("trex_path", trex_path)
- trex_cmd = "cd " + path + "; sudo ./t-rex-64 -i > /dev/null 2>&1"
-
- _server.execute(trex_cmd)
-
- def _connect_client(self, client=None):
- if client is None:
- client = STLClient(username=self.vnfd["mgmt-interface"]["user"],
- server=self.vnfd["mgmt-interface"]["ip"],
- verbose_level=LoggerApi.VERBOSE_QUIET)
- # try to connect with 5s intervals, 30s max
- for idx in range(6):
- try:
- client.connect()
- break
- except STLError:
- LOG.info("Unable to connect to Trex Server.. Attempt %s", idx)
- time.sleep(5)
- return client
-
- def _traffic_runner(self, traffic_profile, queue,
- client_started, terminated):
- LOG.info("Starting TRex client...")
-
- self.my_ports = [0, 1]
- self.client = self._connect_client()
- self.client.reset(ports=self.my_ports)
-
- self.client.remove_all_streams(self.my_ports) # remove all streams
-
- while not terminated.value:
- traffic_profile.execute(self)
- client_started.value = 1
- last_res = self.client.get_stats(self.my_ports)
- if not isinstance(last_res, dict): # added for mock unit test
- terminated.value = 1
- last_res = {}
-
- samples = {}
- for vpci_idx in range(len(self._vpci_ascending)):
- name = \
- self._get_logical_if_name(self._vpci_ascending[vpci_idx])
- # fixme: VNFDs KPIs values needs to be mapped to TRex structure
- xe_value = last_res.get(vpci_idx, {})
- samples[name] = \
- {"rx_throughput_fps": float(xe_value.get("rx_pps", 0.0)),
- "tx_throughput_fps": float(xe_value.get("tx_pps", 0.0)),
- "rx_throughput_mbps": float(xe_value.get("rx_bps", 0.0)),
- "tx_throughput_mbps": float(xe_value.get("tx_bps", 0.0)),
- "in_packets": xe_value.get("ipackets", 0),
- "out_packets": xe_value.get("opackets", 0)}
- time.sleep(WAIT_QUEUE)
- queue.put(samples)
-
- self.client.disconnect()
- terminated.value = 0
-
- def collect_kpi(self):
- if not self._queue.empty():
- self._result.update(self._queue.get())
- LOG.debug("trex collect Kpis %s", self._result)
- return self._result
+ def listen_traffic(self, traffic_profile):
+ pass
def terminate(self):
- self.connection.execute("fuser -n tcp %s %s -k > /dev/null 2>&1" %
- (TREX_SYNC_PORT, TREX_ASYNC_PORT))
- self.traffic_finished = True
- if self._traffic_process:
- self._traffic_process.terminate()
+ self.resource_helper.terminate()
diff --git a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
index e9e80bdfb..310ab67cb 100644
--- a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
@@ -15,313 +15,268 @@
from __future__ import absolute_import
from __future__ import print_function
-import tempfile
-import time
import os
import logging
import re
-from multiprocessing import Queue
-import multiprocessing
-import ipaddress
-import six
+import posixpath
-from yardstick import ssh
-from yardstick.network_services.vnf_generic.vnf.base import GenericVNF
-from yardstick.network_services.utils import provision_tool
-from yardstick.network_services.vnf_generic.vnf.base import QueueFileWrapper
-from yardstick.network_services.nfvi.resource import ResourceProfile
+from six.moves import configparser, zip
-LOG = logging.getLogger(__name__)
-VPE_PIPELINE_COMMAND = '{tool_path} -p 0x3 -f {cfg_file} -s {script}'
-CORES = ['0', '1', '2']
-WAIT_TIME = 20
+from yardstick.network_services.pipeline import PipelineRules
+from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, DpdkVnfSetupEnvHelper
+LOG = logging.getLogger(__name__)
-class VpeApproxVnf(GenericVNF):
+VPE_PIPELINE_COMMAND = """sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}"""
+
+VPE_COLLECT_KPI = """\
+Pkts in:\s(\d+)\r\n\
+\tPkts dropped by Pkts in:\s(\d+)\r\n\
+\tPkts dropped by AH:\s(\d+)\r\n\\
+\tPkts dropped by other:\s(\d+)\
+"""
+
+
+class ConfigCreate(object):
+
+ @staticmethod
+ def vpe_tmq(config, index):
+ tm_q = 'TM{0}'.format(index)
+ config.add_section(tm_q)
+ config.set(tm_q, 'burst_read', '24')
+ config.set(tm_q, 'burst_write', '32')
+ config.set(tm_q, 'cfg', '/tmp/full_tm_profile_10G.cfg')
+ return config
+
+ def __init__(self, priv_ports, pub_ports, socket):
+ super(ConfigCreate, self).__init__()
+ self.sw_q = -1
+ self.sink_q = -1
+ self.n_pipeline = 1
+ self.priv_ports = priv_ports
+ self.pub_ports = pub_ports
+ self.pipeline_per_port = 9
+ self.socket = socket
+
+ def vpe_initialize(self, config):
+ config.add_section('EAL')
+ config.set('EAL', 'log_level', '0')
+
+ config.add_section('PIPELINE0')
+ config.set('PIPELINE0', 'type', 'MASTER')
+ config.set('PIPELINE0', 'core', 's%sC0' % self.socket)
+
+ config.add_section('MEMPOOL0')
+ config.set('MEMPOOL0', 'pool_size', '256K')
+
+ config.add_section('MEMPOOL1')
+ config.set('MEMPOOL1', 'pool_size', '2M')
+ return config
+
+ def vpe_rxq(self, config):
+ for port in self.pub_ports:
+ new_section = 'RXQ{0}.0'.format(port)
+ config.add_section(new_section)
+ config.set(new_section, 'mempool', 'MEMPOOL1')
+
+ return config
+
+ def get_sink_swq(self, parser, pipeline, k, index):
+ sink = ""
+ pktq = parser.get(pipeline, k)
+ if "SINK" in pktq:
+ self.sink_q += 1
+ sink = " SINK{0}".format(self.sink_q)
+ if "TM" in pktq:
+ sink = " TM{0}".format(index)
+ pktq = "SWQ{0}{1}".format(self.sw_q, sink)
+ return pktq
+
+ def vpe_upstream(self, vnf_cfg, intf):
+ parser = configparser.ConfigParser()
+ parser.read(os.path.join(vnf_cfg, 'vpe_upstream'))
+ for pipeline in parser.sections():
+ for k, v in parser.items(pipeline):
+ if k == "pktq_in":
+ index = intf['index']
+ if "RXQ" in v:
+ value = "RXQ{0}.0".format(index)
+ else:
+ value = self.get_sink_swq(parser, pipeline, k, index)
+
+ parser.set(pipeline, k, value)
+
+ elif k == "pktq_out":
+ index = intf['peer_intf']['index']
+ if "TXQ" in v:
+ value = "TXQ{0}.0".format(index)
+ else:
+ self.sw_q += 1
+ value = self.get_sink_swq(parser, pipeline, k, index)
+
+ parser.set(pipeline, k, value)
+
+ new_pipeline = 'PIPELINE{0}'.format(self.n_pipeline)
+ if new_pipeline != pipeline:
+ parser._sections[new_pipeline] = parser._sections[pipeline]
+ parser._sections.pop(pipeline)
+ self.n_pipeline += 1
+ return parser
+
+ def vpe_downstream(self, vnf_cfg, intf):
+ parser = configparser.ConfigParser()
+ parser.read(os.path.join(vnf_cfg, 'vpe_downstream'))
+ for pipeline in parser.sections():
+ for k, v in parser.items(pipeline):
+ index = intf['dpdk_port_num']
+ peer_index = intf['peer_intf']['dpdk_port_num']
+
+ if k == "pktq_in":
+ if "RXQ" not in v:
+ value = self.get_sink_swq(parser, pipeline, k, index)
+ elif "TM" in v:
+ value = "RXQ{0}.0 TM{1}".format(peer_index, index)
+ else:
+ value = "RXQ{0}.0".format(peer_index)
+
+ parser.set(pipeline, k, value)
+
+ if k == "pktq_out":
+ if "TXQ" not in v:
+ self.sw_q += 1
+ value = self.get_sink_swq(parser, pipeline, k, index)
+ elif "TM" in v:
+ value = "TXQ{0}.0 TM{1}".format(peer_index, index)
+ else:
+ value = "TXQ{0}.0".format(peer_index)
+
+ parser.set(pipeline, k, value)
+
+ new_pipeline = 'PIPELINE{0}'.format(self.n_pipeline)
+ if new_pipeline != pipeline:
+ parser._sections[new_pipeline] = parser._sections[pipeline]
+ parser._sections.pop(pipeline)
+ self.n_pipeline += 1
+ return parser
+
+ def create_vpe_config(self, vnf_cfg):
+ config = configparser.ConfigParser()
+ vpe_cfg = os.path.join("/tmp/vpe_config")
+ with open(vpe_cfg, 'w') as cfg_file:
+ config = self.vpe_initialize(config)
+ config = self.vpe_rxq(config)
+ config.write(cfg_file)
+ for index, priv_port in enumerate(self.priv_ports):
+ config = self.vpe_upstream(vnf_cfg, priv_port)
+ config.write(cfg_file)
+ config = self.vpe_downstream(vnf_cfg, priv_port)
+ config = self.vpe_tmq(config, index)
+ config.write(cfg_file)
+
+ def generate_vpe_script(self, interfaces):
+ rules = PipelineRules(pipeline_id=1)
+ for priv_port, pub_port in zip(self.priv_ports, self.pub_ports):
+ priv_intf = interfaces[priv_port]["virtual-interface"]
+ pub_intf = interfaces[pub_port]["virtual-interface"]
+
+ dst_port0_ip = priv_intf["dst_ip"]
+ dst_port1_ip = pub_intf["dst_ip"]
+ dst_port0_mac = priv_intf["dst_mac"]
+ dst_port1_mac = pub_intf["dst_mac"]
+
+ rules.add_firewall_script(dst_port0_ip)
+ rules.next_pipeline()
+ rules.add_flow_classification_script()
+ rules.next_pipeline()
+ rules.add_flow_action()
+ rules.next_pipeline()
+ rules.add_flow_action2()
+ rules.next_pipeline()
+ rules.add_route_script(dst_port1_ip, dst_port1_mac)
+ rules.next_pipeline()
+ rules.add_route_script2(dst_port0_ip, dst_port0_mac)
+ rules.next_pipeline(num=4)
+
+ return rules.get_string()
+
+
+class VpeApproxSetupEnvHelper(DpdkVnfSetupEnvHelper):
+
+ CFG_CONFIG = "/tmp/vpe_config"
+ CFG_SCRIPT = "/tmp/vpe_script"
+ CORES = ['0', '1', '2', '3', '4', '5']
+ PIPELINE_COMMAND = VPE_PIPELINE_COMMAND
+
+ def build_config(self):
+ vpe_vars = {
+ "bin_path": self.ssh_helper.bin_path,
+ "socket": self.socket,
+ }
+
+ all_ports = []
+ priv_ports = []
+ pub_ports = []
+ for interface in self.vnfd_helper.interfaces:
+ all_ports.append(interface['name'])
+ vld_id = interface['virtual-interface']['vld_id']
+ if vld_id.startswith('private'):
+ priv_ports.append(interface)
+ elif vld_id.startswith('public'):
+ pub_ports.append(interface)
+
+ vpe_conf = ConfigCreate(priv_ports, pub_ports, self.socket)
+ vpe_conf.create_vpe_config(self.scenario_helper.vnf_cfg)
+
+ config_basename = posixpath.basename(self.CFG_CONFIG)
+ script_basename = posixpath.basename(self.CFG_SCRIPT)
+ with open(self.CFG_CONFIG) as handle:
+ vpe_config = handle.read()
+
+ self.ssh_helper.upload_config_file(config_basename, vpe_config.format(**vpe_vars))
+
+ vpe_script = vpe_conf.generate_vpe_script(self.vnfd_helper.interfaces)
+ self.ssh_helper.upload_config_file(script_basename, vpe_script.format(**vpe_vars))
+
+
+class VpeApproxVnf(SampleVNF):
""" This class handles vPE VNF model-driver definitions """
- def __init__(self, vnfd):
- super(VpeApproxVnf, self).__init__(vnfd)
- self.socket = None
- self.q_in = Queue()
- self.q_out = Queue()
- self.vnf_cfg = None
- self._vnf_process = None
- self.connection = None
- self.resource = None
-
- def _resource_collect_start(self):
- self.resource.initiate_systemagent(self.bin_path)
- self.resource.start()
+ APP_NAME = 'vPE_vnf'
+ APP_WORD = 'vpe'
+ COLLECT_KPI = VPE_COLLECT_KPI
+ WAIT_TIME = 20
- def _resource_collect_stop(self):
- self.resource.stop()
+ def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
+ if setup_env_helper_type is None:
+ setup_env_helper_type = VpeApproxSetupEnvHelper
- def _collect_resource_kpi(self):
- result = {}
+ super(VpeApproxVnf, self).__init__(name, vnfd, setup_env_helper_type, resource_helper_type)
- status = self.resource.check_if_sa_running("collectd")[0]
- if status:
- result = self.resource.amqp_collect_nfvi_kpi()
-
- result = {"core": result}
-
- return result
-
- @classmethod
- def __setup_hugepages(cls, connection):
- hugepages = \
- connection.execute(
- "awk '/Hugepagesize/ { print $2$3 }' < /proc/meminfo")[1]
- hugepages = hugepages.rstrip()
-
- memory_path = \
- '/sys/kernel/mm/hugepages/hugepages-%s/nr_hugepages' % hugepages
- connection.execute("awk -F: '{ print $1 }' < %s" % memory_path)
-
- pages = 16384 if hugepages.rstrip() == "2048kB" else 16
- connection.execute("echo %s > %s" % (pages, memory_path))
-
- def setup_vnf_environment(self, connection):
- ''' setup dpdk environment needed for vnf to run '''
-
- self.__setup_hugepages(connection)
- connection.execute("modprobe uio && modprobe igb_uio")
-
- exit_status = connection.execute("lsmod | grep -i igb_uio")[0]
- if exit_status == 0:
- return
-
- dpdk = os.path.join(self.bin_path, "dpdk-16.07")
- dpdk_setup = \
- provision_tool(self.connection,
- os.path.join(self.bin_path, "nsb_setup.sh"))
- status = connection.execute("ls {} >/dev/null 2>&1".format(dpdk))[0]
- if status:
- connection.execute("bash %s dpdk >/dev/null 2>&1" % dpdk_setup)
-
- def _get_cpu_sibling_list(self):
- cpu_topo = []
- for core in CORES:
- sys_cmd = \
- "/sys/devices/system/cpu/cpu%s/topology/thread_siblings_list" \
- % core
- cpuid = \
- self.connection.execute("awk -F: '{ print $1 }' < %s" %
- sys_cmd)[1]
- cpu_topo += \
- [(idx) if idx.isdigit() else idx for idx in cpuid.split(',')]
-
- return [cpu.strip() for cpu in cpu_topo]
-
- def scale(self, flavor=""):
- ''' scale vnfbased on flavor input '''
- super(VpeApproxVnf, self).scale(flavor)
-
- def instantiate(self, scenario_cfg, context_cfg):
- vnf_cfg = scenario_cfg['vnf_options']['vpe']['cfg']
-
- mgmt_interface = self.vnfd["mgmt-interface"]
- self.connection = ssh.SSH.from_node(mgmt_interface)
-
- self.tc_file_name = '{0}.yaml'.format(scenario_cfg['tc'])
-
- self.setup_vnf_environment(self.connection)
-
- cores = self._get_cpu_sibling_list()
- self.resource = ResourceProfile(self.vnfd, cores)
-
- self.connection.execute("pkill vPE_vnf")
- dpdk_nic_bind = \
- provision_tool(self.connection,
- os.path.join(self.bin_path, "dpdk_nic_bind.py"))
-
- interfaces = self.vnfd["vdu"][0]['external-interface']
- self.socket = \
- next((0 for v in interfaces
- if v['virtual-interface']["vpci"][5] == "0"), 1)
-
- bound_pci = [v['virtual-interface']["vpci"] for v in interfaces]
- for vpci in bound_pci:
- self.connection.execute(
- "%s --force -b igb_uio %s" % (dpdk_nic_bind, vpci))
- queue_wrapper = \
- QueueFileWrapper(self.q_in, self.q_out, "pipeline>")
- self._vnf_process = multiprocessing.Process(target=self._run_vpe,
- args=(queue_wrapper,
- vnf_cfg,))
- self._vnf_process.start()
- buf = []
- time.sleep(WAIT_TIME) # Give some time for config to load
- while True:
- message = ''
- while self.q_out.qsize() > 0:
- buf.append(self.q_out.get())
- message = ''.join(buf)
- if "pipeline>" in message:
- LOG.info("VPE VNF is up and running.")
- queue_wrapper.clear()
- self._resource_collect_start()
- return self._vnf_process.exitcode
- if "PANIC" in message:
- raise RuntimeError("Error starting vPE VNF.")
-
- LOG.info("Waiting for VNF to start.. ")
- time.sleep(3)
- if not self._vnf_process.is_alive():
- raise RuntimeError("vPE VNF process died.")
-
- def _get_ports_gateway(self, name):
- if 'routing_table' in self.vnfd['vdu'][0]:
- routing_table = self.vnfd['vdu'][0]['routing_table']
-
- for route in routing_table:
- if name == route['if']:
- return route['gateway']
-
- def terminate(self):
- self.execute_command("quit")
- if self._vnf_process:
- self._vnf_process.terminate()
-
- def _run_vpe(self, filewrapper, vnf_cfg):
- mgmt_interface = self.vnfd["mgmt-interface"]
-
- self.connection = ssh.SSH.from_node(mgmt_interface)
- self.connection.wait()
-
- interfaces = self.vnfd["vdu"][0]['external-interface']
- port0_ip = ipaddress.ip_interface(six.text_type(
- "%s/%s" % (interfaces[0]["virtual-interface"]["local_ip"],
- interfaces[0]["virtual-interface"]["netmask"])))
- port1_ip = ipaddress.ip_interface(six.text_type(
- "%s/%s" % (interfaces[1]["virtual-interface"]["local_ip"],
- interfaces[1]["virtual-interface"]["netmask"])))
- dst_port0_ip = ipaddress.ip_interface(
- u"%s/%s" % (interfaces[0]["virtual-interface"]["dst_ip"],
- interfaces[0]["virtual-interface"]["netmask"]))
- dst_port1_ip = ipaddress.ip_interface(
- u"%s/%s" % (interfaces[1]["virtual-interface"]["dst_ip"],
- interfaces[1]["virtual-interface"]["netmask"]))
-
- vpe_vars = {"port0_local_ip": port0_ip.ip.exploded,
- "port0_dst_ip": dst_port0_ip.ip.exploded,
- "port0_local_ip_hex":
- self._ip_to_hex(port0_ip.ip.exploded),
- "port0_prefixlen": port0_ip.network.prefixlen,
- "port0_netmask": port0_ip.network.netmask.exploded,
- "port0_netmask_hex":
- self._ip_to_hex(port0_ip.network.netmask.exploded),
- "port0_local_mac":
- interfaces[0]["virtual-interface"]["local_mac"],
- "port0_dst_mac":
- interfaces[0]["virtual-interface"]["dst_mac"],
- "port0_gateway":
- self._get_ports_gateway(interfaces[0]["name"]),
- "port0_local_network":
- port0_ip.network.network_address.exploded,
- "port0_prefix": port0_ip.network.prefixlen,
- "port1_local_ip": port1_ip.ip.exploded,
- "port1_dst_ip": dst_port1_ip.ip.exploded,
- "port1_local_ip_hex":
- self._ip_to_hex(port1_ip.ip.exploded),
- "port1_prefixlen": port1_ip.network.prefixlen,
- "port1_netmask": port1_ip.network.netmask.exploded,
- "port1_netmask_hex":
- self._ip_to_hex(port1_ip.network.netmask.exploded),
- "port1_local_mac":
- interfaces[1]["virtual-interface"]["local_mac"],
- "port1_dst_mac":
- interfaces[1]["virtual-interface"]["dst_mac"],
- "port1_gateway":
- self._get_ports_gateway(interfaces[1]["name"]),
- "port1_local_network":
- port1_ip.network.network_address.exploded,
- "port1_prefix": port1_ip.network.prefixlen,
- "port0_local_ip6": self._get_port0localip6(),
- "port1_local_ip6": self._get_port1localip6(),
- "port0_prefixlen6": self._get_port0prefixlen6(),
- "port1_prefixlen6": self._get_port1prefixlen6(),
- "port0_gateway6": self._get_port0gateway6(),
- "port1_gateway6": self._get_port1gateway6(),
- "port0_dst_ip_hex6": self._get_port0localip6(),
- "port1_dst_ip_hex6": self._get_port1localip6(),
- "port0_dst_netmask_hex6": self._get_port0prefixlen6(),
- "port1_dst_netmask_hex6": self._get_port1prefixlen6(),
- "bin_path": self.bin_path,
- "socket": self.socket}
-
- for cfg in os.listdir(vnf_cfg):
- vpe_config = ""
- with open(os.path.join(vnf_cfg, cfg), 'r') as vpe_cfg:
- vpe_config = vpe_cfg.read()
-
- self._provide_config_file(cfg, vpe_config, vpe_vars)
-
- LOG.info("Provision and start the vPE")
- tool_path = provision_tool(self.connection,
- os.path.join(self.bin_path, "vPE_vnf"))
- cmd = VPE_PIPELINE_COMMAND.format(cfg_file="/tmp/vpe_config",
- script="/tmp/vpe_script",
- tool_path=tool_path)
- self.connection.run(cmd, stdin=filewrapper, stdout=filewrapper,
- keep_stdin_open=True, pty=True)
-
- def _provide_config_file(self, prefix, template, args):
- cfg, cfg_content = tempfile.mkstemp()
- cfg = os.fdopen(cfg, "w+")
- cfg.write(template.format(**args))
- cfg.close()
- cfg_file = "/tmp/%s" % prefix
- self.connection.put(cfg_content, cfg_file)
- return cfg_file
-
- def execute_command(self, cmd):
- ''' send cmd to vnf process '''
- LOG.info("VPE command: %s", cmd)
- output = []
- if self.q_in:
- self.q_in.put(cmd + "\r\n")
- time.sleep(3)
- while self.q_out.qsize() > 0:
- output.append(self.q_out.get())
- return "".join(output)
+ def get_stats(self, *args, **kwargs):
+ raise NotImplementedError
def collect_kpi(self):
- result = self.get_stats_vpe()
- collect_stats = self._collect_resource_kpi()
- result["collect_stats"] = collect_stats
- LOG.debug("vPE collet Kpis: %s", result)
- return result
-
- def get_stats_vpe(self):
- ''' get vpe statistics '''
- result = {'pkt_in_up_stream': 0, 'pkt_drop_up_stream': 0,
- 'pkt_in_down_stream': 0, 'pkt_drop_down_stream': 0}
- up_stat_commands = ['p 5 stats port in 0', 'p 5 stats port out 0',
- 'p 5 stats port out 1']
- down_stat_commands = ['p 9 stats port in 0', 'p 9 stats port out 0']
- pattern = \
- "Pkts in:\\s(\\d+)\\r\\n\\tPkts dropped by " \
- "AH:\\s(\\d+)\\r\\n\\tPkts dropped by other:\\s(\\d+)"
-
- for cmd in up_stat_commands:
- stats = self.execute_command(cmd)
- match = re.search(pattern, stats, re.MULTILINE)
- if match:
- result["pkt_in_up_stream"] = \
- result.get("pkt_in_up_stream", 0) + int(match.group(1))
- result["pkt_drop_up_stream"] = \
- result.get("pkt_drop_up_stream", 0) + \
- int(match.group(2)) + int(match.group(3))
-
- for cmd in down_stat_commands:
- stats = self.execute_command(cmd)
- match = re.search(pattern, stats, re.MULTILINE)
- if match:
- result["pkt_in_down_stream"] = \
- result.get("pkt_in_down_stream", 0) + int(match.group(1))
- result["pkt_drop_down_stream"] = \
- result.get("pkt_drop_down_stream", 0) + \
- int(match.group(2)) + int(match.group(3))
+ result = {
+ 'pkt_in_up_stream': 0,
+ 'pkt_drop_up_stream': 0,
+ 'pkt_in_down_stream': 0,
+ 'pkt_drop_down_stream': 0,
+ 'collect_stats': self.resource_helper.collect_kpi(),
+ }
+
+ indexes_in = [1]
+ indexes_drop = [2, 3]
+ command = 'p {0} stats port {1} 0'
+ for index, direction in ((5, 'up'), (9, 'down')):
+ key_in = "pkt_in_{0}_stream".format(direction)
+ key_drop = "pkt_drop_{0}_stream".format(direction)
+ for mode in ('in', 'out'):
+ stats = self.vnf_execute(command.format(index, mode))
+ match = re.search(self.COLLECT_KPI, stats, re.MULTILINE)
+ if not match:
+ continue
+ result[key_in] += sum(int(match.group(x)) for x in indexes_in)
+ result[key_drop] += sum(int(match.group(x)) for x in indexes_drop)
+
+ LOG.debug("%s collect KPIs %s", self.APP_NAME, result)
return result
diff --git a/yardstick/network_services/vnf_generic/vnfdgen.py b/yardstick/network_services/vnf_generic/vnfdgen.py
index b56a91915..0120b493e 100644
--- a/yardstick/network_services/vnf_generic/vnfdgen.py
+++ b/yardstick/network_services/vnf_generic/vnfdgen.py
@@ -14,11 +14,16 @@
""" Generic file to map and build vnf discriptor """
from __future__ import absolute_import
-import collections
+from functools import reduce
import jinja2
+import logging
import yaml
+from yardstick.common.utils import try_int
+
+LOG = logging.getLogger(__name__)
+
def render(vnf_model, **kwargs):
"""Render jinja2 VNF template
@@ -40,7 +45,8 @@ def generate_vnfd(vnf_model, node):
as input for GenericVNF.__init__
"""
# get is unused as global method inside template
- node["get"] = get
+ # node["get"] = key_flatten_get
+ node["get"] = deepgetitem
# Set Node details to default if not defined in pod file
# we CANNOT use TaskTemplate.render because it does not allow
# for missing variables, we need to allow password for key_filename
@@ -52,36 +58,34 @@ def generate_vnfd(vnf_model, node):
return filled_vnfd
-def dict_key_flatten(data):
- """ Convert nested dict structure to dotted key
- (e.g. {"a":{"b":1}} -> {"a.b":1}
-
- :param data: nested dictionary
- :return: flat dicrionary
- """
- next_data = {}
-
- # check for non-string iterables
- if not any((isinstance(v, collections.Iterable) and not isinstance(v, str))
- for v in data.values()):
- return data
+# dict_flatten was causing recursion errors with Jinja2 so we removed and replaced
+# which this function from stackoverflow that doesn't require generating entire dictionaries
+# each time we query a key
+def deepgetitem(obj, item, default=None):
+ """Steps through an item chain to get the ultimate value.
- for key, val in data.items():
- if isinstance(val, collections.Mapping):
- for n_k, n_v in val.items():
- next_data["%s.%s" % (key, n_k)] = n_v
- elif isinstance(val, collections.Iterable) and not isinstance(val,
- str):
- for index, item in enumerate(val):
- next_data["%s%d" % (key, index)] = item
- else:
- next_data[key] = val
+ If ultimate value or path to value does not exist, does not raise
+ an exception and instead returns `fallback`.
- return dict_key_flatten(next_data)
+ Based on
+ https://stackoverflow.com/a/38623359
+ https://stackoverflow.com/users/1820042/donny-winston
+ add try_int to work with sequences
-def get(obj, key, *args):
- """ Get template key from dictionary, get default value or raise an exception
+ >>> d = {'snl_final': {'about': {'_icsd': {'icsd_id': 1, 'fr': [2, 3]}}}}
+ >>> deepgetitem(d, 'snl_final.about._icsd.icsd_id')
+ 1
+ >>> deepgetitem(d, 'snl_final.about._sandbox.sbx_id')
+ >>>
+ >>> deepgetitem(d, 'snl_final.about._icsd.fr.1')
+ 3
"""
- data = dict_key_flatten(obj)
- return data.get(key, *args)
+ def getitem(obj, name):
+ # if integer then list index
+ name = try_int(name)
+ try:
+ return obj[name]
+ except (KeyError, TypeError, IndexError):
+ return default
+ return reduce(getitem, item.split('.'), obj)
diff --git a/yardstick/network_services/yang_model.py b/yardstick/network_services/yang_model.py
new file mode 100644
index 000000000..fbf224bd8
--- /dev/null
+++ b/yardstick/network_services/yang_model.py
@@ -0,0 +1,107 @@
+# Copyright (c) 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.
+
+from __future__ import absolute_import
+from __future__ import print_function
+import logging
+import ipaddress
+import yaml
+import six
+
+LOG = logging.getLogger(__name__)
+
+
+class YangModel(object):
+
+ RULE_TEMPLATE = "p acl add 1 {0} {1} {2} {3} {4} {5} {6} {7} 0 0 {8}"
+
+ def __init__(self, config_file):
+ super(YangModel, self).__init__()
+ self._config_file = config_file
+ self._options = {}
+ self._rules = ''
+
+ @property
+ def config_file(self):
+ return self._config_file
+
+ @config_file.setter
+ def config_file(self, value):
+ self._config_file = value
+ self._options = {}
+ self._rules = ''
+
+ def _read_config(self):
+ # TODO: add some error handling in case of empty or non-existing file
+ try:
+ with open(self._config_file) as f:
+ self._options = yaml.safe_load(f)
+ except Exception as e:
+ LOG.exception("Failed to load the yaml %s", e)
+ raise
+
+ def _get_entries(self):
+ if not self._options:
+ return ''
+
+ rule_list = []
+ for ace in self._options['access-list1']['acl']['access-list-entries']:
+ # TODO: resolve ports using topology file and nodes'
+ # ids: public or private.
+ matches = ace['ace']['matches']
+ dst_ipv4_net = matches['destination-ipv4-network']
+ dst_ipv4_net_ip = ipaddress.ip_interface(six.text_type(dst_ipv4_net))
+ port0_local_network = dst_ipv4_net_ip.network.network_address.exploded
+ port0_prefix = dst_ipv4_net_ip.network.prefixlen
+
+ src_ipv4_net = matches['source-ipv4-network']
+ src_ipv4_net_ip = ipaddress.ip_interface(six.text_type(src_ipv4_net))
+ port1_local_network = src_ipv4_net_ip.network.network_address.exploded
+ port1_prefix = src_ipv4_net_ip.network.prefixlen
+
+ lower_dport = matches['destination-port-range']['lower-port']
+ upper_dport = matches['destination-port-range']['upper-port']
+
+ lower_sport = matches['source-port-range']['lower-port']
+ upper_sport = matches['source-port-range']['upper-port']
+
+ # TODO: proto should be read from file also.
+ # Now all rules in sample ACL file are TCP.
+ rule_list.append('') # get an extra new line
+ rule_list.append(self.RULE_TEMPLATE.format(port0_local_network,
+ port0_prefix,
+ port1_local_network,
+ port1_prefix,
+ lower_dport,
+ upper_dport,
+ lower_sport,
+ upper_sport,
+ 0))
+ rule_list.append(self.RULE_TEMPLATE.format(port1_local_network,
+ port1_prefix,
+ port0_local_network,
+ port0_prefix,
+ lower_sport,
+ upper_sport,
+ lower_dport,
+ upper_dport,
+ 1))
+
+ self._rules = '\n'.join(rule_list)
+
+ def get_rules(self):
+ if not self._rules:
+ self._read_config()
+ self._get_entries()
+ return self._rules
diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py
index bf6593d45..c21a47473 100644
--- a/yardstick/orchestrator/heat.py
+++ b/yardstick/orchestrator/heat.py
@@ -316,7 +316,9 @@ name (i.e. %s).\
'enable_dhcp': enable_dhcp,
}
}
- if gateway_ip is not None:
+ if gateway_ip == 'null':
+ self.resources[name]['properties']['gateway_ip'] = None
+ elif gateway_ip is not None:
self.resources[name]['properties']['gateway_ip'] = gateway_ip
self._template['outputs'][name] = {
diff --git a/yardstick/ssh.py b/yardstick/ssh.py
index cf9adf0dc..8ac3eaa3a 100644
--- a/yardstick/ssh.py
+++ b/yardstick/ssh.py
@@ -77,8 +77,8 @@ from oslo_utils import encodeutils
from scp import SCPClient
import six
-
-SSH_PORT = paramiko.config.SSH_PORT
+from yardstick.common.utils import try_int
+from yardstick.network_services.utils import provision_tool
class SSHError(Exception):
@@ -92,7 +92,26 @@ class SSHTimeout(SSHError):
class SSH(object):
"""Represent ssh connection."""
- def __init__(self, user, host, port=SSH_PORT, pkey=None,
+ SSH_PORT = paramiko.config.SSH_PORT
+
+ @staticmethod
+ def gen_keys(key_filename, bit_count=2048):
+ rsa_key = paramiko.RSAKey.generate(bits=bit_count, progress_func=None)
+ rsa_key.write_private_key_file(key_filename)
+ print("Writing %s ..." % key_filename)
+ with open('.'.join([key_filename, "pub"]), "w") as pubkey_file:
+ pubkey_file.write(rsa_key.get_name())
+ pubkey_file.write(' ')
+ pubkey_file.write(rsa_key.get_base64())
+ pubkey_file.write('\n')
+
+ @staticmethod
+ def get_class():
+ # must return static class name, anything else refers to the calling class
+ # i.e. the subclass, not the superclass
+ return SSH
+
+ def __init__(self, user, host, port=None, pkey=None,
key_filename=None, password=None, name=None):
"""Initialize SSH client.
@@ -115,7 +134,7 @@ class SSH(object):
self.log.debug("user:%s host:%s", user, host)
# we may get text port from YAML, convert to int
- self.port = int(port)
+ self.port = try_int(port, self.SSH_PORT)
self.pkey = self._get_pkey(pkey) if pkey else None
self.password = password
self.key_filename = key_filename
@@ -129,21 +148,25 @@ class SSH(object):
logging.getLogger("paramiko").setLevel(logging.WARN)
@classmethod
- def from_node(cls, node, overrides=None, defaults=None):
+ def args_from_node(cls, node, overrides=None, defaults=None):
if overrides is None:
overrides = {}
if defaults is None:
defaults = {}
params = ChainMap(overrides, node, defaults)
- return cls(
- user=params['user'],
- host=params['ip'],
- # paramiko doesn't like None default, requires SSH_PORT default
- port=params.get('ssh_port', SSH_PORT),
- pkey=params.get('pkey'),
- key_filename=params.get('key_filename'),
- password=params.get('password'),
- name=params.get('name'))
+ return {
+ 'user': params['user'],
+ 'host': params['ip'],
+ 'port': params.get('ssh_port', cls.SSH_PORT),
+ 'pkey': params.get('pkey'),
+ 'key_filename': params.get('key_filename'),
+ 'password': params.get('password'),
+ 'name': params.get('name'),
+ }
+
+ @classmethod
+ def from_node(cls, node, overrides=None, defaults=None):
+ return cls(**cls.args_from_node(node, overrides, defaults))
def _get_pkey(self, key):
if isinstance(key, six.string_types):
@@ -156,8 +179,12 @@ class SSH(object):
errors.append(e)
raise SSHError("Invalid pkey: %s" % (errors))
+ @property
+ def is_connected(self):
+ return bool(self._client)
+
def _get_client(self):
- if self._client:
+ if self.is_connected:
return self._client
try:
self._client = paramiko.SSHClient()
@@ -176,9 +203,24 @@ class SSH(object):
raise SSHError(message % {"exception": e,
"exception_type": type(e)})
+ def _make_dict(self):
+ return {
+ 'user': self.user,
+ 'host': self.host,
+ 'port': self.port,
+ 'pkey': self.pkey,
+ 'key_filename': self.key_filename,
+ 'password': self.password,
+ 'name': self.name,
+ }
+
+ def copy(self):
+ return self.get_class()(**self._make_dict())
+
def close(self):
- self._client.close()
- self._client = False
+ if self._client:
+ self._client.close()
+ self._client = False
def run(self, cmd, stdin=None, stdout=None, stderr=None,
raise_on_error=True, timeout=3600,
@@ -308,7 +350,7 @@ class SSH(object):
timeout=timeout, raise_on_error=False)
stdout.seek(0)
stderr.seek(0)
- return (exit_status, stdout.read(), stderr.read())
+ return exit_status, stdout.read(), stderr.read()
def wait(self, timeout=120, interval=1):
"""Wait for the host will be available via ssh."""
@@ -369,3 +411,72 @@ class SSH(object):
self._put_file_sftp(localpath, remotepath, mode=mode)
except (paramiko.SSHException, socket.error):
self._put_file_shell(localpath, remotepath, mode=mode)
+
+ def provision_tool(self, tool_path, tool_file=None):
+ return provision_tool(self, tool_path, tool_file)
+
+ def put_file_obj(self, file_obj, remotepath, mode=None):
+ client = self._get_client()
+
+ with client.open_sftp() as sftp:
+ sftp.putfo(file_obj, remotepath)
+ if mode is not None:
+ sftp.chmod(remotepath, mode)
+
+
+class AutoConnectSSH(SSH):
+
+ def __init__(self, user, host, port=None, pkey=None,
+ key_filename=None, password=None, name=None, wait=False):
+ super(AutoConnectSSH, self).__init__(user, host, port, pkey, key_filename, password, name)
+ self._wait = wait
+
+ def _make_dict(self):
+ data = super(AutoConnectSSH, self)._make_dict()
+ data.update({
+ 'wait': self._wait
+ })
+ return data
+
+ def _connect(self):
+ if not self.is_connected:
+ self._get_client()
+ if self._wait:
+ self.wait()
+
+ def drop_connection(self):
+ """ Don't close anything, just force creation of a new client """
+ self._client = False
+
+ def execute(self, cmd, stdin=None, timeout=3600):
+ self._connect()
+ return super(AutoConnectSSH, self).execute(cmd, stdin, timeout)
+
+ def run(self, cmd, stdin=None, stdout=None, stderr=None,
+ raise_on_error=True, timeout=3600,
+ keep_stdin_open=False, pty=False):
+ self._connect()
+ return super(AutoConnectSSH, self).run(cmd, stdin, stdout, stderr, raise_on_error,
+ timeout, keep_stdin_open, pty)
+
+ def put(self, files, remote_path=b'.', recursive=False):
+ self._connect()
+ return super(AutoConnectSSH, self).put(files, remote_path, recursive)
+
+ def put_file(self, local_path, remote_path, mode=None):
+ self._connect()
+ return super(AutoConnectSSH, self).put_file(local_path, remote_path, mode)
+
+ def put_file_obj(self, file_obj, remote_path, mode=None):
+ self._connect()
+ return super(AutoConnectSSH, self).put_file_obj(file_obj, remote_path, mode)
+
+ def provision_tool(self, tool_path, tool_file=None):
+ self._connect()
+ return super(AutoConnectSSH, self).provision_tool(tool_path, tool_file)
+
+ @staticmethod
+ def get_class():
+ # must return static class name, anything else refers to the calling class
+ # i.e. the subclass, not the superclass
+ return AutoConnectSSH