diff options
291 files changed, 25674 insertions, 16547 deletions
diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py index 8943db3d1..8367fa9eb 100644 --- a/api/resources/v1/env.py +++ b/api/resources/v1/env.py @@ -393,7 +393,7 @@ class V1Env(ApiResource): return result_handler(consts.API_ERROR, 'file must be provided') LOG.info('Checking file') - data = yaml.load(pod_file.read()) + data = yaml.safe_load(pod_file.read()) if not isinstance(data, collections.Mapping): return result_handler(consts.API_ERROR, 'invalid yaml file') diff --git a/api/resources/write_hosts.py b/api/resources/write_hosts.py index e4b69846b..a3025d3b0 100644 --- a/api/resources/write_hosts.py +++ b/api/resources/write_hosts.py @@ -13,11 +13,19 @@ import json def write_hosts(hosts_ip): - hosts_list = ('\n{} {}'.format(ip, host_name) + + yardstick_flag = "# SUT hosts info for Yardstick" + hosts_list = ('\n{} {} {}'.format(ip, host_name, yardstick_flag) for host_name, ip in hosts_ip.items()) - with open("/etc/hosts", 'a') as f: + + with open("/etc/hosts", 'r') as f: + origin_lines = [line for line in f if yardstick_flag not in line] + + with open("/etc/hosts", 'w') as f: + f.writelines(origin_lines) + f.write(yardstick_flag) f.writelines(hosts_list) - f.write("\n") + if __name__ == "__main__": write_hosts(json.load(sys.stdin)) diff --git a/docs/release/release-notes/release-notes.rst b/docs/release/release-notes/release-notes.rst index 6d55ada86..bd65c0725 100644 --- a/docs/release/release-notes/release-notes.rst +++ b/docs/release/release-notes/release-notes.rst @@ -7,9 +7,8 @@ are licensed under a Creative Commons Attribution 4.0 International License. You should have received a copy of the license along with this. If not, see <http://creativecommons.org/licenses/by/4.0/>. -The *Yardstick framework*, the *Yardstick test cases* and the *ApexLake* -experimental framework are opensource software, licensed under the terms of the -Apache License, Version 2.0. +The *Yardstick framework*, the *Yardstick test cases* are opensource software, + licensed under the terms of the Apache License, Version 2.0. ========================================= OPNFV Danube Release Note for Yardstick @@ -306,20 +305,6 @@ Software Deliverables +---------------------+-------------------------------------------------------+ -**API to Other Frameworks** - -+---------------------+-------------------------------------------------------+ -| **Framework** | **Description** | -| | | -+---------------------+-------------------------------------------------------+ -| *ApexLake* | Experimental framework that enables the user to | -| | validate NFVI from the perspective of a VNF. | -| | A virtual Traffic Classifier is utilized as VNF. | -| | Enables experiments with SR-IOV on Compute Node. | -| | | -+---------------------+-------------------------------------------------------+ - - **Test Results Output** +-----------------------------+-----------------------------------------------+ diff --git a/docs/testing/user/userguide/01-introduction.rst b/docs/testing/user/userguide/01-introduction.rst index 63d0d9883..c1d5def98 100755 --- a/docs/testing/user/userguide/01-introduction.rst +++ b/docs/testing/user/userguide/01-introduction.rst @@ -21,8 +21,6 @@ of a Virtual Network Function (:term:`VNF`). The Project's scope is the development of a test framework, *Yardstick*, test cases and test stimuli to enable Network Function Virtualization Infrastructure (:term:`NFVI`) verification. -The Project also includes a sample :term:`VNF`, the Virtual Traffic Classifier -(:term:`VTC`) and its experimental framework, *ApexLake* ! *Yardstick* is used in OPNFV for verifying the OPNFV infrastructure and some of the OPNFV features. The *Yardstick* framework is deployed in several OPNFV @@ -67,12 +65,6 @@ This document consists of the following chapters: * Chapter :doc:`10-vtc-overview` provides information on the :term:`VTC`. -* Chapter :doc:`11-apexlake_installation` provides instructions to install the - experimental framework *ApexLake* - -* Chapter :doc:`12-apexlake_api` explains how this framework is integrated in - *Yardstick*. - * Chapter :doc:`13-nsb-overview` describes the methodology implemented by the Yardstick - Network service benchmarking to test real world usecase for a given VNF. diff --git a/docs/testing/user/userguide/11-apexlake_installation.rst b/docs/testing/user/userguide/11-apexlake_installation.rst deleted file mode 100644 index 0d8ef143f..000000000 --- a/docs/testing/user/userguide/11-apexlake_installation.rst +++ /dev/null @@ -1,302 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International -.. License. -.. http://creativecommons.org/licenses/by/4.0 -.. (c) OPNFV, Intel Corporation and others. - - -.. _DPDK: http://dpdk.org/doc/nics -.. _DPDK-pktgen: https://github.com/Pktgen/Pktgen-DPDK/ -.. _SRIOV: https://wiki.openstack.org/wiki/SR-IOV-Passthrough-For-Networking -.. _PORTSEC: https://wiki.openstack.org/wiki/Neutron/ML2PortSecurityExtensionDriver -.. _here: https://wiki.opnfv.org/vtc - - -============================ -Apexlake Installation Guide -============================ - -Abstract --------- - -ApexLake is a framework that provides automatic execution of experiments and -related data collection to enable a user validate infrastructure from the -perspective of a Virtual Network Function (:term:`VNF`). - -In the context of Yardstick, a virtual Traffic Classifier (:term:`VTC`) network -function is utilized. - - -Framework Hardware Dependencies -=============================== - -In order to run the framework there are some hardware related dependencies for -ApexLake. - -The framework needs to be installed on the same physical node where DPDK-pktgen_ -is installed. - -The installation requires the physical node hosting the packet generator must -have 2 NICs which are DPDK_ compatible. - -The 2 NICs will be connected to the switch where the OpenStack VM -network is managed. - -The switch used must support multicast traffic and :term:`IGMP` snooping. -Further details about the configuration are provided at the following here_. - -The corresponding ports to which the cables are connected need to be configured -as VLAN trunks using two of the VLAN IDs available for Neutron. -Note the VLAN IDs used as they will be required in later configuration steps. - - -Framework Software Dependencies -=============================== -Before starting the framework, a number of dependencies must first be installed. -The following describes the set of instructions to be executed via the Linux -shell in order to install and configure the required dependencies. - -1. Install Dependencies. - -To support the framework dependencies the following packages must be installed. -The example provided is based on Ubuntu and needs to be executed in root mode. - -:: - - apt-get install python-dev - apt-get install python-pip - apt-get install python-mock - apt-get install tcpreplay - apt-get install libpcap-dev - -2. Source OpenStack openrc file. - -:: - - source openrc - -3. Configure Openstack Neutron - -In order to support traffic generation and management by the virtual -Traffic Classifier, the configuration of the port security driver -extension is required for Neutron. - -For further details please follow the following link: PORTSEC_ -This step can be skipped in case the target OpenStack is Juno or Kilo release, -but it is required to support Liberty. -It is therefore required to indicate the release version in the configuration -file located in ./yardstick/vTC/apexlake/apexlake.conf - - -4. Create Two Networks based on VLANs in Neutron. - -To enable network communications between the packet generator and the compute -node, two networks must be created via Neutron and mapped to the VLAN IDs -that were previously used in the configuration of the physical switch. -The following shows the typical set of commands required to configure Neutron -correctly. -The physical switches need to be configured accordingly. - -:: - - VLAN_1=2032 - VLAN_2=2033 - PHYSNET=physnet2 - neutron net-create apexlake_inbound_network \ - --provider:network_type vlan \ - --provider:segmentation_id $VLAN_1 \ - --provider:physical_network $PHYSNET - - neutron subnet-create apexlake_inbound_network \ - 192.168.0.0/24 --name apexlake_inbound_subnet - - neutron net-create apexlake_outbound_network \ - --provider:network_type vlan \ - --provider:segmentation_id $VLAN_2 \ - --provider:physical_network $PHYSNET - - neutron subnet-create apexlake_outbound_network 192.168.1.0/24 \ - --name apexlake_outbound_subnet - - -5. Download Ubuntu Cloud Image and load it on Glance - -The virtual Traffic Classifier is supported on top of Ubuntu 14.04 cloud image. -The image can be downloaded on the local machine and loaded on Glance -using the following commands: - -:: - - wget cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img - glance image-create \ - --name ubuntu1404 \ - --is-public true \ - --disk-format qcow \ - --container-format bare \ - --file trusty-server-cloudimg-amd64-disk1.img - - - -6. Configure the Test Cases - -The VLAN tags must also be included in the test case Yardstick yaml file -as parameters for the following test cases: - - * :doc:`opnfv_yardstick_tc006` - - * :doc:`opnfv_yardstick_tc007` - - * :doc:`opnfv_yardstick_tc020` - - * :doc:`opnfv_yardstick_tc021` - - -Install and Configure DPDK Pktgen -+++++++++++++++++++++++++++++++++ - -Execution of the framework is based on DPDK Pktgen. -If DPDK Pktgen has not installed, it is necessary to download, install, compile -and configure it. -The user can create a directory and download the dpdk packet generator source -code: - -:: - - cd experimental_framework/libraries - mkdir dpdk_pktgen - git clone https://github.com/pktgen/Pktgen-DPDK.git - -For instructions on the installation and configuration of DPDK and DPDK Pktgen -please follow the official DPDK Pktgen README file. -Once the installation is completed, it is necessary to load the DPDK kernel -driver, as follow: - -:: - - insmod uio - insmod DPDK_DIR/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko - -It is necessary to set the configuration file to support the desired Pktgen -configuration. -A description of the required configuration parameters and supporting examples -is provided in the following: - -:: - - [PacketGen] - packet_generator = dpdk_pktgen - - # This is the directory where the packet generator is installed - # (if the user previously installed dpdk-pktgen, - # it is required to provide the director where it is installed). - pktgen_directory = /home/user/software/dpdk_pktgen/dpdk/examples/pktgen/ - - # This is the directory where DPDK is installed - dpdk_directory = /home/user/apexlake/experimental_framework/libraries/Pktgen-DPDK/dpdk/ - - # Name of the dpdk-pktgen program that starts the packet generator - program_name = app/app/x86_64-native-linuxapp-gcc/pktgen - - # DPDK coremask (see DPDK-Pktgen readme) - coremask = 1f - - # DPDK memory channels (see DPDK-Pktgen readme) - memory_channels = 3 - - # Name of the interface of the pktgen to be used to send traffic (vlan_sender) - name_if_1 = p1p1 - - # Name of the interface of the pktgen to be used to receive traffic (vlan_receiver) - name_if_2 = p1p2 - - # PCI bus address correspondent to if_1 - bus_slot_nic_1 = 01:00.0 - - # PCI bus address correspondent to if_2 - bus_slot_nic_2 = 01:00.1 - - -To find the parameters related to names of the NICs and the addresses of the PCI buses -the user may find it useful to run the :term:`DPDK` tool nic_bind as follows: - -:: - - DPDK_DIR/tools/dpdk_nic_bind.py --status - -Lists the NICs available on the system, and shows the available drivers and bus addresses for each interface. -Please make sure to select NICs which are :term:`DPDK` compatible. - -Installation and Configuration of smcroute -++++++++++++++++++++++++++++++++++++++++++ - -The user is required to install smcroute which is used by the framework to -support multicast communications. - -The following is the list of commands required to download and install smroute. - -:: - - cd ~ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - git reset --hard c3f5c56 - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - sudo make install - cd .. - -It is required to do the reset to the specified commit ID. -It is also requires the creation a configuration file using the following -command: - -:: - - SMCROUTE_NIC=(name of the nic) - -where name of the nic is the name used previously for the variable "name_if_2". -For example: - -:: - - SMCROUTE_NIC=p1p2 - -Then create the smcroute configuration file /etc/smcroute.conf - -:: - - echo mgroup from $SMCROUTE_NIC group 224.192.16.1 > /etc/smcroute.conf - - -At the end of this procedure it will be necessary to perform the following -actions to add the user to the sudoers: - -:: - - adduser USERNAME sudo - echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - - -Experiment using SR-IOV Configuration on the Compute Node -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -To enable :term:`SR-IOV` interfaces on the physical NIC of the compute node, a -compatible NIC is required. -NIC configuration depends on model and vendor. After proper configuration to -support :term:`SR-IOV`, a proper configuration of OpenStack is required. -For further information, please refer to the SRIOV_ configuration guide - -Finalize installation the framework on the system -================================================= - -The installation of the framework on the system requires the setup of the project. -After entering into the apexlake directory, it is sufficient to run the following -command. - -:: - - python setup.py install - -Since some elements are copied into the /tmp directory (see configuration file) -it could be necessary to repeat this step after a reboot of the host. diff --git a/docs/testing/user/userguide/12-apexlake_api.rst b/docs/testing/user/userguide/12-apexlake_api.rst deleted file mode 100644 index 35a1dbe3e..000000000 --- a/docs/testing/user/userguide/12-apexlake_api.rst +++ /dev/null @@ -1,89 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International -.. License. -.. http://creativecommons.org/licenses/by/4.0 -.. (c) OPNFV, Intel Corporation and others. - - -================================= -Apexlake API Interface Definition -================================= - -Abstract --------- - -The API interface provided by the framework to enable the execution of test -cases is defined as follows. - - -init ----- - -**static init()** - - Initializes the Framework - - **Returns** None - - -execute_framework ------------------ - -**static execute_framework** (test_cases, - - iterations, - - heat_template, - - heat_template_parameters, - - deployment_configuration, - - openstack_credentials) - - Executes the framework according the specified inputs - - **Parameters** - - - **test_cases** - - Test cases to be run with the workload (dict() of dict()) - - Example: - test_case = dict() - - test_case[’name’] = ‘module.Class’ - - test_case[’params’] = dict() - - test_case[’params’][’throughput’] = ‘1’ - - test_case[’params’][’vlan_sender’] = ‘1000’ - - test_case[’params’][’vlan_receiver’] = ‘1001’ - - test_cases = [test_case] - - - **iterations** - Number of test cycles to be executed (int) - - - **heat_template** - (string) File name of the heat template corresponding to the workload to be deployed. - It contains the parameters to be evaluated in the form of #parameter_name. - (See heat_templates/vTC.yaml as example). - - - **heat_template_parameters** - (dict) Parameters to be provided as input to the - heat template. See http://docs.openstack.org/developer/heat/ template_guide/hot_guide.html - section “Template input parameters” for further info. - - - **deployment_configuration** - ( dict[string] = list(strings) ) ) Dictionary of parameters - representing the deployment configuration of the workload. - - The key is a string corresponding to the name of the parameter, - the value is a list of strings representing the value to be - assumed by a specific param. The parameters are user defined: - they have to correspond to the place holders (#parameter_name) - specified in the heat template. - - **Returns** dict() containing results diff --git a/docs/testing/user/userguide/comp-intro.rst b/docs/testing/user/userguide/comp-intro.rst index ee68226ad..ad354b66d 100644 --- a/docs/testing/user/userguide/comp-intro.rst +++ b/docs/testing/user/userguide/comp-intro.rst @@ -24,9 +24,6 @@ metrics in the document ETSI GS NFV-TST001_, "Pre-deployment Testing; Report on Validation of NFV Environments and Services" are available; further OPNFV releases will provide extended testing of these metrics. -The Project also includes a sample VNF, the Virtual Traffic Classifier (VTC) -and its experimental framework, *ApexLake*. - *Yardstick* is used in OPNFV for verifying the OPNFV infrastructure and some of the OPNFV features. The *Yardstick* framework is deployed in several OPNFV community labs. It is *installer*, *infrastructure* and *application* diff --git a/docs/testing/user/userguide/index.rst b/docs/testing/user/userguide/index.rst index 8ac1c7bdb..3b55b7f9b 100644 --- a/docs/testing/user/userguide/index.rst +++ b/docs/testing/user/userguide/index.rst @@ -23,8 +23,6 @@ Performance Testing User Guide (Yardstick) 08-api 09-yardstick_user_interface 10-vtc-overview - 11-apexlake_installation - 12-apexlake_api 13-nsb-overview 14-nsb_installation 15-list-of-tcs diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc006.rst b/docs/testing/user/userguide/opnfv_yardstick_tc006.rst deleted file mode 100644 index 2ccb417c1..000000000 --- a/docs/testing/user/userguide/opnfv_yardstick_tc006.rst +++ /dev/null @@ -1,144 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International -.. License. -.. http://creativecommons.org/licenses/by/4.0 -.. (c) OPNFV, Intel Corporation and others. - -************************************* -Yardstick Test Case Description TC006 -************************************* - -.. _DPDKpktgen: https://github.com/Pktgen/Pktgen-DPDK/ -.. _rfc2544: https://www.ietf.org/rfc/rfc2544.txt - -+-----------------------------------------------------------------------------+ -|Network Performance | -| | -+--------------+--------------------------------------------------------------+ -|test case id | OPNFV_YARDSTICK_TC006_Virtual Traffic Classifier Data Plane | -| | Throughput Benchmarking Test. | -| | | -+--------------+--------------------------------------------------------------+ -|metric | Throughput | -| | | -+--------------+--------------------------------------------------------------+ -|test purpose | To measure the throughput supported by the virtual Traffic | -| | Classifier according to the RFC2544 methodology for a | -| | user-defined set of vTC deployment configurations. | -| | | -+--------------+--------------------------------------------------------------+ -|configuration | file: file: opnfv_yardstick_tc006.yaml | -| | | -| | packet_size: size of the packets to be used during the | -| | throughput calculation. | -| | Allowe values: [64, 128, 256, 512, 1024, 1280, 1518] | -| | | -| | vnic_type: type of VNIC to be used. | -| | Allowed values are: | -| | - normal: for default OvS port configuration | -| | - direct: for SR-IOV port configuration | -| | Default value: None | -| | | -| | vtc_flavor: OpenStack flavor to be used for the vTC | -| | Default available values are: m1.small, m1.medium, | -| | and m1.large, but the user can create his/her own | -| | flavor and give it as input | -| | Default value: None | -| | | -| | vlan_sender: vlan tag of the network on which the vTC will | -| | receive traffic (VLAN Network 1). | -| | Allowed values: range (1, 4096) | -| | | -| | vlan_receiver: vlan tag of the network on which the vTC | -| | will send traffic back to the packet generator | -| | (VLAN Network 2). | -| | Allowed values: range (1, 4096) | -| | | -| | default_net_name: neutron name of the defaul network that | -| | is used for access to the internet from the vTC | -| | (vNIC 1). | -| | | -| | default_subnet_name: subnet name for vNIC1 | -| | (information available through Neutron). | -| | | -| | vlan_net_1_name: Neutron Name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_1_name: Subnet Neutron name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_net_2_name: Neutron Name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_2_name: Subnet Neutron name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -+--------------+--------------------------------------------------------------+ -|test tool | DPDK pktgen | -| | | -| | DPDK Pktgen is not part of a Linux distribution, | -| | hence it needs to be installed by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|references | DPDK Pktgen: DPDKpktgen_ | -| | | -| | ETSI-NFV-TST001 | -| | | -| | RFC 2544: rfc2544_ | -| | | -+--------------+--------------------------------------------------------------+ -|applicability | Test can be configured with different flavors, vNIC type | -| | and packet sizes. Default values exist as specified above. | -| | The vNIC type and flavor MUST be specified by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|pre-test | The vTC has been successfully instantiated and configured. | -| | The user has correctly assigned the values to the deployment | -| | configuration parameters. | -| | | -| | - Multicast traffic MUST be enabled on the network. | -| | The Data network switches need to be configured in | -| | order to manage multicast traffic. | -| | - In the case of SR-IOV vNICs use, SR-IOV compatible NICs | -| | must be used on the compute node. | -| | - Yarsdtick needs to be installed on a host connected to the | -| | data network and the host must have 2 DPDK-compatible | -| | NICs. Proper configuration of DPDK and DPDK pktgen is | -| | required before to run the test case. | -| | (For further instructions please refer to the ApexLake | -| | documentation). | -| | | -+--------------+--------------------------------------------------------------+ -|test sequence | Description and expected results | -| | | -+--------------+--------------------------------------------------------------+ -|step 1 | The vTC is deployed, according to the user-defined | -| | configuration | -| | | -+--------------+--------------------------------------------------------------+ -|step 2 | The vTC is correctly deployed and configured as necessary | -| | The initialization script has been correctly executed and | -| | vTC is ready to receive and process the traffic. | -| | | -+--------------+--------------------------------------------------------------+ -|step 3 | Test case is executed with the selected parameters: | -| | - vTC flavor | -| | - vNIC type | -| | - packet size | -| | The traffic is sent to the vTC using the maximum available | -| | traffic rate for 60 seconds. | -| | | -+--------------+--------------------------------------------------------------+ -|step 4 | The vTC instance forwards all the packets back to the packet | -| | generator for 60 seconds, as specified by RFC 2544. | -| | | -| | Steps 3 and 4 are executed different times, with different | -| | rates in order to find the maximum supported traffic rate | -| | according to the current definition of throughput in RFC | -| | 2544. | -| | | -+--------------+--------------------------------------------------------------+ -|test verdict | The result of the test is a number between 0 and 100 which | -| | represents the throughput in terms of percentage of the | -| | available pktgen NIC bandwidth. | -| | | -+--------------+--------------------------------------------------------------+ diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc007.rst b/docs/testing/user/userguide/opnfv_yardstick_tc007.rst deleted file mode 100644 index 87663f816..000000000 --- a/docs/testing/user/userguide/opnfv_yardstick_tc007.rst +++ /dev/null @@ -1,162 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International -.. License. -.. http://creativecommons.org/licenses/by/4.0 -.. (c) OPNFV, Intel Corporation and others. - -************************************* -Yardstick Test Case Description TC007 -************************************* - -.. _DPDKpktgen: https://github.com/Pktgen/Pktgen-DPDK/ -.. _rfc2544: https://www.ietf.org/rfc/rfc2544.txt - -+-----------------------------------------------------------------------------+ -|Network Performance | -| | -+--------------+--------------------------------------------------------------+ -|test case id | OPNFV_YARDSTICK_TC007_Virtual Traffic Classifier Data Plane | -| | Throughput Benchmarking Test in Presence of Noisy | -| | neighbours | -| | | -+--------------+--------------------------------------------------------------+ -|metric | Throughput | -| | | -+--------------+--------------------------------------------------------------+ -|test purpose | To measure the throughput supported by the virtual Traffic | -| | Classifier according to the RFC2544 methodology for a | -| | user-defined set of vTC deployment configurations in the | -| | presence of noisy neighbours. | -| | | -+--------------+--------------------------------------------------------------+ -|configuration | file: opnfv_yardstick_tc007.yaml | -| | | -| | packet_size: size of the packets to be used during the | -| | throughput calculation. | -| | Allowe values: [64, 128, 256, 512, 1024, 1280, 1518] | -| | | -| | vnic_type: type of VNIC to be used. | -| | Allowed values are: | -| | - normal: for default OvS port configuration | -| | - direct: for SR-IOV port configuration | -| | | -| | vtc_flavor: OpenStack flavor to be used for the vTC | -| | Default available values are: m1.small, m1.medium, | -| | and m1.large, but the user can create his/her own | -| | flavor and give it as input | -| | | -| | num_of_neighbours: Number of noisy neighbours (VMs) to be | -| | instantiated during the experiment. | -| | Allowed values: range (1, 10) | -| | | -| | amount_of_ram: RAM to be used by each neighbor. | -| | Allowed values: ['250M', '1G', '2G', '3G', '4G', '5G', | -| | '6G', '7G', '8G', '9G', '10G'] | -| | Deault value: 256M | -| | | -| | number_of_cores: Number of noisy neighbours (VMs) to be | -| | instantiated during the experiment. | -| | Allowed values: range (1, 10) | -| | Default value: 1 | -| | | -| | vlan_sender: vlan tag of the network on which the vTC will | -| | receive traffic (VLAN Network 1). | -| | Allowed values: range (1, 4096) | -| | | -| | vlan_receiver: vlan tag of the network on which the vTC | -| | will send traffic back to the packet generator | -| | (VLAN Network 2). | -| | Allowed values: range (1, 4096) | -| | | -| | default_net_name: neutron name of the defaul network that | -| | is used for access to the internet from the vTC | -| | (vNIC 1). | -| | | -| | default_subnet_name: subnet name for vNIC1 | -| | (information available through Neutron). | -| | | -| | vlan_net_1_name: Neutron Name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_1_name: Subnet Neutron name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_net_2_name: Neutron Name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_2_name: Subnet Neutron name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -+--------------+--------------------------------------------------------------+ -|test tool | DPDK pktgen | -| | | -| | DPDK Pktgen is not part of a Linux distribution, | -| | hence it needs to be installed by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|references | DPDKpktgen_ | -| | | -| | ETSI-NFV-TST001 | -| | | -| | rfc2544_ | -| | | -+--------------+--------------------------------------------------------------+ -|applicability | Test can be configured with different flavors, vNIC type | -| | and packet sizes. Default values exist as specified above. | -| | The vNIC type and flavor MUST be specified by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|pre-test | The vTC has been successfully instantiated and configured. | -| | The user has correctly assigned the values to the deployment | -| | configuration parameters. | -| | | -| | - Multicast traffic MUST be enabled on the network. | -| | The Data network switches need to be configured in | -| | order to manage multicast traffic. | -| | - In the case of SR-IOV vNICs use, SR-IOV compatible NICs | -| | must be used on the compute node. | -| | - Yarsdtick needs to be installed on a host connected to the | -| | data network and the host must have 2 DPDK-compatible | -| | NICs. Proper configuration of DPDK and DPDK pktgen is | -| | required before to run the test case. | -| | (For further instructions please refer to the ApexLake | -| | documentation). | -| | | -+--------------+--------------------------------------------------------------+ -|test sequence | Description and expected results | -| | | -+--------------+--------------------------------------------------------------+ -|step 1 | The noisy neighbours are deployed as required by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|step 2 | The vTC is deployed, according to the configuration required | -| | by the user | -| | | -+--------------+--------------------------------------------------------------+ -|step 3 | The vTC is correctly deployed and configured as necessary. | -| | The initialization script has been correctly executed and | -| | the vTC is ready to receive and process the traffic. | -| | | -+--------------+--------------------------------------------------------------+ -|step 4 | Test case is executed with the parameters specified by the | -| | user: | -| | - vTC flavor | -| | - vNIC type | -| | - packet size | -| | The traffic is sent to the vTC using the maximum available | -| | traffic rate | -| | | -+--------------+--------------------------------------------------------------+ -|step 5 | The vTC instance forwards all the packets back to the | -| | packet generator for 60 seconds, as specified by RFC 2544. | -| | | -| | Steps 4 and 5 are executed different times with different | -| | with different traffic rates, in order to find the maximum | -| | supported traffic rate, accoring to the current definition | -| | of throughput in RFC 2544. | -| | | -+--------------+--------------------------------------------------------------+ -|test verdict | The result of the test is a number between 0 and 100 which | -| | represents the throughput in terms of percentage of the | -| | available pktgen NIC bandwidth. | -| | | -+--------------+--------------------------------------------------------------+ diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc020.rst b/docs/testing/user/userguide/opnfv_yardstick_tc020.rst deleted file mode 100644 index f2f1d408b..000000000 --- a/docs/testing/user/userguide/opnfv_yardstick_tc020.rst +++ /dev/null @@ -1,141 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International -.. License. -.. http://creativecommons.org/licenses/by/4.0 -.. (c) OPNFV, Intel Corporation and others. - -************************************* -Yardstick Test Case Description TC020 -************************************* - -.. _DPDKpktgen: https://github.com/Pktgen/Pktgen-DPDK/ -.. _rfc2544: https://www.ietf.org/rfc/rfc2544.txt - -+-----------------------------------------------------------------------------+ -|Network Performance | -| | -+--------------+--------------------------------------------------------------+ -|test case id | OPNFV_YARDSTICK_TC0020_Virtual Traffic Classifier | -| | Instantiation Test | -| | | -+--------------+--------------------------------------------------------------+ -|metric | Failure | -| | | -+--------------+--------------------------------------------------------------+ -|test purpose | To verify that a newly instantiated vTC is 'alive' and | -| | functional and its instantiation is correctly supported by | -| | the infrastructure. | -| | | -+--------------+--------------------------------------------------------------+ -|configuration | file: opnfv_yardstick_tc020.yaml | -| | | -| | vnic_type: type of VNIC to be used. | -| | Allowed values are: | -| | - normal: for default OvS port configuration | -| | - direct: for SR-IOV port configuration | -| | Default value: None | -| | | -| | vtc_flavor: OpenStack flavor to be used for the vTC | -| | Default available values are: m1.small, m1.medium, | -| | and m1.large, but the user can create his/her own | -| | flavor and give it as input | -| | Default value: None | -| | | -| | vlan_sender: vlan tag of the network on which the vTC will | -| | receive traffic (VLAN Network 1). | -| | Allowed values: range (1, 4096) | -| | | -| | vlan_receiver: vlan tag of the network on which the vTC | -| | will send traffic back to the packet generator | -| | (VLAN Network 2). | -| | Allowed values: range (1, 4096) | -| | | -| | default_net_name: neutron name of the defaul network that | -| | is used for access to the internet from the vTC | -| | (vNIC 1). | -| | | -| | default_subnet_name: subnet name for vNIC1 | -| | (information available through Neutron). | -| | | -| | vlan_net_1_name: Neutron Name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_1_name: Subnet Neutron name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_net_2_name: Neutron Name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_2_name: Subnet Neutron name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -+--------------+--------------------------------------------------------------+ -|test tool | DPDK pktgen | -| | | -| | DPDK Pktgen is not part of a Linux distribution, | -| | hence it needs to be installed by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|references | DPDKpktgen_ | -| | | -| | ETSI-NFV-TST001 | -| | | -| | rfc2544_ | -| | | -+--------------+--------------------------------------------------------------+ -|applicability | Test can be configured with different flavors, vNIC type | -| | and packet sizes. Default values exist as specified above. | -| | The vNIC type and flavor MUST be specified by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|pre-test | The vTC has been successfully instantiated and configured. | -| | The user has correctly assigned the values to the deployment | -| | configuration parameters. | -| | | -| | - Multicast traffic MUST be enabled on the network. | -| | The Data network switches need to be configured in | -| | order to manage multicast traffic. | -| | Installation and configuration of smcroute is required | -| | before to run the test case. | -| | (For further instructions please refer to the ApexLake | -| | documentation). | -| | - In the case of SR-IOV vNICs use, SR-IOV compatible NICs | -| | must be used on the compute node. | -| | - Yarsdtick needs to be installed on a host connected to the | -| | data network and the host must have 2 DPDK-compatible | -| | NICs. Proper configuration of DPDK and DPDK pktgen is | -| | required before to run the test case. | -| | (For further instructions please refer to the ApexLake | -| | documentation). | -| | | -+--------------+--------------------------------------------------------------+ -|test sequence | Description and expected results | -| | | -+--------------+--------------------------------------------------------------+ -|step 1 | The vTC is deployed, according to the configuration provided | -| | by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|step 2 | The vTC is correctly deployed and configured as necessary. | -| | The initialization script has been correctly executed and | -| | the vTC is ready to receive and process the traffic. | -| | | -+--------------+--------------------------------------------------------------+ -|step 3 | Test case is executed with the parameters specified by the | -| | the user: | -| | - vTC flavor | -| | - vNIC type | -| | A constant rate traffic is sent to the vTC for 10 seconds. | -| | | -+--------------+--------------------------------------------------------------+ -|step 4 | The vTC instance tags all the packets and sends them back to | -| | the packet generator for 10 seconds. | -| | | -| | The framework checks that the packet generator receives | -| | back all the packets with the correct tag from the vTC. | -| | | -+--------------+--------------------------------------------------------------+ -|test verdict | The vTC is deemed to be successfully instantiated if all | -| | packets are sent back with the right tag as requested, | -| | else it is deemed DoA (Dead on arrival) | -| | | -+--------------+--------------------------------------------------------------+ diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc021.rst b/docs/testing/user/userguide/opnfv_yardstick_tc021.rst deleted file mode 100644 index c7adc870a..000000000 --- a/docs/testing/user/userguide/opnfv_yardstick_tc021.rst +++ /dev/null @@ -1,157 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International -.. License. -.. http://creativecommons.org/licenses/by/4.0 -.. (c) OPNFV, Intel Corporation and others. - -************************************* -Yardstick Test Case Description TC021 -************************************* - -.. _DPDKpktgen: https://github.com/Pktgen/Pktgen-DPDK/ -.. _rfc2544: https://www.ietf.org/rfc/rfc2544.txt - -+-----------------------------------------------------------------------------+ -|Network Performance | -| | -+--------------+--------------------------------------------------------------+ -|test case id | OPNFV_YARDSTICK_TC0021_Virtual Traffic Classifier | -| | Instantiation Test in Presence of Noisy Neighbours | -| | | -+--------------+--------------------------------------------------------------+ -|metric | Failure | -| | | -+--------------+--------------------------------------------------------------+ -|test purpose | To verify that a newly instantiated vTC is 'alive' and | -| | functional and its instantiation is correctly supported by | -| | the infrastructure in the presence of noisy neighbours. | -| | | -+--------------+--------------------------------------------------------------+ -|configuration | file: opnfv_yardstick_tc021.yaml | -| | | -| | vnic_type: type of VNIC to be used. | -| | Allowed values are: | -| | - normal: for default OvS port configuration | -| | - direct: for SR-IOV port configuration | -| | Default value: None | -| | | -| | vtc_flavor: OpenStack flavor to be used for the vTC | -| | Default available values are: m1.small, m1.medium, | -| | and m1.large, but the user can create his/her own | -| | flavor and give it as input | -| | Default value: None | -| | | -| | num_of_neighbours: Number of noisy neighbours (VMs) to be | -| | instantiated during the experiment. | -| | Allowed values: range (1, 10) | -| | | -| | amount_of_ram: RAM to be used by each neighbor. | -| | Allowed values: ['250M', '1G', '2G', '3G', '4G', '5G', | -| | '6G', '7G', '8G', '9G', '10G'] | -| | Deault value: 256M | -| | | -| | number_of_cores: Number of noisy neighbours (VMs) to be | -| | instantiated during the experiment. | -| | Allowed values: range (1, 10) | -| | Default value: 1 | -| | | -| | vlan_sender: vlan tag of the network on which the vTC will | -| | receive traffic (VLAN Network 1). | -| | Allowed values: range (1, 4096) | -| | | -| | vlan_receiver: vlan tag of the network on which the vTC | -| | will send traffic back to the packet generator | -| | (VLAN Network 2). | -| | Allowed values: range (1, 4096) | -| | | -| | default_net_name: neutron name of the defaul network that | -| | is used for access to the internet from the vTC | -| | (vNIC 1). | -| | | -| | default_subnet_name: subnet name for vNIC1 | -| | (information available through Neutron). | -| | | -| | vlan_net_1_name: Neutron Name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_1_name: Subnet Neutron name for VLAN Network 1 | -| | (information available through Neutron). | -| | | -| | vlan_net_2_name: Neutron Name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -| | vlan_subnet_2_name: Subnet Neutron name for VLAN Network 2 | -| | (information available through Neutron). | -| | | -+--------------+--------------------------------------------------------------+ -|test tool | DPDK pktgen | -| | | -| | DPDK Pktgen is not part of a Linux distribution, | -| | hence it needs to be installed by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|references | DPDK Pktgen: DPDK Pktgen: DPDKpktgen_ | -| | | -| | ETSI-NFV-TST001 | -| | | -| | RFC 2544: rfc2544_ | -| | | -+--------------+--------------------------------------------------------------+ -|applicability | Test can be configured with different flavors, vNIC type | -| | and packet sizes. Default values exist as specified above. | -| | The vNIC type and flavor MUST be specified by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|pre-test | The vTC has been successfully instantiated and configured. | -| | The user has correctly assigned the values to the deployment | -| | configuration parameters. | -| | | -| | - Multicast traffic MUST be enabled on the network. | -| | The Data network switches need to be configured in | -| | order to manage multicast traffic. | -| | Installation and configuration of smcroute is required | -| | before to run the test case. | -| | (For further instructions please refer to the ApexLake | -| | documentation). | -| | - In the case of SR-IOV vNICs use, SR-IOV compatible NICs | -| | must be used on the compute node. | -| | - Yarsdtick needs to be installed on a host connected to the | -| | data network and the host must have 2 DPDK-compatible | -| | NICs. Proper configuration of DPDK and DPDK pktgen is | -| | required before to run the test case. | -| | (For further instructions please refer to the ApexLake | -| | documentation). | -| | | -+--------------+--------------------------------------------------------------+ -|test sequence | Description and expected results | -| | | -+--------------+--------------------------------------------------------------+ -|step 1 | The noisy neighbours are deployed as required by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|step 2 | The vTC is deployed, according to the configuration provided | -| | by the user. | -| | | -+--------------+--------------------------------------------------------------+ -|step 3 | The vTC is correctly deployed and configured as necessary. | -| | The initialization script has been correctly executed and | -| | the vTC is ready to receive and process the traffic. | -| | | -+--------------+--------------------------------------------------------------+ -|step 4 | Test case is executed with the selected parameters: | -| | - vTC flavor | -| | - vNIC type | -| | A constant rate traffic is sent to the vTC for 10 seconds. | -| | | -+--------------+--------------------------------------------------------------+ -|step 5 | The vTC instance tags all the packets and sends them back to | -| | the packet generator for 10 seconds. | -| | | -| | The framework checks if the packet generator receives back | -| | all the packets with the correct tag from the vTC. | -| | | -+--------------+--------------------------------------------------------------+ -|test verdict | The vTC is deemed to be successfully instantiated if all | -| | packets are sent back with the right tag as requested, | -| | else it is deemed DoA (Dead on arrival) | -| | | -+--------------+--------------------------------------------------------------+ diff --git a/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia b/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia new file mode 100644 index 000000000..57a83058e --- /dev/null +++ b/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia @@ -0,0 +1,90 @@ +# 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. + +nodes: +- + name: trafficgen_1 + role: IxNet + ip: 1.2.1.1 #ixia machine ip + user: user + password: r00t + key_filename: /root/.ssh/id_rsa + tg_config: + ixchassis: "1.2.1.7" #ixia chassis ip + tcl_port: "8009" # tcl server port + lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0" + root_dir: "/opt/ixia/ixos-api/8.01.0.2/" + py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/" + py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi" + dut_result_dir: "/mnt/ixia" + version: 8.1 + interfaces: + xe0: # logical name from topology.yaml and vnfd.yaml + vpci: "2:5" # Card:port + driver: "none" + dpdk_port_num: 0 + local_ip: "152.16.100.20" + netmask: "255.255.0.0" + local_mac: "00:98:10:64:14:00" + xe1: # logical name from topology.yaml and vnfd.yaml + vpci: "2:6" # [(Card, port)] + driver: "none" + dpdk_port_num: 1 + local_ip: "152.40.40.20" + netmask: "255.255.0.0" + local_mac: "00:98:28:28:14:00" +- + name: vnf + role: VirtualNetworkFunction + ip: 192.168.100.101 + user: root + password: r00t + host: 192.168.100.101 + key_filename: /root/.ssh/id_rsa + interfaces: + xe0: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:07:00.2" + driver: "i40e" + dpdk_port_num: 0 + local_ip: "152.16.100.10" + netmask: "255.255.0.0" + local_mac: "00:00:00:00:00:03" + + xe1: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:07:00.3" + driver: "i40e" + dpdk_port_num: 1 + local_ip: "152.40.40.10" + netmask: "255.255.0.0" + local_mac: "00:00:00:00:00:04" + + routing_table: + - network: "152.16.100.20" + netmask: "255.255.0.0" + gateway: "152.16.100.20" + if: "xe0" + - network: "152.40.40.20" + netmask: "255.255.0.0" + gateway: "152.40.40.20" + if: "xe1" + + 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:9828:2814" + netmask: "112" + gateway: "0064:ff9b:0:0:0:0:9828:2814" + if: "xe1" diff --git a/install.sh b/install.sh index 58d070ecc..49a8bd085 100755 --- a/install.sh +++ b/install.sh @@ -14,6 +14,7 @@ DOCKER_ARCH="$(uname -m)" UBUNTU_PORTS_URL="http://ports.ubuntu.com/ubuntu-ports/" UBUNTU_ARCHIVE_URL="http://archive.ubuntu.com/ubuntu/" +source /etc/os-release source_file=/etc/apt/sources.list if [[ "${DOCKER_ARCH}" == "aarch64" ]]; then @@ -33,18 +34,25 @@ else fi sed -i -e 's/^deb-src /# deb-src /g' "${source_file}" -echo "APT::Default-Release \"trusty\";" > /etc/apt/apt.conf.d/default-distro + +VERSION_CODENAME=${VERSION_CODENAME:-trusty} + +echo "APT::Default-Release \""${VERSION_CODENAME}"\";" > /etc/apt/apt.conf.d/default-distro sub_source_file=/etc/apt/sources.list.d/yardstick.list touch "${sub_source_file}" # first add xenial repo needed for installing qemu_static_user/xenial in the container # then add complementary architecture repositories in case the cloud image is of different arch -echo -e "deb [arch="${DOCKER_ARCH}"] "${DOCKER_REPO}" xenial-updates universe -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty main universe multiverse restricted -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty-updates main universe multiverse restricted -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty-security main universe multiverse restricted -deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" trusty-proposed main universe multiverse restricted" > "${sub_source_file}" +if [[ "${VERSION_CODENAME}" != "xenial" ]]; then + REPO_UPDATE="deb [arch="${DOCKER_ARCH}"] "${DOCKER_REPO}" xenial-updates universe" +fi + +echo -e ""${REPO_UPDATE}" +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}" main universe multiverse restricted +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}"-updates main universe multiverse restricted +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}"-security main universe multiverse restricted +deb [arch="${EXTRA_ARCH}"] "${EXTRA_REPO}" "${VERSION_CODENAME}"-proposed main universe multiverse restricted" > "${sub_source_file}" echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf diff --git a/nsb_setup.sh b/nsb_setup.sh index 05d1fd6db..88027d9bd 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -40,7 +40,7 @@ install_libs() { echo "Install libs needed to build and run NSB Testing..." apt-get update > /dev/null 2>&1 - pkg=(git build-essential python-dev virtualenv python-virtualenv virtualenv linux-headers-$(uname -r) unzip python-pip libpcap-dev) + pkg=(git build-essential python-dev virtualenv python-virtualenv virtualenv linux-headers-$(uname -r) unzip python-pip libpcap-dev cmake) for i in "${pkg[@]}"; do dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed" if [ "$?" -eq "1" ]; then diff --git a/requirements.txt b/requirements.txt index d03c4377f..d5d079386 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,91 +7,92 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -Babel==2.3.4 -Jinja2==2.8.1 -MarkupSafe==0.23 -PyYAML==3.12 -SQLAlchemy==1.1.4 -ansible==2.2.2.0 -appdirs==1.4.3 -backport-ipaddress==0.1; python_version <= '2.7' -chainmap==1.0.2 -cliff==2.4.0 -cmd2==0.6.9 -coverage==4.3.4 -debtcollector==1.11.0 -django==1.8.17 -docker-py==1.10.6 -ecdsa==0.13 -extras==1.0.0 -fixtures==3.0.0 -flake8==2.5.4 -flasgger==0.5.13 -flask-restful-swagger==0.19 -flask-restful==0.3.5 -flask==0.11.1 -funcsigs==1.0.2 -functools32==3.2.3.post2; python_version <= '2.7' -futures==3.0.5 -influxdb==4.0.0 -iso8601==0.1.11 -jsonpatch==1.15 -jsonpointer==1.10 -jsonschema==2.5.1 -jinja2schema==0.1.4 -keystoneauth1==2.18.0 -kubernetes==3.0.0a1 -linecache2==1.0.0 -lxml==3.7.2 -mccabe==0.4.0 -mock==2.0.0 # upgrade to version 2.0.0 to match python3 unittest.mock features -monotonic==1.2 -msgpack-python==0.4.8 -netaddr==0.7.19 -netifaces==0.10.5 -nose==1.3.7 -openstacksdk==0.9.13 -os-client-config==1.26.0 -osc-lib==1.3.0 -oslo.config==3.22.0 -oslo.i18n==3.12.0 -oslo.serialization==2.16.0 -oslo.utils==3.22.0 -paramiko==2.1.1 -pbr==1.10.0 -pep8==1.7.0 -ping==0.2; python_version <= '2.7' -pika==0.10.0 -positional==1.1.1 -prettytable==0.7.2 -pycrypto==2.6.1 -pyflakes==1.0.0 -pyparsing==2.1.10 -pyroute2==0.4.12 -pyrsistent==0.11.12 -python-cinderclient==1.11.0 -python-glanceclient==2.6.0 -python-heatclient==1.8.1 -python-keystoneclient==3.10.0 -python-mimeparse==1.6.0 -python-neutronclient==6.1.0 -python-novaclient==7.1.1 -python-openstackclient==3.8.1 -python-subunit==1.2.0 -python-swiftclient==3.3.0 -pytz==2016.10 -pyzmq==14.5.0 # version 14.5.0 for compatibility with trex traffic generator -requests==2.13.0 -requestsexceptions==1.1.3 -scp==0.10.2 -shade==1.17.0 -simplejson==3.10.0 -six==1.10.0 -stevedore==1.20.0 -testrepository==0.0.20 -testtools==2.2.0 -traceback2==1.4.0 -unicodecsv==0.14.1 -unittest2==1.1.0 -warlock==1.2.0 -wrapt==1.10.8 +Babel==2.3.4 # BSD; OSI Approved BSD License +Jinja2==2.8.1 # BSD; OSI Approved BSD License +MarkupSafe==0.23 # BSD; OSI Approved BSD License +PyYAML==3.12 # MIT; OSI Approved MIT License +SQLAlchemy==1.1.4 # MIT License; OSI Approved MIT License +ansible==2.2.2.0 # GPLv3; OSI Approved GNU General Public License v3 or later (GPLv3+) +appdirs==1.4.3 # MIT; OSI Approved MIT License +backport-ipaddress==0.1; python_version <= "2.7" # OSI Approved Python Software Foundation License +chainmap==1.0.2 # Python Software Foundation License; OSI Approved Python Software Foundation License +cliff==2.4.0 # OSI Approved Apache Software License +cmd2==0.6.9 # MIT; OSI Approved MIT License +coverage==4.3.4 # Apache 2.0; OSI Approved Apache Software License; http://www.apache.org/licenses/LICENSE-2.0; http://www.apache.org/licenses/LICENSE-2.0 +debtcollector==1.11.0 # OSI Approved Apache Software License +django==1.8.17 # BSD; OSI Approved BSD License +docker-py==1.10.6 # OSI Approved Apache Software License +ecdsa==0.13 # MIT +extras==1.0.0 # OSI Approved MIT License +fixtures==3.0.0 # OSI Approved BSD License; OSI Approved Apache Software License +flake8==2.5.4 # MIT; OSI Approved MIT License +flasgger==0.5.13 # MIT +flask-restful-swagger==0.19 # MIT +flask-restful==0.3.5 # BSD; OSI Approved BSD License +flask==0.11.1 # BSD; OSI Approved BSD License +funcsigs==1.0.2 # ASL; OSI Approved Apache Software License +functools32==3.2.3.post2; python_version <= "2.7" # PSF license +futures==3.0.5 # BSD; OSI Approved BSD License +influxdb==4.0.0 # MIT License; OSI Approved MIT License +iso8601==0.1.11 # MIT; OSI Approved MIT License +jsonpatch==1.15 # Modified BSD License; OSI Approved BSD License +jsonpointer==1.10 # Modified BSD License; OSI Approved BSD License +jsonschema==2.5.1 # MIT; OSI Approved MIT License +jinja2schema==0.1.4 # OSI Approved BSD License +keystoneauth1==2.18.0 # OSI Approved Apache Software License +kubernetes==3.0.0a1 # OSI Approved Apache Software License +linecache2==1.0.0 # OSI Approved Python Software Foundation License +lxml==3.7.2 # OSI Approved BSD License +mccabe==0.4.0 # Expat license; OSI Approved MIT License +# upgrade to version 2.0.0 to match python3 unittest.mock features +mock==2.0.0 # OSI Approved BSD License; `BSD License`_; http://github.com/testing-cabal/mock/blob/master/LICENSE.txt +monotonic==1.2 # Apache; OSI Approved Apache Software License +msgpack-python==0.4.8 # OSI Approved Apache Software License +netaddr==0.7.19 # BSD License; OSI Approved BSD License; OSI Approved MIT License +netifaces==0.10.5 # MIT License; OSI Approved MIT License +nose==1.3.7 # GNU LGPL; OSI Approved GNU Library or Lesser General Public License (LGPL) +openstacksdk==0.9.13 # OSI Approved Apache Software License +os-client-config==1.26.0 # OSI Approved Apache Software License +osc-lib==1.3.0 # OSI Approved Apache Software License +oslo.config==3.22.0 # OSI Approved Apache Software License +oslo.i18n==3.12.0 # OSI Approved Apache Software License +oslo.serialization==2.16.0 # OSI Approved Apache Software License +oslo.utils==3.22.0 # OSI Approved Apache Software License +paramiko==2.1.1 # LGPL; OSI Approved GNU Library or Lesser General Public License (LGPL) +pbr==1.10.0 # OSI Approved Apache Software License; Apache License, Version 2.0 +pep8==1.7.0 # Expat license; OSI Approved MIT License +# version 14.5.0 for compatibility with trex traffic generator +pika==0.10.0 # BSD; OSI Approved BSD License +positional==1.1.1 # OSI Approved Apache Software License +prettytable==0.7.2 # BSD (3 clause); OSI Approved BSD License +pycrypto==2.6.1 # Public Domain +pyflakes==1.0.0 # MIT; OSI Approved MIT License +pyparsing==2.1.10 # MIT License; OSI Approved MIT License +pyroute2==0.4.12 # dual license GPLv2+ and Apache v2; OSI Approved GNU General Public License v2 or later (GPLv2+); OSI Approved Apache Software License +pyrsistent==0.11.12 # LICENSE.mit; OSI Approved MIT License +python-cinderclient==1.11.0 # OSI Approved Apache Software License +python-glanceclient==2.6.0 # OSI Approved Apache Software License +python-heatclient==1.8.1 # OSI Approved Apache Software License +python-keystoneclient==3.10.0 # OSI Approved Apache Software License +python-mimeparse==1.6.0 # OSI Approved MIT License +python-neutronclient==6.1.0 # OSI Approved Apache Software License +python-novaclient==7.1.1 # OSI Approved Apache Software License +python-openstackclient==3.8.1 # OSI Approved Apache Software License +python-subunit==1.2.0 # OSI Approved Apache Software License; OSI Approved BSD License +python-swiftclient==3.3.0 # OSI Approved Apache Software License +pytz==2016.10 # MIT; OSI Approved MIT License +pyzmq==14.5.0 # LGPL+BSD; OSI Approved GNU Library or Lesser General Public License (LGPL); OSI Approved BSD License +requests==2.13.0 # Apache 2.0; OSI Approved Apache Software License +requestsexceptions==1.1.3 # OSI Approved Apache Software License +scp==0.10.2 # LGPL +shade==1.17.0 # OSI Approved Apache Software License +simplejson==3.10.0 # MIT License; OSI Approved MIT License; OSI Approved Academic Free License (AFL) +six==1.10.0 # MIT; OSI Approved MIT License +stevedore==1.20.0 # OSI Approved Apache Software License +testrepository==0.0.20 # OSI Approved BSD License; OSI Approved Apache Software License +testtools==2.2.0 # OSI Approved MIT License +traceback2==1.4.0 # OSI Approved Python Software Foundation License +unicodecsv==0.14.1 # BSD License; OSI Approved BSD License +unittest2==1.1.0 # OSI Approved BSD License +warlock==1.2.0 # OSI Approved Apache Software License +wrapt==1.10.8 # BSD diff --git a/run_tests.sh b/run_tests.sh index 2cf54c708..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() { @@ -80,7 +89,6 @@ run_functional_test() { fi } -export PYTHONPATH='yardstick/vTC/apexlake' run_flake8 run_tests diff --git a/samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml b/samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml new file mode 100644 index 000000000..f8c01daff --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml @@ -0,0 +1,53 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +nsd:nsd-catalog: + nsd: + - id: 3tg-topology + name: 3tg-topology + short-name: 3tg-topology + description: 3tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__1 + VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type + - member-vnf-index: '2' + vnfd-id-ref: vnf__1 + VNF model: ../../vnf_descriptors/acl_vnf.yaml #VNF type + - member-vnf-index: '3' + vnfd-id-ref: tg__2 + VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #VNF type + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '3' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: tg__2 diff --git a/samples/vnf_samples/nsut/acl/acl-tg-topology.yaml b/samples/vnf_samples/nsut/acl/acl-tg-topology.yaml new file mode 100644 index 000000000..9bc3e8559 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl-tg-topology.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: 3tg-topology + name: 3tg-topology + short-name: 3tg-topology + description: 3tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__1 + VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type + - member-vnf-index: '2' + vnfd-id-ref: vnf__1 + VNF model: ../../vnf_descriptors/acl_vnf.yaml #VNF type + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/acl/acl.cfg b/samples/vnf_samples/nsut/acl/acl.cfg new file mode 100644 index 000000000..fd3c51ee8 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl.cfg @@ -0,0 +1,55 @@ +# 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. + +[PIPELINE0] +type = MASTER +core = 0 +[PIPELINE1] +type = ARPICMP +core = 1 +pktq_in = SWQ4 +pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0 +arp_route_tbl = (c0102814,fffff000,1,c0102814) (c0106414,fffff000,0,c0106414) +nd_route_tbl = (0064:ff9b:0:0:0:0:9810:6414,120,0,0064:ff9b:0:0:0:0:9810:6414) +pktq_in_prv = RXQ0.0 +prv_to_pub_map = (0,1) +[PIPELINE2] +type = TXRX +core = 2 +pipeline_txrx_type = RXRX +dest_if_offset = 176 +pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0 +pktq_out = SWQ0 SWQ1 SWQ2 SWQ3 SWQ4 +[PIPELINE3] +type = LOADB +core = 3 +pktq_in = SWQ0 SWQ1 SWQ2 SWQ3 +pktq_out = SWQ4 SWQ5 SWQ6 SWQ7 SWQ8 SWQ9 SWQ10 SWQ11 +outport_offset = 136; 8 +n_vnf_threads = 2 +[PIPELINE4] +type = ACL +core = 4 +pktq_in = SWQ2 SWQ3 +pktq_out = SWQ8 SWQ9 +traffic_type = 4 +pkt_type = ipv4 +n_flows = 2000000 +[PIPELINE5] +type = TXRX +core = 5 +pipeline_txrx_type = TXTX +dest_if_offset = 176 +pktq_in = SWQ8 SWQ9 SWQ10 SWQ11 SWQ12 SWQ13 +pktq_out = TXQ0.0 TXQ1.0 TXQ0.1 TXQ1.1 TXQ0.2 TXQ1.2 diff --git a/samples/vnf_samples/nsut/acl/acl_1rule.yaml b/samples/vnf_samples/nsut/acl/acl_1rule.yaml new file mode 100644 index 000000000..b184a29e2 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl_1rule.yaml @@ -0,0 +1,47 @@ +# 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. + +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 diff --git a/samples/vnf_samples/nsut/acl/acl_config/acl_config b/samples/vnf_samples/nsut/acl/acl_config/acl_config new file mode 100644 index 000000000..52b6a5002 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl_config/acl_config @@ -0,0 +1,61 @@ +; 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. + +[PIPELINE0] +type = MASTER +core = s{socket}c0 +[PIPELINE1] +type = ARPICMP +core = s{socket}c1 +pktq_in = SWQ2 +pktq_out = SWQ7 +# debug output +# ({port1_dst_ip},{port1_netmask},1,{port1_dst_ip}) ({port0_dst_ip},{port0_netmask},0,{port0_dst_ip}) +arp_route_tbl = ({port0_dst_ip_hex},{port0_netmask_hex},0,{port0_dst_ip_hex}) ({port1_dst_ip_hex},{port1_netmask_hex},1,{port1_dst_ip_hex}) +#ports_mac_list = port0_local_mac port1_local_mac +ports_mac_list = {port0_local_mac} {port1_local_mac} +pktq_in_prv = RXQ0.0 RXQ1.0 +prv_to_pub_map = (0,1) +prv_que_handler = (0) + +[PIPELINE2] +type = TXRX +core = s{socket}c2 +pktq_in = RXQ0.0 RXQ1.0 +pktq_out = SWQ0 SWQ1 SWQ2 +pipeline_txrx_type = RXRX +dest_if_offset=176 +[PIPELINE3] +type = LOADB +core = s{socket}c3 +pktq_in = SWQ0 SWQ1 +pktq_out = SWQ3 SWQ4 +outport_offset = 136 +phyport_offset = 204 +n_vnf_threads = 1 +prv_que_handler = (0) +[PIPELINE4] +type = ACL +core = s{socket}c4 +pktq_in = SWQ3 SWQ4 +pktq_out = SWQ5 SWQ6 +n_flows = 1000000 +pkt_type = ipv4 +traffic_type = 4 +[PIPELINE5] +type = TXRX +core = s{socket}c5 +pktq_in = SWQ5 SWQ6 SWQ7 +pktq_out = TXQ0.0 TXQ1.0 +pipeline_txrx_type = TXTX diff --git a/samples/vnf_samples/nsut/acl/acl_config/acl_script b/samples/vnf_samples/nsut/acl/acl_config/acl_script new file mode 100644 index 000000000..4d7553609 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl_config/acl_script @@ -0,0 +1,53 @@ +# 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. + +link 0 down +link 0 config {port0_local_ip} {port0_prefixlen} +link 0 up +link 1 down +link 1 config {port1_local_ip} {port1_prefixlen} +link 1 up + +p action add 0 accept +p action add 0 fwd 0 +p action add 0 count + +p action add 1 accept +p action add 1 fwd 1 +p action add 1 count + +#p acl add 1 0.0.0.0 0 0.0.0.0 0 0 65535 0 65535 0 0 0 +#p acl add 1 0.0.0.0 0 0.0.0.0 0 0 65535 0 65535 0 0 1 + +# action rule matches dest port +p acl add 1 {port1_local_network} {port1_prefix} 0.0.0.0 0 0 65535 0 65535 0 0 0 +p acl add 1 0.0.0.0 0 {port1_local_network} {port1_prefix} 0 65535 0 65535 0 0 1 + +p acl add 1 {port0_local_network} {port0_prefix} 0.0.0.0 0 0 65535 0 65535 0 0 1 +p acl add 1 0.0.0.0 0 {port0_local_network} {port0_prefix} 0 65535 0 65535 0 0 0 + +p acl add 1 {port0_local_network} {port0_prefix} {port1_local_network} {port1_prefix} 0 65535 0 65535 0 0 1 +p acl add 1 {port1_local_network} {port1_prefix} {port0_local_network} {port0_prefix} 0 65535 0 65535 0 0 0 + +# gateway is the remote port +p 1 arpadd 0 {port0_gateway} {port0_local_mac} +p 1 arpadd 0 {port0_local_ip} {port0_local_mac} +p 1 arpadd 0 {port0_dst_ip} {port0_dst_mac} +p 1 arpadd 1 {port1_gateway} {port1_local_mac} +p 1 arpadd 1 {port1_local_ip} {port1_local_mac} +p 1 arpadd 1 {port1_dst_ip} {port1_dst_mac} + +p acl applyruleset + +#p acl dbg 1 diff --git a/samples/vnf_samples/nsut/acl/acl_rules.yaml b/samples/vnf_samples/nsut/acl/acl_rules.yaml new file mode 100644 index 000000000..b184a29e2 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl_rules.yaml @@ -0,0 +1,47 @@ +# 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. + +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 diff --git a/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixia.yaml new file mode 100644 index 000000000..606d557e9 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl_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: VACL + name: VACL + short-name: VACL + description: scenario with VACL,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/acl_vnf.yaml + + vld: + - id: private_1 + 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_1 + 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 #VACL VNF diff --git a/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixload.yaml new file mode 100644 index 000000000..2fc173aed --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl_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: VACL + name: VACL + short-name: VACL + description: scenario with HTTP and vACL 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/acl_vnf.yaml + + vld: + - id: private_1 + 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 # HTTP Client + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 # VNF + + - id: public_1 + 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 # HTTP Server + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 # VACL VNF diff --git a/samples/vnf_samples/nsut/acl/acl_worstcaserules.yaml b/samples/vnf_samples/nsut/acl/acl_worstcaserules.yaml new file mode 100644 index 000000000..b184a29e2 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/acl_worstcaserules.yaml @@ -0,0 +1,47 @@ +# 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. + +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 diff --git a/samples/vnf_samples/nsut/acl/ixia_traffic.cfg b/samples/vnf_samples/nsut/acl/ixia_traffic.cfg new file mode 100644 index 000000000..f749865c5 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/ixia_traffic.cfg @@ -0,0 +1,51 @@ +{ + "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/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml index fe89bf8ab..cf2dbfc33 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml @@ -11,31 +11,28 @@ # 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" -description: > - Yardstick TC020 config file. +--- +schema: yardstick:task:0.1 scenarios: -- - type: vtc_instantiation_validation - +- type: NSPerf + traffic_profile: "../../traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml" + topology: acl_vnf_topology_ixload.yaml + nodes: + tg__1: trafficgen_1.yardstick + vnf__1: vnf.yardstick options: - vlan_sender: 2033 - vlan_receiver: 2040 - default_net_name: management_network - default_subnet_name: management_subnet - vlan_net_1_name: apexlake_inbound_network - vlan_subnet_1_name: apexlake_inbound_subnet - vlan_net_2_name: apexlake_outbound_network - vlan_subnet_2_name: apexlake_outbound_subnet - vnic_type: direct - vtc_flavor: yardstick-flavor - + packetsize: 64 + traffic_type: 4 + vnf__1: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: - type: Iteration - iterations: 1 - + type: Duration + duration: 10 + ixia_profile: ../../traffic_profiles/acl/HTTP-vACL_IPv4_2Ports.rxf # Need vlan update context: - type: Dummy + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml new file mode 100644 index 000000000..477bd8fbf --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml @@ -0,0 +1,44 @@ +# 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.yaml" + topology: acl_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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: "../../traffic_profiles/ipv4_1flow_Packets.yaml" + imix: "../../traffic_profiles/imix_voice.yaml" + ixia_profile: ../../traffic_profiles/acl/acl_ipv4_profile_1flows.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml new file mode 100644 index 000000000..695768194 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml @@ -0,0 +1,42 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: acl-tg-topology.yaml + nodes: + tg__1: trafficgen_1.yardstick + vnf__1: vnf.yardstick + tc_options: + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf_options: + acl: + rules: acl_1rule.yaml + cfg: acl_config + runner: + type: Duration + duration: 400 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml new file mode 100644 index 000000000..8d7fe3cb2 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.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.yaml + topology: acl-tg-topology.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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml new file mode 100644 index 000000000..6b21ba576 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml @@ -0,0 +1,45 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: acl-tg-topology-3node.yaml + nodes: + tg__1: trafficgen_1.yardstick + vnf__1: vnf.yardstick + tg__2: trafficgen_2.yardstick + options: + packetsize: 64 + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + corelated_traffic: true + vnf__1: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_3node.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml new file mode 100644 index 000000000..df7a909a1 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml @@ -0,0 +1,45 @@ +# 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: +{% for worker_thread in [1, 2, 3 , 4, 5, 6] %} +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: acl-tg-topology.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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'HW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +{% endfor %} +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_packetsize.yaml new file mode 100644 index 000000000..96b3f687c --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_packetsize.yaml @@ -0,0 +1,42 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: acl-tg-topology.yaml + nodes: + tg__1: trafficgen_1.yardstick + vnf__1: vnf.yardstick + tc_options: + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf_options: + acl: + rules: acl_worstcaserules.yaml + cfg: acl_config + runner: + type: Duration + duration: 400 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.yaml new file mode 100644 index 000000000..8d7fe3cb2 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.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.yaml + topology: acl-tg-topology.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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml index ec7314456..ab688a23f 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml @@ -11,32 +11,35 @@ # 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" -description: > - Yardstick TC006 config file. +--- +schema: yardstick:task:0.1 scenarios: -- - type: vtc_throughput - +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: acl-tg-topology.yaml + nodes: + tg__1: trafficgen_1.yardstick + vnf__1: vnf.yardstick + tc_options: + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + latency: true + vnf_options: + acl: + rules: acl_1rule.yaml + cfg: acl_config options: - packet_size: 1280 - vlan_sender: 2033 - vlan_receiver: 2040 - default_net_name: management_network - default_subnet_name: management_subnet - vlan_net_1_name: apexlake_inbound_network - vlan_subnet_1_name: apexlake_inbound_subnet - vlan_net_2_name: apexlake_outbound_network - vlan_subnet_2_name: apexlake_outbound_subnet - vnic_type: direct - vtc_flavor: yardstick-flavor - + packetsize: 64 runner: type: Iteration - iterations: 1 - + iterations: 28 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml context: - type: Dummy + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml new file mode 100644 index 000000000..10eba4c3c --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml @@ -0,0 +1,84 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: acl-tg-topology.yaml + nodes: + tg__1: trafficgen_1.yardstick + vnf__1: vnf.yardstick + options: + packetsize: 64 + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf__1: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + # put node context first, so we don't HEAT deploy if node has errors + name: yardstick + flavor: yardstick-dpdk-flavor +# flavor: +# name: yardstick-dpdk-flavor +# vcpus: 10 +# ram: 20480 +# disk: 4 +# extra_specs: +# hw:cpu_sockets: 1 +# hw:cpu_cores: 10 +# hw:cpu_threads: 1 +# # hw:mem_page_size: large + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + image: yardstick-vnfs + trafficgen_1: + floating_ip: true + placement: "pgrp1" + image: yardstick-trex + networks: + mgmt: + cidr: '10.0.1.0/24' + external_network: "yardstick-public" + xe0: + cidr: '10.0.2.0/24' + vld_id: public +# port_security_enabled: False + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe1: + cidr: '10.0.3.0/24' + vld_id: private +# port_security_enabled: False + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + diff --git a/samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml new file mode 100644 index 000000000..3344a1de1 --- /dev/null +++ b/samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml @@ -0,0 +1,74 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: acl-tg-topology.yaml + nodes: + tg__1: trafficgen_1.baremetal + vnf__1: vnf.yardstick + tc_options: + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf_options: + acl: + rules: acl_1rule.yaml + cfg: acl_config + runner: + type: Duration + duration: 400 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: baremetal + type: Node + file: trex-baremetal.yml + - name: yardstick + image: yardstick-acl + flavor: yardstick-flavor +# flavor: +# # name: yardstick-dpdk-flavor +# vcpus: 6 +# ram: 20480 +# disk: 4 +# extra_specs: +# hw:cpu_sockets: 1 +# hw:cpu_cores: 6 +# hw:cpu_threads: 1 +# # hw:mem_page_size: large + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + external_network: "yardstick-public" + xe0: + cidr: '10.0.2.0/24' + vld_id: public + xe1: + cidr: '10.0.3.0/24' + vld_id: private + diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml new file mode 100644 index 000000000..24407dc88 --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml @@ -0,0 +1,53 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +nsd:nsd-catalog: + nsd: + - id: 3tg-topology + name: 3tg-topology + short-name: 3tg-topology + description: 3tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__1 + VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type + - member-vnf-index: '2' + vnfd-id-ref: vnf__1 + VNF model: ../../vnf_descriptors/cgnapt_vnf.yaml #VNF type + - member-vnf-index: '3' + vnfd-id-ref: tg__2 + VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #VNF type + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '3' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: tg__2 diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology.yaml new file mode 100644 index 000000000..e668c2eb9 --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology.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: 3tg-topology + name: 3tg-topology + short-name: 3tg-topology + description: 3tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__1 + VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type + - member-vnf-index: '2' + vnfd-id-ref: vnf__1 + VNF model: ../../vnf_descriptors/cgnapt_vnf.yaml #VNF type + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixia.yaml new file mode 100644 index 000000000..a13a64fd5 --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt_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: vCGNAPT + name: vCGNAPT + short-name: vCGNAPT + description: scenario with vCGNAPT 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/cgnapt_vnf.yaml + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixload.yaml new file mode 100644 index 000000000..b4feaf03d --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt_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: VCGNAPT + name: VCGNAPT + short-name: VCGNAPT + description: scenario with HTTP and vCGNAPT 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/cgnapt_vnf.yaml + + vld: + - id: private_1 + 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 # HTTP Client + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 # VNF + + - id: public_1 + 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 # HTTP Server + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 # VCGNAPT VNF diff --git a/samples/vnf_samples/nsut/cgnapt/cgnat.cfg b/samples/vnf_samples/nsut/cgnapt/cgnat.cfg new file mode 100644 index 000000000..8b16f57f6 --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/cgnat.cfg @@ -0,0 +1,90 @@ +# 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. + +[PIPELINE0] +type = MASTER +core = 0 +[PIPELINE1] +type = ARPICMP +core = 1 + +pktq_in = SWQ4 +pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0 +; ARP route table entries (ip, mask, if_port, nh) hex values with no 0x +arp_route_tbl = (c0102814,fffff000,1,c0102814) (c0106414,fffff000,0,c0106414) +;arp_route_tbl = (c0122814,fffff000,3,c0122814) (c0126414,fffff000,1,c0126414) +; Link MAC addresses in order aa:bb:cc:dd:ee:ff separated by space +nd_route_tbl = (0064:ff9b:0:0:0:0:9810:6414,120,0,0064:ff9b:0:0:0:0:9810:6414) +; +; Hex values with no leading 0x, MACs in ascending port order starting @P0 +;ports_mac_list = 00:05:CA:30:21:F0 00:05:CA:30:21:F1 ;00:05:CA:30:21:F2 00:05:CA:30:21:F3 +; +; egress (private interface) info +pktq_in_prv = RXQ0.0 +; +;for pub port <-> prv port mapping (prv, pub) +prv_to_pub_map = (0,1) +;lib_arp_debug = 0 +[PIPELINE2] +type = TIMER +core = 2 +n_flows = 1048576 +[PIPELINE3] +type = TXRX +core = 3 +pipeline_txrx_type = RXRX +dest_if_offset = 176 +pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0 +pktq_out = SWQ0 SWQ1 SWQ2 SWQ3 SWQ4 +; +[PIPELINE4] +type = LOADB +core = 4 +pktq_in = SWQ0 SWQ1 SWQ2 SWQ3 +pktq_out = SWQ4 SWQ5 SWQ6 SWQ7 SWQ8 SWQ9 SWQ10 SWQ11 +outport_offset = 136; 8 +n_vnf_threads = 2 +;loadb_debug = 0 +[PIPELINE5] +type = CGNAPT +core = 5 +pktq_in = SWQ4 SWQ5 SWQ6 SWQ7 +pktq_out = SWQ12 SWQ13 SWQ14 SWQ15 +; +; to make pipeline timer as 1-sec granularity +; +phyport_offset = 204 +n_flows = 1048576 +key_offset = 192;64 +key_size = 8 +hash_offset = 200;72 +;cgnapt_debug = 2 +; +timer_period = 100 +max_clients_per_ip = 65535 +max_port_per_client = 10 +public_ip_port_range = 98103214:(1, 65535) +vnf_set = (3,4,5) +pkt_type = ipv4 +cgnapt_meta_offset = 128 +prv_que_handler = (0) + + +[PIPELINE7] +type = TXRX +core = 7 +pipeline_txrx_type = TXTX +dest_if_offset = 176 +pktq_in = SWQ12 SWQ13 SWQ14 SWQ15 SWQ16 SWQ17 SWQ18 SWQ19 +pktq_out = TXQ0.1 TXQ1.1 TXQ2.1 TXQ3.1 TXQ0.2 TXQ1.2 TXQ2.2 TXQ3.2 diff --git a/samples/vnf_samples/nsut/cgnapt/ixia_traffic.cfg b/samples/vnf_samples/nsut/cgnapt/ixia_traffic.cfg new file mode 100644 index 000000000..f749865c5 --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/ixia_traffic.cfg @@ -0,0 +1,51 @@ +{ + "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/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml new file mode 100644 index 000000000..7e9a589ad --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml @@ -0,0 +1,39 @@ +# 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/http_tests/HTTP_1b-requests_65000_concurrency.yaml" + topology: cgnapt_vnf_topology_ixload.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: + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Duration + duration: 5 + ixia_profile: ../../traffic_profiles/cgnapt/HTTP-vCGNAPT_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/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml new file mode 100644 index 000000000..5203e8d0a --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/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.yaml" + topology: cgnapt_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: + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: "../../traffic_profiles/ipv4_1flow_Packets.yaml" + imix: "../../traffic_profiles/imix_voice.yaml" + ixia_profile: ../../traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml new file mode 100644 index 000000000..feeacf5b0 --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml @@ -0,0 +1,42 @@ +# 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_cgnapt.yaml + topology: cgnapt-vnf-topology.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: + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml new file mode 100644 index 000000000..b5548d5ba --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml @@ -0,0 +1,45 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml + topology: cgnapt-vnf-topology-3node.yaml + nodes: + tg__1: trafficgen_1.yardstick + vnf__1: vnf.yardstick + tg__2: trafficgen_2.yardstick + options: + packetsize: 64 + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + corelated_traffic: true + vnf__1: + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + napt: 'dynamic' + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_3node.yaml diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml new file mode 100644 index 000000000..7d746f0de --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml @@ -0,0 +1,44 @@ +# 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: +{% for worker_thread in [1, 2 ,3 , 4, 5, 6] %} +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml + topology: cgnapt-vnf-topology.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: + vnf_config: {lb_config: 'HW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +{% endfor %} +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.yaml new file mode 100644 index 000000000..16d0d08cd --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.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_cgnapt.yaml + topology: cgnapt-vnf-topology.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 + latency: true + vnf__1: + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 28 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/vfw/acl_1rule.yaml b/samples/vnf_samples/nsut/vfw/acl_1rule.yaml new file mode 100644 index 000000000..b184a29e2 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/acl_1rule.yaml @@ -0,0 +1,47 @@ +# 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. + +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 diff --git a/samples/vnf_samples/nsut/vfw/ixia_traffic.cfg b/samples/vnf_samples/nsut/vfw/ixia_traffic.cfg new file mode 100644 index 000000000..f749865c5 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/ixia_traffic.cfg @@ -0,0 +1,51 @@ +{ + "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/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml new file mode 100644 index 000000000..134722681 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.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/http_tests/HTTP_1b-requests_65000_concurrency.yaml" + topology: vfw_vnf_topology_ixload.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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_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/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml new file mode 100644 index 000000000..746023de2 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml @@ -0,0 +1,44 @@ +# 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.yaml" + topology: vfw_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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: "../../traffic_profiles/ipv4_1flow_Packets.yaml" + imix: "../../traffic_profiles/imix_voice.yaml" + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml new file mode 100644 index 000000000..3a17abac4 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.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.yaml + topology: vfw-tg-topology.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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml new file mode 100644 index 000000000..a92a91e56 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml @@ -0,0 +1,44 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: vfw-tg-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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml new file mode 100644 index 000000000..ab2791c86 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml @@ -0,0 +1,45 @@ +# 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: +{% for worker_thread in [1, 2 ,3 , 4, 5, 6] %} +- type: NSPerf + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: vfw-tg-topology.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: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'HW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +{% endfor %} +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml new file mode 100644 index 000000000..1e6330038 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml @@ -0,0 +1,44 @@ +# 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.yaml + topology: vfw-tg-topology.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 + latency: true + vnf__1: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 28 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod.yaml diff --git a/samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node.yaml b/samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node.yaml new file mode 100644 index 000000000..e1496efad --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node.yaml @@ -0,0 +1,53 @@ +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +nsd:nsd-catalog: + nsd: + - id: 3tg-topology + name: 3tg-topology + short-name: 3tg-topology + description: 3tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__1 + VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type + - member-vnf-index: '2' + vnfd-id-ref: vnf__1 + VNF model: ../../vnf_descriptors/vfw_vnf.yaml #VNF type + - member-vnf-index: '3' + vnfd-id-ref: tg__2 + VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #VNF type + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '3' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: tg__2 diff --git a/samples/vnf_samples/nsut/vfw/vfw-tg-topology.yaml b/samples/vnf_samples/nsut/vfw/vfw-tg-topology.yaml new file mode 100644 index 000000000..b224ec14d --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/vfw-tg-topology.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: 3tg-topology + name: 3tg-topology + short-name: 3tg-topology + description: 3tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__1 + VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type + - member-vnf-index: '2' + vnfd-id-ref: vnf__1 + VNF model: ../../vnf_descriptors/vfw_vnf.yaml #VNF type + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/vfw/vfw.cfg b/samples/vnf_samples/nsut/vfw/vfw.cfg new file mode 100644 index 000000000..8bab8d047 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/vfw.cfg @@ -0,0 +1,62 @@ +# 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. + +[PIPELINE0] +type = MASTER +core = 0 +[PIPELINE1] +type = ARPICMP +core = 1 +pktq_in = SWQ4 +pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0 +arp_route_tbl = (c0102814,fffff000,1,c0102814) (c0106414,fffff000,0,c0106414) +nd_route_tbl = (0064:ff9b:0:0:0:0:9810:6414,120,0,0064:ff9b:0:0:0:0:9810:6414) +pktq_in_prv = RXQ0.0 +prv_to_pub_map = (0,1) +[PIPELINE2] +type = TXRX +core = 2 +pipeline_txrx_type = RXRX +dest_if_offset = 176 +pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0 +pktq_out = SWQ0 SWQ1 SWQ2 SWQ3 SWQ4 +[PIPELINE3] +type = LOADB +core = 3 +pktq_in = SWQ0 SWQ1 SWQ2 SWQ3 +pktq_out = SWQ4 SWQ5 SWQ6 SWQ7 SWQ8 SWQ9 SWQ10 SWQ11 +outport_offset = 136 +n_vnf_threads = 2 +n_lb_tuples = 5 +loadb_debug = 0 +lib_arp_debug = 0 +[PIPELINE4] +type = VFW +core = 4 +pktq_in = SWQ2 SWQ3 +pktq_out = SWQ4 SWQ5 +n_rules = 10 +prv_que_handler = (0) +n_flows = 2000000 +traffic_type = 4 +pkt_type = ipv4 +tcp_be_liberal = 0 +[PIPELINE5] +type = TXRX +core = 5 +pipeline_txrx_type = TXTX +dest_if_offset = 176 +pktq_in = SWQ8 SWQ9 SWQ10 SWQ11 SWQ12 SWQ13 +pktq_out = TXQ0.0 TXQ1.0 TXQ0.1 TXQ1.1 TXQ0.2 TXQ1.2 + diff --git a/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixia.yaml new file mode 100644 index 000000000..3585ba6d9 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/vfw_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: vFW + name: vFW + short-name: vFW + description: scenario with vFW 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/vfw_vnf.yaml + + vld: + - id: private_1 + 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 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 + + - id: public_1 + 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 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixload.yaml new file mode 100644 index 000000000..9e7062321 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/vfw_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: VFW + name: VFW + short-name: VFW + description: scenario with HTTP and vFW 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/vfw_vnf.yaml + + vld: + - id: private_1 + 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 # HTTP Client + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__1 # VNF + + - id: public_1 + 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 # HTTP Server + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__1 # VFW VNF 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/tests/opnfv/test_cases/opnfv_yardstick_tc021.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml index 735699dab..2c48d0ef9 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc021.yaml +++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml @@ -11,34 +11,33 @@ # 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" -description: > - Yardstick TC021 config file. +--- +schema: yardstick:task:0.1 scenarios: -- - type: vtc_instantiation_validation_noisy - +- 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: - vlan_sender: 2033 - vlan_receiver: 2040 - default_net_name: management_network - default_subnet_name: management_subnet - vlan_net_1_name: apexlake_inbound_network - vlan_subnet_1_name: apexlake_inbound_subnet - vlan_net_2_name: apexlake_outbound_network - vlan_subnet_2_name: apexlake_outbound_subnet - vnic_type: direct - vtc_flavor: yardstick-flavor - num_of_neighbours: 2 - amount_of_ram: 1G - number_of_cores: 2 - + 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: 1 - + iterations: 10 + interval: 35 + traffic_options: + flow: "../../traffic_profiles/ipv4_1flow_Packets_vpe.yaml" + imix: "../../traffic_profiles/imix_voice.yaml" context: - type: Dummy + 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/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/vlan_tag.sh b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_downstream index 8564ddd42..540518d17 100755..100644 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/vlan_tag.sh +++ b/samples/vnf_samples/nsut/vpe/vpe_config/vpe_downstream @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. +# 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. @@ -12,10 +12,30 @@ # 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 -#!/bin/bash -INPUT_FILE=$1 -VLAN_TAG=$2 +[PIPELINE7] +type = PASS-THROUGH +core = s{socket}c5h +pktq_in = SWQ4 +pktq_out = SWQ5 -tcprewrite --enet-vlan=add --enet-vlan-tag=$VLAN_TAG --enet-vlan-cfi=0 --enet-vlan-pri=0 --infile=$INPUT_FILE --outfile=$INPUT_FILE +[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/acl/HTTP-vACL_IPv4_2Ports.rxf b/samples/vnf_samples/traffic_profiles/acl/HTTP-vACL_IPv4_2Ports.rxf new file mode 100644 index 000000000..9934797f6 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/acl/HTTP-vACL_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"><rpf> <Ixia.Aptixia.StackManager.SMSession type="Ixia.Aptixia.StackManager.SMSession" objectid="a1e46af9-15aa-4923-8410-c81d0cdf0836" version="6.70.420"> <doWaitLinkUp type="Bool">0</doWaitLinkUp> <doGratArp type="Bool">0</doGratArp> <subscribeToGratArpNotifications type="Bool">0</subscribeToGratArpNotifications> <doInterfaceCheck type="Bool">0</doInterfaceCheck> <rebootPortsBeforeConfigure type="Bool">0</rebootPortsBeforeConfigure> <testDuration type="Int">10000</testDuration> <checkLinkState type="Bool">0</checkLinkState> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420"> <name type="String">client network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1dcd6e1b-17cd-45a1-875a-cbea40d3468c" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="b458c333-b4d4-48ef-bd38-3b456f72f8c8" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="28c0383a-76a7-4750-8162-2ad946ddac97" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="b9a0be2e-3880-4100-9e29-9b474f9301f4" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="e0232591-010e-492c-8a28-75e436f4adb2" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R1</name> <mac type="String">00:98:10:64:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420"> <name type="String">VLAN-R1</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">100</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="a916ae0f-0731-405d-ad19-eaade6c515f1" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R1</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.16.100.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.16.100.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">2596329041</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="aa33a76b-9c7f-48d9-a537-8d6eeec03662" version="6.70.420"> <name type="String">DistGroup1</name> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="9c6c8594-548e-4ea5-a478-0bfb6252c1ce" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="693c7b7b-327b-4d59-b187-57d7600308e3" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="0f6ebdb4-7909-447a-b80a-e132dae33a9b" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="7a893f25-0ac6-41c7-ab5a-511c2068582a" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="fc54eec4-41ef-4b6c-9415-bf639013b52d" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="b0ccbeae-9db2-4416-bbed-80dcb2a7a9ed" version="6.70.420"> <trafficMaps type="ListNode"> <Ixia.Aptixia.StackManager.MeshingTrafficMap type="Ixia.Aptixia.StackManager.MeshingTrafficMap" objectid="ea086372-6f3e-4867-932d-bfa5aff92921" version="6.70.420"> <name type="String">newClientActivity1!HTTP server_newServerActivity1</name> <configMapFilename type="String">newClientActivity1Script.configmap</configMapFilename> <sourceActivityId type="Int">0</sourceActivityId> <ipPreference type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eIpPreference">2</ipPreference> <portRangesString type="String" /> <meshingType type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eMeshingType">2</meshingType> <destinationActivityId type="Int">0</destinationActivityId> </Ixia.Aptixia.StackManager.MeshingTrafficMap> </trafficMaps> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="StringList"> <String>10.223.166.127;2;5</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="df783f7c-615e-47c1-b7f0-1174985ea22e" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="StringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="3d3cf9ef-8aab-4388-9252-4baea80122d3" version="6.70.420" /> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420"> <name type="String">server network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1bd9f1bc-9959-464e-b1e8-ddb0bb4d0181" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="4fe8412b-7d4c-4ebe-a0d4-480a4401b3d0" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="4dfec118-30e8-4494-b7c7-e28518e7848a" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="123fecc5-cb5e-43e9-92a1-b053dc56d0f3" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="35ff711b-53f7-4c74-9e8b-98d35adaa6bf" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R2</name> <mac type="String">00:98:28:28:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420"> <name type="String">VLAN-R2</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">32</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="b85b184d-9bb4-48c2-a029-e633fee7a3c8" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R2</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.40.40.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.40.40.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">463911585</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="b2c21c73-bfe3-4fbc-9804-b5a8b307d893" version="6.70.420"> <name type="String">DistGroup1</name> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="993e33c6-e1f7-4967-982e-82a032f8c61a" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="36ca84d7-ff44-45b7-b75d-aec38b753161" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="25c5acdd-9dd3-4802-93b6-b10651820b66" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="6259328b-97c2-4390-8ab1-f16bf3459219" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="3eedf749-efa4-43a0-87ae-e110a77c88d4" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="284f9992-65d8-4027-a155-709f1965f892" version="6.70.420"> <trafficMaps type="ListNode" /> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-1</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="StringList"> <String>10.223.166.127;2;6</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="f65f12f2-018c-46f5-a9c5-a1f6f7151909" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="StringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="60b1273d-78d3-4813-8cea-ec9a7101b8a3" version="6.70.420" /> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> </portGroupList> <externalProperties type="Ixia.Aptixia.StackManager.ExternalPropertyManager" objectid="1f2452bf-e52a-4db2-ba47-e5cc8bf61b5e" version="6.70.420"> <properties type="ListNode"> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="145671ff-93a5-4ecc-8c83-59b2c3c67be9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatLTEUEUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9f07a941-ad2f-46b0-8c75-911862a21039" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SixRdRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a221ab5c-faae-4940-bfad-5d41d44f1427" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">L2tpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d811442b-bfb8-42f0-bbf8-6bdb6fc9b66b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPServerRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="f252cff3-b919-4e74-9f62-9e9c5ab5d324" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MobileSubscribersRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="493ce043-b982-4a43-a2d4-619e51fbc5a6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IPSecRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="500dfc8b-2e6a-401f-84c0-f6907f60c00e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSgsnS3RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="693cb176-f3d8-4073-8a02-fabdc0bdd3fb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPRange_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ec983bf9-07f0-46b2-99a0-354114f42501" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EmulatedRouterRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5d0f0eb8-40af-4292-8ff2-a57e7903601d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PppoxRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="653fae09-ba19-443c-8f8b-9483c0b86b9a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGAPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c886be8c-c207-4bb4-90d5-17be54556d58" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatRNCIuPSUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="00e75214-5166-406b-90e5-2b83567ae5cf" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="50d10ee7-45ce-46d2-ae8d-ecd3b1806067" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S5S8_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c2f310a4-6ea4-4459-be3b-f3b3365c590a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPGRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7e458bed-5e36-42d6-812d-3794be52766e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPPcrfRange_S5S8_PGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7d225fda-6432-4de3-9750-c19bbc957703" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DSLiteRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="e25dd669-ffc5-493d-a2b5-fd5627bf2ee8" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSGSNRangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7ac0b7d4-6df9-4e1f-86d2-f0a494b3f20b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SlaacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="25699a2c-ab22-417b-9072-894523e98008" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="05f1053a-5774-409f-b07e-add07df64338" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PSTNDigitalRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="482a10c3-0ac7-44d9-9fa9-b43ba3a9901d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a0f03753-923d-4421-8c4f-0ed78f00fc44" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">AtmRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="fb5cd68e-b4b0-4fd4-ae18-4100c0035642" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatMMEApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="62677b6a-080e-4cc3-919b-71fa90ae410f" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBUuApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="2e0fd6e3-470e-48df-ab8d-cc21b9d80393" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPSUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="175f3104-0d2a-44f9-b712-fed3b170f8cb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IpV4V6Range</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d1f37e1e-db44-4bac-acb8-b242dee8e371" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="61ccdebc-84e6-464d-be14-2b3ddedab9d2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DualStackIPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d0678cd8-998e-42ab-8f0d-bfcb5370eac2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S2a_TWAN</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d8350364-51c6-4a1b-af9f-72c9c235a636" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatSGSNIuPSApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="613d02a1-db1e-415d-b4bb-8b73b4477cf4" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBSimUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9a41f718-b55e-44c7-a0cc-b1fcf8204c20" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6dRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="4c26fe62-a63d-4c40-8e15-c58ad8fba8d0" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">UERangeBase</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5c2ca63f-3335-4ab7-963e-440817448538" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPMmeS10RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="51a5eccc-a68d-4730-8a48-32019c547c28" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6aRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="3010c4ad-f31e-4676-9e61-bb25cf9c1bbb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">BmScRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ef1677e4-f390-4a78-b61a-f7650cf5faea" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MBmsGwRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="24322b98-7a2a-4d2d-a4ee-4cde0f0e8b64" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PptpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> </properties> <values type="ListNode"> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="6804ae67-3bd7-471b-8796-ee1e4773c2f1" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="7efcd429-2c48-41bd-bdc5-489dbfcfc49a" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="a63d8276-65bc-4bc2-8202-6461c6399ef9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="09d7b134-2921-4759-bbdb-ff3a5a1966d7" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0cd9f099-242e-4b03-965f-d343c60181e6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="503aa008-2481-419f-a223-c90b2c25c17e" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0b8d2c01-19ac-4f28-924e-660676d978da" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="41c694b3-bb55-48fe-9604-8b003540242f" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> </values> </externalProperties> <availableNetworkTimelines type="ListNode" /> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.MacSessionData type="Ixia.Aptixia.StackManager.MacSessionData" objectid="a9c7aa59-e015-4ffd-bb82-5d877ae9c1a8" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.MacSessionDataSkeleton+eMacValidationOptions">2</duplicateCheckingScope> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacSessionData> <Ixia.Aptixia.StackManager.IpSessionData type="Ixia.Aptixia.StackManager.IpSessionData" objectid="34a78d72-1fc5-4875-9fe1-b4db66b1b4c4" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.IpSessionDataSkeleton+eIpValidationOptions">2</duplicateCheckingScope> <enableGatewayArp type="Bool">0</enableGatewayArp> <gatewayArpRequestRate type="Int">300</gatewayArpRequestRate> <maxOutstandingGatewayArpRequests type="Int">300</maxOutstandingGatewayArpRequests> <ignoreUnresolvedIPs type="Bool">0</ignoreUnresolvedIPs> <sendAllRequests type="Bool">0</sendAllRequests> <individualARPTimeOut type="Int">500</individualARPTimeOut> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpSessionData> <Ixia.Aptixia.StackManager.IxLoadSessionData type="Ixia.Aptixia.StackManager.IxLoadSessionData" objectid="1e24447f-69f1-4030-8b2d-25a18c7160ca" version="1.0.0"> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420" /> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420" /> </portGroupList> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSessionData> <Ixia.Aptixia.StackManager.ImpairSessionData type="Ixia.Aptixia.StackManager.ImpairSessionData" objectid="94b53c2c-0747-41c2-838d-0e0e15f31766" version="6.70.13"> <profiles type="ListNode"> <Ixia.Aptixia.StackManager.ImpairProfile type="Ixia.Aptixia.StackManager.ImpairProfile" objectid="90dd3511-93c1-49fa-8e38-db774db9fe17" version="6.70.13"> <name type="String">DefaultProfile</name> <defaultp type="Bool">1</defaultp> <seed type="Int">0</seed> <addDelay type="Bool">1</addDelay> <delay type="Int">20</delay> <jitter type="Int">0</jitter> <addDrop type="Bool">0</addDrop> <drop type="Double">10</drop> <addDropSequence type="Bool">0</addDropSequence> <dropSequenceSkip type="Int">10</dropSequenceSkip> <dropSequenceLength type="Int">1</dropSequenceLength> <addReorder type="Bool">0</addReorder> <gap type="Int">10</gap> <reorder type="Int">20</reorder> <reorderLength type="Int">1</reorderLength> <addReorderPI type="Bool">0</addReorderPI> <reorderPISkip type="Int">10</reorderPISkip> <reorderPILength type="Int">1</reorderPILength> <reorderPIInterval type="Int">1</reorderPIInterval> <reorderPITimeout type="Int">1000</reorderPITimeout> <addDuplicate type="Bool">0</addDuplicate> <duplicate type="Double">10</duplicate> <addFragment type="Bool">0</addFragment> <fragment type="Double">10</fragment> <mtu type="Int">1000</mtu> <addFragmentSequence type="Bool">0</addFragmentSequence> <fragmentSequenceSkip type="Int">10</fragmentSequenceSkip> <fragmentSequenceLength type="Int">1</fragmentSequenceLength> <mtuSequence type="Int">1000</mtuSequence> <sendFragmentsInReverseOrder type="Bool">0</sendFragmentsInReverseOrder> <sendFirstFragmentOnly type="Bool">0</sendFirstFragmentOnly> <sendOverlappingFragments type="Bool">0</sendOverlappingFragments> <addBandwidth type="Bool">0</addBandwidth> <bandwidth type="Double">1</bandwidth> <bandwidthUnits type="String">mbps</bandwidthUnits> <addBandwidthIn type="Bool">0</addBandwidthIn> <bandwidthIn type="Double">1</bandwidthIn> <bandwidthUnitsIn type="String">mbps</bandwidthUnitsIn> <destinationIp type="String">any</destinationIp> <sourceIp type="String">any</sourceIp> <sourcePort type="Int">0</sourcePort> <destinationPort type="Int">0</destinationPort> <protocol type="String">any</protocol> <typeOfService type="String">any</typeOfService> <addTcpFlagsFilter type="Bool">0</addTcpFlagsFilter> <selectTcpFlags type="String">SYN;RST;ACK</selectTcpFlags> <expectTcpFlags type="String">SYN</expectTcpFlags> <impairOrder type="String">Delay;Drop;DropSeq;Reorder;ReorderPI;Duplicate;Fragment;FragmentSeq;Bandwidth</impairOrder> </Ixia.Aptixia.StackManager.ImpairProfile> </profiles> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.ImpairSessionData> <Ixia.Aptixia.StackManager.IPSecSessionData type="Ixia.Aptixia.StackManager.IPSecSessionData" objectid="bd2f0ea4-4278-49c8-9600-18cd2c8ed639" version="8.1.7"> <ipsecTunnelSetup type="Ixia.Aptixia.StackManager.IPSecTunnelSetup" objectid="1bacc8a0-dda0-4e0c-b013-4d8618dc80b6" version="8.1.7"> <tunnelSetupTimeout type="Int">30</tunnelSetupTimeout> <tunnelRetransmissionTimeout type="Int">30</tunnelRetransmissionTimeout> <numRetries type="Int">0</numRetries> <retryInterval type="Int">10</retryInterval> <retryDelay type="Int">10</retryDelay> <testType type="String">P2D</testType> <sendCiscoVid type="Bool">0</sendCiscoVid> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <enableRekey type="Bool">1</enableRekey> <rekeyRetries type="Int">3</rekeyRetries> <rekeyFuzzPercentage type="Int">0</rekeyFuzzPercentage> <rekeyMargin type="Int">10</rekeyMargin> </ipsecTunnelSetup> <ipsecCertificates type="Ixia.Aptixia.StackManager.IPSecCertificates" objectid="2e324324-bf74-4ad3-afbb-62e44f01c31a" version="8.1.7"> <uniqueCert type="Bool">0</uniqueCert> <certSource type="String">kNewCert</certSource> <caURL type="String" /> <caDN type="String" /> <certSubjectDN type="String" /> <certSubjectAltDN type="String" /> <remoteIkeId type="String" /> <bitSize type="String">k512</bitSize> <saveCert type="Bool">1</saveCert> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <certParentFolder type="String">C:\Program Files\Ixia\CachedCerts</certParentFolder> <certNumber type="String" /> <caCertNumber type="String" /> <earlyExpDate type="String" /> <lateExpDate type="String" /> <usePerRangeCertNameExp type="Bool">0</usePerRangeCertNameExp> <checkCrl type="Bool">0</checkCrl> <crlOverrideEnable type="Bool">0</crlOverrideEnable> <crlOverrideUrl type="String" /> <checkOcsp type="Bool">0</checkOcsp> <ocspOverrideEnable type="Bool">0</ocspOverrideEnable> <ocspOverrideUrl type="String" /> <unknownIsRevoked type="Bool">0</unknownIsRevoked> <certProto type="String">kSCEP</certProto> </ipsecCertificates> <ipsecCertManager type="Ixia.Aptixia.StackManager.IPSecCertManager" objectid="f3dc4ef0-e9a1-48a2-b69f-c5d2b485e897" version="8.1.7"> <caURL type="String" /> <caDN type="String">CN=RootCA,C=RO,L=Bucharest,O=Ixia,OU=IxLoad,IP:201.121.87.2,email:ixia@ixiacom.com</caDN> <certSubjectDN type="String">CN=IxiaVPN,C=RO,L=Bucharest,O=Ixia</certSubjectDN> <keyGenAlgo type="String">kRSA_512</keyGenAlgo> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <caKeyFile type="String">C:\Program Files\Ixia\ca-priv.key</caKeyFile> <caCrtFile type="String">C:\Program Files\Ixia\ca-cert.crt</caCrtFile> <certNumber type="Int">1</certNumber> <certProto type="String">kSCEP</certProto> <createRootCA type="Bool">0</createRootCA> <uniqueCert type="Bool">0</uniqueCert> <descFilePath type="String">C:\Program Files\Ixia\CachedCerts\sample.desc</descFilePath> <useDescFile type="Bool">0</useDescFile> </ipsecCertManager> <eapSimTuples type="ListNode" /> <eapAkaTuples type="ListNode" /> <maxInitiationRate type="Int">50</maxInitiationRate> <maxPendingTunnels type="Int">50</maxPendingTunnels> <negotiationStartDelay type="Int">0</negotiationStartDelay> <teardownRate type="Int">10</teardownRate> <burstInitiation type="Bool">0</burstInitiation> <parallelInitiation type="Bool">0</parallelInitiation> <enableExtraPortLogging type="Bool">0</enableExtraPortLogging> <enableWildcardTsi type="Bool">0</enableWildcardTsi> <enableWildcardTsr type="Bool">0</enableWildcardTsr> <enablePlutoWildcardTsi type="Bool">0</enablePlutoWildcardTsi> <enablePlutoModeCfgWildcardTsr type="Bool">1</enablePlutoModeCfgWildcardTsr> <enablePlutoS2SWildcardTsr type="Bool">0</enablePlutoS2SWildcardTsr> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecSessionData> </typeSpecificData> <statViewManager type="Ixia.Aptixia.StackManager.StatViewManager" objectid="7256ce27-286c-475d-b198-09b4ae306f73" version="6.70.420"> <enableStats type="Bool">1</enableStats> <enableOverviewStats type="Bool">1</enableOverviewStats> <enablePerSessionStats type="Bool">1</enablePerSessionStats> </statViewManager> <waitForLinkUp type="Bool">0</waitForLinkUp> <overloadProtection type="Bool">1</overloadProtection> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.SMSession> </rpf></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"><?xml version="1.0" encoding="utf-16"?> <Config> <configs Version="5.0" /> </Config></xml> + </_quickTestConfig> + <lastApiUniqueId type="int">15481</lastApiUniqueId> + <version type="str">8.01.106.3</version> + <name type="str">HTTP-vACL_IPv4_2Ports.rxf</name> + <comment type="str"></comment> + <path type="str">C:\Users\ds1\Desktop\yardstick</path> + <last type="str">HTTP-vCGNAPT_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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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">6</portId> + <enableCapture type="bool">False</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">15432</_apiUniqueId> + </portPersistentSetting> + <analyzerPartialCapture type="str">False;8191</analyzerPartialCapture> + <name type="str"></name> + <_apiUniqueId type="int">15431</_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.40.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">5</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">15428</_apiUniqueId> + </portPersistentSetting> + <analyzerPartialCapture type="str">False;8191</analyzerPartialCapture> + <name type="str"></name> + <_apiUniqueId type="int">15427</_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 <data> M>)SMG7MOVS@2P+^*D<,5>[BE+8J41*6/19ND;;!I$\1I=X'KH2"I4:*K(WDE M.8\[W'<_4I)MV9:=[.U672SFC]:2.#-\B#,_CBPSSWZXNYX,;B ODBQ]OD>' MSMX/+YZ-2UE^3. 6\F61/_2=H3-TF;MG!*"P5T^2HAS\"/?/]^2T3.X2.2QN MAE.K4920:ABVY'[*Y=04&>6#T_<71^\O!J,7S\[.C\;F\.7%\>G[]?//1X?' M%R]?G1S9@H/3=Z^.WQ\=+JHN%D>/:<!&Y2^>O<[AEYF1N1_<R,D,GN^Y>U5% MQ<U)=GF9I)?SZZ_EI("J["*YAO%]JE_!E;Q)LGPNX2Q*BU)>3\]RT$G5LJ:< M5>5'E[EIC!W6B_LIS,MH579JAGF2R>@LSTK094OW(I_!6L/>)E$$J354;+;Q M*)5J H>RE.,RRV%3X&PY.NUV\"[MG369!IW.RNFL7(SDN]FD3*:3];Y50H?C M!\3>R3L[[0K3OH-946;7;\P]NUK(^/,Z7R<3.)/EHN1@_].'PO3I4U303X>9 MGEU#6A:?CLUD,/^=F$'])(8.'5+''[)/YU"8VHM/;R\NSLC-ZY\^'Y_=\,_N M69:7Q6?7H8'C.>%GZKB"U?/AY01,T?QS8+PE+?;OBN3YWE593O='H]O;V^$M M&V;YY<AU'#KZ^=W)6%_!M21):J:#&>:]A5;TL%95Z6A>ZR'$TK2WN@,[SE[8 M]@\.SCX,[!":NYOHXMFH+; B?>(25DD6@]C,XH-)8H9L4(W!X[7&D)M)^SBM MBZL\FUU>F6E0&UB3'ZUV;.WT(,\:M\D!3.G:^;F,DNR-L3]=*TC2\H7[;&0_ MGHVV2M6=?YWEU[.)'$-9&@=;3/;_//G+W>%3\]_+IT]^F67ETX]U-*Q/]NL/ M.O3J@^\WI&T'&ME_+ O_N3S\[_*PCB$F@IS/TO5V/)F43U<"];QFISX8&+?* M(J/1%,S*F%"_/O[AR67YM-4R8ZJIY3B-,W,7$SE)_BUMS'DE+UL3O%9_]"QO M6K*<ZH_3KZ56VS@8V%9>?RZ;T;!S6IO0."W6Y6I)VY_W\AILJ3VF]N*H?;5; MYT"6<)GE]U;"QKR1C0H+W7;IIOY!?#F/1%9@-0I!\:7,II_N91Y97_S2&6Z& M^5U<5;9FJKNMD,_[8FI8M'%Y=5/K<%9U?S#:6OSVMIG/.V3&#\G89IRJ?UEJ MW4"Q2^IM<GDU,?_*K5(+-I7'ACME$B>06TE%E1(TC(DO&"<\9(I(JB2!V('( M =\13EB-R38#FU69>=6>,N:44J\VTBK:U+-W>7Q\: O'A!*/N)0PQAGS/1ZX MQ VH\"@/'$%$R'P6^AZA9L)7AENZG0TR$STO(3I-K82%$7$\XH07U-EWQ3X+ MAIY/.67B[XZWSYQY6U>TMMC-S.K'2 R,7^^GR:3QS=*L+1JWW7)#ZNCX3NJK M)(7YH!R;%=0).3NH)V^7Q .&7D:170I926I6E"X;4M\?FHXM]6(0SOZ^$J': M=YGF^^ &<C]R]%^IMQK+1MLL;[;A^.X]E+=9_F4>Q8W4<FE0&>L2V6'H'"8@ MBWI0JJ7&P*Z2!T<O5XVUQ'88:X42$^LN<WD]L&&A&'QW)_R_;2QHR)NU6K;' MC^.[<YB:D -YJUNL7L_38-[S#IEN/_[P;JSE!.K;YSB+8-2ZOJDXOFD5_ZA, M*+=J*U<[YVYW@/T]EWES/^H:OZKL,2!J :NN^G1JB;IE)AYDDXD)F';]7;$' M2FGN=%3/Y]6RK<HG(/,4(@MQ*Q?;=7G;P%KY5CNO)]EMM3 J.LVL%F^U8@*O ME:Q6=U:P"BTM,^OENPPU.=LN6^LBV\V9A"K3V>0X-3,[EAJZ+79*;35ZGLU* M.)?I9;>UM>(N,]=3&Z8N%M-E?>B[RK?-RYWSK9Z7T7UJ9ZU)E#O0NR+RT2XX M-X06+KYEU6BEZ\1ED5[_'YE]L]ZW'W5.WY'5M#-X&P^ZD^HZ(6\6]>:NS*[M M\X+5\ZJYZR)O\B0ZR-(XN32#$1N?-#(=UVQ]/U]/3.'B:/.YP2)SMTO+PJ;3 M=78=;4O:H\V</TOM6J99U<BUE/U+<_TXK1863<ZP6N69F9+F:I-R)Y"O)MVF MU0](C%,Y+:ZRTDC.:_C9)B++Q"2?QEU3RD;FX<OFJ<SR@=*PP^"@-+UJUB2_ M0JU9NF3UXG.><"CJQD"E1W3D,\(]"41%'B,NL(!YH1=S=YXUK693]0.N[GRD M[M*L@#>33,E)5\-?9=EDJ5PO^#84NNT6\[[5MWMU/-)R:;5F[;IXMU%M)Z2N M/+1M;USFIB%+D_-Q'1R,/U;66WI;#5=YQ0ZC'8X[M[U]B6@*+^!Z.C%IUV,: M/#<XU]EJU"ZBWD *N;2WX%T6P0/CVZG3;3Z;0FIF9/.L]('9L"*\TU[7C5NU MZ+0M[KY?R65J H'ID6&;#4\/V%P3WS*L,GTYG4[NCQ]KNQZ!+6J==/LU@6 3 M5DU06@UAXX^-QA@LIR&JGV8UL:R2?0^W1NS</JDT:6UZD667DXZ'J$;&3I'4 M^D%;O>I=_?#N(CLR"6@.Y]GMIOYOX&2E7C\W6Y)RQQ,])"82<S<Q&:<.59R1 M@$N7<.V'1*A($AEZU(E\CVE-D9A?EY@['!C)B>1$<O9$SO:W6DA.).=N<OJN MXP2<><0/G(!P#B$)(T9)+%U'.V'@J<!#<O9*SK8#(SF1G$C.KTK.]3<[?@LS MD9!_/D(R3S#&8TY\CU/"%?A$N2;!U%H&H:L"H9B/A.R!D.N.BFQ$-B(;OQ8; M[7L'\X<X9+!\/>H/B\?E4" ?^^2C&W#/I0XCD2<DX4)%1 DPN:3K1U10+5V. MSUZ_,A^W.2LB$A&)B.P'D:WEZ<(!$98(RQ58:E_$D@E!=,P] TNFB @T)8$* MN:"1$!!RA&6?L.QR6\0F8A.QV1,V<YD6LO[!Z+EQ#4PPD9EK7U$J;= (/@D] MSS!34D44"SAQ-*6N4DR)&)"9O3)SW6<1F A,!&;OP$16(BM761F'3L!BSR24 M3(2$^V#R2]=C) QDX )W7?#QIR/?BI6(2<0D8K(G3)Y(NT%0@ODD,G*-D=)W ME)(B)J$K L*%9$1*CY-(:ZI\JAP5,61DGXQ<^"H"$@&)@.P'D/3N[ON!>W<W MD&DT8.;S'(JI6:0B,9&8:\2,0L4A=!T2!X$VQ(P"HGQSZH7,"6+F:^V'2,P^ MB;G=>1&AB%!$:#\(K<Y>RV0RRY&:2,TU:HK(H^ &#J$T< EW7$U"#@%A6CDR M#$ +A=3LE9HK_HJ@1% B*/L!Y<'5+/TR.&JV>!Y\-U^M_@VAB=!<@:;#:,2% M%Q+A:X_PB$8D9&%(/.5)Z2HMW3! :/8)S:V^BP!%@") OQ5 J^X@/Y&?J_P$ M'V0@78-. "#<CR,B0^81%H344T' HF[%7QE?E9.S!"/B$?$8T_OQ!Z8DRQ- M 5^+12IV994BH(I1(#2FW%!1*!)R 212+&1.&+INA%EEKUGEFL<B+!&6",O^ M8(E?6B(IMY"2ASX(36C@*[N;CTO", 82A$+;%!*8'R,I^R8E?F>)F$1,]HM) M@X?!A_.3/RPA<3O8;P)(C]L_BLHH >F'A(<Z($I[,8EE0+4((59<(R#[!&3C MJ,A&9".R\:NRL?G+!+AI#V+R04QZL><Z4A!?:TVX#( H<!GQI>?Y@8I=C^++ MKWU@<KO/(C 1F C,WH&)K$16KOU0A-) @=B<DM!>* C(@1P(@%\Y0;4BP W M[?E6K$1,(B81DSUATD( $TJ$9 <D.0T#1SN<F+P2"(\%(\*CE%"/.8%R0D]0 MW#F]5T@NG141B8A$1/:#R,5&'^926B(F$9,KF*21)[60F@@:^X0KZA&E)"6" M"\^3@9*1PLW2>\7DJL,B*A&5B,I^4(F[#B U'T=-ES,E0D\3J3V37-JM[D(M M8A*X3FS_R+.G-":7O5(3=QU @") _W Q5T'D)\=_ 2F :0(B2\I)9P% 0D5 M:,*\4 BJ(]_1"OGY=?E9.3%%/"(>$8_]X!&W?T4F[F B=5@4 A"IPHAP"#A1 M'%Q"(53:"V-&8\PI>\TI<?M7!"6"\EN\_8K;\R J=Z R5+'G P\,*A4CW#/I MHY2A) [X+C@Q,-=W$95]HA*WYT%8(BR_&2PQJ412=I*2<1$SFT7&+BC"8QT1 MZ2F?""5B;FD9<TPJ>R<EYI2(2<1DOYC\';;G63VOZL0->_YTR(P#[OL0!T2[ MD4<X4Y0(%SS"5" <&L2*>_C=9*_(Q U[D)9(RUYI>7IFM<>#=U!>91&FE<C( MU5^-!$"CT%5$R# TC/0%44H 850Y0L6&DK@#02_O[R 3D8G(Q-^7B=5'4<7M MTW1R7YU16WZ2I%\@JLZ;VFI=<S@V/#1397E4=):?&))8 F:SZ<#V\OE>96UO M$24-$%;+#V8&,==[@RR/(*]X(;4VQD[@!B;/]]RJWVV%0XBEP4RQ4''65-9K ML.#?(5SUM))??H[3ZVF]:I#-3"INAM,:E& .K0"+:"VUP^VJ$;]+*^]L86Y MPA1J4UA-O>;\1N9U2YO 92XU:+$;KMS,KY>&Y\WU" J=)]-RB9T6<*R;7263 E*(=T,)I?&345M>N-X.8!A9;$J-WRWV4NVG[:CX6+OO@?3*V*E@ end </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> diff --git a/samples/vnf_samples/traffic_profiles/acl/acl_ipv4_profile_1flows.ixncfg b/samples/vnf_samples/traffic_profiles/acl/acl_ipv4_profile_1flows.ixncfg Binary files differnew file mode 100644 index 000000000..01269bee2 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/acl/acl_ipv4_profile_1flows.ixncfg diff --git a/samples/vnf_samples/traffic_profiles/cgnapt/HTTP-vCGNAPT_IPv4_2Ports.rxf b/samples/vnf_samples/traffic_profiles/cgnapt/HTTP-vCGNAPT_IPv4_2Ports.rxf new file mode 100644 index 000000000..a454beba7 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/cgnapt/HTTP-vCGNAPT_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"><rpf> <Ixia.Aptixia.StackManager.SMSession type="Ixia.Aptixia.StackManager.SMSession" objectid="a1e46af9-15aa-4923-8410-c81d0cdf0836" version="6.70.420"> <doWaitLinkUp type="Bool">0</doWaitLinkUp> <doGratArp type="Bool">0</doGratArp> <subscribeToGratArpNotifications type="Bool">0</subscribeToGratArpNotifications> <doInterfaceCheck type="Bool">0</doInterfaceCheck> <rebootPortsBeforeConfigure type="Bool">0</rebootPortsBeforeConfigure> <testDuration type="Int">10000</testDuration> <checkLinkState type="Bool">0</checkLinkState> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420"> <name type="String">client network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1dcd6e1b-17cd-45a1-875a-cbea40d3468c" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="b458c333-b4d4-48ef-bd38-3b456f72f8c8" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="28c0383a-76a7-4750-8162-2ad946ddac97" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="b9a0be2e-3880-4100-9e29-9b474f9301f4" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="e0232591-010e-492c-8a28-75e436f4adb2" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R1</name> <mac type="String">00:98:10:64:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420"> <name type="String">VLAN-R1</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">100</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="a916ae0f-0731-405d-ad19-eaade6c515f1" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R1</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.16.100.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.16.100.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">2596329041</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="aa33a76b-9c7f-48d9-a537-8d6eeec03662" version="6.70.420"> <name type="String">DistGroup1</name> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="9c6c8594-548e-4ea5-a478-0bfb6252c1ce" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="693c7b7b-327b-4d59-b187-57d7600308e3" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="0f6ebdb4-7909-447a-b80a-e132dae33a9b" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="7a893f25-0ac6-41c7-ab5a-511c2068582a" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="fc54eec4-41ef-4b6c-9415-bf639013b52d" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="b0ccbeae-9db2-4416-bbed-80dcb2a7a9ed" version="6.70.420"> <trafficMaps type="ListNode"> <Ixia.Aptixia.StackManager.MeshingTrafficMap type="Ixia.Aptixia.StackManager.MeshingTrafficMap" objectid="ea086372-6f3e-4867-932d-bfa5aff92921" version="6.70.420"> <name type="String">newClientActivity1!HTTP server_newServerActivity1</name> <configMapFilename type="String">newClientActivity1Script.configmap</configMapFilename> <sourceActivityId type="Int">0</sourceActivityId> <ipPreference type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eIpPreference">2</ipPreference> <portRangesString type="String" /> <meshingType type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eMeshingType">2</meshingType> <destinationActivityId type="Int">0</destinationActivityId> </Ixia.Aptixia.StackManager.MeshingTrafficMap> </trafficMaps> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="StringList"> <String>10.223.166.127;2;5</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="df783f7c-615e-47c1-b7f0-1174985ea22e" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="StringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="3d3cf9ef-8aab-4388-9252-4baea80122d3" version="6.70.420" /> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420"> <name type="String">server network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1bd9f1bc-9959-464e-b1e8-ddb0bb4d0181" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="4fe8412b-7d4c-4ebe-a0d4-480a4401b3d0" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="4dfec118-30e8-4494-b7c7-e28518e7848a" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="123fecc5-cb5e-43e9-92a1-b053dc56d0f3" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="35ff711b-53f7-4c74-9e8b-98d35adaa6bf" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R2</name> <mac type="String">00:98:28:28:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420"> <name type="String">VLAN-R2</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">32</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="b85b184d-9bb4-48c2-a029-e633fee7a3c8" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R2</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.40.40.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.40.40.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">463911585</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="b2c21c73-bfe3-4fbc-9804-b5a8b307d893" version="6.70.420"> <name type="String">DistGroup1</name> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="993e33c6-e1f7-4967-982e-82a032f8c61a" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="36ca84d7-ff44-45b7-b75d-aec38b753161" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="25c5acdd-9dd3-4802-93b6-b10651820b66" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="6259328b-97c2-4390-8ab1-f16bf3459219" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="3eedf749-efa4-43a0-87ae-e110a77c88d4" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="284f9992-65d8-4027-a155-709f1965f892" version="6.70.420"> <trafficMaps type="ListNode" /> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-1</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="StringList"> <String>10.223.166.127;2;6</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="f65f12f2-018c-46f5-a9c5-a1f6f7151909" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="StringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="60b1273d-78d3-4813-8cea-ec9a7101b8a3" version="6.70.420" /> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> </portGroupList> <externalProperties type="Ixia.Aptixia.StackManager.ExternalPropertyManager" objectid="1f2452bf-e52a-4db2-ba47-e5cc8bf61b5e" version="6.70.420"> <properties type="ListNode"> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="145671ff-93a5-4ecc-8c83-59b2c3c67be9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatLTEUEUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9f07a941-ad2f-46b0-8c75-911862a21039" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SixRdRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a221ab5c-faae-4940-bfad-5d41d44f1427" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">L2tpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d811442b-bfb8-42f0-bbf8-6bdb6fc9b66b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPServerRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="f252cff3-b919-4e74-9f62-9e9c5ab5d324" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MobileSubscribersRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="493ce043-b982-4a43-a2d4-619e51fbc5a6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IPSecRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="500dfc8b-2e6a-401f-84c0-f6907f60c00e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSgsnS3RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="693cb176-f3d8-4073-8a02-fabdc0bdd3fb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPRange_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ec983bf9-07f0-46b2-99a0-354114f42501" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EmulatedRouterRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5d0f0eb8-40af-4292-8ff2-a57e7903601d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PppoxRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="653fae09-ba19-443c-8f8b-9483c0b86b9a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGAPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c886be8c-c207-4bb4-90d5-17be54556d58" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatRNCIuPSUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="00e75214-5166-406b-90e5-2b83567ae5cf" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="50d10ee7-45ce-46d2-ae8d-ecd3b1806067" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S5S8_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c2f310a4-6ea4-4459-be3b-f3b3365c590a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPGRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7e458bed-5e36-42d6-812d-3794be52766e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPPcrfRange_S5S8_PGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7d225fda-6432-4de3-9750-c19bbc957703" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DSLiteRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="e25dd669-ffc5-493d-a2b5-fd5627bf2ee8" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSGSNRangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7ac0b7d4-6df9-4e1f-86d2-f0a494b3f20b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SlaacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="25699a2c-ab22-417b-9072-894523e98008" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="05f1053a-5774-409f-b07e-add07df64338" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PSTNDigitalRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="482a10c3-0ac7-44d9-9fa9-b43ba3a9901d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a0f03753-923d-4421-8c4f-0ed78f00fc44" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">AtmRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="fb5cd68e-b4b0-4fd4-ae18-4100c0035642" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatMMEApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="62677b6a-080e-4cc3-919b-71fa90ae410f" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBUuApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="2e0fd6e3-470e-48df-ab8d-cc21b9d80393" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPSUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="175f3104-0d2a-44f9-b712-fed3b170f8cb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IpV4V6Range</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d1f37e1e-db44-4bac-acb8-b242dee8e371" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="61ccdebc-84e6-464d-be14-2b3ddedab9d2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DualStackIPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d0678cd8-998e-42ab-8f0d-bfcb5370eac2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S2a_TWAN</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d8350364-51c6-4a1b-af9f-72c9c235a636" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatSGSNIuPSApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="613d02a1-db1e-415d-b4bb-8b73b4477cf4" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBSimUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9a41f718-b55e-44c7-a0cc-b1fcf8204c20" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6dRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="4c26fe62-a63d-4c40-8e15-c58ad8fba8d0" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">UERangeBase</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5c2ca63f-3335-4ab7-963e-440817448538" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPMmeS10RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="51a5eccc-a68d-4730-8a48-32019c547c28" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6aRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="3010c4ad-f31e-4676-9e61-bb25cf9c1bbb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">BmScRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ef1677e4-f390-4a78-b61a-f7650cf5faea" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MBmsGwRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="24322b98-7a2a-4d2d-a4ee-4cde0f0e8b64" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PptpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> </properties> <values type="ListNode"> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="6804ae67-3bd7-471b-8796-ee1e4773c2f1" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="7efcd429-2c48-41bd-bdc5-489dbfcfc49a" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="a63d8276-65bc-4bc2-8202-6461c6399ef9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="09d7b134-2921-4759-bbdb-ff3a5a1966d7" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0cd9f099-242e-4b03-965f-d343c60181e6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="503aa008-2481-419f-a223-c90b2c25c17e" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0b8d2c01-19ac-4f28-924e-660676d978da" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="41c694b3-bb55-48fe-9604-8b003540242f" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> </values> </externalProperties> <availableNetworkTimelines type="ListNode" /> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.MacSessionData type="Ixia.Aptixia.StackManager.MacSessionData" objectid="a9c7aa59-e015-4ffd-bb82-5d877ae9c1a8" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.MacSessionDataSkeleton+eMacValidationOptions">2</duplicateCheckingScope> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacSessionData> <Ixia.Aptixia.StackManager.IpSessionData type="Ixia.Aptixia.StackManager.IpSessionData" objectid="34a78d72-1fc5-4875-9fe1-b4db66b1b4c4" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.IpSessionDataSkeleton+eIpValidationOptions">2</duplicateCheckingScope> <enableGatewayArp type="Bool">0</enableGatewayArp> <gatewayArpRequestRate type="Int">300</gatewayArpRequestRate> <maxOutstandingGatewayArpRequests type="Int">300</maxOutstandingGatewayArpRequests> <ignoreUnresolvedIPs type="Bool">0</ignoreUnresolvedIPs> <sendAllRequests type="Bool">0</sendAllRequests> <individualARPTimeOut type="Int">500</individualARPTimeOut> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpSessionData> <Ixia.Aptixia.StackManager.IxLoadSessionData type="Ixia.Aptixia.StackManager.IxLoadSessionData" objectid="1e24447f-69f1-4030-8b2d-25a18c7160ca" version="1.0.0"> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420" /> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420" /> </portGroupList> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSessionData> <Ixia.Aptixia.StackManager.ImpairSessionData type="Ixia.Aptixia.StackManager.ImpairSessionData" objectid="94b53c2c-0747-41c2-838d-0e0e15f31766" version="6.70.13"> <profiles type="ListNode"> <Ixia.Aptixia.StackManager.ImpairProfile type="Ixia.Aptixia.StackManager.ImpairProfile" objectid="90dd3511-93c1-49fa-8e38-db774db9fe17" version="6.70.13"> <name type="String">DefaultProfile</name> <defaultp type="Bool">1</defaultp> <seed type="Int">0</seed> <addDelay type="Bool">1</addDelay> <delay type="Int">20</delay> <jitter type="Int">0</jitter> <addDrop type="Bool">0</addDrop> <drop type="Double">10</drop> <addDropSequence type="Bool">0</addDropSequence> <dropSequenceSkip type="Int">10</dropSequenceSkip> <dropSequenceLength type="Int">1</dropSequenceLength> <addReorder type="Bool">0</addReorder> <gap type="Int">10</gap> <reorder type="Int">20</reorder> <reorderLength type="Int">1</reorderLength> <addReorderPI type="Bool">0</addReorderPI> <reorderPISkip type="Int">10</reorderPISkip> <reorderPILength type="Int">1</reorderPILength> <reorderPIInterval type="Int">1</reorderPIInterval> <reorderPITimeout type="Int">1000</reorderPITimeout> <addDuplicate type="Bool">0</addDuplicate> <duplicate type="Double">10</duplicate> <addFragment type="Bool">0</addFragment> <fragment type="Double">10</fragment> <mtu type="Int">1000</mtu> <addFragmentSequence type="Bool">0</addFragmentSequence> <fragmentSequenceSkip type="Int">10</fragmentSequenceSkip> <fragmentSequenceLength type="Int">1</fragmentSequenceLength> <mtuSequence type="Int">1000</mtuSequence> <sendFragmentsInReverseOrder type="Bool">0</sendFragmentsInReverseOrder> <sendFirstFragmentOnly type="Bool">0</sendFirstFragmentOnly> <sendOverlappingFragments type="Bool">0</sendOverlappingFragments> <addBandwidth type="Bool">0</addBandwidth> <bandwidth type="Double">1</bandwidth> <bandwidthUnits type="String">mbps</bandwidthUnits> <addBandwidthIn type="Bool">0</addBandwidthIn> <bandwidthIn type="Double">1</bandwidthIn> <bandwidthUnitsIn type="String">mbps</bandwidthUnitsIn> <destinationIp type="String">any</destinationIp> <sourceIp type="String">any</sourceIp> <sourcePort type="Int">0</sourcePort> <destinationPort type="Int">0</destinationPort> <protocol type="String">any</protocol> <typeOfService type="String">any</typeOfService> <addTcpFlagsFilter type="Bool">0</addTcpFlagsFilter> <selectTcpFlags type="String">SYN;RST;ACK</selectTcpFlags> <expectTcpFlags type="String">SYN</expectTcpFlags> <impairOrder type="String">Delay;Drop;DropSeq;Reorder;ReorderPI;Duplicate;Fragment;FragmentSeq;Bandwidth</impairOrder> </Ixia.Aptixia.StackManager.ImpairProfile> </profiles> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.ImpairSessionData> <Ixia.Aptixia.StackManager.IPSecSessionData type="Ixia.Aptixia.StackManager.IPSecSessionData" objectid="bd2f0ea4-4278-49c8-9600-18cd2c8ed639" version="8.1.7"> <ipsecTunnelSetup type="Ixia.Aptixia.StackManager.IPSecTunnelSetup" objectid="1bacc8a0-dda0-4e0c-b013-4d8618dc80b6" version="8.1.7"> <tunnelSetupTimeout type="Int">30</tunnelSetupTimeout> <tunnelRetransmissionTimeout type="Int">30</tunnelRetransmissionTimeout> <numRetries type="Int">0</numRetries> <retryInterval type="Int">10</retryInterval> <retryDelay type="Int">10</retryDelay> <testType type="String">P2D</testType> <sendCiscoVid type="Bool">0</sendCiscoVid> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <enableRekey type="Bool">1</enableRekey> <rekeyRetries type="Int">3</rekeyRetries> <rekeyFuzzPercentage type="Int">0</rekeyFuzzPercentage> <rekeyMargin type="Int">10</rekeyMargin> </ipsecTunnelSetup> <ipsecCertificates type="Ixia.Aptixia.StackManager.IPSecCertificates" objectid="2e324324-bf74-4ad3-afbb-62e44f01c31a" version="8.1.7"> <uniqueCert type="Bool">0</uniqueCert> <certSource type="String">kNewCert</certSource> <caURL type="String" /> <caDN type="String" /> <certSubjectDN type="String" /> <certSubjectAltDN type="String" /> <remoteIkeId type="String" /> <bitSize type="String">k512</bitSize> <saveCert type="Bool">1</saveCert> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <certParentFolder type="String">C:\Program Files\Ixia\CachedCerts</certParentFolder> <certNumber type="String" /> <caCertNumber type="String" /> <earlyExpDate type="String" /> <lateExpDate type="String" /> <usePerRangeCertNameExp type="Bool">0</usePerRangeCertNameExp> <checkCrl type="Bool">0</checkCrl> <crlOverrideEnable type="Bool">0</crlOverrideEnable> <crlOverrideUrl type="String" /> <checkOcsp type="Bool">0</checkOcsp> <ocspOverrideEnable type="Bool">0</ocspOverrideEnable> <ocspOverrideUrl type="String" /> <unknownIsRevoked type="Bool">0</unknownIsRevoked> <certProto type="String">kSCEP</certProto> </ipsecCertificates> <ipsecCertManager type="Ixia.Aptixia.StackManager.IPSecCertManager" objectid="f3dc4ef0-e9a1-48a2-b69f-c5d2b485e897" version="8.1.7"> <caURL type="String" /> <caDN type="String">CN=RootCA,C=RO,L=Bucharest,O=Ixia,OU=IxLoad,IP:201.121.87.2,email:ixia@ixiacom.com</caDN> <certSubjectDN type="String">CN=IxiaVPN,C=RO,L=Bucharest,O=Ixia</certSubjectDN> <keyGenAlgo type="String">kRSA_512</keyGenAlgo> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <caKeyFile type="String">C:\Program Files\Ixia\ca-priv.key</caKeyFile> <caCrtFile type="String">C:\Program Files\Ixia\ca-cert.crt</caCrtFile> <certNumber type="Int">1</certNumber> <certProto type="String">kSCEP</certProto> <createRootCA type="Bool">0</createRootCA> <uniqueCert type="Bool">0</uniqueCert> <descFilePath type="String">C:\Program Files\Ixia\CachedCerts\sample.desc</descFilePath> <useDescFile type="Bool">0</useDescFile> </ipsecCertManager> <eapSimTuples type="ListNode" /> <eapAkaTuples type="ListNode" /> <maxInitiationRate type="Int">50</maxInitiationRate> <maxPendingTunnels type="Int">50</maxPendingTunnels> <negotiationStartDelay type="Int">0</negotiationStartDelay> <teardownRate type="Int">10</teardownRate> <burstInitiation type="Bool">0</burstInitiation> <parallelInitiation type="Bool">0</parallelInitiation> <enableExtraPortLogging type="Bool">0</enableExtraPortLogging> <enableWildcardTsi type="Bool">0</enableWildcardTsi> <enableWildcardTsr type="Bool">0</enableWildcardTsr> <enablePlutoWildcardTsi type="Bool">0</enablePlutoWildcardTsi> <enablePlutoModeCfgWildcardTsr type="Bool">1</enablePlutoModeCfgWildcardTsr> <enablePlutoS2SWildcardTsr type="Bool">0</enablePlutoS2SWildcardTsr> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecSessionData> </typeSpecificData> <statViewManager type="Ixia.Aptixia.StackManager.StatViewManager" objectid="7256ce27-286c-475d-b198-09b4ae306f73" version="6.70.420"> <enableStats type="Bool">1</enableStats> <enableOverviewStats type="Bool">1</enableOverviewStats> <enablePerSessionStats type="Bool">1</enablePerSessionStats> </statViewManager> <waitForLinkUp type="Bool">0</waitForLinkUp> <overloadProtection type="Bool">1</overloadProtection> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.SMSession> </rpf></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"><?xml version="1.0" encoding="utf-16"?> <Config> <configs Version="5.0" /> </Config></xml> + </_quickTestConfig> + <lastApiUniqueId type="int">15481</lastApiUniqueId> + <version type="str">8.01.106.3</version> + <name type="str">HTTP-vCGNAPT_IPv4_2Ports.rxf</name> + <comment type="str"></comment> + <path type="str">C:\Users\ds1\Desktop\yardstick</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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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">6</portId> + <enableCapture type="bool">False</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">15432</_apiUniqueId> + </portPersistentSetting> + <analyzerPartialCapture type="str">False;8191</analyzerPartialCapture> + <name type="str"></name> + <_apiUniqueId type="int">15431</_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.40.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">5</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">15428</_apiUniqueId> + </portPersistentSetting> + <analyzerPartialCapture type="str">False;8191</analyzerPartialCapture> + <name type="str"></name> + <_apiUniqueId type="int">15427</_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 <data> M>)SMG7MOVS@2P+^*D<,5>[BE+8J41*6/19ND;;!I$\1I=X'KH2"I4:*K(WDE M.8\[W'<_4I)MV9:=[.U672SFC]:2.#-\B#,_CBPSSWZXNYX,;B ODBQ]OD>' MSMX/+YZ-2UE^3. 6\F61/_2=H3-TF;MG!*"P5T^2HAS\"/?/]^2T3.X2.2QN MAE.K4920:ABVY'[*Y=04&>6#T_<71^\O!J,7S\[.C\;F\.7%\>G[]?//1X?' M%R]?G1S9@H/3=Z^.WQ\=+JHN%D>/:<!&Y2^>O<[AEYF1N1_<R,D,GN^Y>U5% MQ<U)=GF9I)?SZZ_EI("J["*YAO%]JE_!E;Q)LGPNX2Q*BU)>3\]RT$G5LJ:< M5>5'E[EIC!W6B_LIS,MH579JAGF2R>@LSTK094OW(I_!6L/>)E$$J354;+;Q M*)5J H>RE.,RRV%3X&PY.NUV\"[MG369!IW.RNFL7(SDN]FD3*:3];Y50H?C M!\3>R3L[[0K3OH-946;7;\P]NUK(^/,Z7R<3.)/EHN1@_].'PO3I4U303X>9 MGEU#6A:?CLUD,/^=F$'])(8.'5+''[)/YU"8VHM/;R\NSLC-ZY\^'Y_=\,_N M69:7Q6?7H8'C.>%GZKB"U?/AY01,T?QS8+PE+?;OBN3YWE593O='H]O;V^$M M&V;YY<AU'#KZ^=W)6%_!M21):J:#&>:]A5;TL%95Z6A>ZR'$TK2WN@,[SE[8 M]@\.SCX,[!":NYOHXMFH+; B?>(25DD6@]C,XH-)8H9L4(W!X[7&D)M)^SBM MBZL\FUU>F6E0&UB3'ZUV;.WT(,\:M\D!3.G:^;F,DNR-L3]=*TC2\H7[;&0_ MGHVV2M6=?YWEU[.)'$-9&@=;3/;_//G+W>%3\]_+IT]^F67ETX]U-*Q/]NL/ M.O3J@^\WI&T'&ME_+ O_N3S\[_*PCB$F@IS/TO5V/)F43U<"];QFISX8&+?* M(J/1%,S*F%"_/O[AR67YM-4R8ZJIY3B-,W,7$SE)_BUMS'DE+UL3O%9_]"QO M6K*<ZH_3KZ56VS@8V%9>?RZ;T;!S6IO0."W6Y6I)VY_W\AILJ3VF]N*H?;5; MYT"6<)GE]U;"QKR1C0H+W7;IIOY!?#F/1%9@-0I!\:7,II_N91Y97_S2&6Z& M^5U<5;9FJKNMD,_[8FI8M'%Y=5/K<%9U?S#:6OSVMIG/.V3&#\G89IRJ?UEJ MW4"Q2^IM<GDU,?_*K5(+-I7'ACME$B>06TE%E1(TC(DO&"<\9(I(JB2!V('( M =\13EB-R38#FU69>=6>,N:44J\VTBK:U+-W>7Q\: O'A!*/N)0PQAGS/1ZX MQ VH\"@/'$%$R'P6^AZA9L)7AENZG0TR$STO(3I-K82%$7$\XH07U-EWQ3X+ MAIY/.67B[XZWSYQY6U>TMMC-S.K'2 R,7^^GR:3QS=*L+1JWW7)#ZNCX3NJK M)(7YH!R;%=0).3NH)V^7Q .&7D:170I926I6E"X;4M\?FHXM]6(0SOZ^$J': M=YGF^^ &<C]R]%^IMQK+1MLL;[;A^.X]E+=9_F4>Q8W4<FE0&>L2V6'H'"8@ MBWI0JJ7&P*Z2!T<O5XVUQ'88:X42$^LN<WD]L&&A&'QW)_R_;2QHR)NU6K;' MC^.[<YB:D -YJUNL7L_38-[S#IEN/_[P;JSE!.K;YSB+8-2ZOJDXOFD5_ZA, M*+=J*U<[YVYW@/T]EWES/^H:OZKL,2!J :NN^G1JB;IE)AYDDXD)F';]7;$' M2FGN=%3/Y]6RK<HG(/,4(@MQ*Q?;=7G;P%KY5CNO)]EMM3 J.LVL%F^U8@*O ME:Q6=U:P"BTM,^OENPPU.=LN6^LBV\V9A"K3V>0X-3,[EAJZ+79*;35ZGLU* M.)?I9;>UM>(N,]=3&Z8N%M-E?>B[RK?-RYWSK9Z7T7UJ9ZU)E#O0NR+RT2XX M-X06+KYEU6BEZ\1ED5[_'YE]L]ZW'W5.WY'5M#-X&P^ZD^HZ(6\6]>:NS*[M M\X+5\ZJYZR)O\B0ZR-(XN32#$1N?-#(=UVQ]/U]/3.'B:/.YP2)SMTO+PJ;3 M=78=;4O:H\V</TOM6J99U<BUE/U+<_TXK1863<ZP6N69F9+F:I-R)Y"O)MVF MU0](C%,Y+:ZRTDC.:_C9)B++Q"2?QEU3RD;FX<OFJ<SR@=*PP^"@-+UJUB2_ M0JU9NF3UXG.><"CJQD"E1W3D,\(]"41%'B,NL(!YH1=S=YXUK693]0.N[GRD M[M*L@#>33,E)5\-?9=EDJ5PO^#84NNT6\[[5MWMU/-)R:;5F[;IXMU%M)Z2N M/+1M;USFIB%+D_-Q'1R,/U;66WI;#5=YQ0ZC'8X[M[U]B6@*+^!Z.C%IUV,: M/#<XU]EJU"ZBWD *N;2WX%T6P0/CVZG3;3Z;0FIF9/.L]('9L"*\TU[7C5NU MZ+0M[KY?R65J H'ID6&;#4\/V%P3WS*L,GTYG4[NCQ]KNQZ!+6J==/LU@6 3 M5DU06@UAXX^-QA@LIR&JGV8UL:R2?0^W1NS</JDT:6UZD667DXZ'J$;&3I'4 M^D%;O>I=_?#N(CLR"6@.Y]GMIOYOX&2E7C\W6Y)RQQ,])"82<S<Q&:<.59R1 M@$N7<.V'1*A($AEZU(E\CVE-D9A?EY@['!C)B>1$<O9$SO:W6DA.).=N<OJN MXP2<><0/G(!P#B$)(T9)+%U'.V'@J<!#<O9*SK8#(SF1G$C.KTK.]3<[?@LS MD9!_/D(R3S#&8TY\CU/"%?A$N2;!U%H&H:L"H9B/A.R!D.N.BFQ$-B(;OQ8; M[7L'\X<X9+!\/>H/B\?E4" ?^^2C&W#/I0XCD2<DX4)%1 DPN:3K1U10+5V. MSUZ_,A^W.2LB$A&)B.P'D:WEZ<(!$98(RQ58:E_$D@E!=,P] TNFB @T)8$* MN:"1$!!RA&6?L.QR6\0F8A.QV1,V<YD6LO[!Z+EQ#4PPD9EK7U$J;= (/@D] MSS!34D44"SAQ-*6N4DR)&)"9O3)SW6<1F A,!&;OP$16(BM761F'3L!BSR24 M3(2$^V#R2]=C) QDX )W7?#QIR/?BI6(2<0D8K(G3)Y(NT%0@ODD,G*-D=)W ME)(B)J$K L*%9$1*CY-(:ZI\JAP5,61DGXQ<^"H"$@&)@.P'D/3N[ON!>W<W MD&DT8.;S'(JI6:0B,9&8:\2,0L4A=!T2!X$VQ(P"HGQSZH7,"6+F:^V'2,P^ MB;G=>1&AB%!$:#\(K<Y>RV0RRY&:2,TU:HK(H^ &#J$T< EW7$U"#@%A6CDR M#$ +A=3LE9HK_HJ@1% B*/L!Y<'5+/TR.&JV>!Y\-U^M_@VAB=!<@:;#:,2% M%Q+A:X_PB$8D9&%(/.5)Z2HMW3! :/8)S:V^BP!%@") OQ5 J^X@/Y&?J_P$ M'V0@78-. "#<CR,B0^81%H344T' HF[%7QE?E9.S!"/B$?$8T_OQ!Z8DRQ- M 5^+12IV994BH(I1(#2FW%!1*!)R 212+&1.&+INA%EEKUGEFL<B+!&6",O^ M8(E?6B(IMY"2ASX(36C@*[N;CTO", 82A$+;%!*8'R,I^R8E?F>)F$1,]HM) M@X?!A_.3/RPA<3O8;P)(C]L_BLHH >F'A(<Z($I[,8EE0+4((59<(R#[!&3C MJ,A&9".R\:NRL?G+!+AI#V+R04QZL><Z4A!?:TVX#( H<!GQI>?Y@8I=C^++ MKWU@<KO/(C 1F C,WH&)K$16KOU0A-) @=B<DM!>* C(@1P(@%\Y0;4BP W M[?E6K$1,(B81DSUATD( $TJ$9 <D.0T#1SN<F+P2"(\%(\*CE%"/.8%R0D]0 MW#F]5T@NG141B8A$1/:#R,5&'^926B(F$9,KF*21)[60F@@:^X0KZA&E)"6" M"\^3@9*1PLW2>\7DJL,B*A&5B,I^4(F[#B U'T=-ES,E0D\3J3V37-JM[D(M M8A*X3FS_R+.G-":7O5(3=QU @") _W Q5T'D)\=_ 2F :0(B2\I)9P% 0D5 M:,*\4 BJ(]_1"OGY=?E9.3%%/"(>$8_]X!&W?T4F[F B=5@4 A"IPHAP"#A1 M'%Q"(53:"V-&8\PI>\TI<?M7!"6"\EN\_8K;\R J=Z R5+'G P\,*A4CW#/I MHY2A) [X+C@Q,-=W$95]HA*WYT%8(BR_&2PQJ412=I*2<1$SFT7&+BC"8QT1 MZ2F?""5B;FD9<TPJ>R<EYI2(2<1DOYC\';;G63VOZL0->_YTR(P#[OL0!T2[ MD4<X4Y0(%SS"5" <&L2*>_C=9*_(Q U[D)9(RUYI>7IFM<>#=U!>91&FE<C( MU5^-!$"CT%5$R# TC/0%44H 850Y0L6&DK@#02_O[R 3D8G(Q-^7B=5'4<7M MTW1R7YU16WZ2I%\@JLZ;VFI=<S@V/#1397E4=):?&))8 F:SZ<#V\OE>96UO M$24-$%;+#V8&,==[@RR/(*]X(;4VQD[@!B;/]]RJWVV%0XBEP4RQ4''65-9K ML.#?(5SUM))??H[3ZVF]:I#-3"INAM,:E& .K0"+:"VUP^VJ$;]+*^]L86Y MPA1J4UA-O>;\1N9U2YO 92XU:+$;KMS,KY>&Y\WU" J=)]-RB9T6<*R;7263 E*(=T,)I?&345M>N-X.8!A9;$J-WRWV4NVG[:CX6+OO@?3*V*E@ end </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> diff --git a/samples/vnf_samples/traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows.ixncfg b/samples/vnf_samples/traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows.ixncfg Binary files differnew file mode 100644 index 000000000..d24204385 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows.ixncfg 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/yardstick/vTC/apexlake/bin/run_tests.sh b/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml index 402a6d7fe..e713ea858 100755..100644 --- a/yardstick/vTC/apexlake/bin/run_tests.sh +++ b/samples/vnf_samples/traffic_profiles/ipv4_1flow_Packets.yaml @@ -1,4 +1,3 @@ -#!/bin/bash # Copyright (c) 2016-2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,5 +11,8 @@ # 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. -export PYTHONPATH=`pwd` -nosetests --with-coverage --cover-erase --cover-package experimental_framework + +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_cgnapt.yaml b/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml new file mode 100644 index 000000000..2ea8d3c44 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.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', '10.0.2.1-10.0.2.255') }}" + dstip4: "{{get(flow, 'flow.dstip4_range', '10.0.3.1-10.0.3.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', '10.0.3.1-10.0.3.255') }}" + dstip4: "{{get(flow, 'flow.srcip4_range', '10.0.2.1-10.0.2.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.yaml b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml new file mode 100644 index 000000000..ccd40c33b --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml @@ -0,0 +1,121 @@ +# 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') }}" + + outer_l3v4: + proto: "udp" + srcip4: "{{get(flow, 'flow.srcip4_range', '1.1.1.1-1.15.255.255') }}" + dstip4: "{{get(flow, 'flow.dstip4_range', '90.90.1.1-90.105.255.255') }}" + count: "{{get(flow, 'flow.count', '1') }}" + ttl: 32 + dscp: 0 + outer_l4: + srcport: "{{get(flow, 'flow.srcport_range', '1234') }}" + dstport: "{{get(flow, 'flow.dstport_range', '2001') }}" +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', '1.1.1.1-1.15.255.255') }}" + dstip4: "{{get(flow, 'flow.srcip4_range', '90.90.1.1-90.105.255.255') }}" + count: "{{get(flow, 'flow.count', '1') }}" + ttl: 32 + dscp: 0 + outer_l4: + srcport: "{{get(flow, 'flow.srcport_range', '1234') }}" + dstport: "{{get(flow, 'flow.dstport_range', '2001') }}" +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') }}" + + outer_l3v4: + proto: "udp" + srcip4: "{{get(flow, 'flow.srcip4_range', '1.1.1.1-1.15.255.255') }}" + dstip4: "{{get(flow, 'flow.dstip4_range', '90.90.1.1-90.105.255.255') }}" + count: "{{get(flow, 'flow.count', '1') }}" + ttl: 32 + dscp: 0 + outer_l4: + srcport: "{{get(flow, 'flow.srcport_range', '1234') }}" + dstport: "{{get(flow, 'flow.dstport_range', '2001') }}" +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: "udp" + srcip4: "{{get(flow, 'flow.dstip4_range', '1.1.1.1-1.15.255.255') }}" + dstip4: "{{get(flow, 'flow.srcip4_range', '90.90.1.1-90.105.255.255') }}" + count: "{{get(flow, 'flow.count', '1') }}" + ttl: 32 + dscp: 0 + outer_l4: + srcport: "{{get(flow, 'flow.srcport_range', '1234') }}" + dstport: "{{get(flow, 'flow.dstport_range', '2001') }}" 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/vfw/HTTP-vFW_IPv4_2Ports.rxf b/samples/vnf_samples/traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports.rxf new file mode 100644 index 000000000..b1563bd79 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/vfw/HTTP-vFW_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"><rpf> <Ixia.Aptixia.StackManager.SMSession type="Ixia.Aptixia.StackManager.SMSession" objectid="a1e46af9-15aa-4923-8410-c81d0cdf0836" version="6.70.420"> <doWaitLinkUp type="Bool">0</doWaitLinkUp> <doGratArp type="Bool">0</doGratArp> <subscribeToGratArpNotifications type="Bool">0</subscribeToGratArpNotifications> <doInterfaceCheck type="Bool">0</doInterfaceCheck> <rebootPortsBeforeConfigure type="Bool">0</rebootPortsBeforeConfigure> <testDuration type="Int">10000</testDuration> <checkLinkState type="Bool">0</checkLinkState> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420"> <name type="String">client network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1dcd6e1b-17cd-45a1-875a-cbea40d3468c" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="b458c333-b4d4-48ef-bd38-3b456f72f8c8" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="28c0383a-76a7-4750-8162-2ad946ddac97" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="b9a0be2e-3880-4100-9e29-9b474f9301f4" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="e0232591-010e-492c-8a28-75e436f4adb2" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R1</name> <mac type="String">00:98:10:64:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420"> <name type="String">VLAN-R1</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">100</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="a916ae0f-0731-405d-ad19-eaade6c515f1" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R1</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.16.100.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.16.100.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">2596329041</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="aa33a76b-9c7f-48d9-a537-8d6eeec03662" version="6.70.420"> <name type="String">DistGroup1</name> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="9c6c8594-548e-4ea5-a478-0bfb6252c1ce" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="693c7b7b-327b-4d59-b187-57d7600308e3" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="0f6ebdb4-7909-447a-b80a-e132dae33a9b" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="7a893f25-0ac6-41c7-ab5a-511c2068582a" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="fc54eec4-41ef-4b6c-9415-bf639013b52d" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="b0ccbeae-9db2-4416-bbed-80dcb2a7a9ed" version="6.70.420"> <trafficMaps type="ListNode"> <Ixia.Aptixia.StackManager.MeshingTrafficMap type="Ixia.Aptixia.StackManager.MeshingTrafficMap" objectid="ea086372-6f3e-4867-932d-bfa5aff92921" version="6.70.420"> <name type="String">newClientActivity1!HTTP server_newServerActivity1</name> <configMapFilename type="String">newClientActivity1Script.configmap</configMapFilename> <sourceActivityId type="Int">0</sourceActivityId> <ipPreference type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eIpPreference">2</ipPreference> <portRangesString type="String" /> <meshingType type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eMeshingType">2</meshingType> <destinationActivityId type="Int">0</destinationActivityId> </Ixia.Aptixia.StackManager.MeshingTrafficMap> </trafficMaps> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="StringList"> <String>10.223.166.127;2;5</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="df783f7c-615e-47c1-b7f0-1174985ea22e" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="StringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="3d3cf9ef-8aab-4388-9252-4baea80122d3" version="6.70.420" /> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420"> <name type="String">server network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1bd9f1bc-9959-464e-b1e8-ddb0bb4d0181" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="4fe8412b-7d4c-4ebe-a0d4-480a4401b3d0" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="4dfec118-30e8-4494-b7c7-e28518e7848a" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="123fecc5-cb5e-43e9-92a1-b053dc56d0f3" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="35ff711b-53f7-4c74-9e8b-98d35adaa6bf" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R2</name> <mac type="String">00:98:28:28:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420"> <name type="String">VLAN-R2</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">32</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="b85b184d-9bb4-48c2-a029-e633fee7a3c8" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R2</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.40.40.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.40.40.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">463911585</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="b2c21c73-bfe3-4fbc-9804-b5a8b307d893" version="6.70.420"> <name type="String">DistGroup1</name> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="993e33c6-e1f7-4967-982e-82a032f8c61a" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="36ca84d7-ff44-45b7-b75d-aec38b753161" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="25c5acdd-9dd3-4802-93b6-b10651820b66" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="6259328b-97c2-4390-8ab1-f16bf3459219" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="3eedf749-efa4-43a0-87ae-e110a77c88d4" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="284f9992-65d8-4027-a155-709f1965f892" version="6.70.420"> <trafficMaps type="ListNode" /> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-1</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="StringList"> <String>10.223.166.127;2;6</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="f65f12f2-018c-46f5-a9c5-a1f6f7151909" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="StringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="60b1273d-78d3-4813-8cea-ec9a7101b8a3" version="6.70.420" /> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> </portGroupList> <externalProperties type="Ixia.Aptixia.StackManager.ExternalPropertyManager" objectid="1f2452bf-e52a-4db2-ba47-e5cc8bf61b5e" version="6.70.420"> <properties type="ListNode"> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="145671ff-93a5-4ecc-8c83-59b2c3c67be9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatLTEUEUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9f07a941-ad2f-46b0-8c75-911862a21039" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SixRdRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a221ab5c-faae-4940-bfad-5d41d44f1427" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">L2tpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d811442b-bfb8-42f0-bbf8-6bdb6fc9b66b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPServerRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="f252cff3-b919-4e74-9f62-9e9c5ab5d324" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MobileSubscribersRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="493ce043-b982-4a43-a2d4-619e51fbc5a6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IPSecRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="500dfc8b-2e6a-401f-84c0-f6907f60c00e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSgsnS3RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="693cb176-f3d8-4073-8a02-fabdc0bdd3fb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPRange_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ec983bf9-07f0-46b2-99a0-354114f42501" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EmulatedRouterRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5d0f0eb8-40af-4292-8ff2-a57e7903601d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PppoxRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="653fae09-ba19-443c-8f8b-9483c0b86b9a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGAPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c886be8c-c207-4bb4-90d5-17be54556d58" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatRNCIuPSUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="00e75214-5166-406b-90e5-2b83567ae5cf" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="50d10ee7-45ce-46d2-ae8d-ecd3b1806067" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S5S8_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c2f310a4-6ea4-4459-be3b-f3b3365c590a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPGRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7e458bed-5e36-42d6-812d-3794be52766e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPPcrfRange_S5S8_PGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7d225fda-6432-4de3-9750-c19bbc957703" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DSLiteRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="e25dd669-ffc5-493d-a2b5-fd5627bf2ee8" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSGSNRangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7ac0b7d4-6df9-4e1f-86d2-f0a494b3f20b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SlaacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="25699a2c-ab22-417b-9072-894523e98008" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="05f1053a-5774-409f-b07e-add07df64338" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PSTNDigitalRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="482a10c3-0ac7-44d9-9fa9-b43ba3a9901d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a0f03753-923d-4421-8c4f-0ed78f00fc44" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">AtmRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="fb5cd68e-b4b0-4fd4-ae18-4100c0035642" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatMMEApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="62677b6a-080e-4cc3-919b-71fa90ae410f" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBUuApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="2e0fd6e3-470e-48df-ab8d-cc21b9d80393" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPSUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="175f3104-0d2a-44f9-b712-fed3b170f8cb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IpV4V6Range</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d1f37e1e-db44-4bac-acb8-b242dee8e371" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="61ccdebc-84e6-464d-be14-2b3ddedab9d2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DualStackIPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d0678cd8-998e-42ab-8f0d-bfcb5370eac2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S2a_TWAN</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d8350364-51c6-4a1b-af9f-72c9c235a636" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatSGSNIuPSApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="613d02a1-db1e-415d-b4bb-8b73b4477cf4" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBSimUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9a41f718-b55e-44c7-a0cc-b1fcf8204c20" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6dRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="4c26fe62-a63d-4c40-8e15-c58ad8fba8d0" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">UERangeBase</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5c2ca63f-3335-4ab7-963e-440817448538" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPMmeS10RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="51a5eccc-a68d-4730-8a48-32019c547c28" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6aRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="3010c4ad-f31e-4676-9e61-bb25cf9c1bbb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">BmScRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ef1677e4-f390-4a78-b61a-f7650cf5faea" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MBmsGwRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="24322b98-7a2a-4d2d-a4ee-4cde0f0e8b64" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PptpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> </properties> <values type="ListNode"> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="6804ae67-3bd7-471b-8796-ee1e4773c2f1" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="7efcd429-2c48-41bd-bdc5-489dbfcfc49a" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="a63d8276-65bc-4bc2-8202-6461c6399ef9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="09d7b134-2921-4759-bbdb-ff3a5a1966d7" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0cd9f099-242e-4b03-965f-d343c60181e6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="503aa008-2481-419f-a223-c90b2c25c17e" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0b8d2c01-19ac-4f28-924e-660676d978da" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="41c694b3-bb55-48fe-9604-8b003540242f" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> </values> </externalProperties> <availableNetworkTimelines type="ListNode" /> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.MacSessionData type="Ixia.Aptixia.StackManager.MacSessionData" objectid="a9c7aa59-e015-4ffd-bb82-5d877ae9c1a8" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.MacSessionDataSkeleton+eMacValidationOptions">2</duplicateCheckingScope> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacSessionData> <Ixia.Aptixia.StackManager.IpSessionData type="Ixia.Aptixia.StackManager.IpSessionData" objectid="34a78d72-1fc5-4875-9fe1-b4db66b1b4c4" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.IpSessionDataSkeleton+eIpValidationOptions">2</duplicateCheckingScope> <enableGatewayArp type="Bool">0</enableGatewayArp> <gatewayArpRequestRate type="Int">300</gatewayArpRequestRate> <maxOutstandingGatewayArpRequests type="Int">300</maxOutstandingGatewayArpRequests> <ignoreUnresolvedIPs type="Bool">0</ignoreUnresolvedIPs> <sendAllRequests type="Bool">0</sendAllRequests> <individualARPTimeOut type="Int">500</individualARPTimeOut> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpSessionData> <Ixia.Aptixia.StackManager.IxLoadSessionData type="Ixia.Aptixia.StackManager.IxLoadSessionData" objectid="1e24447f-69f1-4030-8b2d-25a18c7160ca" version="1.0.0"> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420" /> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420" /> </portGroupList> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSessionData> <Ixia.Aptixia.StackManager.ImpairSessionData type="Ixia.Aptixia.StackManager.ImpairSessionData" objectid="94b53c2c-0747-41c2-838d-0e0e15f31766" version="6.70.13"> <profiles type="ListNode"> <Ixia.Aptixia.StackManager.ImpairProfile type="Ixia.Aptixia.StackManager.ImpairProfile" objectid="90dd3511-93c1-49fa-8e38-db774db9fe17" version="6.70.13"> <name type="String">DefaultProfile</name> <defaultp type="Bool">1</defaultp> <seed type="Int">0</seed> <addDelay type="Bool">1</addDelay> <delay type="Int">20</delay> <jitter type="Int">0</jitter> <addDrop type="Bool">0</addDrop> <drop type="Double">10</drop> <addDropSequence type="Bool">0</addDropSequence> <dropSequenceSkip type="Int">10</dropSequenceSkip> <dropSequenceLength type="Int">1</dropSequenceLength> <addReorder type="Bool">0</addReorder> <gap type="Int">10</gap> <reorder type="Int">20</reorder> <reorderLength type="Int">1</reorderLength> <addReorderPI type="Bool">0</addReorderPI> <reorderPISkip type="Int">10</reorderPISkip> <reorderPILength type="Int">1</reorderPILength> <reorderPIInterval type="Int">1</reorderPIInterval> <reorderPITimeout type="Int">1000</reorderPITimeout> <addDuplicate type="Bool">0</addDuplicate> <duplicate type="Double">10</duplicate> <addFragment type="Bool">0</addFragment> <fragment type="Double">10</fragment> <mtu type="Int">1000</mtu> <addFragmentSequence type="Bool">0</addFragmentSequence> <fragmentSequenceSkip type="Int">10</fragmentSequenceSkip> <fragmentSequenceLength type="Int">1</fragmentSequenceLength> <mtuSequence type="Int">1000</mtuSequence> <sendFragmentsInReverseOrder type="Bool">0</sendFragmentsInReverseOrder> <sendFirstFragmentOnly type="Bool">0</sendFirstFragmentOnly> <sendOverlappingFragments type="Bool">0</sendOverlappingFragments> <addBandwidth type="Bool">0</addBandwidth> <bandwidth type="Double">1</bandwidth> <bandwidthUnits type="String">mbps</bandwidthUnits> <addBandwidthIn type="Bool">0</addBandwidthIn> <bandwidthIn type="Double">1</bandwidthIn> <bandwidthUnitsIn type="String">mbps</bandwidthUnitsIn> <destinationIp type="String">any</destinationIp> <sourceIp type="String">any</sourceIp> <sourcePort type="Int">0</sourcePort> <destinationPort type="Int">0</destinationPort> <protocol type="String">any</protocol> <typeOfService type="String">any</typeOfService> <addTcpFlagsFilter type="Bool">0</addTcpFlagsFilter> <selectTcpFlags type="String">SYN;RST;ACK</selectTcpFlags> <expectTcpFlags type="String">SYN</expectTcpFlags> <impairOrder type="String">Delay;Drop;DropSeq;Reorder;ReorderPI;Duplicate;Fragment;FragmentSeq;Bandwidth</impairOrder> </Ixia.Aptixia.StackManager.ImpairProfile> </profiles> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.ImpairSessionData> <Ixia.Aptixia.StackManager.IPSecSessionData type="Ixia.Aptixia.StackManager.IPSecSessionData" objectid="bd2f0ea4-4278-49c8-9600-18cd2c8ed639" version="8.1.7"> <ipsecTunnelSetup type="Ixia.Aptixia.StackManager.IPSecTunnelSetup" objectid="1bacc8a0-dda0-4e0c-b013-4d8618dc80b6" version="8.1.7"> <tunnelSetupTimeout type="Int">30</tunnelSetupTimeout> <tunnelRetransmissionTimeout type="Int">30</tunnelRetransmissionTimeout> <numRetries type="Int">0</numRetries> <retryInterval type="Int">10</retryInterval> <retryDelay type="Int">10</retryDelay> <testType type="String">P2D</testType> <sendCiscoVid type="Bool">0</sendCiscoVid> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <enableRekey type="Bool">1</enableRekey> <rekeyRetries type="Int">3</rekeyRetries> <rekeyFuzzPercentage type="Int">0</rekeyFuzzPercentage> <rekeyMargin type="Int">10</rekeyMargin> </ipsecTunnelSetup> <ipsecCertificates type="Ixia.Aptixia.StackManager.IPSecCertificates" objectid="2e324324-bf74-4ad3-afbb-62e44f01c31a" version="8.1.7"> <uniqueCert type="Bool">0</uniqueCert> <certSource type="String">kNewCert</certSource> <caURL type="String" /> <caDN type="String" /> <certSubjectDN type="String" /> <certSubjectAltDN type="String" /> <remoteIkeId type="String" /> <bitSize type="String">k512</bitSize> <saveCert type="Bool">1</saveCert> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <certParentFolder type="String">C:\Program Files\Ixia\CachedCerts</certParentFolder> <certNumber type="String" /> <caCertNumber type="String" /> <earlyExpDate type="String" /> <lateExpDate type="String" /> <usePerRangeCertNameExp type="Bool">0</usePerRangeCertNameExp> <checkCrl type="Bool">0</checkCrl> <crlOverrideEnable type="Bool">0</crlOverrideEnable> <crlOverrideUrl type="String" /> <checkOcsp type="Bool">0</checkOcsp> <ocspOverrideEnable type="Bool">0</ocspOverrideEnable> <ocspOverrideUrl type="String" /> <unknownIsRevoked type="Bool">0</unknownIsRevoked> <certProto type="String">kSCEP</certProto> </ipsecCertificates> <ipsecCertManager type="Ixia.Aptixia.StackManager.IPSecCertManager" objectid="f3dc4ef0-e9a1-48a2-b69f-c5d2b485e897" version="8.1.7"> <caURL type="String" /> <caDN type="String">CN=RootCA,C=RO,L=Bucharest,O=Ixia,OU=IxLoad,IP:201.121.87.2,email:ixia@ixiacom.com</caDN> <certSubjectDN type="String">CN=IxiaVPN,C=RO,L=Bucharest,O=Ixia</certSubjectDN> <keyGenAlgo type="String">kRSA_512</keyGenAlgo> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <caKeyFile type="String">C:\Program Files\Ixia\ca-priv.key</caKeyFile> <caCrtFile type="String">C:\Program Files\Ixia\ca-cert.crt</caCrtFile> <certNumber type="Int">1</certNumber> <certProto type="String">kSCEP</certProto> <createRootCA type="Bool">0</createRootCA> <uniqueCert type="Bool">0</uniqueCert> <descFilePath type="String">C:\Program Files\Ixia\CachedCerts\sample.desc</descFilePath> <useDescFile type="Bool">0</useDescFile> </ipsecCertManager> <eapSimTuples type="ListNode" /> <eapAkaTuples type="ListNode" /> <maxInitiationRate type="Int">50</maxInitiationRate> <maxPendingTunnels type="Int">50</maxPendingTunnels> <negotiationStartDelay type="Int">0</negotiationStartDelay> <teardownRate type="Int">10</teardownRate> <burstInitiation type="Bool">0</burstInitiation> <parallelInitiation type="Bool">0</parallelInitiation> <enableExtraPortLogging type="Bool">0</enableExtraPortLogging> <enableWildcardTsi type="Bool">0</enableWildcardTsi> <enableWildcardTsr type="Bool">0</enableWildcardTsr> <enablePlutoWildcardTsi type="Bool">0</enablePlutoWildcardTsi> <enablePlutoModeCfgWildcardTsr type="Bool">1</enablePlutoModeCfgWildcardTsr> <enablePlutoS2SWildcardTsr type="Bool">0</enablePlutoS2SWildcardTsr> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecSessionData> </typeSpecificData> <statViewManager type="Ixia.Aptixia.StackManager.StatViewManager" objectid="7256ce27-286c-475d-b198-09b4ae306f73" version="6.70.420"> <enableStats type="Bool">1</enableStats> <enableOverviewStats type="Bool">1</enableOverviewStats> <enablePerSessionStats type="Bool">1</enablePerSessionStats> </statViewManager> <waitForLinkUp type="Bool">0</waitForLinkUp> <overloadProtection type="Bool">1</overloadProtection> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.SMSession> </rpf></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"><?xml version="1.0" encoding="utf-16"?> <Config> <configs Version="5.0" /> </Config></xml> + </_quickTestConfig> + <lastApiUniqueId type="int">15481</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:\Users\ds1\Desktop\yardstick</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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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">6</portId> + <enableCapture type="bool">False</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">15432</_apiUniqueId> + </portPersistentSetting> + <analyzerPartialCapture type="str">False;8192</analyzerPartialCapture> + <name type="str"></name> + <_apiUniqueId type="int">15431</_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.40.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">5</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">15428</_apiUniqueId> + </portPersistentSetting> + <analyzerPartialCapture type="str">False;8192</analyzerPartialCapture> + <name type="str"></name> + <_apiUniqueId type="int">15427</_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 <data> M>)SMG7MOVS@2P+^*D<,5N[BE+8JD'NECT29I&VS:!'&VN\#U4)#4*-'5D;R2 MG,<=[KL?*<FV;,M.]E%UL9@_6DOBS)"B9N;'41SFV?=WUY/!#>1%DJ7/]^C0 MV?O^Q;-Q*<L/"=Q"OFSRAIXS=(8N<_>, !3VZDE2E(,?X/[YGIR6R5TBA\7- M<&HUBA)2#<.6W$^YG)HFHWQP^O[BZ/W%8/3BV=GYT=@<OKPX/GV_?O[IZ/#X MXN6KDR/;<'#Z[M7Q^Z/#1=?%XN@Q ]CH_,6SUSG\,C,R]X,;.9G!\SUWK^JH MN#G)+B^3]')^_;6<%%"U7237,+Y/]2NXDC=)EL\EG$5K4<KKZ5D..JE&UK2S MJOWH,C>#L=-Z<3^%>1NMVD[--$\R&9WE60FZ;.E>Y#-8&]C;)(H@M8:*S3$> MI5)-X%"6<EQF.6P*G"UGIST.WJ6]LR<SH--9.9V5BYE\-YN4R72R?F^5T.'X M ;%W\LZZ76'&=S KRNSZC7EF5PL9;][GZV0"9[)<M!SL?_RQ,/?T,2KHQ\-, MSZXA+8N/Q\89S'\G9E(_!D.'#JGC#=G'<RA,[\7'MQ<79^3F]4^?CL]N^"?W M+,O+XI/K4-\13OB)F@->/]67$S!-\\^!B9:TV+\KDN=[5V4YW1^-;F]OA[=L MF.67(]=QZ.CG=R=C?077DB2I<0<SS7L+K>AAK:K3T;S70XBE&6_U!':<O;#C M'QR<_3BP4VB>;J*+9Z.VP(KTB4M8)5D,8N/%!Y/$3-F@FH/':XTA-T[[.*V+ MJSR;75X9-Z@-K,F/5F]L[?0@SYJPR0%,Z]KYN8R2[(VQ/UUK2-+RA?ML9#^> MC;9*U3?_.LNO9Q,YAK(T ;9P]O\^^=O=X5/SW\NG3WZ99>73#W4VK$_VZP\Z M%/7!=QO2]@8:V7\N&_^U//S?\K#.(2:#G,_2]7$\F91/5Q+UO&>G/AB8L,HB MH]$TS,J84*\^_O[)9?FT-3)CJNGE.(TS\Q03.4G^(VW.>24O6PY>JS_:RYN1 M+%W]<?JUU.H8!P,[RNM/93,;UJ>U28W38EVNEK3W\UY>@VVUQ]1>'+6O=NL< MR!(NL_S>2MB<-[)98:';;MW4/X@OYYG("CPB"YW#-"L2DU;O.[//,+^+J[[7 M+'</'?+YK9D.%T->7MW4.IQ5LS$8;6U^>]NX]PZ9\4,R=ABGZM\68C=0[))Z MFUQ>3<R_<JO4 E7EL<%0F<0)Y%921UHHI2,B0"O"::B(<BD0ZON. VY$72:J M.=EF8+,KXV9M#S*GE JO,M)JVM2S#WU\?&@;QX0205Q*&..,>8+[+G%]&@C* M?2<@0<@\%GJ"4./_E>&6;N> C-_G)42GJ96P;"*.($YX09U]ZN]S,72\P D9 M^X<C]IDS'^N*UA:[F5D,&8F!"?/]-)DTH5J:I483Q5L>2)TLWTE]E:0PGY1C MLZ Z(6<'M?-V23Q@Z&44V961E:1F@>FR(?6\(67!4B^&P-G?5T&H]EVF^3ZX MOMR/'/UW*E93VVB;Y<TQ'-^]A_(VRS_/D[J16JX4*F-=(CL,G<,$9%%/2A7S M [MH'AR]7#76$MMAK)593.J[S.7UP*:%8O#-7>!]N[&^(6_6>MF>/X[O;"HR M3I*W;HO5RWOJS^^\0Z8[CG]\-]9R O7C<YQ%,FI=WU0<W[2:?U FLUNUE:N= MOOLK\NUO7/7-XZAK_JJVQW"IQ:^ZZ].I!>P63SS()A.3,.URO$(1E-(\Z:CV MY]6VK<HG(/,4(LMT*Q?;97K;P%K[5CNO)]EMM4XJ.LVL-F^U8A*OE:P6>U:P M2BTM,^OMNPPU)=PN6^LBV\V9^BK3V>0X-9X=2PW=%CNEMAH]SV8EG,OTLMO: M6G.7F>NI35,7"W=9G_JN]FU^N=/?:K^,[E/KM:9N[D#OBL@'N_[<$%J$^)9% MI)6NZYA%M?T;"OUF^6\_ZA*_H\AI%_0V'W37V'4EUZSQS5.97=O7!ZOGU7#7 M1=[D2720I7%R:28C-C%I9#JNV?Y^OIZ8QL71YFN$12%O5YJ%K:[K8CO:5L-' MFZ\ LM2N99I5C5RKX#\WUX_3:F'1E!"K79X9ES17FPH\@7RU!C>C?D!BG,II M<9651G+>P\^V+EG6*?DT[G(IFYF'+YN7-,OW2\,.@X/2W%6S)OD5:LW2):L7 MG_/Z0U$W!BH%T9''"!<2B(H$(RXPGXE0Q-R=%U&KQ57]OJN[/*EO:5; FTFF MY*1KX*^R;+)4KA=\&PK==HOYO=6/>W4^TG)IM6;5NGBW46T=4E<1VK8W+G,S MD*7)^;P.#L8?*NLMO:V&J[IBA]&.P)W;WKY$-(T7<#V=F"KL,0.>&YSK;#5J M%U%O((5<VD?P+HO@@?GMU.DVGTTA-1[9O#I]P!M6A'?:ZWIPJQ:=ML7=SRNY M3$TB,'=DV&;3TP,VU\2W3*M,7TZGD_OCQ]JN9V"+6B?=?DTBV(15DY164]CX M0Z,Q!LMIB.J76TTNJV3?PZT1.[<O+DU9FUYDV>6DXYVJD;$NDMHX:*M7=U>_ MR[O(CDP!FL-Y=KNI_SLX6:G7K]&6I-SQ@@^)B<3<34S&32&D.",^ER[AV@M) MH"))9"BH$WF":4V1F%^6F#L"&,F)Y$1R]D3.]@^YD)Q(SMWD]%S'\3D3Q/,= MGW .(0DC1DDL74<[H2^4+Y"<O9*S'<!(3B0GDO.+DG/]BQZ_AYE(R+\>(9D( M&.,Q)Y[@E' %'E&N*3"UEG[H*C]0S$-"]D#(]4!%-B(;D8U?BHWV>P?SESAD ML/QZU)\6C\NI0#[VR4?7Y\*E#B.1""3A@8J("L#4DJX7T8!JZ7)\]_J%^;@M M6!&1B$A$9#^(;"U/%P&(L$18KL!2>T$L61 0'7-A8,D4"7Q-B:]"'M H""#D M",L^8=D5MHA-Q"9BLR=LYC(M9/W[H^<F-+# 1&:N_8A2:8-&\$@HA&&FI(HH MYG/B:$I=I9@*8D!F]LK,]9A%8"(P$9B] Q-9B:Q<964<.CZ+A2DH61 2[H&I M+UW!2.A+WP7NNN#AKXY\+58B)A&3B,F>,'DB[7Y!"=:3R,@U1DK/44H&,0G= MP"<\D(Q(*3B)M*;*H\I1$4-&]LG(1:PB(!&0",A^ $GO[KX;N'=W YE& V8^ MSZ&8FD4J$A.)N4;,*%0<0M<AL>]K0\S()\HSIR)DCA\S3VLO1&+V2<SMP8L( M180B0OM!:'7V6B:368[41&JN43.(! 77=PBEODNXXVH2<O )T\J1H0\Z4$C- M7JFY$J\(2@0E@K(?4!Y<S=+/@Z-FQ^?!-_/5ZK<(383F"C0=1B,>B) $GA:$ M1S0B(0M#(I20TE5:NJ&/T.P3FEMC%P&* $6 ?BV 5K>#_$1^KO(3/)"^= TZ M 8!P+XZ(#)D@S ^I4+[/?(F[%7QA?E9!S!"/B$?$8T_?B3TP)UF: GXM%JG8 M554&/E7,_KF=F')#Q4"1D = (L5"YH2AZT985?9:5:Y%+,(288FP[ ^6^$-+ M).464O+0@T 3ZGO*[N;CDC",@?AAH&T)"<R+D91]DQ)_9HF81$SVBTF#A\&/ MYR=_6D+B=K!?!9""VS^*RB@!Z86$A]HG2HN8Q-*G.@@A5EPC(/L$9!.HR$9D M([+QB[*Q^<L$N&D/8O)!3(I8N(X,B*>U)ESZ0!2XC'A2",]7L2LH?OFU#TQN MCUD$)@(3@=D[,)&5R,JU7Q2AU)? @9C:,B#<UQ$) N!$ GC*]:F( #?M^5JL M1$PB)A&3/6'20@ +2H1D!R0Y#7U'.YR8NA((CP-& D$IH8(YOG)"$5#<.;U7 M2"Z#%1&)B$1$]H/(Q48?YE):(B81DRN8I)&0.I":!#3V"%=4$*4D)0$/A)"^ MDI'"S=)[Q>1JP"(J$96(RGY0B;L.(#4?1TV7,Q6$0A.IA2DN[59WH0YBXKM. M;/_(LU :B\M>J8F[#B! $:!_.H#BK@/(SPY^ M, ,@B))RDEG/D^"15HPD08 M!%1'GJ,5\O/+\K,*8HIX1#PB'OO!(V[_BDS<P43JL"@$(%*%$>'@<Z(XN(1" MJ+0(8T9CK"E[K2EQ^U<$)8+R:WS[%;?G053N0&6H8N$!]PTJ%2-<F/)1RE 2 M!SP7G!B8Z[F(RCY1B=OS("P1EE\-EEA4(BD[2<EX$#-;1<8N*,)C'1$IE$<" M%<3<TC+F6%3V3DJL*1&3B,E^,?D';,^S>E[UB1OV_.60&?O<\R#VB78C03A3 ME 0N",*4'SC4CQ47^+/)7I&)&_8@+9&6O=+R],QJCP?OH+S*(BPKD9&KOS7B M XU"5Y% AJ%AI!<0I0(@C"HG4+&A).Y T,OW=Y")R$1DXA_+Q.JCJ/+V:3JY MK\ZH;3])TL\05>=-;[6N.1P;'AI761X5G>TGAB26@-EL.K!W^7ROLK:WR)(& M"*OM!S.#F.N]099'D%>\D%H;8R=P Y/G>VYUWVV%0XBEP4RQ4''65-9[L.#? M(5S=:26__!RGU]-ZU2 ;3RINAM,:E& .K0"+:"VUP^VJ4;]+*^CL86YPC1J MTUBY7G-^(_-ZI$WB,I<:M-@-5V[FUTO#\^9Z!(7.DVFYQ$X+.#;,KI))E$,Z B&,VOC)J.VOU&</. 0DMBU![Y'^*+]C[MQR)$7_P?./J0I@ end </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> diff --git a/samples/vnf_samples/traffic_profiles/vfw/vfw_ipv4_profile_1flows.ixncfg b/samples/vnf_samples/traffic_profiles/vfw/vfw_ipv4_profile_1flows.ixncfg Binary files differnew file mode 100644 index 000000000..01269bee2 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/vfw/vfw_ipv4_profile_1flows.ixncfg 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"><rpf> <Ixia.Aptixia.StackManager.SMSession type="Ixia.Aptixia.StackManager.SMSession" objectid="fa09b9eb-82e7-423b-8f09-12129de0d853" version="6.70.420"> <doWaitLinkUp type="Bool">0</doWaitLinkUp> <doGratArp type="Bool">0</doGratArp> <subscribeToGratArpNotifications type="Bool">0</subscribeToGratArpNotifications> <doInterfaceCheck type="Bool">0</doInterfaceCheck> <rebootPortsBeforeConfigure type="Bool">0</rebootPortsBeforeConfigure> <testDuration type="Int">10000</testDuration> <checkLinkState type="Bool">0</checkLinkState> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420"> <name type="String">client network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1dcd6e1b-17cd-45a1-875a-cbea40d3468c" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="b458c333-b4d4-48ef-bd38-3b456f72f8c8" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="28c0383a-76a7-4750-8162-2ad946ddac97" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="b9a0be2e-3880-4100-9e29-9b474f9301f4" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="e0232591-010e-492c-8a28-75e436f4adb2" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R1</name> <mac type="String">00:98:10:64:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420"> <name type="String">VLAN-R1</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">100</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="a916ae0f-0731-405d-ad19-eaade6c515f1" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R1</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.16.100.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.16.100.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">2596329041</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="adb27552-7165-46a3-bc9e-04914adf40ac" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="aa33a76b-9c7f-48d9-a537-8d6eeec03662" version="6.70.420"> <name type="String">DistGroup1</name> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="9c6c8594-548e-4ea5-a478-0bfb6252c1ce" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="693c7b7b-327b-4d59-b187-57d7600308e3" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="0f6ebdb4-7909-447a-b80a-e132dae33a9b" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="7a893f25-0ac6-41c7-ab5a-511c2068582a" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="fc54eec4-41ef-4b6c-9415-bf639013b52d" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-1</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="b0ccbeae-9db2-4416-bbed-80dcb2a7a9ed" version="6.70.420"> <trafficMaps type="ListNode"> <Ixia.Aptixia.StackManager.MeshingTrafficMap type="Ixia.Aptixia.StackManager.MeshingTrafficMap" objectid="d231b294-6ffb-4393-be54-3a233ec5699f" version="6.70.420"> <name type="String">newClientActivity1!HTTP server_newServerActivity1</name> <configMapFilename type="String">newClientActivity1Script.configmap</configMapFilename> <sourceActivityId type="Int">0</sourceActivityId> <ipPreference type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eIpPreference">2</ipPreference> <portRangesString type="String" /> <meshingType type="Ixia.Aptixia.StackManager.MeshingTrafficMapSkeleton+eMeshingType">2</meshingType> <destinationActivityId type="Int">0</destinationActivityId> </Ixia.Aptixia.StackManager.MeshingTrafficMap> </trafficMaps> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-2</name> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="Ixia.RpFramework.Server.Core.ShadowedPropertyStringList"> <String>10.223.166.127;2;13</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="df783f7c-615e-47c1-b7f0-1174985ea22e" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="Ixia.RpFramework.Server.Core.ShadowedPropertyStringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="3d3cf9ef-8aab-4388-9252-4baea80122d3" version="6.70.420" /> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420"> <name type="String">server network</name> <category type="String" /> <stack type="Ixia.Aptixia.StackManager.L1EthernetPlugin" objectid="1bd9f1bc-9959-464e-b1e8-ddb0bb4d0181" version="6.70.420"> <autoNegotiate type="Bool">1</autoNegotiate> <speed type="String">k100FD</speed> <advertise10Half type="Bool">1</advertise10Half> <advertise10Full type="Bool">1</advertise10Full> <advertise100Half type="Bool">1</advertise100Half> <advertise100Full type="Bool">1</advertise100Full> <advertise1000Full type="Bool">1</advertise1000Full> <cardDualPhy type="Ixia.Aptixia.StackManager.DualPhyPlugin" objectid="4fe8412b-7d4c-4ebe-a0d4-480a4401b3d0" version="6.70.420"> <medium type="String">auto</medium> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardDualPhy> <cardElm type="Ixia.Aptixia.StackManager.EthernetELMPlugin" objectid="4dfec118-30e8-4494-b7c7-e28518e7848a" version="6.70.420"> <negotiateMasterSlave type="Bool">1</negotiateMasterSlave> <negotiationType type="String">master</negotiationType> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </cardElm> <enableFlowControl type="Bool">0</enableFlowControl> <directedAddress type="String">01:80:C2:00:00:01</directedAddress> <dataCenter type="Ixia.Aptixia.StackManager.DataCenterSettings" objectid="123fecc5-cb5e-43e9-92a1-b053dc56d0f3" version="6.70.420"> <dcSupported type="Bool">1</dcSupported> <dcEnabled type="Bool">0</dcEnabled> <dcFlowControl type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eFlowControlType">0</dcFlowControl> <dcMode type="Ixia.Aptixia.StackManager.DataCenterSettingsSkeleton+eDataCenterMode">2</dcMode> <dcPfcMapping type="IntList" /> <dcPfcPauseEnable type="Bool">0</dcPfcPauseEnable> <dcPfcPauseDelay type="Int">1</dcPfcPauseDelay> <ixLoadRestObjectId type="Int">4</ixLoadRestObjectId> </dataCenter> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.L2EthernetPlugin type="Ixia.Aptixia.StackManager.L2EthernetPlugin" objectid="35ff711b-53f7-4c74-9e8b-98d35adaa6bf" version="6.70.420"> <macRangeList type="ListNode"> <Ixia.Aptixia.StackManager.MacRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">MAC-R2</name> <mac type="String">00:98:10:28:14:00</mac> <incrementBy type="String">00:00:00:00:00:01</incrementBy> <mtu type="Int">1500</mtu> <count type="Int">1</count> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420"> <name type="String">VLAN-R2</name> <enabled type="Bool">0</enabled> <firstId type="Int">1</firstId> <incrementStep type="Int">32</incrementStep> <increment type="Int">1</increment> <uniqueCount type="Int">4094</uniqueCount> <priority type="Int">0</priority> <tpid type="String">0x8100</tpid> <innerEnable type="Bool">0</innerEnable> <innerFirstId type="Int">1</innerFirstId> <innerIncrementStep type="Int">1</innerIncrementStep> <innerIncrement type="Int">1</innerIncrement> <innerUniqueCount type="Int">4094</innerUniqueCount> <innerPriority type="Int">0</innerPriority> <idIncrMode type="Int">1</idIncrMode> <innerTpid type="String">0x8100</innerTpid> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </vlanRange> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacRange> </macRangeList> <vlanRangeList type="ListNode"> <Ixia.Aptixia.StackManager.VlanIdRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> </vlanRangeList> <childrenList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Plugin type="Ixia.Aptixia.StackManager.IpV4V6Plugin" objectid="b85b184d-9bb4-48c2-a029-e633fee7a3c8" version="6.70.420"> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420"> <enabled type="Bool">1</enabled> <name type="String">IP-R2</name> <ipType type="String">IPv4</ipType> <ipAddress type="String">152.16.40.20</ipAddress> <prefix type="Int">24</prefix> <incrementBy type="String">0.0.0.1</incrementBy> <count type="Int">1</count> <autoCountEnabled type="Bool">0</autoCountEnabled> <gatewayAddress type="String">152.16.40.10</gatewayAddress> <gatewayIncrement type="String">0.0.0.0</gatewayIncrement> <gatewayIncrementMode type="String">perSubnet</gatewayIncrementMode> <enableGatewayArp type="Bool">0</enableGatewayArp> <generateStatistics type="Bool">0</generateStatistics> <mss type="Int">1460</mss> <randomizeAddress type="Bool">0</randomizeAddress> <randomizeSeed type="Int">463911585</randomizeSeed> <autoMacGeneration type="Bool">1</autoMacGeneration> <macRange type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <vlanRange type="Ixia.Aptixia.StackManager.VlanIdRange" objectid="57fa3f41-7695-42d7-ac26-68924bb1e8bb" version="6.70.420" /> <atmRange type="Ixia.Aptixia.StackManager.AtmRange" objectid="00000000-0000-0000-0000-000000000000" /> <pvcRange type="Ixia.Aptixia.StackManager.PvcRange" objectid="00000000-0000-0000-0000-000000000000" /> <autoIpTypeEnabled type="Bool">0</autoIpTypeEnabled> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Range> </rangeList> <rangeGroups type="ListNode"> <Ixia.Aptixia.StackManager.RangeGroup type="Ixia.Aptixia.StackManager.RangeGroup" objectid="b2c21c73-bfe3-4fbc-9804-b5a8b307d893" version="6.70.420"> <distribType type="Ixia.Aptixia.StackManager.RangeGroupSkeleton+eDistributionType">0</distribType> <name type="String">DistGroup1</name> <rangeList type="ListNode"> <Ixia.Aptixia.StackManager.IpV4V6Range type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> </rangeList> </Ixia.Aptixia.StackManager.RangeGroup> </rangeGroups> <childrenList type="ListNode" /> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">IP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpV4V6Plugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">MAC/VLAN-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.L2EthernetPlugin> </childrenList> <extensionList type="ListNode" /> <dscMode type="Bool">0</dscMode> <name type="String">Ethernet-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </stack> <globalPluginList type="ListNode"> <Ixia.Aptixia.StackManager.IxLoadSettingsPlugin type="Ixia.Aptixia.StackManager.IxLoadSettingsPlugin" objectid="993e33c6-e1f7-4967-982e-82a032f8c61a" version="1.0.0"> <teardownInterfaceWithUser type="Bool">0</teardownInterfaceWithUser> <interfaceBehavior type="Int">0</interfaceBehavior> <name type="String">Settings-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSettingsPlugin> <Ixia.Aptixia.StackManager.DnsPlugin type="Ixia.Aptixia.StackManager.DnsPlugin" objectid="36ca84d7-ff44-45b7-b75d-aec38b753161" version="6.70.420"> <domain type="String" /> <timeout type="Int">30000</timeout> <nameServerList type="ListNode" /> <searchList type="ListNode" /> <hostList type="ListNode" /> <name type="String">DNS-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.DnsPlugin> <Ixia.Aptixia.StackManager.FilterPlugin type="Ixia.Aptixia.StackManager.FilterPlugin" objectid="25c5acdd-9dd3-4802-93b6-b10651820b66" version="6.70.420"> <auto type="Bool">1</auto> <all type="Bool">0</all> <pppoecontrol type="Bool">0</pppoecontrol> <pppoenetwork type="Bool">0</pppoenetwork> <isis type="Bool">0</isis> <ip type="String" /> <tcp type="String" /> <udp type="String" /> <mac type="String" /> <icmp type="String" /> <name type="String">Filter-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.FilterPlugin> <Ixia.Aptixia.StackManager.TCPPlugin type="Ixia.Aptixia.StackManager.TCPPlugin" objectid="6259328b-97c2-4390-8ab1-f16bf3459219" version="6.70.420"> <bestPerfSettings type="Bool">0</bestPerfSettings> <accept_ra_all type="Bool">0</accept_ra_all> <tcp_abort_on_overflow type="Bool">0</tcp_abort_on_overflow> <tcp_adv_win_scale type="Int">2</tcp_adv_win_scale> <tcp_app_win type="Int">31</tcp_app_win> <tcp_bic type="Int">0</tcp_bic> <tcp_bic_fast_convergence type="Int">1</tcp_bic_fast_convergence> <tcp_bic_low_window type="Int">14</tcp_bic_low_window> <tcp_dsack type="Bool">1</tcp_dsack> <tcp_ecn type="Bool">0</tcp_ecn> <tcp_fack type="Bool">1</tcp_fack> <tcp_fin_timeout type="Int">60</tcp_fin_timeout> <tcp_frto type="Int">0</tcp_frto> <tcp_keepalive_intvl type="Int">7200</tcp_keepalive_intvl> <tcp_keepalive_probes type="Int">75</tcp_keepalive_probes> <tcp_keepalive_time type="Int">9</tcp_keepalive_time> <tcp_low_latency type="Int">0</tcp_low_latency> <tcp_max_orphans type="Int">8192</tcp_max_orphans> <tcp_max_syn_backlog type="Int">1024</tcp_max_syn_backlog> <tcp_max_tw_buckets type="Int">180000</tcp_max_tw_buckets> <tcp_mem_low type="Int">24576</tcp_mem_low> <tcp_mem_pressure type="Int">32768</tcp_mem_pressure> <tcp_mem_high type="Int">49152</tcp_mem_high> <tcp_moderate_rcvbuf type="Int">0</tcp_moderate_rcvbuf> <tcp_no_metrics_save type="Bool">0</tcp_no_metrics_save> <tcp_orphan_retries type="Int">0</tcp_orphan_retries> <tcp_reordering type="Int">3</tcp_reordering> <tcp_retrans_collapse type="Bool">1</tcp_retrans_collapse> <tcp_retries1 type="Int">3</tcp_retries1> <tcp_retries2 type="Int">15</tcp_retries2> <tcp_rfc1337 type="Bool">0</tcp_rfc1337> <tcp_rmem_min type="Int">4096</tcp_rmem_min> <tcp_rmem_default type="Int">1024</tcp_rmem_default> <tcp_rmem_max type="Int">262144</tcp_rmem_max> <tcp_sack type="Bool">1</tcp_sack> <tcp_stdurg type="Bool">0</tcp_stdurg> <tcp_synack_retries type="Int">5</tcp_synack_retries> <tcp_syn_retries type="Int">5</tcp_syn_retries> <tcp_timestamps type="Bool">1</tcp_timestamps> <tcp_tw_recycle type="Bool">1</tcp_tw_recycle> <tcp_tw_reuse type="Bool">0</tcp_tw_reuse> <tcp_vegas_alpha type="Int">2</tcp_vegas_alpha> <tcp_vegas_beta type="Int">6</tcp_vegas_beta> <tcp_vegas_cong_avoid type="Int">0</tcp_vegas_cong_avoid> <tcp_vegas_gamma type="Int">2</tcp_vegas_gamma> <tcp_westwood type="Int">0</tcp_westwood> <tcp_window_scaling type="Bool">0</tcp_window_scaling> <ip_no_pmtu_disc type="Bool">1</ip_no_pmtu_disc> <tcp_wmem_min type="Int">4096</tcp_wmem_min> <tcp_wmem_default type="Int">1024</tcp_wmem_default> <tcp_wmem_max type="Int">262144</tcp_wmem_max> <tcp_ipfrag_time type="Int">30</tcp_ipfrag_time> <tcp_port_min type="Int">1024</tcp_port_min> <tcp_port_max type="Int">65535</tcp_port_max> <tcp_rto_min type="Int">1000</tcp_rto_min> <tcp_rto_max type="Int">120000</tcp_rto_max> <tcp_tw_rfc1323_strict type="Bool">0</tcp_tw_rfc1323_strict> <udp_port_randomization type="Bool">0</udp_port_randomization> <disable_min_max_buffer_size type="Bool">1</disable_min_max_buffer_size> <llm_hdr_gap type="Int">8</llm_hdr_gap> <llm_hdr_gap_ns type="Int">10</llm_hdr_gap_ns> <inter_packet_granular_delay type="Double">0</inter_packet_granular_delay> <delayed_acks type="Bool">1</delayed_acks> <accept_ra_default type="Bool">0</accept_ra_default> <rps_needed type="Bool">0</rps_needed> <delayed_acks_segments type="Int">0</delayed_acks_segments> <delayed_acks_timeout type="Int">0</delayed_acks_timeout> <tcp_large_icwnd type="Int">0</tcp_large_icwnd> <tcp_mgmt_rmem type="Int">87380</tcp_mgmt_rmem> <tcp_mgmt_wmem type="Int">32768</tcp_mgmt_wmem> <adjust_tcp_buffers type="Bool">1</adjust_tcp_buffers> <name type="String">TCP-4</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.TCPPlugin> <Ixia.Aptixia.StackManager.GratArpPlugin type="Ixia.Aptixia.StackManager.GratArpPlugin" objectid="3eedf749-efa4-43a0-87ae-e110a77c88d4" version="6.70.420"> <enabled type="Bool">1</enabled> <forwardGratArp type="Bool">0</forwardGratArp> <rateControlEnabled type="Bool">0</rateControlEnabled> <maxFramesPerSecond type="Int">0</maxFramesPerSecond> <name type="String">GratARP-2</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.GratArpPlugin> <Ixia.Aptixia.StackManager.MeshingPlugin type="Ixia.Aptixia.StackManager.MeshingPlugin" objectid="284f9992-65d8-4027-a155-709f1965f892" version="6.70.420"> <trafficMaps type="ListNode" /> <activityRangeMapInfoList type="ListNode" /> <name type="String">Meshing-1</name> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MeshingPlugin> </globalPluginList> <portList type="Ixia.RpFramework.Server.Core.ShadowedPropertyStringList"> <String>10.223.166.127;2;14</String> </portList> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.IPSecPortGroupData type="Ixia.Aptixia.StackManager.IPSecPortGroupData" objectid="f65f12f2-018c-46f5-a9c5-a1f6f7151909" version="8.1.7"> <role type="String">Initiator</role> <associates type="ListNode" /> <overrideGlobalOptions type="Bool">0</overrideGlobalOptions> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <maxInitiationRate type="Int">50</maxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <maxPendingTunnels type="Int">50</maxPendingTunnels> <teardownRate type="Int">10</teardownRate> <enableESPPerStreamStats type="Bool">0</enableESPPerStreamStats> <enableESPReplayStats type="Bool">0</enableESPReplayStats> <activities type="ListNode" /> <pcpuLogLevel type="String">0</pcpuLogLevel> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecPortGroupData> </typeSpecificData> <virtualMode type="Bool">0</virtualMode> <allowedVirtualModeTypes type="Ixia.RpFramework.Server.Core.ShadowedPropertyStringList" /> <doOwnership type="Bool">0</doOwnership> <branchToNicMap type="ListNode" /> <cpuAggregation type="Bool">0</cpuAggregation> <activePort type="String" /> <networkLayersManager type="Ixia.Aptixia.StackManager.NetworkLayersManager" objectid="60b1273d-78d3-4813-8cea-ec9a7101b8a3" version="6.70.420" /> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.PortGroup> </portGroupList> <externalProperties type="Ixia.Aptixia.StackManager.ExternalPropertyManager" objectid="1f2452bf-e52a-4db2-ba47-e5cc8bf61b5e" version="6.70.420"> <properties type="ListNode"> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="145671ff-93a5-4ecc-8c83-59b2c3c67be9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatLTEUEUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9f07a941-ad2f-46b0-8c75-911862a21039" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SixRdRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a221ab5c-faae-4940-bfad-5d41d44f1427" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">L2tpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d811442b-bfb8-42f0-bbf8-6bdb6fc9b66b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPServerRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="f252cff3-b919-4e74-9f62-9e9c5ab5d324" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MobileSubscribersRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="493ce043-b982-4a43-a2d4-619e51fbc5a6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IPSecRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="500dfc8b-2e6a-401f-84c0-f6907f60c00e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSgsnS3RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="693cb176-f3d8-4073-8a02-fabdc0bdd3fb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPRange_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ec983bf9-07f0-46b2-99a0-354114f42501" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EmulatedRouterRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5d0f0eb8-40af-4292-8ff2-a57e7903601d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PppoxRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="653fae09-ba19-443c-8f8b-9483c0b86b9a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGAPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c886be8c-c207-4bb4-90d5-17be54556d58" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatRNCIuPSUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="00e75214-5166-406b-90e5-2b83567ae5cf" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPNGUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="50d10ee7-45ce-46d2-ae8d-ecd3b1806067" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S5S8_SGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="c2f310a4-6ea4-4459-be3b-f3b3365c590a" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPGRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7e458bed-5e36-42d6-812d-3794be52766e" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPPcrfRange_S5S8_PGW</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7d225fda-6432-4de3-9750-c19bbc957703" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DSLiteRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="e25dd669-ffc5-493d-a2b5-fd5627bf2ee8" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPSGSNRangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="7ac0b7d4-6df9-4e1f-86d2-f0a494b3f20b" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">SlaacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="25699a2c-ab22-417b-9072-894523e98008" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="05f1053a-5774-409f-b07e-add07df64338" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PSTNDigitalRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="482a10c3-0ac7-44d9-9fa9-b43ba3a9901d" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DHCPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="a0f03753-923d-4421-8c4f-0ed78f00fc44" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">AtmRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="fb5cd68e-b4b0-4fd4-ae18-4100c0035642" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatMMEApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="62677b6a-080e-4cc3-919b-71fa90ae410f" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBUuApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="2e0fd6e3-470e-48df-ab8d-cc21b9d80393" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">GTPSUERange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="175f3104-0d2a-44f9-b712-fed3b170f8cb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IpV4V6Range</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d1f37e1e-db44-4bac-acb8-b242dee8e371" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MacRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="61ccdebc-84e6-464d-be14-2b3ddedab9d2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">DualStackIPRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d0678cd8-998e-42ab-8f0d-bfcb5370eac2" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPUERange_S2a_TWAN</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="d8350364-51c6-4a1b-af9f-72c9c235a636" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatSGSNIuPSApnRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="613d02a1-db1e-415d-b4bb-8b73b4477cf4" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">IxCatENodeBSimUeRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="9a41f718-b55e-44c7-a0cc-b1fcf8204c20" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6dRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="4c26fe62-a63d-4c40-8e15-c58ad8fba8d0" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">UERangeBase</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="5c2ca63f-3335-4ab7-963e-440817448538" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">EGTPMmeS10RangeUe</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="51a5eccc-a68d-4730-8a48-32019c547c28" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">S6aRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="3010c4ad-f31e-4676-9e61-bb25cf9c1bbb" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">BmScRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="ef1677e4-f390-4a78-b61a-f7650cf5faea" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">MBmsGwRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> <Ixia.Aptixia.StackManager.ExternalPropertyInfo type="Ixia.Aptixia.StackManager.ExternalPropertyInfo" objectid="24322b98-7a2a-4d2d-a4ee-4cde0f0e8b64" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <targetType type="String">PptpRange</targetType> <valueType type="String">ExternalValueBoolean</valueType> <description type="String">Enable collection of interface statistics on this range</description> </Ixia.Aptixia.StackManager.ExternalPropertyInfo> </properties> <values type="ListNode"> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="6804ae67-3bd7-471b-8796-ee1e4773c2f1" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="a3559674-8d95-4020-90b3-b42eacaef105" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="7efcd429-2c48-41bd-bdc5-489dbfcfc49a" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="a63d8276-65bc-4bc2-8202-6461c6399ef9" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.IpV4V6Range" objectid="1d9bf537-0c3d-4fdf-9b85-0a622cc77649" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="09d7b134-2921-4759-bbdb-ff3a5a1966d7" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">1</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0cd9f099-242e-4b03-965f-d343c60181e6" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="3011c8a8-a9fd-4b76-a27d-91948113ed4f" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="503aa008-2481-419f-a223-c90b2c25c17e" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> <Ixia.Aptixia.StackManager.ExternalProperty type="Ixia.Aptixia.StackManager.ExternalProperty" objectid="0b8d2c01-19ac-4f28-924e-660676d978da" version="6.70.420"> <propertyName type="String">Publish Statistics</propertyName> <target type="Ixia.Aptixia.StackManager.MacRange" objectid="f91c9f52-8150-4d0f-b657-498ed241835c" version="6.70.420" /> <value type="Ixia.Aptixia.StackManager.ExternalValueBoolean" objectid="41c694b3-bb55-48fe-9604-8b003540242f" version="6.70.420"> <value type="Bool">0</value> </value> <enabled type="Bool">0</enabled> </Ixia.Aptixia.StackManager.ExternalProperty> </values> </externalProperties> <availableNetworkTimelines type="ListNode" /> <typeSpecificData type="ListNode"> <Ixia.Aptixia.StackManager.MacSessionData type="Ixia.Aptixia.StackManager.MacSessionData" objectid="a9c7aa59-e015-4ffd-bb82-5d877ae9c1a8" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.MacSessionDataSkeleton+eMacValidationOptions">2</duplicateCheckingScope> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.MacSessionData> <Ixia.Aptixia.StackManager.IpSessionData type="Ixia.Aptixia.StackManager.IpSessionData" objectid="34a78d72-1fc5-4875-9fe1-b4db66b1b4c4" version="6.70.420"> <duplicateCheckingScope type="Ixia.Aptixia.StackManager.IpSessionDataSkeleton+eIpValidationOptions">2</duplicateCheckingScope> <enableGatewayArp type="Bool">0</enableGatewayArp> <gatewayArpRequestRate type="Int">300</gatewayArpRequestRate> <maxOutstandingGatewayArpRequests type="Int">300</maxOutstandingGatewayArpRequests> <ignoreUnresolvedIPs type="Bool">0</ignoreUnresolvedIPs> <sendAllRequests type="Bool">0</sendAllRequests> <individualARPTimeOut type="Int">500</individualARPTimeOut> <ixLoadRestObjectId type="Int">2</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IpSessionData> <Ixia.Aptixia.StackManager.IxLoadSessionData type="Ixia.Aptixia.StackManager.IxLoadSessionData" objectid="1e24447f-69f1-4030-8b2d-25a18c7160ca" version="1.0.0"> <portGroupList type="ListNode"> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="c4ecfc60-64ac-4dc2-9410-e0f58d84f229" version="6.70.420" /> <Ixia.Aptixia.StackManager.PortGroup type="Ixia.Aptixia.StackManager.PortGroup" objectid="865be042-32d5-426a-9e75-0908c943801f" version="6.70.420" /> </portGroupList> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IxLoadSessionData> <Ixia.Aptixia.StackManager.ImpairSessionData type="Ixia.Aptixia.StackManager.ImpairSessionData" objectid="94b53c2c-0747-41c2-838d-0e0e15f31766" version="6.70.13"> <profiles type="ListNode"> <Ixia.Aptixia.StackManager.ImpairProfile type="Ixia.Aptixia.StackManager.ImpairProfile" objectid="90dd3511-93c1-49fa-8e38-db774db9fe17" version="6.70.13"> <name type="String">DefaultProfile</name> <defaultp type="Bool">1</defaultp> <seed type="Int">0</seed> <addDelay type="Bool">1</addDelay> <delay type="Int">20</delay> <jitter type="Int">0</jitter> <addDrop type="Bool">0</addDrop> <drop type="Double">10</drop> <addDropSequence type="Bool">0</addDropSequence> <dropSequenceSkip type="Int">10</dropSequenceSkip> <dropSequenceLength type="Int">1</dropSequenceLength> <addReorder type="Bool">0</addReorder> <gap type="Int">10</gap> <reorder type="Int">20</reorder> <reorderLength type="Int">1</reorderLength> <addReorderPI type="Bool">0</addReorderPI> <reorderPISkip type="Int">10</reorderPISkip> <reorderPILength type="Int">1</reorderPILength> <reorderPIInterval type="Int">1</reorderPIInterval> <reorderPITimeout type="Int">1000</reorderPITimeout> <addDuplicate type="Bool">0</addDuplicate> <duplicate type="Double">10</duplicate> <addFragment type="Bool">0</addFragment> <fragment type="Double">10</fragment> <mtu type="Int">1000</mtu> <addFragmentSequence type="Bool">0</addFragmentSequence> <fragmentSequenceSkip type="Int">10</fragmentSequenceSkip> <fragmentSequenceLength type="Int">1</fragmentSequenceLength> <mtuSequence type="Int">1000</mtuSequence> <sendFragmentsInReverseOrder type="Bool">0</sendFragmentsInReverseOrder> <sendFirstFragmentOnly type="Bool">0</sendFirstFragmentOnly> <sendOverlappingFragments type="Bool">0</sendOverlappingFragments> <addBandwidth type="Bool">0</addBandwidth> <bandwidth type="Double">1</bandwidth> <bandwidthUnits type="String">mbps</bandwidthUnits> <addBandwidthIn type="Bool">0</addBandwidthIn> <bandwidthIn type="Double">1</bandwidthIn> <bandwidthUnitsIn type="String">mbps</bandwidthUnitsIn> <destinationIp type="String">any</destinationIp> <sourceIp type="String">any</sourceIp> <sourcePort type="Int">0</sourcePort> <destinationPort type="Int">0</destinationPort> <protocol type="String">any</protocol> <typeOfService type="String">any</typeOfService> <addTcpFlagsFilter type="Bool">0</addTcpFlagsFilter> <selectTcpFlags type="String">SYN;RST;ACK</selectTcpFlags> <expectTcpFlags type="String">SYN</expectTcpFlags> <impairOrder type="String">Delay;Drop;DropSeq;Reorder;ReorderPI;Duplicate;Fragment;FragmentSeq;Bandwidth</impairOrder> </Ixia.Aptixia.StackManager.ImpairProfile> </profiles> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.ImpairSessionData> <Ixia.Aptixia.StackManager.IPSecSessionData type="Ixia.Aptixia.StackManager.IPSecSessionData" objectid="bd2f0ea4-4278-49c8-9600-18cd2c8ed639" version="8.1.7"> <ipsecTunnelSetup type="Ixia.Aptixia.StackManager.IPSecTunnelSetup" objectid="1bacc8a0-dda0-4e0c-b013-4d8618dc80b6" version="8.1.7"> <tunnelSetupTimeout type="Int">30</tunnelSetupTimeout> <tunnelRetransmissionTimeout type="Int">30</tunnelRetransmissionTimeout> <numRetries type="Int">0</numRetries> <retryInterval type="Int">10</retryInterval> <retryDelay type="Int">10</retryDelay> <testType type="String">P2D</testType> <sendCiscoVid type="Bool">0</sendCiscoVid> <useMaxInitiationRate type="Bool">0</useMaxInitiationRate> <useMaxPendingTunnels type="Bool">0</useMaxPendingTunnels> <enableRekey type="Bool">1</enableRekey> <rekeyRetries type="Int">3</rekeyRetries> <rekeyFuzzPercentage type="Int">0</rekeyFuzzPercentage> <rekeyMargin type="Int">10</rekeyMargin> </ipsecTunnelSetup> <ipsecCertificates type="Ixia.Aptixia.StackManager.IPSecCertificates" objectid="2e324324-bf74-4ad3-afbb-62e44f01c31a" version="8.1.7"> <uniqueCert type="Bool">0</uniqueCert> <certSource type="String">kNewCert</certSource> <caURL type="String" /> <caDN type="String" /> <certSubjectDN type="String" /> <certSubjectAltDN type="String" /> <remoteIkeId type="String" /> <bitSize type="String">k512</bitSize> <saveCert type="Bool">1</saveCert> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <certParentFolder type="String">C:\Program Files\Ixia\CachedCerts</certParentFolder> <certNumber type="String" /> <caCertNumber type="String" /> <earlyExpDate type="String" /> <lateExpDate type="String" /> <usePerRangeCertNameExp type="Bool">0</usePerRangeCertNameExp> <checkCrl type="Bool">0</checkCrl> <crlOverrideEnable type="Bool">0</crlOverrideEnable> <crlOverrideUrl type="String" /> <checkOcsp type="Bool">0</checkOcsp> <ocspOverrideEnable type="Bool">0</ocspOverrideEnable> <ocspOverrideUrl type="String" /> <unknownIsRevoked type="Bool">0</unknownIsRevoked> <certProto type="String">kSCEP</certProto> </ipsecCertificates> <ipsecCertManager type="Ixia.Aptixia.StackManager.IPSecCertManager" objectid="f3dc4ef0-e9a1-48a2-b69f-c5d2b485e897" version="8.1.7"> <caURL type="String" /> <caDN type="String">CN=RootCA,C=RO,L=Bucharest,O=Ixia,OU=IxLoad,IP:201.121.87.2,email:ixia@ixiacom.com</caDN> <certSubjectDN type="String">CN=IxiaVPN,C=RO,L=Bucharest,O=Ixia</certSubjectDN> <keyGenAlgo type="String">kRSA_512</keyGenAlgo> <cacheCertFolder type="String">C:\Program Files\Ixia\CachedCerts</cacheCertFolder> <caKeyFile type="String">C:\Program Files\Ixia\ca-priv.key</caKeyFile> <caCrtFile type="String">C:\Program Files\Ixia\ca-cert.crt</caCrtFile> <certNumber type="Int">1</certNumber> <certProto type="String">kSCEP</certProto> <createRootCA type="Bool">0</createRootCA> <uniqueCert type="Bool">0</uniqueCert> <descFilePath type="String">C:\Program Files\Ixia\CachedCerts\sample.desc</descFilePath> <useDescFile type="Bool">0</useDescFile> </ipsecCertManager> <eapSimTuples type="ListNode" /> <eapAkaTuples type="ListNode" /> <maxInitiationRate type="Int">50</maxInitiationRate> <maxPendingTunnels type="Int">50</maxPendingTunnels> <negotiationStartDelay type="Int">0</negotiationStartDelay> <teardownRate type="Int">10</teardownRate> <burstInitiation type="Bool">0</burstInitiation> <parallelInitiation type="Bool">0</parallelInitiation> <enableExtraPortLogging type="Bool">0</enableExtraPortLogging> <enableWildcardTsi type="Bool">0</enableWildcardTsi> <enableWildcardTsr type="Bool">0</enableWildcardTsr> <enablePlutoWildcardTsi type="Bool">0</enablePlutoWildcardTsi> <enablePlutoModeCfgWildcardTsr type="Bool">1</enablePlutoModeCfgWildcardTsr> <enablePlutoS2SWildcardTsr type="Bool">0</enablePlutoS2SWildcardTsr> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.IPSecSessionData> </typeSpecificData> <statViewManager type="Ixia.Aptixia.StackManager.StatViewManager" objectid="7256ce27-286c-475d-b198-09b4ae306f73" version="6.70.420"> <enableStats type="Bool">1</enableStats> <enableOverviewStats type="Bool">1</enableOverviewStats> <enablePerSessionStats type="Bool">1</enablePerSessionStats> </statViewManager> <waitForLinkUp type="Bool">0</waitForLinkUp> <overloadProtection type="Bool">1</overloadProtection> <ixLoadRestObjectId type="Int">1</ixLoadRestObjectId> </Ixia.Aptixia.StackManager.SMSession> </rpf></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"><?xml version="1.0" encoding="utf-16"?> <Config> <configs Version="5.0" /> </Config></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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"><specify file></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 <data> M>)RE6/MSXC80_E<\=)III_6;5PC)30+DPAP)#'!WG6DZ&6$OQ#UC<Y+,HYW^ M[UW)#PS8)-/^<(>L[]O52EKM(^T/VZ6OK($R+PRN*Z9F5#[<M"><\"\>;(#N MH;I6-S1#LVRK@@1@8G;@,:Y\@MUUA:RXM_6(QM;:2D@P#H$#6H[WE9(50BC< M&3Y->T]31;]IC\:]"0YOI_WAT_'W2Z_;G][>#7H"Z P?[_I/O6ZV-,M&[S'@ M9/&;]CV%[Q%R=LJ:^!%<5ZR*7(BM!^%BX06+=/Z>^ PD-O66,-D%SAV\DK47 MTI1A9"CC9+D:47 \:5F"VQ+O+2@:(XYUNEM!BID2&^(Q^R%Q1S3DX/"<[)1& M<&38@^>Z$ A%[-3&7D!F/G0))Q,>4C@EC/:GD[>C6B1]=B4T:!CQ5<2SDWR, M?.ZM_..]25)W\@;MD6R%VS&TKQ,Q'BX_XIV]9IQZNN:]Y\.(\ R1\[<^4,[2 M7P5].F"M+?.N*Z^<KUJZOMELM(VMA72A6X9AZK\]#B;.*RR)Z@5X:7@8E4S* M?5M*+JJGJW9A3G!/\IP.OR3M$.[0,/$""H#HT?>8N%[XD8;1Z@CP GYCM77Q MT]9+61W?@X#?AW09^60"G*._9'?W]\4/V^X5_G=[=?$]"OG5E_AQQQ^M^,?4 M:O'@UQ.VV$#"_7T/_K$?_K,?QD\"'\0X"H[MN/#YU4'<25<VXH&"7A*Z*)$ M$9^K9CT>?[A8\*N<9:@J6:4?S,,)4(_XWE]$/*$[LLAY0BS^;G=(+-G[Q/OD M8]:AC8HBK%R^\.0TT,L]!U_ZBAWS8J;8SQ-9@D#%V!23>GZV6*9#."Q"NA,, M\83UA^ETE,GFT5/YSGR1/BQ!Z+2>Q\#0:=FS4**N[[^^]$?KZHLU"M'E-;J= M2\5'8L5V 4WM=ME^+_O94ZEN)+>JZ*7PPR;QW3.<R5L<8<9P]J<(N&M@YU@/ MWN+5QW^\E)6%5=['D,F]N0=4,.U+ DUS;JO.S"1J=39OJ#.C65=KE[6:!388 MAC.39U*FX'0I]*&\>^!GM5&7.G+(J=AG!G32[PIPHIIJ3;5,U;:KMEVO51N6 M:C7,9LVL-HRFVKRTZ_9EO:::Z-M2<4ZVT![T:<K!'0:"81EF0S5LU;"FEM6R M[)9I:&:C:EV:U5^,6LLV4EL/I$KTAIBWD:'@$VX%GI\\0XY9,7FA)?<1!\)' MXKQZ :2'TL?</U!'G=AWBQAO*+IU79'$!1,W95FV9M;KFFDW]W)S:!JMUJQY M.<.M.]466 W2<@WG1[-V&+;T,LVG-O2W3\ W(?V6!FQD-37#U$RCKME261'E MC*(Q^$!8?"C; 58>BJCOE-[MH;(<[8RR7-3 L+:@9*F(J,"4G[;-^L_/?:S+ MGN-5GH75ZL>C5<K#1W\[AA5&'*"Y;=EQ)6HVTIT7<(J?\>?'B4-\B*_/,+)8 ME)L_%9RL<_"G&49M(78P6^B[N5,1SX<]8_1[[H9.M,1;9R>G$M]E%G:9M\02 M*0N^DU$<?\V:]2+>EV$;%G[8#72]Y#45G:+$WI-Y<ADJ-F"X$BFTQ!\[H>]C MU!3UHTPVP G>MQM[]2%6*CP 0@-P1=86O+FH*_,*CO!2/?=^N)&5$"M4<PB7 M:L'H*YBR A5$&6!R:H[Q<XJ2GN.<KF-*N3IL"$(G]/L!^O><.%"LL9!5JG0< M1AS&)%@4:SN"B]0L5R)833-W.3[Z(KS,+\_Z6^R7[BX07HN-7D'^/:!\$17F M"2E[Z"5EHF#')7W6'OZ'SC2K^$5G%/@[^6V*B8$7? -WWQ'L9?3$$_8C5HB+ M#OJF+1U9"3!775>DMDJN=:\<XG$355%"Z@*5319QT#'8 -;@I]VN+B6PE0Z6 MJ_-]-!*2"D4V2[E&6D"=,)A[BXB2?.LJ3ITAZ" H[R/Y7A,:VQAG<"&?Y'(B M*['3'.\"<Z@G/20!<W4V:L4,ZF/Z3 L]<=O)0OEU75B_(9!CZ'G+_Z]O2'&Q ,3_&3_6WEYE]ZB+T\ end </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 Binary files differnew file mode 100644 index 000000000..dc05fc89a --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_1flows.ixncfg 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 Binary files differnew file mode 100644 index 000000000..b7e45bfae --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/vpe/vpe_ipv4_profile_256Kflows.ixncfg diff --git a/samples/vnf_samples/vnf_descriptors/acl_vnf.yaml b/samples/vnf_samples/vnf_descriptors/acl_vnf.yaml new file mode 100644 index 000000000..b38e6b8ae --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/acl_vnf.yaml @@ -0,0 +1,84 @@ +# 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. + +vnfd:vnfd-catalog: + vnfd: + - id: AclApproxVnf + name: AclVnfSshIntel + short-name: AclVnf + description: ACL approximation using DPDK + mgmt-interface: + vdu-id: aclvnf-baremetal + {% if user is defined %} + user: '{{user}}' # Value filled by vnfdgen + {% endif %} + {% if password is defined %} + password: '{{password}}' # Value filled by vnfdgen + {% endif %} + {% if ip is defined %} + ip: '{{ip}}' # Value filled by vnfdgen + {% endif %} + {% if key_filename is defined %} + key_filename: '{{key_filename}}' # Value filled by vnfdgen + {% endif %} + connection-point: + - name: xe0 + type: VPORT + - name: xe1 + type: VPORT + vdu: + - id: aclvnf-baremetal + name: aclvnf-baremetal + description: ACL approximation using DPDK + vm-flavor: + vcpu-count: '4' + memory-mb: '4096' + external-interface: + - name: xe0 + virtual-interface: + type: PCI-PASSTHROUGH + # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. + vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen + dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen + driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen + vld_id: '{{ interfaces.xe0.vld_id }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe0 + - name: xe1 + virtual-interface: + type: PCI-PASSTHROUGH + # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. + vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen + dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen + driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen + vld_id: '{{ interfaces.xe1.vld_id }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe1 + routing_table: {{ routing_table }} + nd_route_tbl: {{ nd_route_tbl }} + benchmark: + kpi: + - packets_in + - packets_fwd + - packets_dropped diff --git a/samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml b/samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml new file mode 100644 index 000000000..b42fb4d4e --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml @@ -0,0 +1,79 @@ +# Copyright 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. +# +# This needs to be adjusted for every hardware setup +# +vnfd:vnfd-catalog: + vnfd: + - id: CgnaptApproxVnf + name: CgnaptVnfSshIntel + short-name: CgnaptVnf + description: CGNAPT approximation using DPDK + mgmt-interface: + vdu-id: cgnatvnf-baremetal + {% if user is defined %} + user: '{{user}}' # Value filled by vnfdgen + {% endif %} + {% if password is defined %} + password: '{{password}}' # Value filled by vnfdgen + {% endif %} + {% if ip is defined %} + ip: '{{ip}}' # Value filled by vnfdgen + {% endif %} + {% if key_filename is defined %} + key_filename: '{{key_filename}}' # Value filled by vnfdgen + {% endif %} + connection-point: + - name: xe0 + type: VPORT + - name: xe1 + type: VPORT + vdu: + - id: cgnaptvnf-baremetal + name: cgnaptvnf-baremetal + description: CGNAPT approximation using DPDK + external-interface: + - name: xe0 + virtual-interface: + type: PCI-PASSTHROUGH + # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. + vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen + dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe0 + - name: xe1 + virtual-interface: + type: PCI-PASSTHROUGH + # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. + vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen + dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe1 + routing_table: {{ routing_table }} + nd_route_tbl: {{ nd_route_tbl }} + benchmark: + kpi: + - packets_in + - packets_fwd + - packets_dropped diff --git a/samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml b/samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml new file mode 100644 index 000000000..4b520f61b --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml @@ -0,0 +1,79 @@ +# +# Copyright 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +vnfd:vnfd-catalog: + vnfd: + - id: IXIATrafficGen # ISB class mapping + name: IXIAtrafficgen + short-name: ixia + description: IXIA stateless traffic verifier + mgmt-interface: + vdu-id: trexgen-baremetal + user: '{{user}}' # Value filled by vnfdgen + password: '{{password}}' # Value filled by vnfdgen + ip: '{{ip}}' # Value filled by vnfdgen + tg-config: + ixchassis: '{{tg_config.ixchassis}}' #ixia chassis ip + tcl_port: '{{tg_config.tcl_port}}' # tcl server port + lib_path: '{{tg_config.lib_path}}' + root_dir: '{{tg_config.root_dir}}' + py_lib_path: '{{tg_config.py_lib_path}}' + py_bin_path: '{{tg_config.py_bin_path}}' + dut_result_dir: '{{tg_config.dut_result_dir}}' + version: '{{tg_config.version}}' + connection-point: + - name: xe0 + type: VPORT + - name: xe1 + type: VPORT + vdu: + - id: trexgen-baremetal + name: trexgen-baremetal + description: IXIAstateless traffic verifier + external-interface: + - name: xe0 + virtual-interface: + type: PCI-PASSTHROUGH + # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. + vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe0.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen + driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe0 + - name: xe1 + virtual-interface: + type: PCI-PASSTHROUGH + vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe1.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen + driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe1 + + benchmark: + kpi: + - rx_throughput_fps + - tx_throughput_fps + - tx_throughput_mbps + - rx_throughput_mbps + - in_packets + - out_packets diff --git a/samples/vnf_samples/vnf_descriptors/tg_ixload.yaml b/samples/vnf_samples/vnf_descriptors/tg_ixload.yaml new file mode 100644 index 000000000..b430d35bd --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/tg_ixload.yaml @@ -0,0 +1,80 @@ +# +# Copyright 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +vnfd:vnfd-catalog: + vnfd: + - id: IxLoadTrafficGen + name: IxLoadTrafficGenVnfSshIntel + short-name: IxLoadTrafficGenVnf + description: IxLoad client/server connection details + mgmt-interface: + user: '{{user}}' # Value filled by vnfdgen + password: '{{password}}' # Value filled by vnfdgen + ip: '{{ip}}' # Value filled by vnfdgen + tg-config: + ixchassis: '{{tg_config.ixchassis}}' #ixia chassis ip + tcl_port: '{{tg_config.tcl_port}}' # tcl server port + lib_path: '{{tg_config.lib_path}}' + root_dir: '{{tg_config.root_dir}}' + py_lib_path: '{{tg_config.py_lib_path}}' + py_bin_path: '{{tg_config.py_bin_path}}' + dut_result_dir: '{{tg_config.dut_result_dir}}' + version: '{{tg_config.version}}' + vdu: + - id: abclient-baremetal + name: abclient-baremetal + description: AB client interface details + external-interface: + - name: xe0 + virtual-interface: + type: PCI-PASSTHROUGH + vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe0.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe0 + - name: xe1 + virtual-interface: + type: PCI-PASSTHROUGH + vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe1.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe1 + benchmark: + kpi: + - complete_requests + - failed_requests + - time_taken_for_tests [seconds] + - requests_per_second [#/sec] (mean) + - time_per_request [ms] (mean, across all concurrent requests) + - transfer_rate [Kbytes/sec] received + - requests_served_50% (ms) + - requests_served_66% (ms) + - requests_served_75% (ms) + - requests_served_80% (ms) + - requests_served_90% (ms) + - requests_served_95% (ms) + - requests_served_98% (ms) + - requests_served_99% (ms) + - requests_served_100% (ms)
\ No newline at end of file diff --git a/samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml b/samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml new file mode 100644 index 000000000..ffbfbdec0 --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml @@ -0,0 +1,104 @@ +# +# Copyright 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +vnfd:vnfd-catalog: + vnfd: + - id: IxLoadTrafficGen + name: IxLoadTrafficGenVnfSshIntel + short-name: IxLoadTrafficGenVnf + description: IxLoad client/server connection details + mgmt-interface: + user: '{{user}}' # Value filled by vnfdgen + password: '{{password}}' # Value filled by vnfdgen + ip: '{{ip}}' # Value filled by vnfdgen + tg-config: + ixchassis: '{{tg_config.ixchassis}}' #ixia chassis ip + tcl_port: '{{tg_config.tcl_port}}' # tcl server port + lib_path: '{{tg_config.lib_path}}' + root_dir: '{{tg_config.root_dir}}' + py_lib_path: '{{tg_config.py_lib_path}}' + dut_result_dir: '{{tg_config.dut_result_dir}}' + version: '{{tg_config.version}}' + vdu: + - id: abclient-baremetal + name: abclient-baremetal + description: AB client interface details + external-interface: + - name: xe0 + virtual-interface: + type: PCI-PASSTHROUGH + vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe0.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe0 + - name: xe1 + virtual-interface: + type: PCI-PASSTHROUGH + vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe1.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe1 + - name: xe2 + virtual-interface: + type: PCI-PASSTHROUGH + vpci: '{{ interfaces.xe2.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe2.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe2.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe2.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe2.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe2.dst_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe2.netmask }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe2 + - name: xe3 + virtual-interface: + type: PCI-PASSTHROUGH + vpci: '{{ interfaces.xe3.vpci }}' # Value filled by vnfdgen + local_iface_name: '{{ interfaces.xe3.local_iface_name }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe3.local_ip }}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe3.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe3.local_mac }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe3.dst_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe3.netmask }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe3 + + benchmark: + kpi: + - complete_requests + - failed_requests + - time_taken_for_tests [seconds] + - requests_per_second [#/sec] (mean) + - time_per_request [ms] (mean, across all concurrent requests) + - transfer_rate [Kbytes/sec] received + - requests_served_50% (ms) + - requests_served_66% (ms) + - requests_served_75% (ms) + - requests_served_80% (ms) + - requests_served_90% (ms) + - requests_served_95% (ms) + - requests_served_98% (ms) + - requests_served_99% (ms) + - requests_served_100% (ms) diff --git a/samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml b/samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml new file mode 100644 index 000000000..1c272e66d --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml @@ -0,0 +1,84 @@ +# 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. + +vnfd:vnfd-catalog: + vnfd: + - id: FWApproxVnf + name: FWVnfSshIntel + short-name: vFWVnf + description: FW approximation using DPDK + mgmt-interface: + vdu-id: aclvnf-baremetal + {% if user is defined %} + user: '{{user}}' # Value filled by vnfdgen + {% endif %} + {% if password is defined %} + password: '{{password}}' # Value filled by vnfdgen + {% endif %} + {% if ip is defined %} + ip: '{{ip}}' # Value filled by vnfdgen + {% endif %} + {% if key_filename is defined %} + key_filename: '{{key_filename}}' # Value filled by vnfdgen + {% endif %} + connection-point: + - name: xe0 + type: VPORT + - name: xe1 + type: VPORT + vdu: + - id: aclvnf-baremetal + name: aclvnf-baremetal + description: ACL approximation using DPDK + vm-flavor: + vcpu-count: '4' + memory-mb: '4096' + external-interface: + - name: xe0 + virtual-interface: + type: PCI-PASSTHROUGH + # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. + vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen + dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen + driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen + vld_id: '{{ interfaces.xe0.vld_id }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe0 + - name: xe1 + virtual-interface: + type: PCI-PASSTHROUGH + # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. + vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen + dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen + local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen + driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen + dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen + local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen + netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen + dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen + vld_id: '{{ interfaces.xe1.vld_id }}' # Value filled by vnfdgen + bandwidth: 10 Gbps + vnfd-connection-point-ref: xe1 + routing_table: {{ routing_table }} + nd_route_tbl: {{ nd_route_tbl }} + benchmark: + kpi: + - packets_in + - packets_fwd + - packets_dropped 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/ci/pip_license.py b/tests/ci/pip_license.py new file mode 100644 index 000000000..e512db7ee --- /dev/null +++ b/tests/ci/pip_license.py @@ -0,0 +1,80 @@ +# 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. + +import pkg_resources +import pip.req +import sys + + +def get_pkg_license(pkg): + """ + Given a package reference (as from requirements.txt), + return license listed in package metadata. + NOTE: This function does no error checking and is for + demonstration purposes only. + + can-pip-or-setuptools-distribute-etc-list-the-license-used-by-each-install + https://stackoverflow.com/a/19086260 + https://stackoverflow.com/users/308066/dkamins + """ + try: + pkgs = pkg_resources.working_set.resolve(pkg, replace_conflicting=True) + # pkgs = pkg_resources.require(pkg) + except pkg_resources.DistributionNotFound as e: + sys.stderr.write("%s\n" % e) + return None + pkg = pkgs[0] + try: + info = pkg.get_metadata_lines('METADATA') + except IOError: + try: + info = pkg.get_metadata_lines('PKG-INFO') + except IOError: + info = [] + licenses = [] + for line in info: + if "License:" in line: + lic = line.split(': ', 1)[1] + if "UNKNOWN" not in lic: + # try this type first + licenses.append(lic) + # break + elif "License ::" in line: + licenses.append(" ".join(line.split(':: ')[1:3])) + return "; ".join(licenses) + +# quick and dirty hack + + +def main(): + + reqs = list(pip.req.parse_requirements("../../requirements.txt", session='hack')) + lines = [] + for req in reqs: + pkg = pkg_resources.parse_requirements([req.name]) + lic = get_pkg_license(pkg) + markers = req.markers + if markers: + mark = "; " + str(req.markers) + else: + mark = "" + line = "{0}{1}\t\t# {2}\n".format(req.req, mark, lic) + sys.stdout.write(line) + lines.append(line) + with open("requirements.txt", "w") as rrr: + rrr.writelines(lines) + + +if __name__ == '__main__': + main() diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml deleted file mode 100644 index 5f51e7adc..000000000 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2016-2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. ---- - -schema: "yardstick:task:0.1" -description: > - Sample benchmark task config file; - vTC. - -scenarios: -- - type: vtc_throughput_noisy - - options: - packet_size: 1280 - vlan_sender: 2033 - vlan_receiver: 2040 - default_net_name: management_network - default_subnet_name: management_subnet - vlan_net_1_name: apexlake_inbound_network - vlan_subnet_1_name: apexlake_inbound_subnet - vlan_net_2_name: apexlake_outbound_network - vlan_subnet_2_name: apexlake_outbound_subnet - vnic_type: direct - vtc_flavor: yardstick-flavor - num_of_neighbours: 2 - amount_of_ram: 1G - number_of_cores: 2 - - runner: - type: Iteration - iterations: 1 - -context: - type: Dummy diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc025.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc025.yaml index a8312876f..a37f83b83 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc025.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc025.yaml @@ -17,7 +17,9 @@ description: > "etc/yardstick/nodes/pod.yaml.ipmi.sample"). {% set file = file or '/etc/yardstick/pod.yaml' %} -{% set jumphost = jumphost or 'node0' %} +{% set jump_host = jump_host or 'node0' %} +{% set attack_host = attack_host or 'node1' %} +{% set monitor_time = monitor_time or 180 %} scenarios: - @@ -25,30 +27,38 @@ scenarios: options: attackers: - fault_type: "bare-metal-down" - host: node1 - jump_host: {{jumphost}} + host: {{attack_host}} + jump_host: {{jump_host}} monitors: - monitor_type: "openstack-cmd" command_name: "openstack image list" - monitor_time: 10 + monitor_time: {{monitor_time}} monitor_number: 3 + sla: + max_outage_time: 5 - monitor_type: "openstack-cmd" command_name: "openstack router list" - monitor_time: 10 + monitor_time: {{monitor_time}} monitor_number: 3 + sla: + max_outage_time: 5 - monitor_type: "openstack-cmd" command_name: "openstack stack list" - monitor_time: 10 + monitor_time: {{monitor_time}} monitor_number: 3 + sla: + max_outage_time: 5 - monitor_type: "openstack-cmd" command_name: "openstack volume list" - monitor_time: 10 + monitor_time: {{monitor_time}} monitor_number: 3 + sla: + max_outage_time: 5 nodes: - node1: node1.LF - node0: node0.LF + {{attack_host}}: {{attack_host}}.LF + {{jump_host}}: {{jump_host}}.LF runner: type: Iteration diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc054.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc054.yaml index c229277f4..417327cb6 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc054.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc054.yaml @@ -13,11 +13,15 @@ description: > Test case for TC054 :OpenStack VIP Master Node abnormally shutdown High Availability; This test case is written by new scenario-based HA testing framework. +{% set attack_host = attack_host or 'node1' %} +{% set check_host = check_host or 'node2' %} +{% set jump_host = jump_host or 'node0' %} {% set file = file or '/etc/yardstick/pod.yaml' %} {% set vip_management = vip_management or '192.168.0.2' %} {% set vip_public = vip_public or '172.16.0.3' %} {% set vip_router_management = vip_router_management or '192.168.0.1' %} {% set vip_router_public = vip_router_public or '172.16.0.2' %} +{% set monitor_time = monitor_time or 180 %} scenarios: - @@ -26,15 +30,16 @@ scenarios: attackers: - fault_type: "bare-metal-down" - host: node1 + host: {{attack_host}} key: "bare-metal-down" + jump_host: {{jump_host}} monitors: - monitor_type: "openstack-cmd" key: "list-images" command_name: "openstack image list" - monitor_time: 10 + monitor_time: {{monitor_time}} monitor_number: 3 sla: max_outage_time: 5 @@ -43,8 +48,8 @@ scenarios: monitor_type: "general-monitor" monitor_key: "ip-status" key: "vip-mgmt-status" - host: node2 - monitor_time: 10 + host: {{check_host}} + monitor_time: {{monitor_time}} monitor_number: 3 sla: max_outage_time: 5 @@ -55,8 +60,8 @@ scenarios: monitor_type: "general-monitor" monitor_key: "ip-status" key: "vip-routerp-status" - host: node2 - monitor_time: 10 + host: {{check_host}} + monitor_time: {{monitor_time}} monitor_number: 3 sla: max_outage_time: 5 @@ -67,8 +72,8 @@ scenarios: monitor_type: "general-monitor" monitor_key: "ip-status" key: "vip-router-status" - host: node2 - monitor_time: 10 + host: {{check_host}} + monitor_time: {{monitor_time}} monitor_number: 3 sla: max_outage_time: 5 @@ -79,8 +84,8 @@ scenarios: monitor_type: "general-monitor" monitor_key: "ip-status" key: "vip-pub" - host: node2 - monitor_time: 10 + host: {{check_host}} + monitor_time: {{monitor_time}} monitor_number: 3 sla: max_outage_time: 5 @@ -119,8 +124,9 @@ scenarios: index: 6 nodes: - node1: node1.LF - node2: node2.LF + {{jump_host}}: {{jump_host}}.LF + {{attack_host}}: {{attack_host}}.LF + {{check_host}}: {{check_host}}.LF runner: type: Duration duration: 1 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/benchmark/scenarios/networking/test_vtc_instantiation_validation.py b/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation.py deleted file mode 100644 index 07b3da992..000000000 --- a/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python - -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Unittest for yardstick.benchmark.scenarios.networking.iperf3.Iperf - -from __future__ import absolute_import -import unittest - -from yardstick.benchmark.scenarios.networking import \ - vtc_instantiation_validation - - -class VtcInstantiationValidationTestCase(unittest.TestCase): - - def setUp(self): - scenario = dict() - scenario['options'] = dict() - scenario['options']['default_net_name'] = '' - scenario['options']['default_subnet_name'] = '' - scenario['options']['vlan_net_1_name'] = '' - scenario['options']['vlan_subnet_1_name'] = '' - scenario['options']['vlan_net_2_name'] = '' - scenario['options']['vlan_subnet_2_name'] = '' - scenario['options']['vnic_type'] = '' - scenario['options']['vtc_flavor'] = '' - scenario['options']['packet_size'] = '' - scenario['options']['vlan_sender'] = '' - scenario['options']['vlan_receiver'] = '' - - self.vt = vtc_instantiation_validation.VtcInstantiationValidation( - scenario, '') - - def test_run_for_success(self): - result = {} - self.vt.run(result) - - -def main(): - unittest.main() - -if __name__ == '__main__': - main() diff --git a/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation_noisy.py b/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation_noisy.py deleted file mode 100644 index 34f3610b1..000000000 --- a/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation_noisy.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python - -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Unittest for yardstick.benchmark.scenarios.networking.iperf3.Iperf - -from __future__ import absolute_import -import unittest - -from yardstick.benchmark.scenarios.networking import \ - vtc_instantiation_validation_noisy - - -class VtcInstantiationValidationiNoisyTestCase(unittest.TestCase): - - def setUp(self): - scenario = dict() - scenario['options'] = dict() - scenario['options']['default_net_name'] = '' - scenario['options']['default_subnet_name'] = '' - scenario['options']['vlan_net_1_name'] = '' - scenario['options']['vlan_subnet_1_name'] = '' - scenario['options']['vlan_net_2_name'] = '' - scenario['options']['vlan_subnet_2_name'] = '' - scenario['options']['vnic_type'] = '' - scenario['options']['vtc_flavor'] = '' - scenario['options']['packet_size'] = '' - scenario['options']['vlan_sender'] = '' - scenario['options']['vlan_receiver'] = '' - scenario['options']['num_of_neighbours'] = '1' - scenario['options']['amount_of_ram'] = '1G' - scenario['options']['number_of_cores'] = '1' - - self.vt = \ - vtc_instantiation_validation_noisy.VtcInstantiationValidationNoisy( - scenario, '') - - def test_run_for_success(self): - result = {} - self.vt.run(result) - - -def main(): - unittest.main() - -if __name__ == '__main__': - main() diff --git a/tests/unit/benchmark/scenarios/networking/test_vtc_throughput.py b/tests/unit/benchmark/scenarios/networking/test_vtc_throughput.py deleted file mode 100644 index a73fad5a8..000000000 --- a/tests/unit/benchmark/scenarios/networking/test_vtc_throughput.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python - -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Unittest for yardstick.benchmark.scenarios.networking.iperf3.Iperf - -from __future__ import absolute_import -import mock -import unittest - -from yardstick.benchmark.scenarios.networking import vtc_throughput - - -class VtcThroughputTestCase(unittest.TestCase): - - def setUp(self): - scenario = dict() - scenario['options'] = dict() - scenario['options']['default_net_name'] = '' - scenario['options']['default_subnet_name'] = '' - scenario['options']['vlan_net_1_name'] = '' - scenario['options']['vlan_subnet_1_name'] = '' - scenario['options']['vlan_net_2_name'] = '' - scenario['options']['vlan_subnet_2_name'] = '' - scenario['options']['vnic_type'] = '' - scenario['options']['vtc_flavor'] = '' - scenario['options']['packet_size'] = '' - scenario['options']['vlan_sender'] = '' - scenario['options']['vlan_receiver'] = '' - - self.vt = vtc_throughput.VtcThroughput(scenario, '') - - def test_run_for_success(self): - result = {} - self.vt.run(result) - - -def main(): - unittest.main() - -if __name__ == '__main__': - main() diff --git a/tests/unit/benchmark/scenarios/networking/test_vtc_throughput_noisy_test.py b/tests/unit/benchmark/scenarios/networking/test_vtc_throughput_noisy_test.py deleted file mode 100644 index e1b162c79..000000000 --- a/tests/unit/benchmark/scenarios/networking/test_vtc_throughput_noisy_test.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python - -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Unittest for yardstick.benchmark.scenarios.networking.iperf3.Iperf - -from __future__ import absolute_import -import mock -import unittest - -from yardstick.benchmark.scenarios.networking import vtc_throughput_noisy - - -class VtcThroughputNoisyTestCase(unittest.TestCase): - - def setUp(self): - scenario = dict() - scenario['options'] = dict() - scenario['options']['default_net_name'] = '' - scenario['options']['default_subnet_name'] = '' - scenario['options']['vlan_net_1_name'] = '' - scenario['options']['vlan_subnet_1_name'] = '' - scenario['options']['vlan_net_2_name'] = '' - scenario['options']['vlan_subnet_2_name'] = '' - scenario['options']['vnic_type'] = '' - scenario['options']['vtc_flavor'] = '' - scenario['options']['packet_size'] = '' - scenario['options']['vlan_sender'] = '' - scenario['options']['vlan_receiver'] = '' - scenario['options']['num_of_neighbours'] = '1' - scenario['options']['amount_of_ram'] = '1G' - scenario['options']['number_of_cores'] = '1' - - self.vt = vtc_throughput_noisy.VtcThroughputNoisy(scenario, '') - - def test_run_for_success(self): - result = {} - self.vt.run(result) - - -def main(): - unittest.main() - -if __name__ == '__main__': - main() diff --git a/tests/unit/common/test_utils.py b/tests/unit/common/test_utils.py index e21e5fa3a..f25e6cc07 100644 --- a/tests/unit/common/test_utils.py +++ b/tests/unit/common/test_utils.py @@ -10,11 +10,18 @@ # 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 +from yardstick.common import constants class IterSubclassesTestCase(unittest.TestCase): @@ -93,7 +100,7 @@ class GetParaFromYaml(unittest.TestCase): get_env.return_value = self._get_file_abspath(file_path) args = 'releng.file' default = 'hello' - self.assertTrue(utils.get_param(args, default), default) + self.assertTrue(constants.get_param(args, default), default) @mock.patch('yardstick.common.utils.os.environ.get') def test_get_param_para_exists(self, get_env): @@ -101,7 +108,7 @@ class GetParaFromYaml(unittest.TestCase): get_env.return_value = self._get_file_abspath(file_path) args = 'releng.dir' para = '/home/opnfv/repos/releng' - self.assertEqual(para, utils.get_param(args)) + self.assertEqual(para, constants.get_param(args)) def _get_file_abspath(self, filename): curr_path = os.path.dirname(os.path.abspath(__file__)) @@ -142,6 +149,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 +176,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 +799,275 @@ 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) + + def test_join_non_strings(self): + self.assertEqual(utils.join_non_strings(':'), '') + self.assertEqual(utils.join_non_strings(':', 'a'), 'a') + self.assertEqual(utils.join_non_strings(':', 'a', 2, 'c'), 'a:2:c') + self.assertEqual(utils.join_non_strings(':', ['a', 2, 'c']), 'a:2:c') + self.assertEqual(utils.join_non_strings(':', 'abc'), 'abc') + + def test_validate_non_string_sequence(self): + self.assertEqual(utils.validate_non_string_sequence([1, 2, 3]), [1, 2, 3]) + self.assertIsNone(utils.validate_non_string_sequence('123')) + self.assertIsNone(utils.validate_non_string_sequence(1)) + + self.assertEqual(utils.validate_non_string_sequence(1, 2), 2) + self.assertEqual(utils.validate_non_string_sequence(1, default=2), 2) + + with self.assertRaises(RuntimeError): + utils.validate_non_string_sequence(1, raise_exc=RuntimeError) + + def test_error_class(self): + with self.assertRaises(RuntimeError): + utils.ErrorClass() + + error_instance = utils.ErrorClass(test='') + with self.assertRaises(AttributeError): + error_instance.get_name() + + +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/yardstick/vTC/__init__.py b/tests/unit/network_services/helpers/__init__.py index e69de29bb..e69de29bb 100644 --- a/yardstick/vTC/__init__.py +++ b/tests/unit/network_services/helpers/__init__.py diff --git a/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml b/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml new file mode 100644 index 000000000..606d557e9 --- /dev/null +++ b/tests/unit/network_services/helpers/acl_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: VACL + name: VACL + short-name: VACL + description: scenario with VACL,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/acl_vnf.yaml + + vld: + - id: private_1 + 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_1 + 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 #VACL VNF 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/libs/__init__.py b/tests/unit/network_services/libs/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/unit/network_services/libs/__init__.py diff --git a/tests/unit/network_services/libs/ixia_libs/__init__.py b/tests/unit/network_services/libs/ixia_libs/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/unit/network_services/libs/ixia_libs/__init__.py diff --git a/tests/unit/network_services/libs/ixia_libs/test_IxNet.py b/tests/unit/network_services/libs/ixia_libs/test_IxNet.py new file mode 100644 index 000000000..9114b5163 --- /dev/null +++ b/tests/unit/network_services/libs/ixia_libs/test_IxNet.py @@ -0,0 +1,882 @@ +#!/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. +# + +# Unittest for yardstick.network_services.libs.ixia_libs.IxNet + +from __future__ import absolute_import +import unittest +import mock + +from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IxNextgen +from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IP_VERSION_4 +from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IP_VERSION_6 + + +class TestIxNextgen(unittest.TestCase): + + def test___init__(self): + ixnet_gen = IxNextgen() + self.assertIsNone(ixnet_gen._bidir) + + @mock.patch("yardstick.network_services.libs.ixia_libs.IxNet.IxNet.IxNetwork") + @mock.patch("yardstick.network_services.libs.ixia_libs.IxNet.IxNet.sys") + def test_connect(self, mock_sys, mock_ix_network): + mock_ix_network.IxNet.return_value = mock_ixnet = mock.Mock() + + ixnet_gen = IxNextgen() + ixnet_gen.get_config = mock.MagicMock() + ixnet_gen.get_ixnet = mock.MagicMock() + + result = ixnet_gen._connect({"py_lib_path": "/tmp"}) + self.assertIsNotNone(result) + self.assertEqual(mock_ix_network.IxNet.call_count, 1) + self.assertEqual(mock_ixnet.connect.call_count, 1) + + def test_clear_ixia_config(self): + ixnet = mock.MagicMock() + ixnet.execute = mock.Mock() + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.clear_ixia_config() + self.assertIsNone(result) + self.assertEqual(ixnet.execute.call_count, 1) + + def test_load_ixia_profile(self): + ixnet = mock.MagicMock() + ixnet.execute = mock.Mock() + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.load_ixia_profile({}) + self.assertIsNone(result) + self.assertEqual(ixnet.execute.call_count, 1) + + def test_load_ixia_config(self): + ixnet = mock.MagicMock() + ixnet.execute = mock.Mock() + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_load_config({}) + self.assertIsNone(result) + self.assertEqual(ixnet.execute.call_count, 2) + + @mock.patch('yardstick.network_services.libs.ixia_libs.IxNet.IxNet.log') + def test_ix_assign_ports(self, mock_logger): + ixnet = mock.MagicMock() + ixnet.getList.return_value = [0, 1] + ixnet.getAttribute.side_effect = ['up', 'down'] + + config = { + 'chassis': '1.1.1.1', + 'card1': '1', + 'card2': '2', + 'port1': '2', + 'port2': '2', + } + + ixnet_gen = IxNextgen(ixnet) + ixnet_gen._cfg = config + + result = ixnet_gen.ix_assign_ports() + self.assertIsNone(result) + self.assertEqual(ixnet.execute.call_count, 1) + self.assertEqual(ixnet.commit.call_count, 1) + self.assertEqual(ixnet.getAttribute.call_count, 2) + self.assertEqual(mock_logger.error.call_count, 1) + + def test_ix_update_frame(self): + static_traffic_params = { + "private": { + "id": 1, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:03", + "framesPerSecond": True, + "framesize": { + "64B": "100", + "1KB": "0", + }, + "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_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "id": 2, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:04", + "framesPerSecond": False, + "framesize": {"64B": "100"}, + "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_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + + ixnet = mock.MagicMock() + ixnet.remapIds.return_value = ["0"] + ixnet.setMultiAttribute.return_value = [1] + ixnet.commit.return_value = [1] + ixnet.getList.side_effect = [ + [1], + [1], + [1], + [ + "ethernet.header.destinationAddress", + "ethernet.header.sourceAddress", + ], + ] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_update_frame(static_traffic_params) + self.assertIsNone(result) + self.assertEqual(ixnet.setMultiAttribute.call_count, 7) + self.assertEqual(ixnet.commit.call_count, 2) + + def test_ix_update_udp(self): + ixnet = mock.MagicMock() + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_update_udp({}) + self.assertIsNone(result) + + def test_ix_update_tcp(self): + ixnet = mock.MagicMock() + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_update_tcp({}) + self.assertIsNone(result) + + def test_ix_start_traffic(self): + ixnet = mock.MagicMock() + ixnet.getList.return_value = [0] + ixnet.getAttribute.return_value = 'down' + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_start_traffic() + self.assertIsNone(result) + self.assertEqual(ixnet.getList.call_count, 1) + self.assertEqual(ixnet.execute.call_count, 3) + + def test_ix_stop_traffic(self): + ixnet = mock.MagicMock() + ixnet.getList.return_value = [0] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_stop_traffic() + self.assertIsNone(result) + self.assertEqual(ixnet.getList.call_count, 1) + self.assertEqual(ixnet.execute.call_count, 1) + + def test_ix_get_statistics(self): + ixnet = mock.MagicMock() + ixnet.execute.return_value = "" + ixnet.getList.side_effect = [ + [ + '::ixNet::OBJ-/statistics/view:"Traffic Item Statistics"', + '::ixNet::OBJ-/statistics/view:"Port Statistics"', + ], + [ + '::ixNet::OBJ-/statistics/view:"Flow Statistics"', + ], + ] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_get_statistics() + self.assertIsNotNone(result) + self.assertEqual(ixnet.getList.call_count, 2) + self.assertEqual(ixnet.execute.call_count, 20) + + def test_find_view_obj_no_where(self): + views = ['here', 'there', 'everywhere'] + result = IxNextgen.find_view_obj('no_where', views) + self.assertEqual(result, '') + + def test_add_ip_header_v4(self): + static_traffic_params = { + "private": { + "id": 1, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:03", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "srcmac": "00:00:00:00:00:01" + }, + "outer_l3": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "count": 1024, + "ttl": 32 + }, + "outer_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "id": 2, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:04", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "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_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + + ixnet = mock.MagicMock() + ixnet.remapIds.return_value = ["0"] + ixnet.setMultiAttribute.return_value = [1] + ixnet.commit.return_value = [1] + ixnet.getList.side_effect = [[1], [0], [0], ["srcIp", "dstIp"]] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.add_ip_header(static_traffic_params, IP_VERSION_4) + self.assertIsNone(result) + self.assertGreater(ixnet.setMultiAttribute.call_count, 0) + self.assertEqual(ixnet.commit.call_count, 1) + + def test_add_ip_header_v4_nothing_to_do(self): + static_traffic_params = { + "private": { + "id": 1, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:03", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "srcmac": "00:00:00:00:00:01" + }, + "outer_l3": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "count": 1024, + "ttl": 32 + }, + "outer_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "id": 2, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:04", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "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_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + + ixnet = mock.MagicMock() + ixnet.remapIds.return_value=["0"] + ixnet.setMultiAttribute.return_value = [1] + ixnet.commit.return_value = [1] + ixnet.getList.side_effect = [[1], [0, 1], [0], ["srcIp", "dstIp"]] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.add_ip_header(static_traffic_params, IP_VERSION_4) + self.assertIsNone(result) + self.assertGreater(ixnet.setMultiAttribute.call_count, 0) + self.assertEqual(ixnet.commit.call_count, 1) + + def test_add_ip_header_v6(self): + static_traffic_profile = { + "private": { + "id": 1, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:03", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "srcmac": "00:00:00:00:00:01" + }, + "outer_l3": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "id": 2, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:04", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "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_l3v6": { + "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" + } + } + + ixnet = mock.MagicMock() + ixnet.getList.side_effect = [[1], [1], [1], ["srcIp", "dstIp"]] + ixnet.remapIds.return_value = ["0"] + ixnet.setMultiAttribute.return_value = [1] + ixnet.commit.return_value = [1] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.add_ip_header(static_traffic_profile, IP_VERSION_6) + self.assertIsNone(result) + self.assertGreater(ixnet.setMultiAttribute.call_count, 0) + self.assertEqual(ixnet.commit.call_count, 1) + + def test_add_ip_header_v6_nothing_to_do(self): + static_traffic_params = { + "private": { + "id": 1, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:03", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "srcmac": "00:00:00:00:00:01" + }, + "outer_l3": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "count": 1024, + "ttl": 32 + }, + "outer_l3v6": { + "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": { + "id": 2, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l2": { + "dstmac": "00:00:00:00:00:04", + "framesPerSecond": True, + "framesize": {"64B": "100"}, + "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_l3v6": { + "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" + } + } + + ixnet = mock.MagicMock() + ixnet.getList.side_effect = [[1], [0, 1], [1], ["srcIP", "dstIP"]] + ixnet.remapIds.return_value = ["0"] + ixnet.setMultiAttribute.return_value = [1] + ixnet.commit.return_value = [1] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.add_ip_header(static_traffic_params, IP_VERSION_6) + self.assertIsNone(result) + self.assertEqual(ixnet.setMultiAttribute.call_count, 0) + + def test_set_random_ip_multi_attributes_bad_ip_version(self): + bad_ip_version = object() + ixnet_gen = IxNextgen(mock.Mock()) + mock1 = mock.Mock() + mock2 = mock.Mock() + mock3 = mock.Mock() + with self.assertRaises(ValueError): + ixnet_gen.set_random_ip_multi_attributes(mock1, bad_ip_version, mock2, mock3) + + def test_get_config(self): + tg_cfg = { + "vdu": [ + { + "external-interface": [ + { + "virtual-interface": { + "vpci": "0000:07:00.1", + }, + }, + { + "virtual-interface": { + "vpci": "0001:08:01.2", + }, + }, + ], + }, + ], + "mgmt-interface": { + "ip": "test1", + "tg-config": { + "dut_result_dir": "test2", + "version": "test3", + "ixchassis": "test4", + "tcl_port": "test5", + "py_lib_path": "test6", + }, + } + } + + expected = { + 'py_lib_path': 'test6', + 'machine': 'test1', + 'port': 'test5', + 'chassis': 'test4', + 'card1': '0000', + 'port1': '07', + 'card2': '0001', + 'port2': '08', + 'output_dir': 'test2', + 'version': 'test3', + 'bidir': True, + } + + result = IxNextgen.get_config(tg_cfg) + self.assertDictEqual(result, expected) + + def test_ix_update_ether(self): + static_traffic_params = { + "private": { + "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_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "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_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + + ixnet = mock.MagicMock() + ixnet.setMultiAttribute.return_value = [1] + ixnet.commit.return_value = [1] + ixnet.getList.side_effect = [ + [1], + [1], + [1], + [ + "ethernet.header.destinationAddress", + "ethernet.header.sourceAddress", + ], + ] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_update_ether(static_traffic_params) + self.assertIsNone(result) + self.assertGreater(ixnet.setMultiAttribute.call_count, 0) + + def test_ix_update_ether_nothing_to_do(self): + static_traffic_params = { + "private": { + "id": 1, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l3": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "id": 2, + "bidir": "False", + "duration": 60, + "iload": "100", + "outer_l3": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + + ixnet = mock.MagicMock() + ixnet.setMultiAttribute.return_value = [1] + ixnet.commit.return_value = [1] + ixnet.getList.side_effect=[ + [1], + [1], + [1], + [ + "ethernet.header.destinationAddress", + "ethernet.header.sourceAddress", + ], + ] + + ixnet_gen = IxNextgen(ixnet) + + result = ixnet_gen.ix_update_ether(static_traffic_params) + self.assertIsNone(result) + self.assertEqual(ixnet.setMultiAttribute.call_count, 0) diff --git a/tests/unit/network_services/nfvi/test_resource.py b/tests/unit/network_services/nfvi/test_resource.py index e2640ac74..cb26fd085 100644 --- a/tests/unit/network_services/nfvi/test_resource.py +++ b/tests/unit/network_services/nfvi/test_resource.py @@ -92,9 +92,11 @@ class TestResourceProfile(unittest.TestCase): mock.Mock(return_value=(0, {}, "")) ssh.from_node.return_value = ssh_mock + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] self.resource_profile = \ - ResourceProfile(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0], - [1, 2, 3]) + ResourceProfile(mgmt, interfaces, [1, 2, 3]) def test___init__(self): self.assertEqual(True, self.resource_profile.enable) @@ -107,13 +109,13 @@ class TestResourceProfile(unittest.TestCase): reskey = ["", "cpufreq", "cpufreq-0"] value = "metric:10" val = self.resource_profile.get_cpu_data(reskey, value) - self.assertEqual(val, ['0', 'cpufreq', '10', 'metric']) + self.assertIsNotNone(val) def test_get_cpu_data_error(self): reskey = ["", "", ""] value = "metric:10" val = self.resource_profile.get_cpu_data(reskey, value) - self.assertEqual(val, ['error', 'Invalid', '']) + self.assertEqual(val, ('error', 'Invalid', '', '')) def test__start_collectd(self): with mock.patch("yardstick.ssh.SSH") as ssh: @@ -121,32 +123,228 @@ class TestResourceProfile(unittest.TestCase): ssh_mock.execute = \ mock.Mock(return_value=(0, "", "")) ssh.from_node.return_value = ssh_mock + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] resource_profile = \ - ResourceProfile(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0], - [1, 2, 3]) + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._prepare_collectd_conf = mock.Mock() self.assertIsNone( resource_profile._start_collectd(ssh_mock, "/opt/nsb_bin")) - def test_initiate_systemagent(self): + def test__prepare_collectd_conf_BM(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 + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] resource_profile = \ - ResourceProfile(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0], - [1, 2, 3]) + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._provide_config_file = mock.Mock() + self.assertIsNone( + resource_profile._prepare_collectd_conf("/opt/nsb_bin")) + + def test__prepare_collectd_conf_managed_ovs_dpdk(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 + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] + resource_profile = \ + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._provide_config_file = mock.Mock() + self.assertIsNone( + resource_profile._prepare_collectd_conf("/opt/nsb_bin")) + + def test__prepare_collectd_conf_ovs_dpdk(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 + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] + resource_profile = \ + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._provide_config_file = mock.Mock() + self.assertIsNone( + resource_profile._prepare_collectd_conf("/opt/nsb_bin")) + + def test__prepare_collectd_conf_managed_sriov(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 + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] + resource_profile = \ + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._provide_config_file = mock.Mock() + self.assertIsNone( + resource_profile._prepare_collectd_conf("/opt/nsb_bin")) + + def test__prepare_collectd_conf_sriov(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 + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] + resource_profile = \ + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._provide_config_file = mock.Mock() + self.assertIsNone( + resource_profile._prepare_collectd_conf("/opt/nsb_bin")) + + @mock.patch("yardstick.network_services.nfvi.resource.open") + @mock.patch("yardstick.network_services.nfvi.resource.tempfile") + @mock.patch("yardstick.network_services.nfvi.resource.os") + def test__provide_config_file(self, mock_open, mock_tempfile, mock_os): + 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 + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] + resource_profile = \ + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._prepare_collectd_conf = mock.Mock() + resource_profile.connection = ssh_mock + resource_profile.connection.put = \ + mock.Mock(return_value=(0, "", "")) + mock_tempfile.mkstemp = mock.Mock(return_value=["test", ""]) + self.assertIsNone( + resource_profile._provide_config_file("/opt/nsb_bin", + "collectd.cfg", {})) + + @mock.patch("yardstick.network_services.nfvi.resource.open") + def test_initiate_systemagent(self, mock_open): + 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 + mgmt = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['mgmt-interface'] + interfaces = \ + self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface'] + resource_profile = \ + ResourceProfile(mgmt, interfaces, [1, 2, 3]) + resource_profile._start_collectd = mock.Mock() self.assertIsNone( resource_profile.initiate_systemagent("/opt/nsb_bin")) + def test__parse_hugepages(self): + reskey = ["cpu", "cpuFreq"] + value = "timestamp:12345" + res = self.resource_profile.parse_hugepages(reskey, value) + self.assertEqual({'cpu/cpuFreq': '12345'}, res) + + def test__parse_dpdkstat(self): + reskey = ["dpdk0", "0"] + value = "tx:12345" + res = self.resource_profile.parse_dpdkstat(reskey, value) + self.assertEqual({'dpdk0/0': '12345'}, res) + + def test__parse_virt(self): + reskey = ["vm0", "cpu"] + value = "load:45" + res = self.resource_profile.parse_virt(reskey, value) + self.assertEqual({'vm0/cpu': '45'}, res) + + def test__parse_ovs_stats(self): + reskey = ["ovs", "stats"] + value = "tx:45" + res = self.resource_profile.parse_ovs_stats(reskey, value) + self.assertEqual({'ovs/stats': '45'}, res) + def test_parse_collectd_result(self): res = self.resource_profile.parse_collectd_result({}, [0, 1, 2]) - self.assertDictEqual(res, {'timestamp': '', 'cpu': {}, 'memory': {}}) + expected_result = {'cpu': {}, 'dpdkstat': {}, 'hugepages': {}, + 'memory': {}, 'ovs_stats': {}, 'timestamp': '', + 'virt': {}} + self.assertDictEqual(res, expected_result) + + def test_parse_collectd_result_cpu(self): + metric = {"nsb_stats/cpu/0/ipc": "101"} + self.resource_profile.get_cpu_data = mock.Mock(return_value=[1, + "ipc", + "1234", + ""]) + res = self.resource_profile.parse_collectd_result(metric, [0, 1, 2]) + expected_result = {'cpu': {1: {'ipc': '1234'}}, 'dpdkstat': {}, 'hugepages': {}, + 'memory': {}, 'ovs_stats': {}, 'timestamp': '', + 'virt': {}} + self.assertDictEqual(res, expected_result) + + def test_parse_collectd_result_memory(self): + metric = {"nsb_stats/memory/bw": "101"} + res = self.resource_profile.parse_collectd_result(metric, [0, 1, 2]) + expected_result = {'cpu': {}, 'dpdkstat': {}, 'hugepages': {}, + 'memory': {'bw': '101'}, 'ovs_stats': {}, 'timestamp': '', + 'virt': {}} + self.assertDictEqual(res, expected_result) + + def test_parse_collectd_result_hugepage(self): + metric = {"nsb_stats/hugepages/free": "101"} + self.resource_profile.parse_hugepages = \ + mock.Mock(return_value={"free": "101"}) + res = self.resource_profile.parse_collectd_result(metric, [0, 1, 2]) + expected_result = {'cpu': {}, 'dpdkstat': {}, 'hugepages': {'free': + '101'}, + 'memory': {}, 'ovs_stats': {}, 'timestamp': '', + 'virt': {}} + self.assertDictEqual(res, expected_result) + + def test_parse_collectd_result_dpdk_virt_ovs(self): + metric = {"nsb_stats/dpdkstat/tx": "101", + "nsb_stats/ovs_stats/tx": "101", + "nsb_stats/virt/virt/memory": "101"} + self.resource_profile.parse_dpdkstat = \ + mock.Mock(return_value={"tx": "101"}) + self.resource_profile.parse_virt = \ + mock.Mock(return_value={"memory": "101"}) + self.resource_profile.parse_ovs_stats = \ + mock.Mock(return_value={"tx": "101"}) + res = self.resource_profile.parse_collectd_result(metric, [0, 1, 2]) + expected_result = {'cpu': {}, 'dpdkstat': {'tx': '101'}, 'hugepages': {}, + 'memory': {}, 'ovs_stats': {'tx': '101'}, 'timestamp': '', + 'virt': {'memory': '101'}} + self.assertDictEqual(res, expected_result) + + def test_amqp_process_for_nfvi_kpi(self): + self.resource_profile.amqp_client = \ + mock.MagicMock(side_effect=[None, mock.MagicMock()]) + self.resource_profile.run_collectd_amqp = \ + mock.Mock(return_value=0) + res = self.resource_profile.amqp_process_for_nfvi_kpi() + self.assertEqual(None, res) + + def test_amqp_collect_nfvi_kpi(self): + self.resource_profile.amqp_client = \ + mock.MagicMock(side_effect=[None, mock.MagicMock()]) + self.resource_profile.run_collectd_amqp = \ + mock.Mock(return_value=0) + self.resource_profile.parse_collectd_result = mock.Mock() + res = self.resource_profile.amqp_collect_nfvi_kpi() + self.assertIsNotNone(res) def test_run_collectd_amqp(self): _queue = multiprocessing.Queue() resource.AmqpConsumer = mock.Mock(autospec=collectd) - self.assertIsNone(self.resource_profile.run_collectd_amqp(_queue)) + self.assertIsNone(self.resource_profile.run_collectd_amqp()) def test_start(self): self.assertIsNone(self.resource_profile.start()) 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_http_ixload.py b/tests/unit/network_services/traffic_profile/test_http_ixload.py new file mode 100644 index 000000000..2e1b6f4ff --- /dev/null +++ b/tests/unit/network_services/traffic_profile/test_http_ixload.py @@ -0,0 +1,250 @@ +# 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 +import unittest +import mock +import runpy + +from oslo_serialization import jsonutils + +from yardstick.network_services.traffic_profile import http_ixload + + +class TestIxLoadTrafficGen(unittest.TestCase): + + def test_parse_run_test(self): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + j = jsonutils.dump_as_bytes(test_input) + ixload = http_ixload.IXLOADHttpTest(j) + self.assertDictEqual(ixload.test_input, test_input) + self.assertIsNone(ixload.parse_run_test()) + self.assertEqual(ixload.ports_to_reassign, [ + ["IXIA_CHASSIS", "CARD", 1], + ["IXIA_CHASSIS", "CARD", 2], + ["IXIA_CHASSIS", "CARD", 3], + ]) + + def test_format_ports_for_reassignment(self): + ports = [ + ["IXIA_CHASSIS", "CARD", 1], + ["IXIA_CHASSIS", "CARD", 2], + ["IXIA_CHASSIS", "CARD", 3], + ] + formatted = http_ixload.IXLOADHttpTest.format_ports_for_reassignment(ports) + self.assertEqual(formatted, [ + "IXIA_CHASSIS;CARD;1", + "IXIA_CHASSIS;CARD;2", + "IXIA_CHASSIS;CARD;3", + ]) + + def test_reassign_ports(self): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + j = jsonutils.dump_as_bytes(test_input) + ixload = http_ixload.IXLOADHttpTest(j) + repository = mock.Mock() + test = mock.MagicMock() + test.setPorts = mock.Mock() + ports_to_reassign = [(1, 2, 3), (1, 2, 4)] + ixload.format_ports_for_reassignment = mock.Mock(return_value=["1;2;3"]) + self.assertIsNone(ixload.reassign_ports(test, repository, ports_to_reassign)) + + def test_reassign_ports_error(self): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + j = jsonutils.dump_as_bytes(test_input) + ixload = http_ixload.IXLOADHttpTest(j) + repository = mock.Mock() + test = "test" + ports_to_reassign = [(1, 2, 3), (1, 2, 4)] + ixload.format_ports_for_reassignment = mock.Mock(return_value=["1;2;3"]) + ixload.ix_load = mock.MagicMock() + ixload.ix_load.delete = mock.Mock() + ixload.ix_load.disconnect = mock.Mock() + with self.assertRaises(Exception): + ixload.reassign_ports(test, repository, ports_to_reassign) + + def test_stat_collector(self): + args = [0, 1] + self.assertIsNone( + http_ixload.IXLOADHttpTest.stat_collector(*args)) + + def test_IxL_StatCollectorCommand(self): + args = [[0, 1, 2, 3], [0, 1, 2, 3]] + self.assertIsNone( + http_ixload.IXLOADHttpTest.IxL_StatCollectorCommand(*args)) + + def test_set_results_dir(self): + test_stat_collector = mock.MagicMock() + test_stat_collector.setResultDir = mock.Mock() + results_on_windows = "c:/Results" + self.assertIsNone( + http_ixload.IXLOADHttpTest.set_results_dir(test_stat_collector, + results_on_windows)) + + def test_set_results_dir_error(self): + test_stat_collector = "" + results_on_windows = "c:/Results" + with self.assertRaises(Exception): + http_ixload.IXLOADHttpTest.set_results_dir(test_stat_collector, results_on_windows) + + def test_load_config_file(self): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + j = jsonutils.dump_as_bytes(test_input) + ixload = http_ixload.IXLOADHttpTest(j) + ixload.ix_load = mock.MagicMock() + ixload.ix_load.new = mock.Mock(return_value="") + self.assertIsNotNone(ixload.load_config_file("ixload.cfg")) + + def test_load_config_file_error(self): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + j = jsonutils.dump_as_bytes(test_input) + ixload = http_ixload.IXLOADHttpTest(j) + ixload.ix_load = "test" + with self.assertRaises(Exception): + ixload.load_config_file("ixload.cfg") + + @mock.patch('yardstick.network_services.traffic_profile.http_ixload.IxLoad') + @mock.patch('yardstick.network_services.traffic_profile.http_ixload.StatCollectorUtils') + def test_start_http_test_connect_error(self, mock_collector_type, mock_ixload_type): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + + j = jsonutils.dump_as_bytes(test_input) + + mock_ixload = mock_ixload_type() + mock_ixload.connect.side_effect = RuntimeError + + ixload = http_ixload.IXLOADHttpTest(j) + ixload.results_on_windows = 'windows_result_dir' + ixload.result_dir = 'my_result_dir' + + with self.assertRaises(RuntimeError): + ixload.start_http_test() + + @mock.patch('yardstick.network_services.traffic_profile.http_ixload.IxLoad') + @mock.patch('yardstick.network_services.traffic_profile.http_ixload.StatCollectorUtils') + def test_start_http_test(self, mock_collector_type, mock_ixload_type): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + + j = jsonutils.dump_as_bytes(test_input) + + ixload = http_ixload.IXLOADHttpTest(j) + ixload.results_on_windows = 'windows_result_dir' + ixload.result_dir = 'my_result_dir' + ixload.load_config_file = mock.MagicMock() + + self.assertIsNone(ixload.start_http_test()) + + @mock.patch('yardstick.network_services.traffic_profile.http_ixload.IxLoad') + @mock.patch('yardstick.network_services.traffic_profile.http_ixload.StatCollectorUtils') + def test_start_http_test_reassign_error(self, mock_collector_type, mock_ixload_type): + ports = [1, 2, 3] + test_input = { + "remote_server": "REMOTE_SERVER", + "ixload_cfg": "IXLOAD_CFG", + "result_dir": "RESULT_DIR", + "ixia_chassis": "IXIA_CHASSIS", + "IXIA": { + "card": "CARD", + "ports": ports, + }, + } + + j = jsonutils.dump_as_bytes(test_input) + + ixload = http_ixload.IXLOADHttpTest(j) + ixload.load_config_file = mock.MagicMock() + + reassign_ports = mock.Mock(side_effect=RuntimeError) + ixload.reassign_ports = reassign_ports + ixload.results_on_windows = 'windows_result_dir' + ixload.result_dir = 'my_result_dir' + + ixload.start_http_test() + self.assertEqual(reassign_ports.call_count, 1) + + @mock.patch("yardstick.network_services.traffic_profile.http_ixload.IXLOADHttpTest") + def test_main(self, IXLOADHttpTest): + args = ["1", "2", "3"] + http_ixload.main(args) diff --git a/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py new file mode 100644 index 000000000..6dba64af9 --- /dev/null +++ b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py @@ -0,0 +1,648 @@ +#!/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 + +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.traffic_profile.traffic_profile \ + import TrexProfile + from yardstick.network_services.traffic_profile.ixia_rfc2544 import \ + IXIARFC2544Profile + from yardstick.network_services.traffic_profile import ixia_rfc2544 + + +class TestIXIARFC2544Profile(unittest.TestCase): + 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}} + + PROFILE = {'description': 'Traffic profile to run RFC2544 latency', + 'name': 'rfc2544', + 'traffic_profile': {'traffic_type': 'IXIARFC2544Profile', + 'frame_rate': 100}, + 'public': {'ipv4': + {'outer_l2': {'framesize': + {'64B': '100', '1518B': '0', + '128B': '0', '1400B': '0', + '256B': '0', '373b': '0', + '570B': '0'}}, + 'outer_l3v4': {'dstip4': '1.1.1.1-1.15.255.255', + 'proto': 'udp', + 'srcip4': '90.90.1.1-90.105.255.255', + 'dscp': 0, 'ttl': 32}, + 'outer_l4': {'srcport': '2001', + 'dsrport': '1234'}}}, + 'private': {'ipv4': + {'outer_l2': {'framesize': + {'64B': '100', '1518B': '0', + '128B': '0', '1400B': '0', + '256B': '0', '373b': '0', + '570B': '0'}}, + 'outer_l3v4': {'dstip4': '9.9.1.1-90.105.255.255', + 'proto': 'udp', + 'srcip4': '1.1.1.1-1.15.255.255', + 'dscp': 0, 'ttl': 32}, + 'outer_l4': {'dstport': '2001', + 'srcport': '1234'}}}, + 'schema': 'isb:traffic_profile:0.1'} + + def test_get_ixia_traffic_profile_error(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) + STATIC_TRAFFIC = { + "private": { + "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_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "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_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + ixia_rfc2544.STATIC_TRAFFIC = STATIC_TRAFFIC + + r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.rate = 100 + mac = {"src_mac_0": "00:00:00:00:00:01", + "src_mac_1": "00:00:00:00:00:02", + "src_mac_2": "00:00:00:00:00:02", + "dst_mac_0": "00:00:00:00:00:03", + "dst_mac_1": "00:00:00:00:00:04", + "dst_mac_2": "00:00:00:00:00:04"} + self.assertRaises(IOError, r_f_c2544_profile._get_ixia_traffic_profile, + self.PROFILE, mac, xfile="tmp", + static_traffic=STATIC_TRAFFIC) + + + @mock.patch("yardstick.network_services.traffic_profile.ixia_rfc2544.open") + def test_get_ixia_traffic_profile(self, mock_open): + 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) + STATIC_TRAFFIC = { + "private": { + "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_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "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_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + ixia_rfc2544.STATIC_TRAFFIC = STATIC_TRAFFIC + + r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.rate = 100 + mac = {"src_mac_0": "00:00:00:00:00:01", + "src_mac_1": "00:00:00:00:00:02", + "src_mac_2": "00:00:00:00:00:02", + "dst_mac_0": "00:00:00:00:00:03", + "dst_mac_1": "00:00:00:00:00:04", + "dst_mac_2": "00:00:00:00:00:04"} + result = r_f_c2544_profile._get_ixia_traffic_profile( + self.PROFILE, mac, xfile="tmp", static_traffic=STATIC_TRAFFIC) + self.assertIsNotNone(result) + + @mock.patch("yardstick.network_services.traffic_profile.ixia_rfc2544.open") + def test_get_ixia_traffic_profile_v6(self, mock_open): + 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) + STATIC_TRAFFIC = { + "private": { + "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_l3v4": { + "dscp": 0, + "dstip4": "152.16.40.20", + "proto": "udp", + "srcip4": "152.16.100.20", + "ttl": 32 + }, + "outer_l3v6": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l4": { + "dstport": "2001", + "srcport": "1234" + }, + "traffic_type": "continuous" + }, + "public": { + "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_l3v4": { + "count": 1024, + "dscp": 0, + "dstip4": "152.16.100.20", + "proto": "udp", + "srcip4": "152.16.40.20", + "ttl": 32 + }, + "outer_l3v6": { + "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" + } + } + ixia_rfc2544.STATIC_TRAFFIC = STATIC_TRAFFIC + + r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.rate = 100 + mac = {"src_mac_0": "00:00:00:00:00:01", + "src_mac_1": "00:00:00:00:00:02", + "src_mac_2": "00:00:00:00:00:02", + "dst_mac_0": "00:00:00:00:00:03", + "dst_mac_1": "00:00:00:00:00:04", + "dst_mac_2": "00:00:00:00:00:04"} + profile_data = {'description': 'Traffic profile to run RFC2544', + 'name': 'rfc2544', + 'traffic_profile': + {'traffic_type': 'IXIARFC2544Profile', + 'frame_rate': 100}, + 'public': + {'ipv4': + {'outer_l2': {'framesize': + {'64B': '100', '1518B': '0', + '128B': '0', '1400B': '0', + '256B': '0', '373b': '0', + '570B': '0'}}, + 'outer_l3v6': {'dstip6': '1.1.1.1-1.15.255.255', + 'proto': 'udp', + 'srcip6': '90.90.1.1-90.105.255.255', + 'dscp': 0, 'ttl': 32}, + 'outer_l4': {'srcport': '2001', + 'dsrport': '1234'}}}, + 'private': {'ipv4': + {'outer_l2': {'framesize': + {'64B': '100', '1518B': '0', + '128B': '0', '1400B': '0', + '256B': '0', '373b': '0', + '570B': '0'}}, + 'outer_l3v6': + {'dstip6': '9.9.1.1-90.105.255.255', + 'proto': 'udp', + 'srcip6': '1.1.1.1-1.15.255.255', + 'dscp': 0, 'ttl': 32}, + 'outer_l4': {'dstport': '2001', + 'srcport': '1234'}}}, + 'schema': 'isb:traffic_profile:0.1'} + result = r_f_c2544_profile._get_ixia_traffic_profile( + profile_data, mac, static_traffic=STATIC_TRAFFIC) + self.assertIsNotNone(result) + + def test__ixia_traffic_generate(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) + traffic = {"public": {'iload': 10}, + "private": {'iload': 10}} + ixia_obj = mock.MagicMock() + r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.rate = 100 + result = r_f_c2544_profile._ixia_traffic_generate(traffic_generator, + traffic, ixia_obj) + self.assertIsNone(result) + + 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 = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.first_run = True + r_f_c2544_profile.params = {"public": {'iload': 10}, + "private": {'iload': 10}} + + r_f_c2544_profile.get_streams = mock.Mock() + r_f_c2544_profile.full_profile = {} + r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock() + r_f_c2544_profile.get_multiplier = mock.Mock() + r_f_c2544_profile._ixia_traffic_generate = mock.Mock() + ixia_obj = mock.MagicMock() + self.assertEqual(None, r_f_c2544_profile.execute(traffic_generator, + ixia_obj)) + + def test_get_drop_percentage(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 = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.params = self.PROFILE + ixia_obj = mock.MagicMock() + r_f_c2544_profile.execute = mock.Mock() + r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock() + r_f_c2544_profile._ixia_traffic_generate = mock.Mock() + r_f_c2544_profile.get_multiplier = mock.Mock() + r_f_c2544_profile.tmp_throughput = 0 + r_f_c2544_profile.tmp_drop = 0 + r_f_c2544_profile.full_profile = {} + 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, + "RxThroughput": 10, + "TxThroughput": 10, + "in_packets": 1000, + "out_packets": 1000} + tol_min = 100.0 + tolerance = 0.0 + self.assertIsNotNone(r_f_c2544_profile.get_drop_percentage( + traffic_generator, samples, + tol_min, tolerance, ixia_obj)) + + def test_get_drop_percentage_update(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 = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.params = self.PROFILE + ixia_obj = mock.MagicMock() + r_f_c2544_profile.execute = mock.Mock() + r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock() + r_f_c2544_profile._ixia_traffic_generate = mock.Mock() + r_f_c2544_profile.get_multiplier = mock.Mock() + r_f_c2544_profile.tmp_throughput = 0 + r_f_c2544_profile.tmp_drop = 0 + r_f_c2544_profile.full_profile = {} + 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, + "RxThroughput": 10, + "TxThroughput": 10, + "in_packets": 1000, + "out_packets": 1002} + tol_min = 0.0 + tolerance = 1.0 + self.assertIsNotNone(r_f_c2544_profile.get_drop_percentage( + traffic_generator, samples, + tol_min, tolerance, ixia_obj)) + + 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 = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.params = self.PROFILE + ixia_obj = mock.MagicMock() + r_f_c2544_profile.execute = mock.Mock() + r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock() + r_f_c2544_profile._ixia_traffic_generate = mock.Mock() + r_f_c2544_profile.get_multiplier = mock.Mock() + r_f_c2544_profile.tmp_throughput = 0 + r_f_c2544_profile.tmp_drop = 0 + r_f_c2544_profile.full_profile = {} + 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, + "RxThroughput": 10, + "TxThroughput": 10, + "in_packets": 1000, + "out_packets": 0} + tol_min = 0.0 + tolerance = 0.0 + r_f_c2544_profile.tmp_throughput = 0 + self.assertIsNotNone(r_f_c2544_profile.get_drop_percentage( + traffic_generator, samples, + tol_min, tolerance, ixia_obj)) + + def test_get_multiplier(self): + r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.max_rate = 100 + r_f_c2544_profile.min_rate = 100 + self.assertEqual("1.0", r_f_c2544_profile.get_multiplier()) + + def test_start_ixia_latency(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 = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + r_f_c2544_profile.max_rate = 100 + r_f_c2544_profile.min_rate = 100 + ixia_obj = mock.MagicMock() + r_f_c2544_profile._get_ixia_traffic_profile = \ + mock.Mock(return_value={}) + r_f_c2544_profile.full_profile = {} + r_f_c2544_profile._ixia_traffic_generate = mock.Mock() + self.assertEqual( + None, + r_f_c2544_profile.start_ixia_latency(traffic_generator, + ixia_obj)) + + +if __name__ == '__main__': + unittest.main() 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/acl_1rule.yaml b/tests/unit/network_services/vnf_generic/vnf/acl_1rule.yaml new file mode 100644 index 000000000..b184a29e2 --- /dev/null +++ b/tests/unit/network_services/vnf_generic/vnf/acl_1rule.yaml @@ -0,0 +1,47 @@ +# 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. + +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 diff --git a/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py new file mode 100644 index 000000000..c079a2ad0 --- /dev/null +++ b/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py @@ -0,0 +1,456 @@ +#!/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 +import unittest +import mock +import os + + +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.acl_vnf import AclApproxVnf + from yardstick.network_services.vnf_generic.vnf import acl_vnf + from yardstick.network_services.nfvi.resource import ResourceProfile + + +TEST_FILE_YAML = 'nsb_test_case.yaml' + + +name = 'vnf__1' + + +@mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Process") +class TestAclApproxVnf(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': 'AclApproxVnf', 'name': 'VPEVnfSsh'}]}} + + scenario_cfg = {'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}} + }, + 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7', + 'task_path': '/tmp', + '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_acl.yaml', + 'traffic_options': {'flow': 'ipv4_Packets_acl.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': 'acl_vnf.yaml'}}} + + def test___init__(self, mock_process): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + acl_approx_vnf = AclApproxVnf(name, vnfd) + self.assertIsNone(acl_approx_vnf._vnf_process) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_collect_kpi(self, mock_time, mock_process): + 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] + acl_approx_vnf = AclApproxVnf(name, vnfd) + acl_approx_vnf.q_in = mock.MagicMock() + acl_approx_vnf.q_out = mock.MagicMock() + acl_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + acl_approx_vnf.resource = mock.Mock(autospec=ResourceProfile) + acl_approx_vnf.vnf_execute = mock.Mock(return_value="") + result = {'packets_dropped': 0, 'packets_fwd': 0, + 'packets_in': 0} + self.assertEqual(result, acl_approx_vnf.collect_kpi()) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_vnf_execute_command(self, mock_time, mock_process): + 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] + acl_approx_vnf = AclApproxVnf(name, vnfd) + acl_approx_vnf.q_in = mock.MagicMock() + acl_approx_vnf.q_out = mock.MagicMock() + acl_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + cmd = "quit" + self.assertEqual("", acl_approx_vnf.vnf_execute(cmd)) + + def test_get_stats(self, mock_process): + 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] + acl_approx_vnf = AclApproxVnf(name, vnfd) + acl_approx_vnf.q_in = mock.MagicMock() + acl_approx_vnf.q_out = mock.MagicMock() + acl_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + mock_result = \ + "ACL TOTAL: pkts_processed: 100, pkts_drop: 0, spkts_received: 100" + acl_approx_vnf.vnf_execute = mock.Mock(return_value=mock_result) + self.assertEqual(mock_result, acl_approx_vnf.get_stats()) + + 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("yardstick.network_services.vnf_generic.vnf.acl_vnf.hex") + @mock.patch("yardstick.network_services.vnf_generic.vnf.acl_vnf.eval") + @mock.patch('yardstick.network_services.vnf_generic.vnf.acl_vnf.open') + def test_run_acl(self, mock_open, eval, hex, mock_process): + 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] + acl_approx_vnf = AclApproxVnf(name, vnfd) + acl_approx_vnf._build_config = mock.MagicMock() + acl_approx_vnf.queue_wrapper = mock.MagicMock() + acl_approx_vnf.ssh_helper = mock.MagicMock() + acl_approx_vnf.ssh_helper.run = mock.MagicMock() + acl_approx_vnf.scenario_helper.scenario_cfg = self.scenario_cfg + acl_approx_vnf.vnf_cfg = {'lb_config': 'SW', + 'lb_count': 1, + 'worker_config': '1C/1T', + 'worker_threads': 1} + acl_approx_vnf.all_options = {'traffic_type': '4', + 'topology': 'nsb_test_case.yaml'} + acl_approx_vnf._run() + acl_approx_vnf.ssh_helper.run.assert_called_once() + + @mock.patch("yardstick.network_services.vnf_generic.vnf.acl_vnf.YangModel") + @mock.patch("yardstick.network_services.vnf_generic.vnf.acl_vnf.find_relative_file") + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") + def test_instantiate(self, mock_context, mock_yang, mock_find, mock_process): + 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] + acl_approx_vnf = AclApproxVnf(name, vnfd) + acl_approx_vnf.ssh_helper = ssh + acl_approx_vnf.deploy_helper = mock.MagicMock() + acl_approx_vnf.resource_helper = mock.MagicMock() + acl_approx_vnf._build_config = mock.MagicMock() + self.scenario_cfg['vnf_options'] = {'acl': {'cfg': "", + 'rules': ""}} + acl_approx_vnf.q_out.put("pipeline>") + acl_approx_vnf.WAIT_TIME = 0 + self.scenario_cfg.update({"nodes": {"vnf__1": ""}}) + self.assertIsNone(acl_approx_vnf.instantiate(self.scenario_cfg, + self.context_cfg)) + + def test_instantiate_panic(self, mock_process): + with mock.patch("yardstick.ssh.SSH") as ssh: + 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] + acl_approx_vnf = AclApproxVnf(name, vnfd) + self.scenario_cfg['vnf_options'] = {'acl': {'cfg': "", + 'rules': ""}} + acl_approx_vnf._run_acl = mock.Mock(return_value=0) + acl_approx_vnf.WAIT_TIME = 0 + acl_approx_vnf.resource_helper = mock.MagicMock() + acl_approx_vnf._build_config = mock.MagicMock() + acl_approx_vnf._vnf_process = mock.MagicMock() + acl_approx_vnf._vnf_process.start = mock.Mock() + acl_approx_vnf._vnf_process.is_alive = mock.Mock(return_value=True) + self.assertRaises(ValueError, acl_approx_vnf.instantiate, + self.scenario_cfg, self.context_cfg) + acl_approx_vnf.q_out.put("PANIC") + acl_approx_vnf.WAIT_TIME = 0 + self.assertRaises(ValueError, acl_approx_vnf.instantiate, + self.scenario_cfg, self.context_cfg) + + def test_scale(self, mock_process): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + acl_approx_vnf = AclApproxVnf(name, vnfd) + flavor = "" + self.assertRaises(NotImplementedError, acl_approx_vnf.scale, flavor) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_terminate(self, mock_time, mock_process): + 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] + acl_approx_vnf = AclApproxVnf(name, vnfd) + acl_approx_vnf._vnf_process = mock.MagicMock() + acl_approx_vnf._vnf_process.terminate = mock.Mock() + acl_approx_vnf.used_drivers = {"01:01.0": "i40e", + "01:01.1": "i40e"} + acl_approx_vnf.vnf_execute = mock.MagicMock() + acl_approx_vnf.ssh_helper = ssh_mock + acl_approx_vnf.dpdk_nic_bind = "dpdk_nic_bind.py" + acl_approx_vnf._resource_collect_stop = mock.Mock() + self.assertEqual(None, acl_approx_vnf.terminate()) + +if __name__ == '__main__': + unittest.main() 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_cgnapt_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py new file mode 100644 index 000000000..bf226d2c8 --- /dev/null +++ b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py @@ -0,0 +1,481 @@ +#!/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 + +import os +import unittest + +import mock + +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.cgnapt_vnf import CgnaptApproxVnf, \ + CgnaptApproxSetupEnvHelper + from yardstick.network_services.vnf_generic.vnf import cgnapt_vnf + from yardstick.network_services.nfvi.resource import ResourceProfile + +TEST_FILE_YAML = 'nsb_test_case.yaml' + + +name = 'vnf__1' + + +class TestCgnaptApproxSetupEnvHelper(unittest.TestCase): + + def test__generate_ip_from_pool(self): + + ip = CgnaptApproxSetupEnvHelper._generate_ip_from_pool("1.2.3.4") + self.assertEqual(next(ip), '1.2.3.4') + self.assertEqual(next(ip), '1.2.4.4') + self.assertEqual(next(ip), '1.2.5.4') + + def test__update_cgnat_script_file(self): + + sample = """\ +# See the License for the specific language governing permissions and +# limitations under the License. + +link 0 down +link 0 config {port0_local_ip} {port0_prefixlen} +link 0 up +link 1 down +link 1 config {port1_local_ip} {port1_prefixlen} +link 1 up +""" + header = "This is a header" + + out = CgnaptApproxSetupEnvHelper._update_cgnat_script_file(header, sample.splitlines(), "") + self.assertNotIn("This is a header", out) + + def test__get_cgnapt_confgi(self): + + c = CgnaptApproxSetupEnvHelper(mock.MagicMock(), mock.MagicMock(), mock.MagicMock()) + c._get_ports_gateway = mock.Mock(return_value=3) + ret = c._get_cgnapt_config([{"name": 'a'}, {}, {"name": "b"}, {}, {"name": "c"}]) + self.assertEqual(ret, [3, 3, 3]) + + +@mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Process") +class TestCgnaptApproxVnf(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': 'CgnaptApproxVnf', 'name': 'VPEVnfSsh'}]}} + + scenario_cfg = {'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}} + }, + 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7', + 'task_path': '/tmp', + '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_acl.yaml', + 'traffic_options': {'flow': 'ipv4_Packets_acl.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': 'cgnapt_vnf.yaml'}}} + + def test___init__(self, mock_process): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + self.assertIsNone(cgnapt_approx_vnf._vnf_process) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_collect_kpi(self, mock_time, mock_process): + 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] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf.q_in = mock.MagicMock() + cgnapt_approx_vnf.q_out = mock.MagicMock() + cgnapt_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + cgnapt_approx_vnf.resource = mock.Mock(autospec=ResourceProfile) + result = {'packets_dropped': 0, 'packets_fwd': 0, 'packets_in': 0} + self.assertEqual(result, cgnapt_approx_vnf.collect_kpi()) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_vnf_execute_command(self, mock_time, mock_process): + 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] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf.q_in = mock.MagicMock() + cgnapt_approx_vnf.q_out = mock.MagicMock() + cgnapt_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + cmd = "quit" + self.assertEqual("", cgnapt_approx_vnf.vnf_execute(cmd)) + + def test_get_stats(self, mock_process): + 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] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf.q_in = mock.MagicMock() + cgnapt_approx_vnf.q_out = mock.MagicMock() + cgnapt_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + mock_result = \ + "CG-NAPT(.*\n)*Received 100, Missed 0, Dropped 0,Translated 100,ingress" + cgnapt_approx_vnf.vnf_execute = mock.Mock(return_value=mock_result) + self.assertListEqual(list(mock_result), list(cgnapt_approx_vnf.get_stats())) + + 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("yardstick.network_services.vnf_generic.vnf.cgnapt_vnf.hex") + @mock.patch("yardstick.network_services.vnf_generic.vnf.cgnapt_vnf.eval") + @mock.patch('yardstick.network_services.vnf_generic.vnf.cgnapt_vnf.open') + def test_run_vcgnapt(self, hex, eval, mock_open, mock_process): + 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] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf._build_config = mock.MagicMock() + cgnapt_approx_vnf.queue_wrapper = mock.MagicMock() + cgnapt_approx_vnf.ssh_helper = mock.MagicMock() + cgnapt_approx_vnf.ssh_helper.run = mock.MagicMock() + cgnapt_approx_vnf.scenario_helper.scenario_cfg = self.scenario_cfg + cgnapt_approx_vnf._run() + cgnapt_approx_vnf.ssh_helper.run.assert_called_once() + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") + def test_instantiate(self, mock_context, mock_process): + 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] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf.ssh_helper = ssh + cgnapt_approx_vnf.deploy_helper = mock.MagicMock() + cgnapt_approx_vnf.resource_helper = mock.MagicMock() + cgnapt_approx_vnf._build_config = mock.MagicMock() + self.scenario_cfg['vnf_options'] = {'acl': {'cfg': "", + 'rules': ""}} + cgnapt_approx_vnf.q_out.put("pipeline>") + cgnapt_vnf.WAIT_TIME = 3 + self.scenario_cfg.update({"nodes": {"vnf__1": ""}}) + self.assertIsNone(cgnapt_approx_vnf.instantiate(self.scenario_cfg, + self.context_cfg)) + + def test_scale(self, mock_process): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + flavor = "" + self.assertRaises(NotImplementedError, cgnapt_approx_vnf.scale, flavor) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_terminate(self, mock_time, mock_process): + 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] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf._vnf_process = mock.MagicMock() + cgnapt_approx_vnf._vnf_process.terminate = mock.Mock() + cgnapt_approx_vnf.used_drivers = {"01:01.0": "i40e", + "01:01.1": "i40e"} + cgnapt_approx_vnf.vnf_execute = mock.MagicMock() + cgnapt_approx_vnf.ssh_helper = ssh_mock + cgnapt_approx_vnf.dpdk_nic_bind = "dpdk_nic_bind.py" + cgnapt_approx_vnf._resource_collect_stop = mock.Mock() + self.assertEqual(None, cgnapt_approx_vnf.terminate()) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + @mock.patch("yardstick.network_services.vnf_generic.vnf.cgnapt_vnf.time") + def test__vnf_up_post(self, mock_time, mock_cgnapt_time, mock_process): + 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] + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf._vnf_process = mock.MagicMock() + cgnapt_approx_vnf._vnf_process.terminate = mock.Mock() + cgnapt_approx_vnf.vnf_execute = mock.MagicMock() + cgnapt_approx_vnf.ssh_helper = ssh_mock + cgnapt_approx_vnf.scenario_helper.scenario_cfg = self.scenario_cfg + cgnapt_approx_vnf._resource_collect_stop = mock.Mock() + cgnapt_approx_vnf._vnf_up_post() + cgnapt_approx_vnf.vnf_execute.assert_called_once() + + +if __name__ == '__main__': + unittest.main() 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_ixload.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_ixload.py new file mode 100644 index 000000000..cda44127e --- /dev/null +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_ixload.py @@ -0,0 +1,374 @@ +#!/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 +import unittest +import mock +import subprocess + +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_ixload import IxLoadTrafficGen + from yardstick.network_services.vnf_generic.vnf.tg_ixload import IxLoadResourceHelper + from yardstick.network_services.traffic_profile.base import TrafficProfile + + +NAME = "tg__1" + + +class TestIxLoadTrafficGen(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'}]}} + + 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): + 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] + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + self.assertIsNone(ixload_traffic_gen.data) + + def test_collect_kpi(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] + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + ixload_traffic_gen.data = {} + restult = ixload_traffic_gen.collect_kpi() + self.assertEqual({}, restult) + + def test_listen_traffic(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] + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + self.assertEqual(None, ixload_traffic_gen.listen_traffic({})) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.makedirs") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.call") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.shutil") + def test_instantiate(self, call, shutil, mock_makedirs): + 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] + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + scenario_cfg = {'tc': "nsb_test_case", + 'ixia_profile': "ixload.cfg"} + ixload_traffic_gen.RESULTS_MOUNT = "/tmp/result" + shutil.copy = mock.Mock() + scenario_cfg.update({'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}} + }}) + self.assertRaises(IOError, + ixload_traffic_gen.instantiate(scenario_cfg, {})) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.call") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.shutil") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.open") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.min") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.max") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.len") + def test_run_traffic(self, call, shutil, main_open, min, max, len): + 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] + vnfd["mgmt-interface"].update({"tg-config": {}}) + vnfd["mgmt-interface"]["tg-config"].update({"ixchassis": + "1.1.1.1"}) + vnfd["mgmt-interface"]["tg-config"].update({"py_bin_path": + "/root"}) + sut = IxLoadTrafficGen(NAME, vnfd) + sut.connection = mock.Mock() + sut.connection.run = mock.Mock() + sut._traffic_runner = mock.Mock(return_value=0) + shutil.copy = mock.Mock() + result = sut.run_traffic(mock_traffic_profile) + self.assertIsNone(result) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.call") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.shutil") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.open") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.min") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.max") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.len") + def test_run_traffic_csv(self, call, shutil, main_open, min, max, len): + 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] + vnfd["mgmt-interface"].update({"tg-config": {}}) + vnfd["mgmt-interface"]["tg-config"].update({"ixchassis": + "1.1.1.1"}) + vnfd["mgmt-interface"]["tg-config"].update({"py_bin_path": + "/root"}) + sut = IxLoadTrafficGen(NAME, vnfd) + sut.connection = mock.Mock() + sut.connection.run = mock.Mock() + sut._traffic_runner = mock.Mock(return_value=0) + shutil.copy = mock.Mock() + subprocess.call(["touch", "/tmp/1.csv"]) + sut.rel_bin_path = mock.Mock(return_value="/tmp/*.csv") + result = sut.run_traffic(mock_traffic_profile) + self.assertIsNone(result) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.call") + def test_terminate(self, call): + 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 + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + self.assertEqual(None, ixload_traffic_gen.terminate()) + + @mock.patch("yardstick.ssh.SSH") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.call") + def test_parse_csv_read(self, mock_call, mock_ssh): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + kpi_data = { + 'HTTP Total Throughput (Kbps)': 1, + 'HTTP Simulated Users': 2, + 'HTTP Concurrent Connections': '3', + 'HTTP Connection Rate': 4.3, + 'HTTP Transaction Rate': True, + } + http_reader = [kpi_data] + + mock_ssh_type = mock.Mock(autospec=mock_ssh.SSH) + mock_ssh_type.execute.return_value = 0, "", "" + mock_ssh.from_node.return_value = mock_ssh_type + + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + result = ixload_traffic_gen.resource_helper.result + + ixload_traffic_gen.resource_helper.parse_csv_read(http_reader) + for key_left, key_right in IxLoadResourceHelper.KPI_LIST.items(): + self.assertEqual(result[key_left][-1], int(kpi_data[key_right])) + + @mock.patch("yardstick.ssh.SSH") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.call") + def test_parse_csv_read_value_error(self, mock_call, mock_ssh): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + http_reader = [{ + 'HTTP Total Throughput (Kbps)': 1, + 'HTTP Simulated Users': 2, + 'HTTP Concurrent Connections': "not a number", + 'HTTP Connection Rate': 4, + 'HTTP Transaction Rate': 5, + }] + + mock_ssh_type = mock.Mock(autospec=mock_ssh.SSH) + mock_ssh_type.execute.return_value = 0, "", "" + mock_ssh.from_node.return_value = mock_ssh_type + + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + init_value = ixload_traffic_gen.resource_helper.result + + ixload_traffic_gen.resource_helper.parse_csv_read(http_reader) + self.assertDictEqual(ixload_traffic_gen.resource_helper.result, init_value) + + @mock.patch("yardstick.ssh.SSH") + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_ixload.call") + def test_parse_csv_read_error(self, mock_call, mock_ssh): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + http_reader = [{ + 'HTTP Total Throughput (Kbps)': 1, + 'HTTP Simulated Users': 2, + 'HTTP Concurrent Connections': 3, + 'HTTP Transaction Rate': 5, + }] + + mock_ssh_type = mock.Mock(autospec=mock_ssh.SSH) + mock_ssh_type.execute.return_value = 0, "", "" + mock_ssh.from_node.return_value = mock_ssh_type + + ixload_traffic_gen = IxLoadTrafficGen(NAME, vnfd) + + with self.assertRaises(KeyError): + ixload_traffic_gen.resource_helper.parse_csv_read(http_reader) 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_ixia.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py new file mode 100644 index 000000000..8f7f05772 --- /dev/null +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py @@ -0,0 +1,405 @@ +#!/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 +import os +import unittest +import mock +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_rfc2544_ixia import IxiaTrafficGen + from yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia import IxiaRfc2544Helper + from yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia import IxiaResourceHelper + from yardstick.network_services.traffic_profile.base import TrafficProfile + +TEST_FILE_YAML = 'nsb_test_case.yaml' + + +NAME = "tg__1" + + +@mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.IxNextgen") +class TestIxiaResourceHelper(unittest.TestCase): + + def test___init___with_custom_rfc_helper(self, mock_ix_nextgen): + class MyRfcHelper(IxiaRfc2544Helper): + pass + + ixia_resource_helper = IxiaResourceHelper(mock.Mock(), MyRfcHelper) + self.assertIsInstance(ixia_resource_helper.rfc_helper, MyRfcHelper) + + def test_stop_collect_with_client(self, mock_ix_nextgen): + mock_client = mock.Mock() + + ixia_resource_helper = IxiaResourceHelper(mock.Mock()) + + ixia_resource_helper.client = mock_client + ixia_resource_helper.stop_collect() + self.assertEqual(mock_client.ix_stop_traffic.call_count, 1) + + +@mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.IxNextgen") +class TestIXIATrafficGen(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'}]}} + + 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}} + + 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, mock_ixnextgen): + 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] + ixnet_traffic_gen = IxiaTrafficGen(NAME, vnfd) + + def test_listen_traffic(self, mock_ixnextgen): + 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] + ixnet_traffic_gen = IxiaTrafficGen(NAME, vnfd) + self.assertEqual(None, ixnet_traffic_gen.listen_traffic({})) + + def test_instantiate(self, mock_ixnextgen): + 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] + ixnet_traffic_gen = IxiaTrafficGen(NAME, vnfd) + scenario_cfg = {'tc': "nsb_test_case", "topology": "", + 'ixia_profile': "ixload.cfg"} + scenario_cfg.update({'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}} + }}) + ixnet_traffic_gen.topology = "" + ixnet_traffic_gen.get_ixobj = mock.MagicMock() + ixnet_traffic_gen._ixia_traffic_gen = mock.MagicMock() + ixnet_traffic_gen._ixia_traffic_gen._connect = mock.Mock() + self.assertRaises( + IOError, + ixnet_traffic_gen.instantiate(scenario_cfg, {})) + + def test_collect_kpi(self, mock_ixnextgen): + 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] + ixnet_traffic_gen = IxiaTrafficGen(NAME, vnfd) + ixnet_traffic_gen.data = {} + restult = ixnet_traffic_gen.collect_kpi() + self.assertEqual({}, restult) + + def test_terminate(self, mock_ixnextgen): + 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 + ixnet_traffic_gen = IxiaTrafficGen(NAME, vnfd) + ixnet_traffic_gen._terminated = mock.MagicMock() + ixnet_traffic_gen._terminated.value = 0 + ixnet_traffic_gen._ixia_traffic_gen = mock.MagicMock() + ixnet_traffic_gen._ixia_traffic_gen.ix_stop_traffic = mock.Mock() + ixnet_traffic_gen._traffic_process = mock.MagicMock() + ixnet_traffic_gen._traffic_process.terminate = mock.Mock() + self.assertEqual(None, ixnet_traffic_gen.terminate()) + + 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 + + def test_scale(self, mock_ix_nextgen): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + sut = IxiaTrafficGen('vnf1', vnfd) + sut.scale() + + def test__check_status(self, mock_ix_nextgen): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + sut = IxiaTrafficGen('vnf1', vnfd) + sut._check_status() + + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.time") + @mock.patch("yardstick.ssh.SSH") + def test_traffic_runner(self, mock_ixnextgen, mock_ssh, 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 + + mock_ssh_instance = mock.Mock(autospec=mock_ssh.SSH) + mock_ssh_instance.execute.return_value = 0, "", "" + mock_ssh_instance.run.return_value = 0, "", "" + + mock_ssh.from_node.return_value = mock_ssh_instance + + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + vnfd["mgmt-interface"].update({ + 'tg-config': { + "ixchassis": "1.1.1.1", + "py_bin_path": "/root", + } + }) + + samples = {} + name = '' + for ifname in range(1): + name = "xe{}".format(ifname) + samples[name] = { + "Rx_Rate_Kbps": 20, + "Tx_Rate_Kbps": 20, + "Rx_Rate_Mbps": 10, + "Tx_Rate_Mbps": 10, + "RxThroughput": 10, + "TxThroughput": 10, + "Valid_Frames_Rx": 1000, + "Frames_Tx": 1000, + "in_packets": 1000, + "out_packets": 1000, + } + + samples.update({"CurrentDropPercentage": 0.0}) + + last_res = [ + 0, + { + "Rx_Rate_Kbps": [20, 20], + "Tx_Rate_Kbps": [20, 20], + "Rx_Rate_Mbps": [10, 10], + "Tx_Rate_Mbps": [10, 10], + "CurrentDropPercentage": [0, 0], + "RxThroughput": [10, 10], + "TxThroughput": [10, 10], + "Frames_Tx": [1000, 1000], + "in_packets": [1000, 1000], + "Valid_Frames_Rx": [1000, 1000], + "out_packets": [1000, 1000], + }, + ] + + mock_traffic_profile.execute.return_value = ['Completed', samples] + mock_traffic_profile.get_drop_percentage.return_value = ['Completed', samples] + + sut = IxiaTrafficGen(name, vnfd) + sut.tg_port_pairs = [[[0], [1]]] + sut.vnf_port_pairs = [[[0], [1]]] + sut.tc_file_name = self._get_file_abspath(TEST_FILE_YAML) + sut.topology = "" + + sut.ssh_helper = mock.Mock() + sut._traffic_process = mock.MagicMock() + sut.generate_port_pairs = mock.Mock() + + sut._ixia_traffic_gen = mock.MagicMock() + sut._ixia_traffic_gen.ix_get_statistics.return_value = last_res + + sut.resource_helper.client = mock.MagicMock() + sut.resource_helper.client_started = mock.MagicMock() + sut.resource_helper.client_started.value = 1 + + sut.scenario_helper.scenario_cfg = { + '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, + }, + }, + }, + 'ixia_profile': {} + } + + result = sut._traffic_runner(mock_traffic_profile) + self.assertIsNone(result) 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_vfw_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py new file mode 100644 index 000000000..d817b164c --- /dev/null +++ b/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py @@ -0,0 +1,447 @@ +#!/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 +import unittest +import mock +import os + +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.vfw_vnf import FWApproxVnf + from yardstick.network_services.nfvi.resource import ResourceProfile + +TEST_FILE_YAML = 'nsb_test_case.yaml' + + +name = 'vnf__1' + + +@mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Process") +class TestFWApproxVnf(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': 'FWApproxVnf', 'name': 'VPEVnfSsh'}]}} + + scenario_cfg = {'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}} + }, + 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7', + 'task_path': '/tmp', + '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_vfw.yaml', + 'traffic_options': {'flow': 'ipv4_Packets_vfw.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': 'vfw_vnf.yaml'}}} + + def test___init__(self, mock_process): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + self.assertIsNone(vfw_approx_vnf._vnf_process) + + STATS = """\ +p vfw stats + +VFW Stats +{"VFW_counters" : {"id" : "PIPELINE4", " pkts_received": 6007180, " pkts_fw_forwarded": 6007180, " pkts_drop_fw": 0, " pkts_acl_forwarded": 6007180, "pkts_drop_without_rule" : 0, "average_pkts_in_batch" : 31, "average_internal_time_in_clocks" : 17427, "average_external_time_in_clocks" : 261120, "total_time_measures" : 189829, "ct_packets_forwarded" : 6007148, "ct_packets_dropped" : 0, "bytes_processed ": 360430800, "ct_sessions" : {"active" : 130050, "open_attempt" : 130050, "re-open_attempt" : 0, "established" : 0, "closed" : 0, "timeout" : 0}, "ct_drops" : {"out_of_window" : 0, "invalid_conn" : 0, "invalid_state_transition" : 0 "RST" : 0}} +VFW TOTAL: pkts_received: 6007180, "pkts_fw_forwarded": 6007180, "pkts_drop_fw": 0, "fw_drops" : {"TTL_zero" : 0, "bad_size" : 0, "fragmented_packet" : 0, "unsupported_packet_types" : 0, "no_arp_entry" : 6007180}, "pkts_acl_forwarded": 6007180, "pkts_drop_without_rule": 0, "packets_last_sec" : 0, "average_packets_per_sec" : 0, "bytes_last_sec" : 0, "average_bytes_per_sec" : 0, "bytes_processed ": 360430800 +"CT TOTAL: ct_packets_forwarded" : 6007180, " ct_packets_dropped" : 0, "ct_sessions" : {"active" : 130050, "open_attempt" : 130050, "re-open_attempt" : 0, "established" : 0, "closed" : 0, "timeout" : 0}, "ct_drops" : {"out_of_window" : 0, "invalid_conn" : 0, "invalid_state_transition" : 0 "RST" : 0} +Action ID: 00, packetCount: 2954633, byteCount: 177277980 +Action ID: 01, packetCount: 3052547, byteCount: 183152820 +pipeline> + +pipeline> +""" # noqa + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_collect_kpi(self, mock_time, mock_process): + 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] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + vfw_approx_vnf.q_in = mock.MagicMock() + vfw_approx_vnf.q_out = mock.MagicMock() + vfw_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + vfw_approx_vnf.resource = mock.Mock(autospec=ResourceProfile) + vfw_approx_vnf.resource_helper = mock.MagicMock( + **{'collect_kpi.return_value': {"core": {}}}) + vfw_approx_vnf.vnf_execute = mock.Mock(return_value=self.STATS) + result = { + 'packets_dropped': 0, + 'packets_fwd': 6007180, + 'packets_in': 6007180, + 'collect_stats': {'core': {}}, + } + self.assertEqual(result, vfw_approx_vnf.collect_kpi()) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_vnf_execute_command(self, mock_time, mock_process): + 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] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + vfw_approx_vnf.q_in = mock.MagicMock() + vfw_approx_vnf.q_out = mock.MagicMock() + vfw_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + cmd = "quit" + self.assertEqual("", vfw_approx_vnf.vnf_execute(cmd)) + + def test_get_stats(self, mock_process): + 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] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + vfw_approx_vnf.q_in = mock.MagicMock() + vfw_approx_vnf.q_out = mock.MagicMock() + vfw_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + vfw_approx_vnf.vnf_execute = mock.Mock(return_value=self.STATS) + self.assertEqual(self.STATS, vfw_approx_vnf.get_stats()) + + 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("yardstick.network_services.vnf_generic.vnf.vfw_vnf.hex") + @mock.patch("yardstick.network_services.vnf_generic.vnf.vfw_vnf.eval") + @mock.patch("yardstick.network_services.vnf_generic.vnf.vfw_vnf.open") + def test_run_vfw(self, mock_open, eval, hex, mock_process): + 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] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + vfw_approx_vnf._build_config = mock.MagicMock() + vfw_approx_vnf.queue_wrapper = mock.MagicMock() + vfw_approx_vnf.ssh_helper = mock.MagicMock() + vfw_approx_vnf.ssh_helper.run = mock.MagicMock() + vfw_approx_vnf.scenario_helper.scenario_cfg = self.scenario_cfg + vfw_approx_vnf.vnf_cfg = {'lb_config': 'SW', + 'lb_count': 1, + 'worker_config': '1C/1T', + 'worker_threads': 1} + vfw_approx_vnf.all_options = {'traffic_type': '4', + 'topology': 'nsb_test_case.yaml'} + vfw_approx_vnf._run() + vfw_approx_vnf.ssh_helper.run.assert_called_once() + + @mock.patch("yardstick.network_services.vnf_generic.vnf.vfw_vnf.YangModel") + @mock.patch("yardstick.network_services.vnf_generic.vnf.vfw_vnf.find_relative_file") + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") + def test_instantiate(self, Context, mock_yang, mock_find, mock_process): + 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] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + vfw_approx_vnf.ssh_helper = ssh + vfw_approx_vnf.deploy_helper = mock.MagicMock() + vfw_approx_vnf.resource_helper = mock.MagicMock() + vfw_approx_vnf._build_config = mock.MagicMock() + self.scenario_cfg['vnf_options'] = {'acl': {'cfg': "", + 'rules': ""}} + self.scenario_cfg.update({"nodes": {"vnf__1": ""}}) + self.assertIsNone(vfw_approx_vnf.instantiate(self.scenario_cfg, + self.context_cfg)) + + def test_scale(self, mock_process): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + flavor = "" + self.assertRaises(NotImplementedError, vfw_approx_vnf.scale, flavor) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + def test_terminate(self, mock_time, mock_process): + 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] + vfw_approx_vnf = FWApproxVnf(name, vnfd) + vfw_approx_vnf._vnf_process = mock.MagicMock() + vfw_approx_vnf._vnf_process.terminate = mock.Mock() + vfw_approx_vnf.used_drivers = {"01:01.0": "i40e", + "01:01.1": "i40e"} + vfw_approx_vnf.vnf_execute = mock.Mock() + vfw_approx_vnf.ssh_helper = ssh_mock + vfw_approx_vnf.dpdk_nic_bind = "dpdk_nic_bind.py" + vfw_approx_vnf._resource_collect_stop = mock.Mock() + self.assertEqual(None, vfw_approx_vnf.terminate()) + +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/orchestrator/test_heat.py b/tests/unit/orchestrator/test_heat.py index 151070423..c34ea53fc 100644 --- a/tests/unit/orchestrator/test_heat.py +++ b/tests/unit/orchestrator/test_heat.py @@ -181,7 +181,7 @@ class HeatTemplateTestCase(unittest.TestCase): self.assertEqual(heat_template.resources['test']['type'], 'OS::Nova::Flavor') @mock_patch_target_module('op_utils') - @mock_patch_target_module('heatclient.client.Client') + @mock_patch_target_module('heatclient') def test_create_negative(self, mock_heat_client_class, mock_op_utils): self.template.HEAT_WAIT_LOOP_INTERVAL = 0 mock_heat_client = mock_heat_client_class() # get the constructed mock @@ -207,8 +207,6 @@ class HeatTemplateTestCase(unittest.TestCase): self.assertEqual(mock_op_utils.get_heat_api_version.call_count, expected_op_utils_usage) # ensure the constructor and instance were used - expected_constructor_calls += 1 - expected_create_calls += 1 self.assertEqual(mock_heat_client_class.call_count, expected_constructor_calls) self.assertEqual(mock_heat_client.stacks.create.call_count, expected_create_calls) @@ -233,7 +231,6 @@ class HeatTemplateTestCase(unittest.TestCase): self.assertEqual(mock_op_utils.get_heat_api_version.call_count, expected_op_utils_usage) # ensure the constructor was not used but the instance was used - expected_create_calls += 1 self.assertEqual(mock_heat_client_class.call_count, expected_constructor_calls) self.assertEqual(mock_heat_client.stacks.create.call_count, expected_create_calls) @@ -241,13 +238,8 @@ class HeatTemplateTestCase(unittest.TestCase): expected_status_calls += 3 self.assertEqual(mock_status.call_count, expected_status_calls) - # ensure the expected exception was raised - error_message = get_error_message(raised.exception) - self.assertNotIn('timeout', error_message) - self.assertIn('the reason', error_message) - @mock_patch_target_module('op_utils') - @mock_patch_target_module('heatclient.client.Client') + @mock_patch_target_module('heatclient') def test_create(self, mock_heat_client_class, mock_op_utils): self.template.HEAT_WAIT_LOOP_INTERVAL = 0.2 mock_heat_client = mock_heat_client_class() @@ -283,8 +275,6 @@ class HeatTemplateTestCase(unittest.TestCase): self.assertEqual(mock_op_utils.get_heat_api_version.call_count, expected_op_utils_usage) # ensure the constructor and instance were used - expected_constructor_calls += 1 - expected_create_calls += 1 self.assertEqual(mock_heat_client_class.call_count, expected_constructor_calls) self.assertEqual(mock_heat_client.stacks.create.call_count, expected_create_calls) @@ -301,7 +291,6 @@ class HeatTemplateTestCase(unittest.TestCase): self.assertIsInstance(self.template.create(block=True, timeout=2), heat.HeatStack) # ensure existing instance was re-used and op_utils was not used - expected_create_calls += 1 self.assertEqual(mock_heat_client_class.call_count, expected_constructor_calls) self.assertEqual(mock_heat_client.stacks.create.call_count, expected_create_calls) @@ -309,9 +298,6 @@ class HeatTemplateTestCase(unittest.TestCase): expected_status_calls += 1 self.assertEqual(mock_status.call_count, expected_status_calls) - # ensure the expected outputs are present - self.assertDictEqual(self.template.outputs, expected_outputs) - # reset template outputs self.template.outputs = None @@ -324,7 +310,6 @@ class HeatTemplateTestCase(unittest.TestCase): self.assertIsInstance(self.template.create(block=True, timeout=2), heat.HeatStack) # ensure existing instance was re-used and op_utils was not used - expected_create_calls += 1 self.assertEqual(mock_heat_client_class.call_count, expected_constructor_calls) self.assertEqual(mock_heat_client.stacks.create.call_count, expected_create_calls) 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() @@ -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/vTC/build.sh b/vTC/build.sh deleted file mode 100644 index 7df97b799..000000000 --- a/vTC/build.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2017 akis.kourtis@iit.demokritos.gr and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -#!/bin/sh - -# Jira No.137 - -# download and install required libraries -apt-get update -apt-get install -y git build-essential gcc libnuma-dev bison flex byacc libjson0-dev libcurl4-gnutls-dev jq dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - -# Setup for PF_RING and bridge between interfaces - -# Get the source code from the bitbucket repository with OAuth2 authentication -rm resp.json -curl -X POST -u "mPkgwvJPsTFS8hYmHk:SDczcrK4cvnkMRWSEchB3ANcWbqFXqPx" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token=38uFQuhEdPvCTbhc7k >> resp.json -access_token=`jq -r '.access_token' resp.json` -git clone https://x-token-auth:${access_token}@bitbucket.org/akiskourtis/vtc.git -cd vtc -git checkout -b stable -#Build nDPI library -cd nDPI -NDPI_DIR=$(pwd) -echo $NDPI_DIR -NDPI_INCLUDE=$(pwd)/src/include -echo $NDPI_INCLUDE -./autogen.sh -./configure -make -make install - -#Build PF_RING library -cd .. -cd PF_RING -make -#Build PF_RING examples, including the modified pfbridge, with nDPI integrated. -cd userland/examples/ -sed -i 's#EXTRA_LIBS =#EXTRA_LIBS='"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c#' ./Makefile -sed -i 's# -Ithird-party# -Ithird-party/ -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'#' ./Makefile -echo $NDPI_DIR -make -cd ../.. -cd .. -cd .. -#sudo rmmod pf_ring -insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=16384 enable_debug=1 quick_mode=1 enable_tx_capture=0 -#./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 diff --git a/yardstick/__init__.py b/yardstick/__init__.py index 2f5ae9feb..c1010d98c 100644 --- a/yardstick/__init__.py +++ b/yardstick/__init__.py @@ -10,16 +10,10 @@ from __future__ import absolute_import import logging import os -import sys -import yardstick.vTC.apexlake as apexlake from yardstick.common import constants from yardstick.common import utils as yardstick_utils -# Hack to be able to run apexlake unit tests -# without having to install apexlake. -sys.path.append(os.path.dirname(apexlake.__file__)) - yardstick_utils.makedirs(constants.LOG_DIR) LOG_FILE = os.path.join(constants.LOG_DIR, 'yardstick.log') LOG_FORMATTER = ('%(asctime)s ' 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/plugin.py b/yardstick/benchmark/core/plugin.py index c8d0865d1..a741d5e74 100644 --- a/yardstick/benchmark/core/plugin.py +++ b/yardstick/benchmark/core/plugin.py @@ -153,7 +153,7 @@ class PluginParser(object): raise e print("Input plugin is:\n%s\n" % rendered_plugin) - cfg = yaml.load(rendered_plugin) + cfg = yaml.safe_load(rendered_plugin) except IOError as ioerror: sys.exit(ioerror) diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index b2da7a2ee..395f3b8e8 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 @@ -36,6 +38,7 @@ output_file_default = "/tmp/yardstick.out" config_file = '/etc/yardstick/yardstick.conf' test_cases_dir_default = "tests/opnfv/test_cases/" LOG = logging.getLogger(__name__) +JOIN_TIMEOUT = 60 class Task(object): # pragma: no cover @@ -121,6 +124,7 @@ class Task(object): # pragma: no cover except KeyboardInterrupt: raise except Exception: + LOG.exception("Running test case %s failed!", case_name) testcases[case_name] = {'criteria': 'FAIL', 'tc_data': []} else: testcases[case_name] = {'criteria': 'PASS', 'tc_data': data} @@ -260,13 +264,12 @@ class Task(object): # pragma: no cover # Wait for background runners to finish for runner in background_runners: - status = runner.join(timeout=60) + status = runner.join(JOIN_TIMEOUT) if status is None: # Nuke if it did not stop nicely base_runner.Runner.terminate(runner) - status = runner_join(runner) - else: - base_runner.Runner.release(runner) + runner.join(JOIN_TIMEOUT) + base_runner.Runner.release(runner) self.outputs.update(runner.get_output()) result.extend(runner.get_result()) @@ -411,7 +414,7 @@ class TaskParser(object): # pragma: no cover try: with open(self.path) as stream: - cfg = yaml.load(stream) + cfg = yaml.safe_load(stream) except IOError as ioerror: sys.exit(ioerror) @@ -475,7 +478,7 @@ class TaskParser(object): # pragma: no cover raise e print("Input task is:\n%s\n" % rendered_task) - cfg = yaml.load(rendered_task) + cfg = yaml.safe_load(rendered_task) except IOError as ioerror: sys.exit(ioerror) @@ -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): @@ -601,7 +605,8 @@ def get_networks_from_nodes(nodes): for node in nodes.values(): if not node: continue - for interface in node['interfaces'].values(): + interfaces = node.get('interfaces', {}) + for interface in interfaces.values(): vld_id = interface.get('vld_id') # mgmt network doesn't have vld_id if not vld_id: diff --git a/yardstick/benchmark/core/testcase.py b/yardstick/benchmark/core/testcase.py index 7b23b73aa..7ab1b08cf 100644 --- a/yardstick/benchmark/core/testcase.py +++ b/yardstick/benchmark/core/testcase.py @@ -69,7 +69,7 @@ class Testcase(object): def _parse_testcase(self, testcase_info): rendered_testcase = TaskTemplate.render(testcase_info) - testcase_cfg = yaml.load(rendered_testcase) + testcase_cfg = yaml.safe_load(rendered_testcase) test_precondition = testcase_cfg.get('precondition', {}) installer_type = test_precondition.get('installer_type', 'all') diff --git a/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py b/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py index 7b3d8b0be..a20b26396 100644 --- a/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py +++ b/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py @@ -56,7 +56,7 @@ class BaseAttacker(object): def __init__(self, config, context): if not BaseAttacker.attacker_cfgs: with open(attacker_conf_path) as stream: - BaseAttacker.attacker_cfgs = yaml.load(stream) + BaseAttacker.attacker_cfgs = yaml.safe_load(stream) self._config = config self._context = context diff --git a/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py b/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py index ba3370003..6165aba74 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py +++ b/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py @@ -74,7 +74,7 @@ class BaseMonitor(multiprocessing.Process): def __init__(self, config, context, data): if not BaseMonitor.monitor_cfgs: with open(monitor_conf_path) as stream: - BaseMonitor.monitor_cfgs = yaml.load(stream) + BaseMonitor.monitor_cfgs = yaml.safe_load(stream) multiprocessing.Process.__init__(self) self._config = config self._context = context diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py index a9488cc30..d0551bf03 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py +++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py @@ -63,6 +63,7 @@ class MonitorOpenstackCmd(basemonitor.BaseMonitor): def monitor_func(self): exit_status = 0 exit_status, stdout = _execute_shell_command(self.cmd) + LOG.debug("Execute command '%s' and the stdout is:\n%s", self.cmd, stdout) if exit_status: return False return True diff --git a/yardstick/benchmark/scenarios/availability/operation/baseoperation.py b/yardstick/benchmark/scenarios/availability/operation/baseoperation.py index 88ca9e2bb..4c2ce82d9 100644 --- a/yardstick/benchmark/scenarios/availability/operation/baseoperation.py +++ b/yardstick/benchmark/scenarios/availability/operation/baseoperation.py @@ -54,7 +54,7 @@ class BaseOperation(object): def __init__(self, config, context): if not BaseOperation.operation_cfgs: with open(operation_conf_path) as stream: - BaseOperation.operation_cfgs = yaml.load(stream) + BaseOperation.operation_cfgs = yaml.safe_load(stream) self.key = '' self._config = config self._context = context diff --git a/yardstick/benchmark/scenarios/availability/result_checker/baseresultchecker.py b/yardstick/benchmark/scenarios/availability/result_checker/baseresultchecker.py index 1ccd05844..ce34d8be0 100644 --- a/yardstick/benchmark/scenarios/availability/result_checker/baseresultchecker.py +++ b/yardstick/benchmark/scenarios/availability/result_checker/baseresultchecker.py @@ -58,7 +58,7 @@ class BaseResultChecker(object): def __init__(self, config, context): if not BaseResultChecker.resultchecker_cfgs: with open(resultchecker_conf_path) as stream: - BaseResultChecker.resultchecker_cfgs = yaml.load(stream) + BaseResultChecker.resultchecker_cfgs = yaml.safe_load(stream) self.actualResult = object() self.expectedResult = object() self.success = False 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..e0dd36684 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,174 @@ 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] + + # 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 - node_0_if["vld_id"] = vld["id"] - node_1_if["vld_id"] = vld["id"] + 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 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 +300,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 +385,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 +393,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 +424,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 +450,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/benchmark/scenarios/networking/vtc_instantiation_validation.py b/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation.py deleted file mode 100644 index ac57c929c..000000000 --- a/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation.py +++ /dev/null @@ -1,88 +0,0 @@ -############################################################################# -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -from __future__ import absolute_import -import logging -import os - -from yardstick.benchmark.scenarios import base -import experimental_framework.api as api - -LOG = logging.getLogger(__name__) - - -class VtcInstantiationValidation(base.Scenario): - """Execute Instantiation Validation TC on the vTC - """ - __scenario_type__ = "vtc_instantiation_validation" - - def __init__(self, scenario_cfg, context_cfg): - self.scenario_cfg = scenario_cfg - self.context_cfg = context_cfg - self.options = None - self.setup_done = False - - def setup(self): - """scenario setup""" - - self.options = self.scenario_cfg['options'] - self.setup_done = True - - def run(self, result): - """execute test""" - - if not self.setup_done: - self.setup() - - heat_template = 'vTC.yaml' - iterations = 1 - - openstack_credentials = { - 'ip_controller': '0.0.0.0', - 'heat_url': '***', - 'auth_uri': os.environ.get('OS_AUTH_URL'), - 'user': os.environ.get('OS_USERNAME'), - 'password': os.environ.get('OS_PASSWORD'), - 'project': os.environ.get('OS_TENANT_NAME') - } - heat_template_parameters = { - 'default_net': self.options['default_net_name'], - 'default_subnet': self.options['default_subnet_name'], - 'source_net': self.options['vlan_net_1_name'], - 'source_subnet': self.options['vlan_subnet_1_name'], - 'destination_net': self.options['vlan_net_2_name'], - 'destination_subnet': self.options['vlan_subnet_2_name'] - } - deployment_configuration = { - 'vnic_type': [self.options['vnic_type']], - 'vtc_flavor': [self.options['vtc_flavor']] - } - - test_case = dict() - test_case['name'] = 'instantiation_validation_benchmark.' \ - 'InstantiationValidationBenchmark' - test_case['params'] = dict() - test_case['params']['throughput'] = '1' - test_case['params']['vlan_sender'] = str(self.options['vlan_sender']) - test_case['params']['vlan_receiver'] = \ - str(self.options['vlan_receiver']) - - res = dict() - try: - res = api.FrameworkApi.execute_framework( - [test_case], - iterations, - heat_template, - heat_template_parameters, - deployment_configuration, - openstack_credentials) - except Exception: - LOG.exception('Exception') - LOG.info('Got output: %s', res) - result.update(res) diff --git a/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py b/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py deleted file mode 100644 index d3a9a9a02..000000000 --- a/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py +++ /dev/null @@ -1,99 +0,0 @@ -############################################################################# -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -from __future__ import absolute_import -import logging -import os - -from yardstick.benchmark.scenarios import base -import experimental_framework.api as api - -LOG = logging.getLogger(__name__) - - -class VtcInstantiationValidationNoisy(base.Scenario): - """Execute Instantiation Validation TC on the vTC - """ - __scenario_type__ = "vtc_instantiation_validation_noisy" - - def __init__(self, scenario_cfg, context_cfg): - self.scenario_cfg = scenario_cfg - self.context_cfg = context_cfg - self.options = None - self.setup_done = False - - def setup(self): - """scenario setup""" - - self.options = self.scenario_cfg['options'] - self.setup_done = True - - def run(self, result): - """execute test""" - - if not self.setup_done: - self.setup() - - heat_template = 'vTC.yaml' - iterations = 1 - - openstack_credentials = { - 'ip_controller': '0.0.0.0', - 'heat_url': '***', - 'auth_uri': os.environ.get('OS_AUTH_URL'), - 'user': os.environ.get('OS_USERNAME'), - 'password': os.environ.get('OS_PASSWORD'), - 'project': os.environ.get('OS_TENANT_NAME') - } - heat_template_parameters = { - 'default_net': self.options['default_net_name'], - 'default_subnet': self.options['default_subnet_name'], - 'source_net': self.options['vlan_net_1_name'], - 'source_subnet': self.options['vlan_subnet_1_name'], - 'destination_net': self.options['vlan_net_2_name'], - 'destination_subnet': self.options['vlan_subnet_2_name'] - } - deployment_configuration = { - 'vnic_type': [self.options['vnic_type']], - 'vtc_flavor': [self.options['vtc_flavor']] - } - - test_case = dict() - test_case['name'] = 'instantiation_validation_noisy_neighbors_' \ - 'benchmark.' \ - 'InstantiationValidationNoisyNeighborsBenchmark' - test_case['params'] = dict() - test_case['params']['throughput'] = '1' - test_case['params']['vlan_sender'] = str(self.options['vlan_sender']) - test_case['params']['vlan_receiver'] = \ - str(self.options['vlan_receiver']) - test_case['params']['num_of_neighbours'] = \ - str(self.options['num_of_neighbours']) - test_case['params']['amount_of_ram'] = \ - str(self.options['amount_of_ram']) - test_case['params']['number_of_cores'] = \ - str(self.options['number_of_cores']) - test_case['params']['network'] = \ - str(self.options['default_net_name']) - test_case['params']['subnet'] = \ - str(self.options['default_subnet_name']) - - res = dict() - try: - res = api.FrameworkApi.execute_framework( - [test_case], - iterations, - heat_template, - heat_template_parameters, - deployment_configuration, - openstack_credentials) - except Exception: - LOG.exception('Exception') - LOG.info('Got output: %s', res) - result.update(res) diff --git a/yardstick/benchmark/scenarios/networking/vtc_throughput.py b/yardstick/benchmark/scenarios/networking/vtc_throughput.py deleted file mode 100644 index b9cb0b1e7..000000000 --- a/yardstick/benchmark/scenarios/networking/vtc_throughput.py +++ /dev/null @@ -1,88 +0,0 @@ -############################################################################# -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -from __future__ import absolute_import -import logging -import os - -from yardstick.benchmark.scenarios import base -from experimental_framework import api as api - -LOG = logging.getLogger(__name__) - - -class VtcThroughput(base.Scenario): - """Execute Instantiation Validation TC on the vTC - """ - __scenario_type__ = "vtc_throughput" - - def __init__(self, scenario_cfg, context_cfg): - self.scenario_cfg = scenario_cfg - self.context_cfg = context_cfg - self.options = None - self.setup_done = False - - def setup(self): - """scenario setup""" - - self.options = self.scenario_cfg['options'] - self.setup_done = True - - def run(self, result): - """execute test""" - - if not self.setup_done: - self.setup() - - heat_template = 'vTC.yaml' - iterations = 1 - - openstack_credentials = { - 'ip_controller': '0.0.0.0', - 'heat_url': '***', - 'auth_uri': os.environ.get('OS_AUTH_URL'), - 'user': os.environ.get('OS_USERNAME'), - 'password': os.environ.get('OS_PASSWORD'), - 'project': os.environ.get('OS_TENANT_NAME') - } - heat_template_parameters = { - 'default_net': self.options['default_net_name'], - 'default_subnet': self.options['default_subnet_name'], - 'source_net': self.options['vlan_net_1_name'], - 'source_subnet': self.options['vlan_subnet_1_name'], - 'destination_net': self.options['vlan_net_2_name'], - 'destination_subnet': self.options['vlan_subnet_2_name'] - } - deployment_configuration = { - 'vnic_type': [self.options['vnic_type']], - 'vtc_flavor': [self.options['vtc_flavor']] - } - - test_case = dict() - test_case['name'] = 'rfc2544_throughput_benchmark.' \ - 'RFC2544ThroughputBenchmark' - test_case['params'] = dict() - test_case['params']['packet_size'] = str(self.options['packet_size']) - test_case['params']['vlan_sender'] = str(self.options['vlan_sender']) - test_case['params']['vlan_receiver'] = \ - str(self.options['vlan_receiver']) - - res = dict() - try: - res = api.FrameworkApi.execute_framework( - [test_case], - iterations, - heat_template, - heat_template_parameters, - deployment_configuration, - openstack_credentials) - except Exception: - LOG.exception("Exception") - LOG.info('Got output: %s', res) - result.update(res) diff --git a/yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py b/yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py deleted file mode 100644 index 38ebc4c42..000000000 --- a/yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py +++ /dev/null @@ -1,98 +0,0 @@ -############################################################################# -# Copyright (c) 2015 Ericsson AB and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -from __future__ import absolute_import -import logging -import os - -from yardstick.benchmark.scenarios import base -import experimental_framework.api as api - -LOG = logging.getLogger(__name__) - - -class VtcThroughputNoisy(base.Scenario): - """Execute Instantiation Validation TC on the vTC - """ - __scenario_type__ = "vtc_throughput_noisy" - - def __init__(self, scenario_cfg, context_cfg): - self.scenario_cfg = scenario_cfg - self.context_cfg = context_cfg - self.options = None - self.setup_done = False - - def setup(self): - """scenario setup""" - - self.options = self.scenario_cfg['options'] - self.setup_done = True - - def run(self, result): - """execute test""" - - if not self.setup_done: - self.setup() - - heat_template = 'vTC.yaml' - iterations = 1 - - openstack_credentials = { - 'ip_controller': '0.0.0.0', - 'heat_url': '***', - 'auth_uri': os.environ.get('OS_AUTH_URL'), - 'user': os.environ.get('OS_USERNAME'), - 'password': os.environ.get('OS_PASSWORD'), - 'project': os.environ.get('OS_TENANT_NAME') - } - heat_template_parameters = { - 'default_net': self.options['default_net_name'], - 'default_subnet': self.options['default_subnet_name'], - 'source_net': self.options['vlan_net_1_name'], - 'source_subnet': self.options['vlan_subnet_1_name'], - 'destination_net': self.options['vlan_net_2_name'], - 'destination_subnet': self.options['vlan_subnet_2_name'] - } - deployment_configuration = { - 'vnic_type': [self.options['vnic_type']], - 'vtc_flavor': [self.options['vtc_flavor']] - } - - test_case = dict() - test_case['name'] = 'multi_tenancy_throughput_benchmark.' \ - 'MultiTenancyThroughputBenchmark' - test_case['params'] = dict() - test_case['params']['packet_size'] = str(self.options['packet_size']) - test_case['params']['vlan_sender'] = str(self.options['vlan_sender']) - test_case['params']['vlan_receiver'] = \ - str(self.options['vlan_receiver']) - test_case['params']['num_of_neighbours'] = \ - str(self.options['num_of_neighbours']) - test_case['params']['amount_of_ram'] = \ - str(self.options['amount_of_ram']) - test_case['params']['number_of_cores'] = \ - str(self.options['number_of_cores']) - test_case['params']['network'] = \ - str(self.options['default_net_name']) - test_case['params']['subnet'] = \ - str(self.options['default_subnet_name']) - - res = dict() - try: - res = api.FrameworkApi.execute_framework( - [test_case], - iterations, - heat_template, - heat_template_parameters, - deployment_configuration, - openstack_credentials) - except Exception: - LOG.exception('Exception') - LOG.info('Got output: %s', res) - result.update(res) diff --git a/yardstick/common/constants.py b/yardstick/common/constants.py index 8e8114fbb..822d3b4fa 100644 --- a/yardstick/common/constants.py +++ b/yardstick/common/constants.py @@ -8,15 +8,36 @@ ############################################################################## from __future__ import absolute_import import os +from functools import reduce -from yardstick.common.utils import get_param +import pkg_resources +from yardstick.common.utils import parse_yaml dirname = os.path.dirname abspath = os.path.abspath join = os.path.join sep = os.path.sep +CONF = {} + + +def get_param(key, default=''): + + # we have to defer this to runtime so that we can mock os.environ.get in unittests + conf_file = os.environ.get('CONF_FILE', '/etc/yardstick/yardstick.yaml') + + # don't re-parse yaml for each lookup + if not CONF: + CONF.update(parse_yaml(conf_file)) + try: + return reduce(lambda a, b: a[b], key.split('.'), CONF) + except KeyError: + if not default: + raise + return default + + try: SERVER_IP = get_param('api.server_ip') except KeyError: @@ -41,7 +62,8 @@ CONF_DIR = get_param('dir.conf', '/etc/yardstick') REPOS_DIR = get_param('dir.repos', '/home/opnfv/repos/yardstick') RELENG_DIR = get_param('dir.releng', '/home/opnfv/repos/releng') LOG_DIR = get_param('dir.log', '/tmp/yardstick/') -YARDSTICK_ROOT_PATH = dirname(dirname(dirname(abspath(__file__)))) + sep +YARDSTICK_ROOT_PATH = dirname( + dirname(abspath(pkg_resources.resource_filename(__name__, "")))) + sep CONF_SAMPLE_DIR = join(REPOS_DIR, 'etc/yardstick/') ANSIBLE_DIR = join(REPOS_DIR, 'ansible') SAMPLE_CASE_DIR = join(REPOS_DIR, 'samples') diff --git a/yardstick/common/template_format.py b/yardstick/common/template_format.py index e1662ced1..98c0a0b3c 100644 --- a/yardstick/common/template_format.py +++ b/yardstick/common/template_format.py @@ -51,6 +51,7 @@ def parse(tmpl_str): tpl = jsonutils.loads(tmpl_str) else: try: + # we already use SafeLoader when constructing special Heat YAML loader class tpl = yaml.load(tmpl_str, Loader=yaml_loader) except yaml.YAMLError as yea: raise ValueError(yea) diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py index 7a64b8ca2..729bc1db9 100644 --- a/yardstick/common/utils.py +++ b/yardstick/common/utils.py @@ -26,7 +26,7 @@ import sys import collections import socket import random -from functools import reduce +import ipaddress from contextlib import closing import yaml @@ -106,19 +106,6 @@ def parse_yaml(file_path): return value -def get_param(key, default=''): - - conf_file = os.environ.get('CONF_FILE', '/etc/yardstick/yardstick.yaml') - - conf = parse_yaml(conf_file) - try: - return reduce(lambda a, b: a[b], key.split('.'), conf) - except KeyError: - if not default: - raise - return default - - def makedirs(d): try: os.makedirs(d) @@ -148,7 +135,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 +208,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 +254,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 +268,117 @@ 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()} + + +def validate_non_string_sequence(value, default=None, raise_exc=None): + if isinstance(value, collections.Sequence) and not isinstance(value, str): + return value + if raise_exc: + raise raise_exc + return default + + +def join_non_strings(separator, *non_strings): + try: + non_strings = validate_non_string_sequence(non_strings[0], raise_exc=RuntimeError) + except (IndexError, RuntimeError): + pass + return str(separator).join(str(non_string) for non_string in non_strings) + + +class ErrorClass(object): + + def __init__(self, *args, **kwargs): + if 'test' not in kwargs: + raise RuntimeError + + def __getattr__(self, item): + raise AttributeError 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/libs/__init__.py b/yardstick/network_services/libs/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/yardstick/network_services/libs/__init__.py diff --git a/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py new file mode 100644 index 000000000..815a2a21c --- /dev/null +++ b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py @@ -0,0 +1,335 @@ +# 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 print_function +import sys +import logging + +import re +from itertools import product + +from yardstick.common.utils import ErrorClass + +try: + import IxNetwork +except ImportError: + IxNetwork = ErrorClass + +log = logging.getLogger(__name__) + +IP_VERSION_4 = 4 +IP_VERSION_6 = 6 + + +class TrafficStreamHelper(object): + + TEMPLATE = '{0.traffic_item}/{0.stream}:{0.param_id}/{1}' + + def __init__(self, traffic_item, stream, param_id): + super(TrafficStreamHelper, self).__init__() + self.traffic_item = traffic_item + self.stream = stream + self.param_id = param_id + + def __getattr__(self, item): + return self.TEMPLATE.format(self, item) + + +class FramesizeHelper(object): + + def __init__(self): + super(FramesizeHelper, self).__init__() + self.weighted_pairs = [] + self.weighted_range_pairs = [] + + @property + def weighted_pairs_arg(self): + return '-weightedPairs', self.weighted_pairs + + @property + def weighted_range_pairs_arg(self): + return '-weightedRangePairs', self.weighted_range_pairs + + def make_args(self, *args): + return self.weighted_pairs_arg + self.weighted_range_pairs_arg + args + + def populate_data(self, framesize_data): + for key, value in framesize_data.items(): + if value == '0': + continue + + replaced = re.sub('[Bb]', '', key) + self.weighted_pairs.extend([ + replaced, + value, + ]) + pairs = [ + replaced, + replaced, + value, + ] + self.weighted_range_pairs.append(pairs) + + +class IxNextgen(object): + + STATS_NAME_MAP = { + "traffic_item": 'Traffic Item', + "Tx_Frames": 'Tx Frames', + "Rx_Frames": 'Rx Frames', + "Tx_Frame_Rate": 'Tx Frame Rate', + "Rx_Frame_Rate": 'Tx Frame Rate', + "Store-Forward_Avg_latency_ns": 'Store-Forward Avg Latency (ns)', + "Store-Forward_Min_latency_ns": 'Store-Forward Min Latency (ns)', + "Store-Forward_Max_latency_ns": 'Store-Forward Max Latency (ns)', + } + + PORT_STATS_NAME_MAP = { + "stat_name": 'Stat Name', + "Frames_Tx": 'Frames Tx.', + "Valid_Frames_Rx": 'Valid Frames Rx.', + "Frames_Tx_Rate": 'Frames Tx. Rate', + "Valid_Frames_Rx_Rate": 'Valid Frames Rx. Rate', + "Tx_Rate_Kbps": 'Tx. Rate (Kbps)', + "Rx_Rate_Kbps": 'Rx. Rate (Kbps)', + "Tx_Rate_Mbps": 'Tx. Rate (Mbps)', + "Rx_Rate_Mbps": 'Rx. Rate (Mbps)', + } + + LATENCY_NAME_MAP = { + "Store-Forward_Avg_latency_ns": 'Store-Forward Avg Latency (ns)', + "Store-Forward_Min_latency_ns": 'Store-Forward Min Latency (ns)', + "Store-Forward_Max_latency_ns": 'Store-Forward Max Latency (ns)', + } + + RANDOM_MASK_MAP = { + IP_VERSION_4: '0.0.0.255', + IP_VERSION_6: '0:0:0:0:0:0:0:ff', + } + + MODE_SEEDS_MAP = { + 0: ('private', ['256', '2048']), + } + + MODE_SEEDS_DEFAULT = 'public', ['2048', '256'] + + @staticmethod + def find_view_obj(view_name, views): + edited_view_name = '::ixNet::OBJ-/statistics/view:"{}"'.format(view_name) + return next((view for view in views if edited_view_name == view), '') + + @staticmethod + def get_config(tg_cfg): + external_interface = tg_cfg["vdu"][0]["external-interface"] + card_port0 = external_interface[0]["virtual-interface"]["vpci"] + card_port1 = external_interface[1]["virtual-interface"]["vpci"] + card0, port0 = card_port0.split(':')[:2] + card1, port1 = card_port1.split(':')[:2] + cfg = { + 'py_lib_path': tg_cfg["mgmt-interface"]["tg-config"]["py_lib_path"], + 'machine': tg_cfg["mgmt-interface"]["ip"], + 'port': tg_cfg["mgmt-interface"]["tg-config"]["tcl_port"], + 'chassis': tg_cfg["mgmt-interface"]["tg-config"]["ixchassis"], + 'card1': card0, + 'port1': port0, + 'card2': card1, + 'port2': port1, + 'output_dir': tg_cfg["mgmt-interface"]["tg-config"]["dut_result_dir"], + 'version': tg_cfg["mgmt-interface"]["tg-config"]["version"], + 'bidir': True, + } + return cfg + + def __init__(self, ixnet=None): + self.ixnet = ixnet + self._objRefs = dict() + self._cfg = None + self._logger = logging.getLogger(__name__) + self._params = None + self._bidir = None + + def iter_over_get_lists(self, x1, x2, y2, offset=0): + for x in self.ixnet.getList(x1, x2): + y_list = self.ixnet.getList(x, y2) + for i, y in enumerate(y_list, offset): + yield x, y, i + + def set_random_ip_multi_attribute(self, ipv4, seed, fixed_bits, random_mask, l3_count): + self.ixnet.setMultiAttribute( + ipv4, + '-seed', str(seed), + '-fixedBits', str(fixed_bits), + '-randomMask', str(random_mask), + '-valueType', 'random', + '-countValue', str(l3_count)) + + def set_random_ip_multi_attributes(self, ip, version, seeds, l3): + try: + random_mask = self.RANDOM_MASK_MAP[version] + except KeyError: + raise ValueError('Unknown version %s' % version) + + l3_count = l3['count'] + if "srcIp" in ip: + fixed_bits = l3['srcip4'] + self.set_random_ip_multi_attribute(ip, seeds[0], fixed_bits, random_mask, l3_count) + if "dstIp" in ip: + fixed_bits = l3['dstip4'] + self.set_random_ip_multi_attribute(ip, seeds[1], fixed_bits, random_mask, l3_count) + + def add_ip_header(self, params, version): + for it, ep, i in self.iter_over_get_lists('/traffic', 'trafficItem', "configElement"): + mode, seeds = self.MODE_SEEDS_MAP.get(i, self.MODE_SEEDS_DEFAULT) + l3 = params[mode]['outer_l3'] + + for ip, ip_bits, _ in self.iter_over_get_lists(ep, 'stack', 'field'): + self.set_random_ip_multi_attributes(ip_bits, version, seeds, l3) + + self.ixnet.commit() + + def _connect(self, tg_cfg): + self._cfg = self.get_config(tg_cfg) + + sys.path.append(self._cfg["py_lib_path"]) + self.ixnet = IxNetwork.IxNet() + + machine = self._cfg['machine'] + port = str(self._cfg['port']) + version = str(self._cfg['version']) + result = self.ixnet.connect(machine, '-port', port, '-version', version) + return result + + def clear_ixia_config(self): + self.ixnet.execute('newConfig') + + def load_ixia_profile(self, profile): + self.ixnet.execute('loadConfig', self.ixnet.readFrom(profile)) + + def ix_load_config(self, profile): + self.clear_ixia_config() + self.load_ixia_profile(profile) + + def ix_assign_ports(self): + vports = self.ixnet.getList(self.ixnet.getRoot(), 'vport') + ports = [ + (self._cfg['chassis'], self._cfg['card1'], self._cfg['port1']), + (self._cfg['chassis'], self._cfg['card2'], self._cfg['port2']), + ] + + vport_list = self.ixnet.getList("/", "vport") + self.ixnet.execute('assignPorts', ports, [], vport_list, True) + self.ixnet.commit() + + for vport in vports: + if self.ixnet.getAttribute(vport, '-state') != 'up': + log.error("Both thr ports are down...") + + def ix_update_frame(self, params): + streams = ["configElement"] + + for param in params.values(): + framesize_data = FramesizeHelper() + traffic_items = self.ixnet.getList('/traffic', 'trafficItem') + param_id = param['id'] + for traffic_item, stream in product(traffic_items, streams): + helper = TrafficStreamHelper(traffic_item, stream, param_id) + + self.ixnet.setMultiAttribute(helper.transmissionControl, + '-type', '{0}'.format(param['traffic_type']), + '-duration', '{0}'.format(param['duration'])) + + stream_frame_rate_path = helper.frameRate + self.ixnet.setMultiAttribute(stream_frame_rate_path, '-rate', param['iload']) + if param['outer_l2']['framesPerSecond']: + self.ixnet.setMultiAttribute(stream_frame_rate_path, + '-type', 'framesPerSecond') + + framesize_data.populate_data(param['outer_l2']['framesize']) + + make_attr_args = framesize_data.make_args('-incrementFrom', '66', + '-randomMin', '66', + '-quadGaussian', [], + '-type', 'weightedPairs', + '-presetDistribution', 'cisco', + '-incrementTo', '1518') + + self.ixnet.setMultiAttribute(helper.frameSize, *make_attr_args) + + self.ixnet.commit() + + def update_ether_multi_attribute(self, ether, mac_addr): + self.ixnet.setMultiAttribute(ether, + '-singleValue', mac_addr, + '-fieldValue', mac_addr, + '-valueType', 'singleValue') + + def update_ether_multi_attributes(self, ether, l2): + if "ethernet.header.destinationAddress" in ether: + self.update_ether_multi_attribute(ether, str(l2['dstmac'])) + + if "ethernet.header.sourceAddress" in ether: + self.update_ether_multi_attribute(ether, str(l2['srcmac'])) + + def ix_update_ether(self, params): + for ti, ep, index in self.iter_over_get_lists('/traffic', 'trafficItem', + "configElement", 1): + iter1 = (v['outer_l2'] for v in params.values() if str(v['id']) == str(index)) + try: + l2 = next(iter1, {}) + except KeyError: + continue + + for ip, ether, _ in self.iter_over_get_lists(ep, 'stack', 'field'): + self.update_ether_multi_attributes(ether, l2) + + self.ixnet.commit() + + def ix_update_udp(self, params): + pass + + def ix_update_tcp(self, params): + pass + + def ix_start_traffic(self): + tis = self.ixnet.getList('/traffic', 'trafficItem') + for ti in tis: + self.ixnet.execute('generate', [ti]) + self.ixnet.execute('apply', '/traffic') + self.ixnet.execute('start', '/traffic') + + def ix_stop_traffic(self): + tis = self.ixnet.getList('/traffic', 'trafficItem') + for _ in tis: + self.ixnet.execute('stop', '/traffic') + + def build_stats_map(self, view_obj, name_map): + return {kl: self.execute_get_column_values(view_obj, kr) for kl, kr in name_map.items()} + + def execute_get_column_values(self, view_obj, name): + return self.ixnet.execute('getColumnValues', view_obj, name) + + def ix_get_statistics(self): + views = self.ixnet.getList('/statistics', 'view') + view_obj = self.find_view_obj("Traffic Item Statistics", views) + stats = self.build_stats_map(view_obj, self.STATS_NAME_MAP) + + self.find_view_obj("Port Statistics", views) + ports_stats = self.build_stats_map(view_obj, self.PORT_STATS_NAME_MAP) + + views = self.ixnet.getList('/statistics', 'view') + view_obj = self.find_view_obj("Flow Statistics", views) + stats["latency"] = self.build_stats_map(view_obj, self.LATENCY_NAME_MAP) + + return stats, ports_stats diff --git a/yardstick/network_services/libs/ixia_libs/IxNet/__init__.py b/yardstick/network_services/libs/ixia_libs/IxNet/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/yardstick/network_services/libs/ixia_libs/IxNet/__init__.py diff --git a/yardstick/network_services/libs/ixia_libs/__init__.py b/yardstick/network_services/libs/ixia_libs/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/yardstick/network_services/libs/ixia_libs/__init__.py diff --git a/yardstick/network_services/nfvi/collectd.conf b/yardstick/network_services/nfvi/collectd.conf index abcf24ded..6d8b73f7f 100644 --- a/yardstick/network_services/nfvi/collectd.conf +++ b/yardstick/network_services/nfvi/collectd.conf @@ -15,7 +15,7 @@ Hostname "nsb_stats" FQDNLookup true -Interval 5 +Interval {interval} ############################################################################## # LoadPlugin section # @@ -23,10 +23,8 @@ Interval 5 # Specify what features to activate. # ############################################################################## -LoadPlugin amqp -LoadPlugin cpu -LoadPlugin intel_rdt -LoadPlugin memory +#LoadPlugin syslog +{loadplugin} ############################################################################## # Plugin configuration # @@ -35,6 +33,10 @@ LoadPlugin memory # ription of those options is available in the collectd.conf(5) manual page. # ############################################################################## +#<Plugin syslog> +# LogLevel debug +#</Plugin> + <Plugin amqp> <Publish "name"> Host "0.0.0.0" @@ -53,7 +55,7 @@ LoadPlugin memory <Plugin cpu> ReportByCpu true ReportByState true - ValuesPercentage false + ValuesPercentage true </Plugin> <Plugin memory> @@ -61,18 +63,47 @@ LoadPlugin memory ValuesPercentage false </Plugin> -<LoadPlugin intel_rdt> - Interval 5 -</LoadPlugin> <Plugin "intel_rdt"> Cores "" </Plugin> -<Plugin memcached> - <Instance "local"> - Host "127.0.0.1" - Port "11211" - </Instance> +<Plugin hugepages> + ReportPerNodeHP true + ReportRootHP true + ValuesPages true + ValuesBytes false + ValuesPercentage false +</Plugin> + +<Plugin hugepages> + ReportPerNodeHP true + ReportRootHP true + ValuesPages true + ValuesBytes false + ValuesPercentage false +</Plugin> + +<Plugin dpdkstat> + <EAL> + Coremask "0x1" + MemoryChannels "4" + ProcessType "secondary" + FilePrefix "rte" + </EAL> + SharedMemObj "dpdk_collectd_stats_0" + EnabledPortMask 0xffff + {dpdk_interface} +</Plugin> + +<Plugin virt> + Domain "samplevnf" +</Plugin> + +<Plugin ovs_stats> + Port "6640" + Address "127.0.0.1" + Socket "/usr/local/var/run/openvswitch/db.sock" + Bridges "br0" "br_ext" </Plugin> <Include "/etc/collectd/collectd.conf.d"> diff --git a/yardstick/network_services/nfvi/collectd.sh b/yardstick/network_services/nfvi/collectd.sh index 7acb40431..8162ec539 100755 --- a/yardstick/network_services/nfvi/collectd.sh +++ b/yardstick/network_services/nfvi/collectd.sh @@ -22,8 +22,20 @@ if [ "$(whoami)" != "root" ]; then exit 1; fi +echo "setup proxy..." +http_proxy=$1 +https_proxy=$2 +if [[ "$http_proxy" != "" ]]; then + export http_proxy=$http_proxy + export https_proxy=$http_proxy +fi + +if [[ "$https_proxy" != "" ]]; then + export https_proxy=$https_proxy +fi + echo "Install required libraries to run collectd..." -pkg=(git flex bison build-essential pkg-config automake autotools-dev libltdl-dev librabbitmq-dev rabbitmq-server) +pkg=(git flex bison build-essential pkg-config automake autotools-dev libltdl-dev librabbitmq-dev rabbitmq-server cmake) for i in "${pkg[@]}"; do dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed" if [ "$?" -eq "1" ]; then @@ -43,7 +55,6 @@ else rm -rf intel-cmt-cat >/dev/null git clone https://github.com/01org/intel-cmt-cat.git pushd intel-cmt-cat - git checkout tags/v1.5 -b v1.5 make install PREFIX=/usr popd @@ -51,7 +62,59 @@ else echo "Done." fi -which /opt/nsb_bin/collectd/collectd >/dev/null +ls /usr/lib/libdpdk.so >/dev/null +if [ $? -eq 0 ] +then + echo "DPDK already installed. Done" +else + pushd . + + echo "Get dpdk and install..." + mkdir -p $INSTALL_NSB_BIN + rm -rf "$INSTALL_NSB_BIN"/dpdk >/dev/null + git clone http://dpdk.org/git/dpdk + pushd dpdk + mkdir -p /mnt/huge + mount -t hugetlbfs nodev /mnt/huge + sed -i 's/CONFIG_RTE_BUILD_SHARED_LIB=n/CONFIG_RTE_BUILD_SHARED_LIB=y/g' config/common_base + sed -i 's/CONFIG_RTE_EAL_PMD_PATH=""/CONFIG_RTE_EAL_PMD_PATH="\/usr\/lib\/dpdk-pmd\/"/g' config/common_base + + echo "Build dpdk v16.04" + make config T=x86_64-native-linuxapp-gcc + make + sudo make install prefix=/usr + mkdir -p /usr/lib/dpdk-pmd + find /usr/lib -type f -name 'librte_pmd*' | while read path ; do ln -s $path /usr/lib/dpdk-pmd/`echo $path | grep -o 'librte_.*so'` ; done + + echo "Disable ASLR." + echo 0 > /proc/sys/kernel/randomize_va_space + make install PREFIX=/usr + popd + + popd + echo "Done." +fi + +which $INSTALL_NSB_BIN/yajl > /dev/null +if [ -f "/usr/local/lib/libyajl.so.2.1.1" ] +then + echo "ovs stats libs already installed." +else + echo "installing ovs stats libraries" + pushd . + + cd $INSTALL_NSB_BIN + git clone https://github.com/lloyd/yajl.git + pushd yajl + ./configure + make + make install + popd + + popd +fi + +which $INSTALL_NSB_BIN/collectd/collectd >/dev/null if [ $? -eq 0 ] then echo "Collectd already installed. Done" @@ -62,9 +125,9 @@ else git clone https://github.com/collectd/collectd.git pushd collectd git stash - git checkout -b collectd 43a4db3b3209f497a0ba408aebf8aee385c6262d + git checkout -n nfvi 47c86ace348a1d7a5352a83d10935209f89aa4f5 ./build.sh - ./configure --with-libpqos=/usr/ + ./configure --with-libpqos=/usr/ --with-libdpdk=/usr --with-libyajl=/usr/local --enable-debug --enable-dpdkstat --enable-virt --enable-ovs_stats make install > /dev/null popd echo "Done." diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py index 18b0d8952..ce09b6597 100644 --- a/yardstick/network_services/nfvi/resource.py +++ b/yardstick/network_services/nfvi/resource.py @@ -14,19 +14,28 @@ """ Resource collection definitions """ from __future__ import absolute_import +from __future__ import print_function +import tempfile import logging +import os import os.path import re import multiprocessing +from collections import Sequence + from oslo_config import cfg from yardstick import ssh from yardstick.network_services.nfvi.collectd import AmqpConsumer from yardstick.network_services.utils import provision_tool +LOG = logging.getLogger(__name__) + CONF = cfg.CONF ZMQ_OVS_PORT = 5567 ZMQ_POLLING_TIME = 12000 +LIST_PLUGINS_ENABLED = ["amqp", "cpu", "cpufreq", "intel_rdt", "memory", + "hugepages", "dpdkstat", "virt", "ovs_stats"] class ResourceProfile(object): @@ -34,16 +43,17 @@ class ResourceProfile(object): This profile adds a resource at the beginning of the test session """ - def __init__(self, vnfd, cores): + def __init__(self, mgmt, interfaces=None, cores=None): self.enable = True self.connection = None - self.cores = cores + self.cores = cores if isinstance(cores, Sequence) else [] + self._queue = multiprocessing.Queue() + self.amqp_client = None + self.interfaces = interfaces if isinstance(interfaces, Sequence) else [] - mgmt_interface = vnfd.get("mgmt-interface") # why the host or ip? - self.vnfip = mgmt_interface.get("host", mgmt_interface["ip"]) - self.connection = ssh.SSH.from_node(mgmt_interface, - overrides={"ip": self.vnfip}) + self.vnfip = mgmt.get("host", mgmt["ip"]) + self.connection = ssh.SSH.from_node(mgmt, overrides={"ip": self.vnfip}) self.connection.wait() @@ -52,81 +62,147 @@ class ResourceProfile(object): err, pid, _ = self.connection.execute("pgrep -f %s" % process) return [err == 0, pid] - def run_collectd_amqp(self, queue): + def run_collectd_amqp(self): """ run amqp consumer to collect the NFVi data """ - amqp = \ - AmqpConsumer('amqp://admin:admin@{}:5672/%2F'.format(self.vnfip), - queue) + amqp_url = 'amqp://admin:admin@{}:5672/%2F'.format(self.vnfip) + amqp = AmqpConsumer(amqp_url, self._queue) try: amqp.run() except (AttributeError, RuntimeError, KeyboardInterrupt): amqp.stop() @classmethod - def get_cpu_data(cls, reskey, value): + def parse_simple_resource(cls, key, value): + return {'/'.join(key): value.split(":")[1]} + + @classmethod + def get_cpu_data(cls, key_split, value): """ Get cpu topology of the host """ pattern = r"-(\d+)" - if "cpufreq" in reskey[1]: - match = re.search(pattern, reskey[2], re.MULTILINE) - metric = reskey[1] + if "cpufreq" in key_split[0]: + metric = key_split[0] + source = key_split[1] else: - match = re.search(pattern, reskey[1], re.MULTILINE) - metric = reskey[2] + metric = key_split[1] + source = key_split[0] + + match = re.search(pattern, source, re.MULTILINE) + if not match: + return "error", "Invalid", "", "" + + time, value = value.split(":") + return str(match.group(1)), metric, value, time + + @classmethod + def parse_hugepages(cls, key, value): + return cls.parse_simple_resource(key, value) - time, val = re.split(":", value) - if match: - return [str(match.group(1)), metric, val, time] + @classmethod + def parse_dpdkstat(cls, key, value): + return cls.parse_simple_resource(key, value) + + @classmethod + def parse_virt(cls, key, value): + return cls.parse_simple_resource(key, value) - return ["error", "Invalid", ""] + @classmethod + def parse_ovs_stats(cls, key, value): + return cls.parse_simple_resource(key, value) - def parse_collectd_result(self, metrics, listcores): + def parse_collectd_result(self, metrics, core_list): """ convert collectd data into json""" - res = {"cpu": {}, "memory": {}} + result = { + "cpu": {}, + "memory": {}, + "hugepages": {}, + "dpdkstat": {}, + "virt": {}, + "ovs_stats": {}, + } testcase = "" for key, value in metrics.items(): - reskey = key.rsplit("/") - if "cpu" in reskey[1] or "intel_rdt" in reskey[1]: - cpu_key, name, metric, testcase = \ - self.get_cpu_data(reskey, value) - if cpu_key in listcores: - res["cpu"].setdefault(cpu_key, {}).update({name: metric}) - elif "memory" in reskey[1]: - val = re.split(":", value)[1] - res["memory"].update({reskey[2]: val}) - res["timestamp"] = testcase - - return res - - def amqp_collect_nfvi_kpi(self, _queue=multiprocessing.Queue()): + key_split = key.split("/") + res_key_iter = (key for key in key_split if "nsb_stats" not in key) + res_key0 = next(res_key_iter) + res_key1 = next(res_key_iter) + + if "cpu" in res_key0 or "intel_rdt" in res_key0: + cpu_key, name, metric, testcase = self.get_cpu_data(key_split, value) + if cpu_key in core_list: + result["cpu"].setdefault(cpu_key, {}).update({name: metric}) + + elif "memory" in res_key0: + result["memory"].update({res_key1: value.split(":")[0]}) + + elif "hugepages" in res_key0: + result["hugepages"].update(self.parse_hugepages(key, value)) + + elif "dpdkstat" in res_key0: + result["dpdkstat"].update(self.parse_dpdkstat(key, value)) + + elif "virt" in res_key1: + result["virt"].update(self.parse_virt(key, value)) + + elif "ovs_stats" in res_key0: + result["ovs_stats"].update(self.parse_ovs_stats(key, value)) + + result["timestamp"] = testcase + + return result + + def amqp_process_for_nfvi_kpi(self): """ amqp collect and return nfvi kpis """ - try: - metric = {} - amqp_client = \ - multiprocessing.Process(target=self.run_collectd_amqp, - args=(_queue,)) - amqp_client.start() - amqp_client.join(7) - amqp_client.terminate() - - while not _queue.empty(): - metric.update(_queue.get()) - except (AttributeError, RuntimeError, TypeError, ValueError): - logging.debug("Failed to get NFVi stats...") - msg = {} - else: - msg = self.parse_collectd_result(metric, self.cores) + if self.amqp_client is None: + self.amqp_client = \ + multiprocessing.Process(target=self.run_collectd_amqp) + self.amqp_client.start() + def amqp_collect_nfvi_kpi(self): + """ amqp collect and return nfvi kpis """ + metric = {} + while not self._queue.empty(): + metric.update(self._queue.get()) + msg = self.parse_collectd_result(metric, self.cores) return msg - @classmethod - def _start_collectd(cls, connection, bin_path): - connection.execute('pkill -9 collectd') + def _provide_config_file(self, bin_path, nfvi_cfg, kwargs): + with open(os.path.join(bin_path, nfvi_cfg), 'r') as cfg: + template = cfg.read() + cfg, cfg_content = tempfile.mkstemp() + with os.fdopen(cfg, "w+") as cfg: + cfg.write(template.format(**kwargs)) + cfg_file = os.path.join(bin_path, nfvi_cfg) + self.connection.put(cfg_content, cfg_file) + + def _prepare_collectd_conf(self, bin_path): + """ Prepare collectd conf """ + loadplugin = "\n".join("LoadPlugin {0}".format(plugin) + for plugin in LIST_PLUGINS_ENABLED) + + interfaces = "\n".join("PortName '{0[name]}'".format(interface) + for interface in self.interfaces) + + kwargs = { + "interval": '25', + "loadplugin": loadplugin, + "dpdk_interface": interfaces, + } + + self._provide_config_file(bin_path, 'collectd.conf', kwargs) + + def _start_collectd(self, connection, bin_path): + LOG.debug("Starting collectd to collect NFVi stats") + # temp disable + return + connection.execute('sudo pkill -9 collectd') collectd = os.path.join(bin_path, "collectd.sh") provision_tool(connection, collectd) - provision_tool(connection, os.path.join(bin_path, "collectd.conf")) + self._prepare_collectd_conf(bin_path) # Reset amqp queue + LOG.debug("reset and setup amqp to collect data from collectd") + connection.execute("sudo rm -rf /var/lib/rabbitmq/mnesia/rabbit*") connection.execute("sudo service rabbitmq-server start") connection.execute("sudo rabbitmqctl stop_app") connection.execute("sudo rabbitmqctl reset") @@ -134,8 +210,15 @@ class ResourceProfile(object): connection.execute("sudo service rabbitmq-server restart") # Run collectd - connection.execute(collectd) - connection.execute(os.path.join(bin_path, "collectd", "collectd")) + + http_proxy = os.environ.get('http_proxy', '') + https_proxy = os.environ.get('https_proxy', '') + connection.execute("sudo %s '%s' '%s'" % + (collectd, http_proxy, https_proxy)) + LOG.debug("Start collectd service.....") + connection.execute( + "sudo %s" % os.path.join(bin_path, "collectd", "collectd")) + LOG.debug("Done") def initiate_systemagent(self, bin_path): """ Start system agent for NFVi collection on host """ @@ -145,16 +228,24 @@ class ResourceProfile(object): def start(self): """ start nfvi collection """ if self.enable: - logging.debug("Start NVFi metric collection...") + LOG.debug("Start NVFi metric collection...") def stop(self): """ stop nfvi collection """ - if self.enable: - agent = "collectd" - logging.debug("Stop resource monitor...") - status, pid = self.check_if_sa_running(agent) - if status: - self.connection.execute('kill -9 %s' % pid) - self.connection.execute('pkill -9 %s' % agent) - self.connection.execute('service rabbitmq-server stop') - self.connection.execute("sudo rabbitmqctl stop_app") + if not self.enable: + return + + agent = "collectd" + LOG.debug("Stop resource monitor...") + + if self.amqp_client is not None: + self.amqp_client.terminate() + + status, pid = self.check_if_sa_running(agent) + if status == 0: + return + + self.connection.execute('sudo kill -9 %s' % pid) + self.connection.execute('sudo pkill -9 %s' % agent) + self.connection.execute('sudo service rabbitmq-server stop') + self.connection.execute("sudo rabbitmqctl stop_app") 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/http_ixload.py b/yardstick/network_services/traffic_profile/http_ixload.py new file mode 100644 index 000000000..8a4f97f04 --- /dev/null +++ b/yardstick/network_services/traffic_profile/http_ixload.py @@ -0,0 +1,294 @@ +# 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 print_function + +import sys +import os +import logging + +# ixload uses its own py2. So importing jsonutils fails. So adding below +# workaround to support call from yardstick +try: + from oslo_serialization import jsonutils +except ImportError: + import json as jsonutils + +from yardstick.common.utils import join_non_strings +from yardstick.common.utils import ErrorClass + +try: + from IxLoad import IxLoad, StatCollectorUtils +except ImportError: + IxLoad = ErrorClass + StatCollectorUtils = ErrorClass + +LOG = logging.getLogger(__name__) +CSV_FILEPATH_NAME = 'IxL_statResults.csv' + +STATS_TO_GET = ( + 'HTTP_Client.csv', + 'HTTP_Server.csv', + 'L2-3 Stats for Client Ports.csv', + 'L2-3 Stats for Server Ports.csv', + 'IxLoad Detailed Report.html', + 'IxLoad Detailed Report.pdf' +) + +HTTP_CLIENT_STATS = [ + ["HTTP Client", "TCP Connections Established", "kSum"], + ["HTTP Client", "TCP Connection Requests Failed", "kSum"], + ["HTTP Client", "HTTP Simulated Users", "kSum"], + ["HTTP Client", "HTTP Concurrent Connections", "kSum"], + ["HTTP Client", "HTTP Connections", "kSum"], + ["HTTP Client", "HTTP Transactions", "kSum"], + ["HTTP Client", "HTTP Connection Attempts", "kSum"] +] + +HTTP_SERVER_STATS = [ + ["HTTP Server", "TCP Connections Established", "kSum"], + ["HTTP Server", "TCP Connection Requests Failed", "kSum"] +] + + +INCOMING_STAT_RECORD_TEMPLATE = """ +===================================== +INCOMING STAT RECORD >>> %s +Len = %s +%s +%s +===================================== +""" + +INCOMING_STAT_INTERVAL_TEMPLATE = """ +===================================== +Incoming stats: Time interval: %s +Incoming stats: Time interval: %s +===================================== +""" + + +class IXLOADHttpTest(object): + + def __init__(self, test_input): + self.test_input = jsonutils.loads(test_input) + self.parse_run_test() + self.ix_load = None + self.stat_utils = None + self.remote_server = None + self.config_file = None + self.results_on_windows = None + self.result_dir = None + self.chassis = None + self.card = None + self.ports_to_reassign = None + + @staticmethod + def format_ports_for_reassignment(ports): + formatted = [join_non_strings(';', p) for p in ports if len(p) == 3] + LOG.debug('for client ports:%s', os.linesep.join(formatted)) + return formatted + + def reassign_ports(self, test, repository, ports_to_reassign): + LOG.debug('ReassignPorts: %s %s', test, repository) + + chassis_chain = repository.cget('chassisChain') + LOG.debug('chassischain: %s', chassis_chain) + client_ports = ports_to_reassign[0::2] + server_ports = ports_to_reassign[1::2] + + client_ports = self.format_ports_for_reassignment(client_ports) + LOG.debug('Reassigning client ports: %s', client_ports) + server_ports = self.format_ports_for_reassignment(server_ports) + LOG.debug('Reassigning server ports: %s', server_ports) + ports_to_set = client_ports + server_ports + + try: + LOG.debug('Reassigning ports: %s', ports_to_set) + test.setPorts(ports_to_set) + except Exception: + LOG.error('Error: Could not remap port assignment for: %s', + ports_to_set) + self.ix_load.delete(repository) + self.ix_load.disconnect() + raise + + @staticmethod + def stat_collector(*args): + LOG.debug(INCOMING_STAT_RECORD_TEMPLATE, args, len(args), args[0], args[1]) + + @staticmethod + def IxL_StatCollectorCommand(*args): + stats = args[1][3] + timestamp = args[1][1] + LOG.debug(INCOMING_STAT_INTERVAL_TEMPLATE, timestamp, stats) + + @staticmethod + def set_results_dir(test_controller, results_on_windows): + """ + If the folder doesn't exists on the Windows Client PC, + IxLoad will automatically create it. + """ + try: + test_controller.setResultDir(results_on_windows) + except Exception: + LOG.error('Error creating results dir on Win: %s', + results_on_windows) + raise + + def load_config_file(self, config_file): + try: + LOG.debug(config_file) + repository = self.ix_load.new("ixRepository", name=config_file) + return repository + except Exception: + LOG.error('Error: IxLoad config file not found: %s', config_file) + raise + + def start_http_test(self): + self.ix_load = IxLoad() + + LOG.debug('--- ixLoad obj: %s', self.ix_load) + try: + self.ix_load.connect(self.remote_server) + except Exception: + raise + + log_tag = "IxLoad-api" + log_name = "reprun" + logger = self.ix_load.new("ixLogger", log_tag, 1) + log_engine = logger.getEngine() + log_engine.setLevels(self.ix_load.ixLogger.kLevelDebug, + self.ix_load.ixLogger.kLevelInfo) + log_engine.setFile(log_name, 2, 256, 1) + + # Initialize stat collection utilities + self.stat_utils = StatCollectorUtils() + + test_controller = self.ix_load.new("ixTestController", outputDir=1) + + repository = self.load_config_file(self.config_file) + + # Get the first test on the testList + test_name = repository.testList[0].cget("name") + test = repository.testList.getItem(test_name) + + self.set_results_dir(test_controller, self.results_on_windows) + + test.config(statsRequired=1, enableResetPorts=1, csvInterval=2, + enableForceOwnership=True) + + # ---- Remap ports ---- + try: + self.reassign_ports(test, repository, self.ports_to_reassign) + except Exception: + LOG.exception("Exception occurred during reassign_ports") + + # ----------------------------------------------------------------------- + # Set up stat Collection + # ----------------------------------------------------------------------- + test_server_handle = test_controller.getTestServerHandle() + self.stat_utils.Initialize(test_server_handle) + + # Clear any stats that may have been registered previously + self.stat_utils.ClearStats() + + # Define the stats we would like to collect + self.stat_utils.AddStat(caption="Watch_Stat_1", + statSourceType="HTTP Client", + statName="TCP Connections Established", + aggregationType="kSum", + filterList={}) + + self.stat_utils.AddStat(caption="Watch_Stat_2", + statSourceType="HTTP Client", + statName="TCP Connection Requests Failed", + aggregationType="kSum", + filterList={}) + + self.stat_utils.AddStat(caption="Watch_Stat_3", + statSourceType="HTTP Server", + statName="TCP Connections Established", + aggregationType="kSum", + filterList={}) + + self.stat_utils.AddStat(caption="Watch_Stat_4", + statSourceType="HTTP Server", + statName="TCP Connection Requests Failed", + aggregationType="kSum", + filterList={}) + + self.stat_utils.StartCollector(self.IxL_StatCollectorCommand) + + test_controller.run(test) + self.ix_load.waitForTestFinish() + + test_controller.releaseConfigWaitFinish() + + # Stop the collector (running in the tcl event loop) + self.stat_utils.StopCollector() + + # Cleanup + test_controller.generateReport(detailedReport=1, format="PDF;HTML") + test_controller.releaseConfigWaitFinish() + + self.ix_load.delete(test) + self.ix_load.delete(test_controller) + self.ix_load.delete(logger) + self.ix_load.delete(log_engine) + + LOG.debug('Retrieving CSV stats from Windows Client PC ...') + for stat_file in STATS_TO_GET: + enhanced_stat_file = stat_file.replace('-', '') + enhanced_stat_file = enhanced_stat_file.replace(' ', '_') + enhanced_stat_file = enhanced_stat_file.replace('__', '_') + + LOG.debug('Getting csv stat file: %s', stat_file) + src_file = os.path.join(self.results_on_windows, stat_file) + dst_file = os.path.join(self.result_dir, '_'.join(['ixLoad', enhanced_stat_file])) + self.ix_load.retrieveFileCopy(src_file, dst_file) + + self.ix_load.disconnect() + + def parse_run_test(self): + self.remote_server = self.test_input["remote_server"] + LOG.debug("remote tcl server: %s", self.remote_server) + + self.config_file = self.test_input["ixload_cfg"] + LOG.debug("ixload config: %s", self.remote_server) + + self.results_on_windows = 'C:/Results' + self.result_dir = self.test_input["result_dir"] + self.chassis = self.test_input["ixia_chassis"] + LOG.debug("remote ixia chassis: %s", self.chassis) + + self.card = self.test_input["IXIA"]["card"] + self.ports_to_reassign = [ + [self.chassis, self.card, port] for port in + self.test_input["IXIA"]["ports"] + ] + + LOG.debug("Ports to be reassigned: %s", self.ports_to_reassign) + + +def main(args): + # Get the args from cmdline and parse and run the test + test_input = "".join(args[1:]) + if test_input: + ixload_obj = IXLOADHttpTest(test_input) + ixload_obj.start_http_test() + +if __name__ == '__main__': + main(sys.argv) diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py new file mode 100644 index 000000000..5ba00180b --- /dev/null +++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py @@ -0,0 +1,155 @@ +# 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 logging +import json + +from yardstick.network_services.traffic_profile.traffic_profile import \ + TrexProfile + +LOG = logging.getLogger(__name__) + + +class IXIARFC2544Profile(TrexProfile): + def _get_ixia_traffic_profile(self, profile_data, mac={}, + xfile=None, static_traffic={}): + result = {} + if xfile: + with open(xfile, 'r') as stream: + try: + static_traffic = json.load(stream) + except Exception as exc: + LOG.debug(exc) + + for traffickey, trafficvalue in static_traffic.items(): + traffic = static_traffic[traffickey] + # outer_l2 + index = 0 + for key, value in profile_data[traffickey].items(): + framesize = value['outer_l2']['framesize'] + traffic['outer_l2']['framesize'] = framesize + traffic['framesPerSecond'] = True + traffic['bidir'] = False + traffic['outer_l2']['srcmac'] = \ + mac["src_mac_{}".format(traffic['id'])] + traffic['outer_l2']['dstmac'] = \ + mac["dst_mac_{}".format(traffic['id'])] + # outer_l3 + if "outer_l3v6" in list(value.keys()): + traffic['outer_l3'] = value['outer_l3v6'] + srcip4 = value['outer_l3v6']['srcip6'] + traffic['outer_l3']['srcip4'] = srcip4.split("-")[0] + dstip4 = value['outer_l3v6']['dstip6'] + traffic['outer_l3']['dstip4'] = dstip4.split("-")[0] + else: + traffic['outer_l3'] = value['outer_l3v4'] + srcip4 = value['outer_l3v4']['srcip4'] + traffic['outer_l3']['srcip4'] = srcip4.split("-")[0] + dstip4 = value['outer_l3v4']['dstip4'] + traffic['outer_l3']['dstip4'] = dstip4.split("-")[0] + + traffic['outer_l3']['type'] = key + # outer_l4 + traffic['outer_l4'] = value['outer_l4'] + index = index + 1 + result.update({traffickey: traffic}) + + return result + + def _ixia_traffic_generate(self, traffic_generator, traffic, ixia_obj): + for key, value in traffic.items(): + if "public" in key or "private" in key: + traffic[key]["iload"] = str(self.rate) + ixia_obj.ix_update_frame(traffic) + ixia_obj.ix_update_ether(traffic) + # ixia_obj.ix_update_ipv4(traffic) + ixia_obj.ix_start_traffic() + self.tmp_drop = 0 + self.tmp_throughput = 0 + + def execute(self, traffic_generator, ixia_obj, mac={}, xfile=None): + if self.first_run: + self.full_profile = {} + self.pg_id = 0 + self.profile = 'private_1' + for key, value in self.params.items(): + if "private" in key or "public" in key: + self.profile_data = self.params[key] + self.get_streams(self.profile_data) + self.full_profile.update({key: self.profile_data}) + traffic = \ + self._get_ixia_traffic_profile(self.full_profile, mac, xfile) + self.max_rate = self.rate + self.min_rate = 0 + self.get_multiplier() + self._ixia_traffic_generate(traffic_generator, traffic, ixia_obj) + + def get_multiplier(self): + self.rate = round((self.max_rate + self.min_rate) / 2.0, 2) + multiplier = round(self.rate / self.pps, 2) + return str(multiplier) + + def start_ixia_latency(self, traffic_generator, ixia_obj, + mac={}, xfile=None): + traffic = self._get_ixia_traffic_profile(self.full_profile, mac) + self._ixia_traffic_generate(traffic_generator, traffic, + ixia_obj, xfile) + + def get_drop_percentage(self, traffic_generator, samples, tol_min, + tolerance, ixia_obj, mac={}, xfile=None): + status = 'Running' + drop_percent = 100 + in_packets = sum([samples[iface]['in_packets'] for iface in samples]) + out_packets = sum([samples[iface]['out_packets'] for iface in samples]) + rx_throughput = \ + sum([samples[iface]['RxThroughput'] for iface in samples]) + tx_throughput = \ + sum([samples[iface]['TxThroughput'] for iface in samples]) + packet_drop = abs(out_packets - in_packets) + try: + drop_percent = round((packet_drop / float(out_packets)) * 100, 2) + except ZeroDivisionError: + LOG.info('No traffic is flowing') + samples['TxThroughput'] = round(tx_throughput / 1.0, 2) + samples['RxThroughput'] = round(rx_throughput / 1.0, 2) + 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'] = round(rx_throughput / 1.0, 2) + samples['DropPercentage'] = drop_percent + if self.first_run: + max_supported_rate = out_packets / 30.0 + self.rate = max_supported_rate + self.first_run = False + if drop_percent <= tolerance: + status = 'Completed' + if drop_percent > tolerance: + self.max_rate = self.rate + elif drop_percent < tol_min: + self.min_rate = self.rate + if drop_percent >= self.tmp_drop: + self.tmp_drop = drop_percent + self.tmp_throughput = round((rx_throughput / 1.0), 2) + samples['Throughput'] = round(rx_throughput / 1.0, 2) + samples['DropPercentage'] = drop_percent + else: + samples['Throughput'] = round(rx_throughput / 1.0, 2) + samples['DropPercentage'] = drop_percent + return status, samples + self.get_multiplier() + traffic = self._get_ixia_traffic_profile(self.full_profile, mac, xfile) + self._ixia_traffic_generate(traffic_generator, traffic, ixia_obj) + return status, samples 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..0264bbc1c 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 = connection.execute("which %s > /dev/null 2>&1" % tool_path)[0] 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/acl_vnf.py b/yardstick/network_services/vnf_generic/vnf/acl_vnf.py new file mode 100644 index 000000000..5f3c8a0cd --- /dev/null +++ b/yardstick/network_services/vnf_generic/vnf/acl_vnf.py @@ -0,0 +1,72 @@ +# 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 print_function +import logging + +from yardstick.benchmark.scenarios.networking.vnf_generic import find_relative_file +from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, DpdkVnfSetupEnvHelper +from yardstick.network_services.yang_model import YangModel + +LOG = logging.getLogger(__name__) + +# ACL should work the same on all systems, we can provide the binary +ACL_PIPELINE_COMMAND = \ + 'sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}' + +ACL_COLLECT_KPI = r"""\ +ACL TOTAL:[^p]+pkts_processed"?:\s(\d+),[^p]+pkts_drop"?:\s(\d+),[^p]+pkts_received"?:\s(\d+),""" + + +class AclApproxSetupEnvSetupEnvHelper(DpdkVnfSetupEnvHelper): + + APP_NAME = "vACL" + CFG_CONFIG = "/tmp/acl_config" + CFG_SCRIPT = "/tmp/acl_script" + PIPELINE_COMMAND = ACL_PIPELINE_COMMAND + HW_DEFAULT_CORE = 2 + SW_DEFAULT_CORE = 5 + DEFAULT_CONFIG_TPL_CFG = "acl.cfg" + VNF_TYPE = "ACL" + + +class AclApproxVnf(SampleVNF): + + APP_NAME = "vACL" + APP_WORD = 'acl' + COLLECT_KPI = ACL_COLLECT_KPI + + COLLECT_MAP = { + 'packets_in': 3, + 'packets_fwd': 1, + 'packets_dropped': 2, + } + + 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 = AclApproxSetupEnvSetupEnvHelper + + super(AclApproxVnf, self).__init__(name, vnfd, setup_env_helper_type, resource_helper_type) + self.acl_rules = None + + def scale(self, flavor=""): + raise NotImplementedError + + def _start_vnf(self): + yang_model_path = find_relative_file(self.scenario_helper.options['rules'], + self.scenario_helper.task_path) + yang_model = YangModel(yang_model_path) + self.acl_rules = yang_model.get_rules() + super(AclApproxVnf, self)._start_vnf() 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/cgnapt_vnf.py b/yardstick/network_services/vnf_generic/vnf/cgnapt_vnf.py new file mode 100644 index 000000000..f9980b165 --- /dev/null +++ b/yardstick/network_services/vnf_generic/vnf/cgnapt_vnf.py @@ -0,0 +1,123 @@ +# 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 time +import logging + +from six.moves import zip +from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, DpdkVnfSetupEnvHelper + +LOG = logging.getLogger(__name__) + +# CGNAPT should work the same on all systems, we can provide the binary +CGNAPT_PIPELINE_COMMAND = 'sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}' +WAIT_FOR_STATIC_NAPT = 4 + +CGNAPT_COLLECT_KPI = """\ +CG-NAPT(.*\n)*\ +Received\s(\d+),\ +Missed\s(\d+),\ +Dropped\s(\d+),\ +Translated\s(\d+),\ +ingress\ +""" + + +class CgnaptApproxSetupEnvHelper(DpdkVnfSetupEnvHelper): + + APP_NAME = "vCGNAPT" + CFG_CONFIG = "/tmp/cgnapt_config" + CFG_SCRIPT = "/tmp/cgnapt_script" + DEFAULT_CONFIG_TPL_CFG = "cgnat.cfg" + PIPELINE_COMMAND = CGNAPT_PIPELINE_COMMAND + SW_DEFAULT_CORE = 6 + HW_DEFAULT_CORE = 3 + VNF_TYPE = "CGNAPT" + + @staticmethod + def _generate_ip_from_pool(ip): + ip_parts = ip.split('.') + assert len(ip_parts) == 4 + iter1 = (str(n) for n in range(int(ip_parts[2]), 256)) + for ip_parts[2] in iter1: + yield '.'.join(ip_parts) + + @staticmethod + def _update_cgnat_script_file(ip_pipeline_cfg, mcpi, vnf_str): + pipeline_config_str = str(ip_pipeline_cfg) + input_cmds = '\n'.join(mcpi) + icmp_flag = 'link 0 down' in input_cmds + if icmp_flag: + pipeline_config_str = '' + return '\n'.join([pipeline_config_str, input_cmds]) + + def scale(self, flavor=""): + raise NotImplementedError + + def _get_cgnapt_config(self, interfaces=None): + if interfaces is None: + interfaces = self.vnfd_helper.interfaces + + gateway_ips = [] + + # fixme: Get private port and gateway from port list + priv_ports = interfaces[::2] + for interface in priv_ports: + gateway_ips.append(self._get_ports_gateway(interface["name"])) + return gateway_ips + + +class CgnaptApproxVnf(SampleVNF): + + APP_NAME = "vCGNAPT" + APP_WORD = 'cgnapt' + COLLECT_KPI = CGNAPT_COLLECT_KPI + + COLLECT_MAP = { + "packets_in": 2, + "packets_fwd": 5, + "packets_dropped": 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 = CgnaptApproxSetupEnvHelper + + super(CgnaptApproxVnf, self).__init__(name, vnfd, setup_env_helper_type, + resource_helper_type) + + def _vnf_up_post(self): + super(CgnaptApproxVnf, self)._vnf_up_post() + if self.scenario_helper.options.get('napt', 'static') != 'static': + return + + ip_iter = self.setup_helper._generate_ip_from_pool("152.16.40.10") + gw_ips = self.setup_helper._get_cgnapt_config() + if self.scenario_helper.vnf_cfg.get("lb_config", "SW") == 'HW': + pipeline = self.setup_helper.HW_DEFAULT_CORE + offset = 3 + else: + pipeline = self.setup_helper.SW_DEFAULT_CORE - 1 + offset = 0 + + worker_threads = int(self.scenario_helper.vnf_cfg["worker_threads"]) + cmd_template = "p {0} entry addm {1} 1 {2} 1 0 32 65535 65535 65535" + for gw, ip in zip(gw_ips, ip_iter): + cmd = cmd_template.format(pipeline, gw, ip) + pipeline += worker_threads + pipeline += offset + self.vnf_execute(cmd) + + time.sleep(WAIT_FOR_STATIC_NAPT) 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..90053bc36 --- /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.mgmt_interface, + interfaces=self.vnfd_helper.interfaces, cores=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', '') + cmd = "sudo -E %s -s -p='%s'" % (build_script, http_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_ixload.py b/yardstick/network_services/vnf_generic/vnf/tg_ixload.py new file mode 100644 index 000000000..c15f7b954 --- /dev/null +++ b/yardstick/network_services/vnf_generic/vnf/tg_ixload.py @@ -0,0 +1,176 @@ +# 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 csv +import glob +import logging +import os +import shutil + +from collections import OrderedDict +from subprocess import call + +import six + +from yardstick.common.utils import makedirs +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__) + +VNF_PATH = os.path.dirname(os.path.realpath(__file__)) + +MOUNT_CMD = """\ +mount.cifs //{0[ip]}/Results {1.RESULTS_MOUNT} \ +-o username={0[user]},password={0[password]}\ +""" + +IXLOAD_CONFIG_TEMPLATE = '''\ +{ + "ixia_chassis": "%s", + "IXIA": { + "ports": %s, + "card": %s + }, + "remote_server": "%s", + "result_dir": "%s", + "ixload_cfg": '"C:/Results/%s" +}''' + +IXLOAD_CMD = "{ixloadpy} {http_ixload} {args}" + + +class ResourceDataHelper(list): + + def get_aggregates(self): + return { + "min": min(self), + "max": max(self), + "avg": sum(self) / len(self), + } + + +class IxLoadResourceHelper(ClientResourceHelper): + + RESULTS_MOUNT = "/mnt/Results" + + KPI_LIST = OrderedDict(( + ('http_throughput', 'HTTP Total Throughput (Kbps)'), + ('simulated_users', 'HTTP Simulated Users'), + ('concurrent_connections', 'HTTP Concurrent Connections'), + ('connection_rate', 'HTTP Connection Rate'), + ('transaction_rate', 'HTTP Transaction Rate'), + )) + + def __init__(self, setup_helper): + super(IxLoadResourceHelper, self).__init__(setup_helper) + self.result = OrderedDict((key, ResourceDataHelper()) for key in self.KPI_LIST) + self.resource_file_name = '' + + def parse_csv_read(self, reader): + for row in reader: + try: + new_data = {key_left: int(row[key_right]) + for key_left, key_right in self.KPI_LIST.items()} + except (TypeError, ValueError): + continue + else: + for key, value in new_data.items(): + self.result[key].append(value) + + def setup(self): + # TODO: fixupt scenario_helper to hanlde ixia + self.resource_file_name = str(self.scenario_helper.scenario_cfg['ixia_profile']) + makedirs(self.RESULTS_MOUNT) + cmd = MOUNT_CMD.format(self.vnfd_helper.mgmt_interface, self) + LOG.debug(cmd) + + if not os.path.ismount(self.RESULTS_MOUNT): + call(cmd, shell=True) + + shutil.rmtree(self.RESULTS_MOUNT, ignore_errors=True) + makedirs(self.RESULTS_MOUNT) + shutil.copy(self.resource_file_name, self.RESULTS_MOUNT) + + def make_aggregates(self): + return {key_right: self.result[key_left].get_aggregates() + for key_left, key_right in self.KPI_LIST.items()} + + def log(self): + for key in self.KPI_LIST: + LOG.debug(self.result[key]) + + +class IxLoadTrafficGen(SampleVNFTrafficGen): + + def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None): + if resource_helper_type is None: + resource_helper_type = IxLoadResourceHelper + + super(IxLoadTrafficGen, self).__init__(name, vnfd, setup_env_helper_type, + resource_helper_type) + self._result = {} + self.done = False + self.data = None + + def run_traffic(self, traffic_profile): + ports = [] + card = None + for interface in self.vnfd_helper.interfaces: + vpci_list = interface['virtual-interface']["vpci"].split(":") + card = vpci_list[0] + ports.append(vpci_list[1]) + + for csv_file in glob.iglob(self.ssh_helper.join_bin_path('*.csv')): + os.unlink(csv_file) + + ixia_config = self.vnfd_helper.mgmt_interface["tg-config"] + ixload_config = IXLOAD_CONFIG_TEMPLATE % ( + ixia_config["ixchassis"], ports, card, + self.vnfd_helper.mgmt_interface["ip"], self.ssh_helper.bin_path, + os.path.basename(self.resource_helper.resource_file_name)) + + http_ixload_path = os.path.join(VNF_PATH, "../../traffic_profile") + cmd = IXLOAD_CMD.format( + ixloadpy=os.path.join(ixia_config["py_bin_path"], "ixloadpython"), + http_ixload=os.path.join(http_ixload_path, "http_ixload.py"), + args="'%s'" % ixload_config) + + LOG.debug(cmd) + call(cmd, shell=True) + + with open(self.ssh_helper.join_bin_path("ixLoad_HTTP_Client.csv")) as csv_file: + lines = csv_file.readlines()[10:] + + with open(self.ssh_helper.join_bin_path("http_result.csv"), 'wb+') as result_file: + result_file.writelines(six.text_type(lines[:-1])) + result_file.flush() + result_file.seek(0) + reader = csv.DictReader(result_file) + self.resource_helper.parse_csv_read(reader) + + self.resource_helper.log() + self.data = self.resource_helper.make_aggregates() + + def listen_traffic(self, traffic_profile): + pass + + def instantiate(self, scenario_cfg, context_cfg): + super(IxLoadTrafficGen, self).instantiate(scenario_cfg, context_cfg) + self.done = False + + def terminate(self): + call(["pkill", "-9", "http_ixload.py"]) + super(IxLoadTrafficGen, self).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_ixia.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py new file mode 100644 index 000000000..07bbdae95 --- /dev/null +++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py @@ -0,0 +1,165 @@ +# 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 time +import os +import logging +import sys + +from yardstick.common.utils import ErrorClass +from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTrafficGen +from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper +from yardstick.network_services.vnf_generic.vnf.sample_vnf import Rfc2544ResourceHelper + +try: + from IxNet import IxNextgen +except ImportError: + IxNextgen = ErrorClass + +LOG = logging.getLogger(__name__) + +WAIT_AFTER_CFG_LOAD = 10 +WAIT_FOR_TRAFFIC = 30 +IXIA_LIB = os.path.dirname(os.path.realpath(__file__)) +IXNET_LIB = os.path.join(IXIA_LIB, "../../libs/ixia_libs/IxNet") +sys.path.append(IXNET_LIB) + + +class IxiaRfc2544Helper(Rfc2544ResourceHelper): + + pass + + +class IxiaResourceHelper(ClientResourceHelper): + + def __init__(self, setup_helper, rfc_helper_type=None): + super(IxiaResourceHelper, self).__init__(setup_helper) + self.scenario_helper = setup_helper.scenario_helper + + self.client = IxNextgen() + + if rfc_helper_type is None: + rfc_helper_type = IxiaRfc2544Helper + + self.rfc_helper = rfc_helper_type(self.scenario_helper) + self.tg_port_pairs = [] + self.priv_ports = None + self.pub_ports = None + + def _connect(self, client=None): + self.client.connect(self.vnfd_helper) + + def _build_ports(self): + # self.generate_port_pairs(self.topology) + 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(self.priv_ports).union(set(self.pub_ports))) + + def get_stats(self, *args, **kwargs): + return self.client.ix_get_statistics()[1] + + def stop_collect(self): + self._terminated.value = 0 + if self.client: + self.client.ix_stop_traffic() + + def generate_samples(self, key=None, default=None): + last_result = self.get_stats() + + samples = {} + for vpci_idx, interface in enumerate(self.vnfd_helper.interfaces): + name = "xe{0}".format(vpci_idx) + samples[name] = { + "rx_throughput_kps": float(last_result["Rx_Rate_Kbps"][vpci_idx]), + "tx_throughput_kps": float(last_result["Tx_Rate_Kbps"][vpci_idx]), + "rx_throughput_mbps": float(last_result["Rx_Rate_Mbps"][vpci_idx]), + "tx_throughput_mbps": float(last_result["Tx_Rate_Mbps"][vpci_idx]), + "in_packets": int(last_result["Valid_Frames_Rx"][vpci_idx]), + "out_packets": int(last_result["Frames_Tx"][vpci_idx]), + "RxThroughput": int(last_result["Valid_Frames_Rx"][vpci_idx]) / 30, + "TxThroughput": int(last_result["Frames_Tx"][vpci_idx]) / 30, + } + + return samples + + def run_traffic(self, traffic_profile): + min_tol = self.rfc_helper.tolerance_low + max_tol = self.rfc_helper.tolerance_high + + self._build_ports() + self._connect() + + # we don't know client_file_name until runtime as instantiate + client_file_name = self.scenario_helper.scenario_cfg['ixia_profile'] + self.client.ix_load_config(client_file_name) + time.sleep(WAIT_AFTER_CFG_LOAD) + + self.client.ix_assign_ports() + + mac = {} + for index, interface in enumerate(self.vnfd_helper.interfaces): + virt_intf = interface["virtual-interface"] + mac.update({ + "src_mac_{}".format(index): virt_intf["local_mac"], + "dst_mac_{}".format(index): virt_intf["dst_mac"], + }) + + samples = {} + ixia_file = os.path.join(os.getcwd(), "ixia_traffic.cfg") + # Generate ixia traffic config... + while not self._terminated.value: + traffic_profile.execute(self, self.client, mac, ixia_file) + self.client_started.value = 1 + time.sleep(WAIT_FOR_TRAFFIC) + self.client.ix_stop_traffic() + samples = self.generate_samples() + self._queue.put(samples) + status, samples = traffic_profile.get_drop_percentage(self, samples, min_tol, + max_tol, self.client, mac, + ixia_file) + + current = samples['CurrentDropPercentage'] + if min_tol <= current <= max_tol or status == 'Completed': + self._terminated.value = 1 + + self.client.ix_stop_traffic() + self._queue.put(samples) + + +class IxiaTrafficGen(SampleVNFTrafficGen): + + def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None): + if resource_helper_type is None: + resource_helper_type = IxiaResourceHelper + + super(IxiaTrafficGen, self).__init__(name, vnfd, setup_env_helper_type, + resource_helper_type) + self._ixia_traffic_gen = None + self.ixia_file_name = '' + self.tg_port_pairs = [] + self.vnf_port_pairs = [] + + def _check_status(self): + pass + + def scale(self, flavor=""): + pass + + def listen_traffic(self, traffic_profile): + pass + + def terminate(self): + self.resource_helper.stop_collect() + super(IxiaTrafficGen, self).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/vfw_vnf.py b/yardstick/network_services/vnf_generic/vnf/vfw_vnf.py new file mode 100644 index 000000000..32a08c7bd --- /dev/null +++ b/yardstick/network_services/vnf_generic/vnf/vfw_vnf.py @@ -0,0 +1,67 @@ +# 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 logging + +from yardstick.benchmark.scenarios.networking.vnf_generic import find_relative_file +from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, DpdkVnfSetupEnvHelper +from yardstick.network_services.yang_model import YangModel + +LOG = logging.getLogger(__name__) + +# vFW should work the same on all systems, we can provide the binary +FW_PIPELINE_COMMAND = """sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}""" + +FW_COLLECT_KPI = (r"""VFW TOTAL:[^p]+pkts_received"?:\s(\d+),[^p]+pkts_fw_forwarded"?:\s(\d+),""" + r"""[^p]+pkts_drop_fw"?:\s(\d+),\s""") + + +class FWApproxSetupEnvHelper(DpdkVnfSetupEnvHelper): + + APP_NAME = "vFW" + CFG_CONFIG = "/tmp/vfw_config" + CFG_SCRIPT = "/tmp/vfw_script" + DEFAULT_CONFIG_TPL_CFG = "vfw.cfg" + PIPELINE_COMMAND = FW_PIPELINE_COMMAND + SW_DEFAULT_CORE = 5 + HW_DEFAULT_CORE = 2 + VNF_TYPE = "VFW" + + +class FWApproxVnf(SampleVNF): + + APP_NAME = "vFW" + APP_WORD = 'vfw' + COLLECT_KPI = FW_COLLECT_KPI + + COLLECT_MAP = { + 'packets_in': 1, + 'packets_fwd': 2, + 'packets_dropped': 3, + } + + 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 = FWApproxSetupEnvHelper + + super(FWApproxVnf, self).__init__(name, vnfd, setup_env_helper_type, resource_helper_type) + self.vfw_rules = None + + def _start_vnf(self): + yang_model_path = find_relative_file(self.scenario_helper.options['rules'], + self.scenario_helper.task_path) + yang_model = YangModel(yang_model_path) + self.vfw_rules = yang_model.get_rules() + super(FWApproxVnf, self)._start_vnf() 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 beb63b421..c21a47473 100644 --- a/yardstick/orchestrator/heat.py +++ b/yardstick/orchestrator/heat.py @@ -21,7 +21,7 @@ import logging import socket import time -import heatclient +import heatclient.client import pkg_resources from oslo_utils import encodeutils @@ -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 diff --git a/yardstick/vTC/apexlake/.gitignore b/yardstick/vTC/apexlake/.gitignore deleted file mode 100644 index ddcd58683..000000000 --- a/yardstick/vTC/apexlake/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -benchmark.log - diff --git a/yardstick/vTC/apexlake/MANIFEST.in b/yardstick/vTC/apexlake/MANIFEST.in deleted file mode 100644 index f784569e9..000000000 --- a/yardstick/vTC/apexlake/MANIFEST.in +++ /dev/null @@ -1,7 +0,0 @@ -recursive-include bin *.py -recursive-include benchmarks *.py -recursive-include heat_templates * -recursive-include packet_generators * -recursive-include etc *.cfg *.json -include *.py -include README.rst diff --git a/yardstick/vTC/apexlake/README.rst b/yardstick/vTC/apexlake/README.rst deleted file mode 100644 index 06a795c12..000000000 --- a/yardstick/vTC/apexlake/README.rst +++ /dev/null @@ -1,238 +0,0 @@ -.. _DPDK: http://dpdk.org/doc/nics -.. _DPDK-pktgen: https://github.com/Pktgen/Pktgen-DPDK/ -.. _SRIOV: https://wiki.openstack.org/wiki/SR-IOV-Passthrough-For-Networking -.. _PORTSEC: https://wiki.openstack.org/wiki/Neutron/ML2PortSecurityExtensionDriver - -=========================== -Apexlake installation guide -=========================== -ApexLake is a framework that provides automatic execution of experiments and related data collection to help -the user validating the infrastructure from the perspective of a Virtual Network Function. -To do so in the context of Yardstick, the virtual Traffic Classifier network function is utilized. - - -Hardware dependencies to run the framework -========================================== -In order to run the framework some hardware dependencies are required to run ApexLake. - -The framework needs to be installed on a physical node where the DPDK packet DPDK-pktgen_ -can be correctly installed and executed. -That requires for the packet generator to have 2 NICs DPDK_ Compatible. - -The 2 NICs will be connected to the switch where the Openstack VM network is managed. - -The switch is required to support multicast traffic and snooping protocol. - -The corresponding ports to which the cables are connected will be configured as VLAN trunks -using two of the VLAN IDs available for Neutron. -The mentioned VLAN IDs will be required in further configuration steps. - - -Software dependencies to run the framework -========================================== -Before to start the framework, a set of dependencies are required to be installed. -In the following a set of instructions to be executed on the Linux shell to install dependencies -and configure the environment is presented. - -1. Install dependencies. - -To install the dependencies required by the framework it is necessary install the following packages. -The following example is provided for Ubuntu and need to be executed as root. -:: - - apt-get install python-dev - apt-get install python-pip - apt-get install python-mock - apt-get install tcpreplay - apt-get install libpcap-dev - -2. Source OpenStack openrc file. - -:: - - source openrc - -3. Configure Openstack Neutron - -In order to support traffic generation and management by the virtual Traffic Classifier, -the configuration of the port security driver extension is required for Neutron. -For further details please follow the following link: PORTSEC_ -This step can be skipped in case the target OpenStack is Juno or Kilo release, -but it is required to support Liberty. -It is therefore required to indicate the release version in the configuration file apexlake.conf. - -4. Create 2 Networks based on VLANs in Neutron. - -In order for the network communication between the packet generator and the Compute node to -work fine, it is required to create through Neutron two networks and map those on the VLAN IDs -that have been previously used for the configuration on the physical switch. -The underlying switch needs to be configured accordingly. -:: - - VLAN_1=2032 - VLAN_2=2033 - PHYSNET=physnet2 - neutron net-create apexlake_inbound_network \ - --provider:network_type vlan \ - --provider:segmentation_id $VLAN_1 \ - --provider:physical_network $PHYSNET - - neutron subnet-create apexlake_inbound_network \ - 192.168.0.0/24 --name apexlake_inbound_subnet - - neutron net-create apexlake_outbound_network \ - --provider:network_type vlan \ - --provider:segmentation_id $VLAN_2 \ - --provider:physical_network $PHYSNET - - neutron subnet-create apexlake_outbound_network 192.168.1.0/24 \ - --name apexlake_outbound_subnet - -5. Download Ubuntu Cloud Image and load it on Glance - -The virtual Traffic Classifier is supported on top of Ubuntu 14.04 cloud image. -The image can be downloaded on the local machine and loaded on Glance using the following commands: -:: - - wget cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img - glance image-create \ - --name ubuntu1404 \ - --is-public true \ - --disk-format qcow \ - --container-format bare \ - --file trusty-server-cloudimg-amd64-disk1.img - -6. Configure the Test Cases. - -The VLAN tags are also required into the test case Yardstick yaml file as parameters the following test cases: - - TC 006 - - TC 007 - - TC 020 - - TC 021 - - -Install and configure DPDK Pktgen -+++++++++++++++++++++++++++++++++ -The execution of the framework is based on DPDK Pktgen. -If DPDK Pktgen has not been installed on the system by the user, it is necessary to download, compile and configure it. -The user can create a directory and download the dpdk packet generator source code: -:: - - cd experimental_framework/libraries - mkdir dpdk_pktgen - git clone https://github.com/pktgen/Pktgen-DPDK.git - -For the installation and configuration of DPDK and DPDK Pktgen please follow the official DPDK Pktgen README file. -Once the installation is completed, it is necessary to load the DPDK kernel driver, as follow: -:: - - insmod uio - insmod DPDK_DIR/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko - -It is required to properly set the configuration file according to the system on Pktgen runs on. -A description of the required configuration parameters and examples is provided in the following: -:: - - [PacketGen] - packet_generator = dpdk_pktgen - - # This is the directory where the packet generator is installed - # (if the user previously installed dpdk-pktgen, - # it is required to provide the director where it is installed). - pktgen_directory = /home/user/software/dpdk_pktgen/dpdk/examples/pktgen/ - - # This is the directory where DPDK is installed - dpdk_directory = /home/user/apexlake/experimental_framework/libraries/Pktgen-DPDK/dpdk/ - - # Name of the dpdk-pktgen program that starts the packet generator - program_name = app/app/x86_64-native-linuxapp-gcc/pktgen - - # DPDK coremask (see DPDK-Pktgen readme) - coremask = 1f - - # DPDK memory channels (see DPDK-Pktgen readme) - memory_channels = 3 - - # Name of the interface of the pktgen to be used to send traffic (vlan_sender) - name_if_1 = p1p1 - - # Name of the interface of the pktgen to be used to receive traffic (vlan_receiver) - name_if_2 = p1p2 - - # PCI bus address correspondent to if_1 - bus_slot_nic_1 = 01:00.0 - - # PCI bus address correspondent to if_2 - bus_slot_nic_2 = 01:00.1 - - -To find the parameters related to names of the NICs and addresses of the PCI buses -the user may find useful to run the DPDK tool nic_bind as follows: -:: - - DPDK_DIR/tools/dpdk_nic_bind.py --status - -which lists the NICs available on the system, show the available drivers and bus addresses for each interface. -Please make sure to select NICs which are DPDK compatible. - -Installation and configuration of smcroute -++++++++++++++++++++++++++++++++++++++++++ -The user is required to install smcroute which is used by the framework to support multicast communications. -In the following a list of commands to be ran to download and install smroute is provided. -:: - - cd ~ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - git reset --hard c3f5c56 - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - sudo make install - cd .. - -It is required to do the reset to the specified commit ID. -It is also required to create a configuration file using the following command: - - SMCROUTE_NIC=(name of the nic) - -where name of the nic is the name used previously for the variable "name_if_2". -In the example it would be: -:: - - SMCROUTE_NIC=p1p2 - -Then create the smcroute configuration file /etc/smcroute.conf -:: - - echo mgroup from $SMCROUTE_NIC group 224.192.16.1 > /etc/smcroute.conf - - -At the end of this procedure it will be necessary to perform the following actions to add the user to the sudoers: -:: - - adduser USERNAME sudo - echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - - -Experiment using SR-IOV configuration on the compute node -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -In order to enable SR-IOV interfaces on the physical NIC of the compute node, a compatible NIC is required. -NIC configuration depends on model and vendor. After proper configuration to support SR-IOV, -a proper configuration of openstack is required. -For further information, please look at the _SRIOV configuration guide - - -Finalize installation the framework on the system -================================================= - -The installation of the framework on the system requires the setup of the project. -After entering into the apexlake directory, it is sufficient to run the following command. -:: - - python setup.py install - -Since some elements are copied into the /tmp directory (see configuration file) it could be necessary -to repeat this step after a reboot of the host. diff --git a/yardstick/vTC/apexlake/__init__.py b/yardstick/vTC/apexlake/__init__.py deleted file mode 100644 index 8898092d0..000000000 --- a/yardstick/vTC/apexlake/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -Benchmarking Framework -""" diff --git a/yardstick/vTC/apexlake/apexlake.conf b/yardstick/vTC/apexlake/apexlake.conf deleted file mode 100644 index 826e3daca..000000000 --- a/yardstick/vTC/apexlake/apexlake.conf +++ /dev/null @@ -1,36 +0,0 @@ -[General] -debug = false - - -[OpenStack] -#release = juno -#release = kilo -release = liberty - -[PacketGen] -packet_generator = dpdk_pktgen -pktgen_directory = /home/user/IntelLabs/benchmarking-framework/experimental_framework/libraries/pktgen-2.9.5/ -dpdk_directory = /home/user/IntelLabs/benchmarking-framework/experimental_framework/libraries/dpdk-2.1.0/ -program_name = app/app/x86_64-native-linuxapp-gcc/pktgen -coremask = 1f -memory_channels = 3 -bus_slot_nic_1 = 21:00.0 -bus_slot_nic_2 = 21:00.1 -name_if_1 = p2p1 -name_if_2 = p2p2 - - - -[Experiment-VNF] - - -[InfluxDB] -influxdb_ip_address = 192.168.1.1 -influxdb_port = 8086 -influxdb_db_name = database - - -[Deployment-parameters] - - -[Testcase-parameters] diff --git a/yardstick/vTC/apexlake/docs/source/api.rst b/yardstick/vTC/apexlake/docs/source/api.rst deleted file mode 100644 index 38085900b..000000000 --- a/yardstick/vTC/apexlake/docs/source/api.rst +++ /dev/null @@ -1,5 +0,0 @@ -.. automodule:: experimental_framework.api - :members: - :undoc-members: - :inherited-members: - :show-inheritance: diff --git a/yardstick/vTC/apexlake/experimental_framework/__init__.py b/yardstick/vTC/apexlake/experimental_framework/__init__.py deleted file mode 100644 index 9c4eef12d..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -Experimental Framework -""" -from __future__ import absolute_import -import os - -APEX_LAKE_ROOT = os.path.realpath( - os.path.join(os.path.dirname(os.path.dirname(__file__)))) diff --git a/yardstick/vTC/apexlake/experimental_framework/api.py b/yardstick/vTC/apexlake/experimental_framework/api.py deleted file mode 100644 index 24dd1f89a..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/api.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 experimental_framework.benchmarking_unit as b_unit -from experimental_framework import heat_template_generation, common - - -class FrameworkApi(object): - - @staticmethod - def init(): - """ - Initializes the Framework - - :return: None - """ - common.init(api=True) - - # @staticmethod - # def get_available_test_cases(): - # """ - # Returns a list of available test cases. - # This list include eventual modules developed by the user, if any. - # Each test case is returned as a string that represents the full name - # of the test case and that can be used to get more information - # calling get_test_case_features(test_case_name) - # - # :return: list of strings - # """ - # return b_unit.BenchmarkingUnit.get_available_test_cases() - - @staticmethod - def get_test_case_features(test_case): - """ - Returns a list of features (description, requested parameters, - allowed values, etc.) for a specified test case. - - :param test_case: name of the test case (string) - The string represents the test case and can be - obtained calling "get_available_test_cases()" - method. - - :return: dict() containing the features of the test case - """ - if not isinstance(test_case, str): - raise ValueError('The provided test_case parameter has to be ' - 'a string') - benchmark = b_unit.BenchmarkingUnit.get_required_benchmarks( - [test_case])[0] - return benchmark.get_features() - - @staticmethod - def execute_framework( - test_cases, - iterations, - heat_template, - heat_template_parameters, - deployment_configuration, - openstack_credentials - ): - """ - Executes the framework according the inputs - - :param test_cases: Test cases to be ran on the workload - (dict() of dict()) - - Example: - test_case = dict() - test_case['name'] = 'module.Class' - test_case['params'] = dict() - test_case['params']['throughput'] = '1' - test_case['params']['vlan_sender'] = '1007' - test_case['params']['vlan_receiver'] = '1006' - test_cases = [test_case] - - :param iterations: Number of cycles to be executed (int) - - :param heat_template: (string) File name of the heat template of the - workload to be deployed. It contains the - parameters to be evaluated in the form of - #parameter_name. (See heat_templates/vTC.yaml as - example). - - :param heat_template_parameters: (dict) Parameters to be provided - as input to the heat template. - See http://docs.openstack.org/developer/heat/ - template_guide/hot_guide.html - section - "Template input parameters" for further info. - - :param deployment_configuration: ( dict[string] = list(strings) ) ) - Dictionary of parameters representing the - deployment configuration of the workload - The key is a string corresponding to the name of - the parameter, the value is a list of strings - representing the value to be assumed by a specific - param. - The parameters are user defined: they have to - correspond to the place holders (#parameter_name) - specified in the heat template. - - :return: dict() Containing results - """ - common.init(api=True) - - # Input Validation - common.InputValidation.validate_os_credentials(openstack_credentials) - credentials = openstack_credentials - - msg = 'The provided heat_template does not exist' - if common.RELEASE == 'liberty': - heat_template = 'vTC_liberty.yaml' - else: - heat_template = 'vTC.yaml' - template = "{}{}".format(common.get_template_dir(), heat_template) - common.InputValidation.validate_file_exist(template, msg) - - msg = 'The provided iterations variable must be an integer value' - common.InputValidation.validate_integer(iterations, msg) - - msg = 'The provided heat_template_parameters variable must be a ' \ - 'dictionary' - common.InputValidation.validate_dictionary(heat_template_parameters, - msg) - log_msg = "Generation of all the heat templates " \ - "required by the experiment" - common.LOG.info(log_msg) - heat_template_generation.generates_templates(heat_template, - deployment_configuration) - benchmarking_unit = \ - b_unit.BenchmarkingUnit( - heat_template, credentials, heat_template_parameters, - iterations, test_cases) - try: - common.LOG.info("Benchmarking Unit initialization") - benchmarking_unit.initialize() - common.LOG.info("Benchmarking Unit Running") - results = benchmarking_unit.run_benchmarks() - finally: - common.LOG.info("Benchmarking Unit Finalization") - benchmarking_unit.finalize() - return results diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarking_unit.py b/yardstick/vTC/apexlake/experimental_framework/benchmarking_unit.py deleted file mode 100644 index 56ea6d2f0..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarking_unit.py +++ /dev/null @@ -1,283 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -The Benchmarking Unit manages the Benchmarking of VNFs orchestrating the -initialization, execution and finalization -""" - - -from __future__ import absolute_import -import json -import time -import inspect - -from experimental_framework.benchmarks import benchmark_base_class as base -from experimental_framework import common -# from experimental_framework import data_manager as data -from experimental_framework import heat_template_generation as heat -from experimental_framework import deployment_unit as deploy -from six.moves import range - - -class BenchmarkingUnit: - """ - Management of the overall Benchmarking process - """ - - def __init__(self, heat_template_name, openstack_credentials, - heat_template_parameters, iterations, benchmarks): - """ - :param heat_template_name: (str) Name of the heat template. - - :param openstack_credentials: (dict) Credentials for openstack. - Required fields are: 'ip_controller', 'heat_url', - 'user', 'password', 'auth_uri', 'project'. - - :param heat_template_parameters: (dict) parameters to be given as - input to the heat template. Required keys depend on - the specific heat template. - - :param iterations: (int) number of cycles to be executed. - - :param benchmarks: (list[str]) List of the names of the - benchmarks/test_cases to be executed in the cycle. - - :return: None - """ - # Loads vars from configuration file - self.template_file_extension = common.TEMPLATE_FILE_EXTENSION - self.template_dir = common.get_template_dir() - self.results_directory = str(common.RESULT_DIR) + str(time.time()) - - # Initializes other internal variable from parameters - self.template_name = heat_template_name - self.iterations = iterations - self.required_benchmarks = benchmarks - self.template_files = [] - self.benchmarks = list() - self.benchmark_names = list() - # self.data_manager = data.DataManager(self.results_directory) - self.heat_template_parameters = heat_template_parameters - self.template_files = \ - heat.get_all_heat_templates(self.template_dir, - self.template_file_extension) - common.DEPLOYMENT_UNIT = deploy.DeploymentUnit(openstack_credentials) - - def initialize(self): - """ - Initialize the environment in order to run the benchmarking - - :return: None - """ - for benchmark in self.required_benchmarks: - benchmark_class = BenchmarkingUnit.get_benchmark_class( - benchmark['name']) - # Need to generate a unique name for the benchmark - # (since there is the possibility to have different - # instances of the same benchmark) - self.benchmarks.append(benchmark_class( - self.get_benchmark_name(benchmark['name']), - benchmark['params'])) - - # for template_file_name in self.template_files: - # experiment_name = BenchmarkingUnit.extract_experiment_name( - # template_file_name) - # self.data_manager.create_new_experiment(experiment_name) - # for benchmark in self.benchmarks: - # self.data_manager.add_benchmark(experiment_name, - # benchmark.get_name()) - - def finalize(self): - """ - Finalizes the Benchmarking Unit - Destroys all the stacks deployed by the framework and save results on - csv file. - - :return: None - """ - # self.data_manager.generate_result_csv_file() - common.DEPLOYMENT_UNIT.destroy_all_deployed_stacks() - - def run_benchmarks(self): - """ - Runs all the requested benchmarks and collect the results. - - :return: None - """ - common.LOG.info('Run Benchmarking Unit') - - experiment = {} - result = {} - for iteration in range(self.iterations): - common.LOG.info('Iteration %s', iteration) - for template_file_name in self.template_files: - experiment_name = BenchmarkingUnit.\ - extract_experiment_name(template_file_name) - experiment['experiment_name'] = experiment_name - configuration = self.\ - get_experiment_configuration(template_file_name) - # self.data_manager.add_configuration(experiment_name, - # configuration) - for key in configuration.keys(): - experiment[key] = configuration[key] - # metadata = dict() - # metadata['experiment_name'] = experiment_name - # self.data_manager.add_metadata(experiment_name, metadata) - - # For each benchmark in the cycle the workload is deployed - for benchmark in self.benchmarks: - log_msg = 'Benchmark {} started on {}'.format( - benchmark.get_name(), template_file_name - ) - common.LOG.info(log_msg) - - # Initialization of Benchmark - benchmark.init() - log_msg = 'Template {} deployment START'.\ - format(experiment_name) - common.LOG.info(log_msg) - - # Deployment of the workload - deployment_success = \ - common.DEPLOYMENT_UNIT.deploy_heat_template( - self.template_dir + template_file_name, - experiment_name, - self.heat_template_parameters) - - if deployment_success: - log_msg = 'Template {} deployment COMPLETED'.format( - experiment_name) - common.LOG.info(log_msg) - else: - log_msg = 'Template {} deployment FAILED'.format( - experiment_name) - common.LOG.info(log_msg) - continue - - # Running the Benchmark/test case - result = benchmark.run() - # self.data_manager.add_data_points(experiment_name, - # benchmark.get_name(), - # result) - - # Terminate the workload - log_msg = 'Destroying deployment for experiment {}'.\ - format(experiment_name) - common.LOG.info(log_msg) - common.DEPLOYMENT_UNIT.destroy_heat_template( - experiment_name) - - # Finalize the benchmark - benchmark.finalize() - log_msg = 'Benchmark {} terminated'.format( - benchmark.__class__.__name__) - common.LOG.info(log_msg) - # self.data_manager.generate_result_csv_file() - - experiment['benchmark'] = benchmark.get_name() - for key in benchmark.get_params(): - experiment[key] = benchmark.get_params()[key] - common.LOG.info('Benchmark Finished') - # self.data_manager.generate_result_csv_file() - common.LOG.info('Benchmarking Unit: Experiments completed!') - return result - - def get_experiment_configuration(self, template_file_name): - """ - Reads and returns the configuration for the specific experiment - (heat template) - - :param template_file_name: (str) Name of the file for the heat - template for which it is requested the configuration - - :return: dict() Configuration parameters and values - """ - file_name = "{}{}.json".format(self.template_dir, template_file_name) - with open(file_name) as json_file: - configuration = json.load(json_file) - return configuration - - def get_benchmark_name(self, name, instance=0): - """ - Returns the name to be used for the benchmark/test case (TC). - This is required since each benchmark/TC could be run more than once - within the same cycle, with different initialization parameters. - In order to distinguish between them, a unique name is generated. - - :param name: (str) original name of the benchmark/TC - - :param instance: (int) number of instance already in the queue for - this type of benchmark/TC. - - :return: (str) name to be assigned to the benchmark/TC - """ - if name + "_" + str(instance) in self.benchmark_names: - instance += 1 - return self.get_benchmark_name(name, instance) - self.benchmark_names.append(name + "_" + str(instance)) - return name + "_" + str(instance) - - @staticmethod - def extract_experiment_name(template_file_name): - """ - Generates a unique experiment name for a given template. - - :param template_file_name: (str) File name of the template used - during the experiment string - - :return: (str) Experiment Name - """ - strings = template_file_name.split('.') - return ".".join(strings[:(len(strings) - 1)]) - - @staticmethod - def get_benchmark_class(complete_module_name): - """ - Returns the classes included in a given module. - - :param complete_module_name: (str) Complete name of the module as - returned by get_available_test_cases. - - :return: Class related to the benchmark/TC present in the requested - module. - """ - strings = complete_module_name.split('.') - class_name = 'experimental_framework.benchmarks.{}'.format(strings[0]) - pkg = __import__(class_name, globals(), locals(), [], 0) - module = getattr(getattr(pkg, 'benchmarks'), strings[0]) - members = inspect.getmembers(module) - for m in members: - if inspect.isclass(m[1]): - class_name = m[1]("", dict()).__class__.__name__ - if isinstance(m[1]("", dict()), base.BenchmarkBaseClass) and \ - not class_name == 'BenchmarkBaseClass': - return m[1] - - @staticmethod - def get_required_benchmarks(required_benchmarks): - """ - Returns instances of required test cases. - - :param required_benchmarks: (list() of strings) Benchmarks to be - executed by the experimental framework. - - :return: list() of BenchmarkBaseClass - """ - benchmarks = list() - for b in required_benchmarks: - class_ = BenchmarkingUnit.get_benchmark_class(b) - instance = class_("", dict()) - benchmarks.append(instance) - return benchmarks diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/__init__.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/__init__.py deleted file mode 100644 index 99635a45a..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -Benchmarks to be executed within the framework -""" diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py deleted file mode 100644 index 38c91ee3a..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 abc - - -class BenchmarkBaseClass(object): - """ - This class represents a Benchmark that we want to run on the platform. - One of them will be the calculation of the throughput changing the - configuration parameters - """ - - def __init__(self, name, params): - if not params: - params = dict() - if not isinstance(params, dict): - raise ValueError("Parameters need to be provided in a dict") - - for param in self.get_features()['parameters']: - if param not in list(params.keys()): - params[param] = self.get_features()['default_values'][param] - - for param in self.get_features()['parameters']: - if param in self.get_features()['allowed_values'] and \ - params[param] not in \ - (self.get_features())['allowed_values'][param]: - raise ValueError('Value of parameter "' + param + - '" is not allowed') - self.name = name - self.params = params - - def get_name(self): - return self.name - - def get_params(self): - return self.params - - def get_features(self): - features = dict() - features['description'] = 'Please implement the method ' \ - '"get_features" for your benchmark' - features['parameters'] = list() - features['allowed_values'] = dict() - features['default_values'] = dict() - return features - - @abc.abstractmethod - def init(self): - """ - Initializes the benchmark - :return: - """ - raise NotImplementedError("Subclass must implement abstract method") - - @abc.abstractmethod - def finalize(self): - """ - Finalizes the benchmark - :return: - """ - raise NotImplementedError("Subclass must implement abstract method") - - @abc.abstractmethod - def run(self): - """ - This method executes the specific benchmark on the VNF already - instantiated - :return: list of dictionaries (every dictionary contains the results - of a data point - """ - raise NotImplementedError("Subclass must implement abstract method") diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py deleted file mode 100644 index db9d449ef..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py +++ /dev/null @@ -1,260 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 os -# import signal -import time - -import subprocess -from experimental_framework.benchmarks import benchmark_base_class as base -from experimental_framework.constants import framework_parameters as fp -from experimental_framework.constants import conf_file_sections as cfs -from experimental_framework.packet_generators import dpdk_packet_generator \ - as dpdk -import experimental_framework.common as common -from six.moves import range - - -THROUGHPUT = 'throughput' -VLAN_SENDER = 'vlan_sender' -VLAN_RECEIVER = 'vlan_receiver' -PACKETS_FILE_NAME = 'packets.res' -PACKET_CHECKER_PROGRAM_NAME = 'test_sniff' -MULTICAST_GROUP = '224.192.16.1' - - -class InstantiationValidationBenchmark(base.BenchmarkBaseClass): - - def __init__(self, name, params): - base.BenchmarkBaseClass.__init__(self, name, params) - self.base_dir = os.path.join( - common.get_base_dir(), fp.EXPERIMENTAL_FRAMEWORK_DIR, - fp.DPDK_PKTGEN_DIR) - self.results_file = self.base_dir + PACKETS_FILE_NAME - self.lua_file = self.base_dir + 'constant_traffic.lua' - self.res_dir = '' - self.interface_name = '' - - # Set the packet checker command - self.pkt_checker_command = os.path.join( - common.get_base_dir(), - 'experimental_framework/libraries/', - 'packet_checker/', - PACKET_CHECKER_PROGRAM_NAME + ' ') - - def init(self): - """ - Initialize the benchmark - :return: None - """ - pass - - def finalize(self): - """ - Finalizes the benchmark - :return: None - """ - pass - - def get_features(self): - features = dict() - features['description'] = 'Instantiation Validation Benchmark' - features['parameters'] = [THROUGHPUT, VLAN_SENDER, VLAN_RECEIVER] - features['allowed_values'] = dict() - features['allowed_values'][THROUGHPUT] = [str(x) for x in range(100)] - features['allowed_values'][VLAN_SENDER] = [str(x) for x in - range(-1, 4096)] - features['allowed_values'][VLAN_RECEIVER] = [str(x) - for x in range(-1, 4096)] - features['default_values'] = dict() - features['default_values'][THROUGHPUT] = '1' - features['default_values'][VLAN_SENDER] = '-1' - features['default_values'][VLAN_RECEIVER] = '-1' - return features - - def run(self): - # Setup packet generator - traffic_time = '10' - packet_size = '512' - traffic_rate_percentage = self.params[THROUGHPUT] - - dpdk_pktgen_vars = common.get_dpdk_pktgen_vars() - # bus_address = dpdk_pktgen_vars[cfs.CFSP_DPDK_BUS_SLOT_NIC_2] - self.interface_name = dpdk_pktgen_vars[cfs.CFSP_DPDK_NAME_IF_2] - packetgen = dpdk.DpdkPacketGenerator() - self._configure_lua_file(traffic_rate_percentage, traffic_time) - packetgen.init_dpdk_pktgen(dpdk_interfaces=1, - pcap_file_0='packet_' + packet_size + - '.pcap', - pcap_file_1='igmp.pcap', - lua_script='constant_traffic.lua', - vlan_0=self.params[VLAN_SENDER], - vlan_1=self.params[VLAN_RECEIVER]) - - self._init_packet_checker() - # Send constant traffic at a specified rate - common.LOG.debug('Start the packet generator') - packetgen.send_traffic() - common.LOG.debug('Stop the packet generator') - time.sleep(5) - self._finalize_packet_checker() - self._reset_lua_file(traffic_rate_percentage, traffic_time) - return self._get_results() - - def _configure_lua_file(self, traffic_rate_percentage, traffic_time): - """ - Configure the packet gen to write the results into the right file - :return: None - """ - common.replace_in_file(self.lua_file, 'local out_file = ""', - 'local out_file = "' + - self.results_file + '"') - common.replace_in_file(self.lua_file, 'local traffic_rate = 0', - 'local traffic_rate = ' + - traffic_rate_percentage) - common.replace_in_file(self.lua_file, 'local traffic_delay = 0', - 'local traffic_delay = ' + traffic_time) - - def _reset_lua_file(self, traffic_rate_percentage, traffic_time): - """ - Configure the packet gen to write the results into the right file - :param traffic_rate_percentage: - :param traffic_time: - :return: None - """ - - common.replace_in_file(self.lua_file, 'local out_file = "' + - self.results_file + '"', - 'local out_file = ""') - common.replace_in_file(self.lua_file, 'local traffic_rate = ' + - traffic_rate_percentage, - 'local traffic_rate = 0') - common.replace_in_file(self.lua_file, 'local traffic_delay = ' + - traffic_time, 'local traffic_delay = 0') - - def _get_results(self): - ret_val = dict() - packet_checker_res = 0 - if self.res_dir: - packet_checker_res = \ - int(common.get_file_first_line(self.res_dir + - 'packet_checker.res')) - pkt_gen_res = int(common.get_file_first_line(self.results_file)) - if pkt_gen_res <= packet_checker_res or \ - (float(pkt_gen_res - packet_checker_res) / pkt_gen_res) <= 0.1: - ret_val['failure'] = '0' - else: - ret_val['failure'] = '1' - return ret_val - - def _init_packet_checker(self): - """ - Sets up the multicast and starts the packet checker - :return: - """ - # Kill any other process running from previous failed execution - self.res_dir = common.get_result_dir() - pids = self._get_pids() - for pid in pids: - # os.kill(pid, signal.SIGTERM) - command = 'sudo kill ' + str(pid) - common.run_command(command) - - # initialization of the VLAN interface - command = "sudo ip link add link " - command += self.interface_name - command += " name " - command += self.interface_name + '.' + self.params[VLAN_RECEIVER] - command += " type vlan id " + self.params[VLAN_RECEIVER] - common.run_command(command) - - # set up the new - command = 'sudo ifconfig ' + self.interface_name + '.' + \ - self.params[VLAN_RECEIVER] - # An IP address is required for the interface to receive a multicast - # flow. The specific address is not important - command += ' 10.254.254.254 up netmask 255.255.255.248' - common.run_command(command) - - command = "sudo ifconfig " - command += self.interface_name + "." + self.params[VLAN_RECEIVER] - command += " promisc" - common.run_command(command) - - # configure smcroute - command = "sudo echo 'mgroup from " - command += self.interface_name + '.' + self.params[VLAN_RECEIVER] - command += " group " - command += MULTICAST_GROUP - command += "' > /etc/smcroute.conf" - common.run_command(command) - - # run smcroute on the interface - command = 'sudo smcroute -d' - common.run_command(command) - time.sleep(3) - - # Start the packet checker - current_dir = os.path.dirname(os.path.realpath(__file__)) - dir_list = self.pkt_checker_command.split('/') - directory = os.pathsep.join(dir_list[0:len(dir_list) - 1]) - os.chdir(directory) - command = "make" - common.run_command(command) - os.chdir(current_dir) - - command = "sudo chmod +x {}".format(self.pkt_checker_command) - common.run_command(command) - - command = 'sudo ' + self.pkt_checker_command - command += self.interface_name + '.' + self.params[VLAN_RECEIVER] - command += ' 128' - command += ' &' - common.run_command(command) - - def _finalize_packet_checker(self): - """ - Obtains the PID of the packet checker and sends an alarm to - terminate it - :return: None - """ - pids = self._get_pids() - for pid in pids: - # os.kill(pid, signal.SIGTERM) - command = 'sudo kill ' + str(pid) - common.run_command(command) - - # stop smcroute on the interface - command = 'sudo smcroute -k' - common.run_command(command) - - # finalization of the VLAN interface - command = "sudo ip link delete " - command += self.interface_name + '.' + self.params[VLAN_RECEIVER] - common.run_command(command) - - def _get_pids(self): - """ - Returns a list of integers containing the pid or the pids of the - processes currently running on the host - :return: type: list of int - """ - output = subprocess.check_output( - 'pgrep "{}"'.format(PACKET_CHECKER_PROGRAM_NAME)) - if not output: - pids = [] - else: - pids = [int(x) for x in output.splitlines()] - return pids diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py deleted file mode 100644 index 5569b6c12..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 experimental_framework import common -from experimental_framework.benchmarks import \ - instantiation_validation_benchmark as base -from six.moves import range - - -NUM_OF_NEIGHBORS = 'num_of_neighbours' -AMOUNT_OF_RAM = 'amount_of_ram' -NUMBER_OF_CORES = 'number_of_cores' -NETWORK_NAME = 'network' -SUBNET_NAME = 'subnet' - - -class InstantiationValidationNoisyNeighborsBenchmark( - base.InstantiationValidationBenchmark): - - def __init__(self, name, params): - base.InstantiationValidationBenchmark.__init__(self, name, params) - - if common.RELEASE == 'liberty': - temp_name = 'stress_workload_liberty.yaml' - else: - temp_name = 'stress_workload.yaml' - - self.template_file = common.get_template_dir() + \ - temp_name - self.stack_name = 'neighbour' - self.neighbor_stack_names = [] - - def get_features(self): - features = super(InstantiationValidationNoisyNeighborsBenchmark, - self).get_features() - features['description'] = 'Instantiation Validation Benchmark ' \ - 'with noisy neghbors' - features['parameters'].append(NUM_OF_NEIGHBORS) - features['parameters'].append(AMOUNT_OF_RAM) - features['parameters'].append(NUMBER_OF_CORES) - features['parameters'].append(NETWORK_NAME) - features['parameters'].append(SUBNET_NAME) - features['allowed_values'][NUM_OF_NEIGHBORS] = \ - ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] - features['allowed_values'][NUMBER_OF_CORES] = \ - ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] - features['allowed_values'][AMOUNT_OF_RAM] = \ - ['256M', '1G', '2G', '3G', '4G', '5G', '6G', '7G', '8G', '9G', - '10G'] - features['default_values'][NUM_OF_NEIGHBORS] = '1' - features['default_values'][NUMBER_OF_CORES] = '1' - features['default_values'][AMOUNT_OF_RAM] = '256M' - features['default_values'][NETWORK_NAME] = '' - features['default_values'][SUBNET_NAME] = '' - return features - - def init(self): - super(InstantiationValidationNoisyNeighborsBenchmark, self).init() - common.replace_in_file(self.lua_file, 'local out_file = ""', - 'local out_file = "' + - self.results_file + '"') - heat_param = dict() - heat_param['network'] = self.params[NETWORK_NAME] - heat_param['subnet'] = self.params[SUBNET_NAME] - heat_param['cores'] = self.params['number_of_cores'] - heat_param['memory'] = self.params['amount_of_ram'] - for i in range(0, int(self.params['num_of_neighbours'])): - stack_name = self.stack_name + str(i) - common.DEPLOYMENT_UNIT.deploy_heat_template(self.template_file, - stack_name, - heat_param) - self.neighbor_stack_names.append(stack_name) - - def finalize(self): - common.replace_in_file(self.lua_file, 'local out_file = "' + - self.results_file + '"', - 'local out_file = ""') - # destroy neighbor stacks - for stack_name in self.neighbor_stack_names: - common.DEPLOYMENT_UNIT.destroy_heat_template(stack_name) - self.neighbor_stack_names = list() diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py deleted file mode 100644 index 44c9f327a..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 experimental_framework.benchmarks import rfc2544_throughput_benchmark \ - as base -from experimental_framework import common -from six.moves import range - - -NETWORK_NAME = 'network' -SUBNET_NAME = 'subnet' - - -class MultiTenancyThroughputBenchmark(base.RFC2544ThroughputBenchmark): - - def __init__(self, name, params): - base.RFC2544ThroughputBenchmark.__init__(self, name, params) - - if common.RELEASE == 'liberty': - temp_name = 'stress_workload_liberty.yaml' - else: - temp_name = 'stress_workload.yaml' - - self.template_file = "{}{}".format(common.get_template_dir(), - temp_name) - self.stack_name = 'neighbour' - self.neighbor_stack_names = list() - - def get_features(self): - features = super(MultiTenancyThroughputBenchmark, self).get_features() - features['description'] = \ - 'RFC 2544 Throughput calculation with ' \ - 'memory-bound noisy neighbors' - features['parameters'].append('num_of_neighbours') - features['parameters'].append('amount_of_ram') - features['parameters'].append('number_of_cores') - features['parameters'].append(NETWORK_NAME) - features['parameters'].append(SUBNET_NAME) - features['allowed_values']['num_of_neighbours'] = \ - ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] - features['allowed_values']['number_of_cores'] = \ - ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] - features['allowed_values']['amount_of_ram'] = \ - ['256M', '1G', '2G', '3G', '4G', '5G', '6G', '7G', '8G', '9G', - '10G'] - features['default_values'][NETWORK_NAME] = '' - features['default_values'][SUBNET_NAME] = '' - features['default_values']['num_of_neighbours'] = '1' - features['default_values']['number_of_cores'] = '1' - features['default_values']['amount_of_ram'] = '256M' - return features - - def init(self): - """ - Initialize the benchmark - return: None - """ - common.replace_in_file(self.lua_file, 'local out_file = ""', - 'local out_file = "' + - self.results_file + '"') - heat_param = dict() - heat_param['cores'] = self.params['number_of_cores'] - heat_param['memory'] = self.params['amount_of_ram'] - heat_param['network'] = self.params[NETWORK_NAME] - heat_param['subnet'] = self.params[SUBNET_NAME] - for i in range(0, int(self.params['num_of_neighbours'])): - stack_name = self.stack_name + str(i) - common.DEPLOYMENT_UNIT.deploy_heat_template(self.template_file, - stack_name, - heat_param) - self.neighbor_stack_names.append(stack_name) - - def finalize(self): - """ - Finalizes the benchmark - return: None - """ - common.replace_in_file(self.lua_file, 'local out_file = "' + - self.results_file + '"', - 'local out_file = ""') - # destroy neighbor stacks - for stack_name in self.neighbor_stack_names: - common.DEPLOYMENT_UNIT.destroy_heat_template(stack_name) - self.neighbor_stack_names = list() diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py deleted file mode 100644 index 5c7b55e42..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 six.moves import range - -from experimental_framework.benchmarks import benchmark_base_class -from experimental_framework.packet_generators \ - import dpdk_packet_generator as dpdk -import experimental_framework.common as common -from experimental_framework.constants import framework_parameters as fp - - -PACKET_SIZE = 'packet_size' -VLAN_SENDER = 'vlan_sender' -VLAN_RECEIVER = 'vlan_receiver' - - -class RFC2544ThroughputBenchmark(benchmark_base_class.BenchmarkBaseClass): - """ - Calculates the throughput of the VNF under test according to the RFC2544. - """ - - def __init__(self, name, params): - benchmark_base_class.BenchmarkBaseClass.__init__(self, name, params) - self.base_dir = common.get_base_dir() + \ - fp.EXPERIMENTAL_FRAMEWORK_DIR + fp.DPDK_PKTGEN_DIR - self.results_file = self.base_dir + 'experiment.res' - self.lua_file = self.base_dir + 'rfc2544.lua' - - def init(self): - """ - Initialize the benchmark - :return: None - """ - pass - - def finalize(self): - """ - :return: None - """ - pass - - def get_features(self): - """ - Returns the features associated to the benchmark - :return: - """ - features = dict() - features['description'] = 'RFC 2544 Throughput calculation' - features['parameters'] = [PACKET_SIZE, VLAN_SENDER, VLAN_RECEIVER] - features['allowed_values'] = dict() - features['allowed_values'][PACKET_SIZE] = ['64', '128', '256', '512', - '1024', '1280', '1514'] - features['allowed_values'][VLAN_SENDER] = [str(x) for x in - range(-1, 4096)] - features['allowed_values'][VLAN_RECEIVER] = [str(x) for x in - range(-1, 4096)] - features['default_values'] = dict() - features['default_values'][PACKET_SIZE] = '1280' - features['default_values'][VLAN_SENDER] = '1007' - features['default_values'][VLAN_RECEIVER] = '1006' - return features - - def run(self): - """ - Sends and receive traffic according to the RFC methodology in order - to measure the throughput of the workload - :return: Results of the testcase (type: dict) - """ - packet_size = self._extract_packet_size_from_params() - - # Packetgen management - packetgen = dpdk.DpdkPacketGenerator() - self._configure_lua_file() - packetgen.init_dpdk_pktgen(dpdk_interfaces=2, - pcap_file_0='packet_' + - packet_size + '.pcap', - pcap_file_1='igmp.pcap', - lua_script='rfc2544.lua', - vlan_0=self.params[VLAN_SENDER], - vlan_1=self.params[VLAN_RECEIVER]) - common.LOG.debug('Start the packet generator - packet size: ' + - str(packet_size)) - packetgen.send_traffic() - common.LOG.debug('Stop the packet generator') - - return self._get_results() - - def _extract_packet_size_from_params(self): - """ - Extracts packet sizes from parameters - :return: packet_sizes (list) - """ - packet_size = '1280' # default value - if PACKET_SIZE in list(self.params.keys()) and \ - isinstance(self.params[PACKET_SIZE], str): - packet_size = self.params[PACKET_SIZE] - return packet_size - - def _configure_lua_file(self): - """ - Configure the packet gen to write the results into the right file - :return: None - """ - common.replace_in_file(self.lua_file, 'local out_file = ""', - 'local out_file = "' + - self.results_file + '"') - - def _reset_lua_file(self): - """ - Sets back the configuration of the local file var to the default - :return: - """ - common.replace_in_file(self.lua_file, 'local out_file = "' + - self.results_file + '"', - 'local out_file = ""') - - def _get_results(self): - """ - Returns the results of the experiment - :return: None - """ - throughput = common.get_file_first_line(self.results_file) - ret_val = dict() - try: - ret_val['throughput'] = int(throughput) - except: - ret_val['throughput'] = 0 - return ret_val diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/test_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/test_benchmark.py deleted file mode 100644 index 5891832f2..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/test_benchmark.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 time - -from experimental_framework.benchmarks import benchmark_base_class as base - - -class TestBenchmark(base.BenchmarkBaseClass): - - def init(self): - pass - - def finalize(self): - pass - - def get_features(self): - features = dict() - features['description'] = 'Test Benchmark' - features['parameters'] = list() - features['allowed_values'] = dict() - features['default_values'] = dict() - return features - - def run(self): - time.sleep(10) - return dict() diff --git a/yardstick/vTC/apexlake/experimental_framework/common.py b/yardstick/vTC/apexlake/experimental_framework/common.py deleted file mode 100644 index feea8bde6..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/common.py +++ /dev/null @@ -1,622 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 print_function -from __future__ import absolute_import -import os -import re -import six.moves.configparser -import logging -import fileinput -from experimental_framework.constants import conf_file_sections as cf -from experimental_framework.constants import framework_parameters as fp - - -# ------------------------------------------------------ -# List of common variables -# ------------------------------------------------------ - -allowed_releases = ['liberty', 'kilo', 'juno'] - -LOG = None -CONF_FILE = None -DEPLOYMENT_UNIT = None -ITERATIONS = None -RELEASE = None - -BASE_DIR = None -RESULT_DIR = None -TEMPLATE_DIR = None -TEMPLATE_NAME = None -TEMPLATE_FILE_EXTENSION = None - -PKTGEN = None -PKTGEN_DIR = None -PKTGEN_DPDK_DIRECTORY = None -PKTGEN_PROGRAM = None -PKTGEN_COREMASK = None -PKTGEN_MEMCHANNEL = None -PKTGEN_BUS_SLOT_NIC_1 = None -PKTGEN_BUS_SLOT_NIC_2 = None -PKTGEN_NAME_NIC_1 = None -PKTGEN_NAME_NIC_2 = None - -INFLUXDB_IP = None -INFLUXDB_PORT = None -INFLUXDB_DB_NAME = None - - -# ------------------------------------------------------ -# Initialization and Input 'heat_templates/'validation -# ------------------------------------------------------ - -def init(api=False): - global BASE_DIR - # BASE_DIR = os.getcwd() - BASE_DIR = os.path.dirname(os.path.abspath(__file__)) - BASE_DIR = BASE_DIR.replace('/experimental_framework', '') - BASE_DIR = InputValidation.validate_directory_exist_and_format( - BASE_DIR, "Error 000001") - - init_conf_file(api) - init_log() - init_general_vars(api) - if CONF_FILE.get_variable_list(cf.CFS_PKTGEN): - init_pktgen() - - -def init_conf_file(api=False): - global CONF_FILE - if api: - CONF_FILE = ConfigurationFile(cf.get_sections_api(), - '/tmp/apexlake/apexlake.conf') - else: - CONF_FILE = ConfigurationFile(cf.get_sections(), - '/tmp/apexlake/apexlake.conf') - - -def init_general_vars(api=False): - global TEMPLATE_FILE_EXTENSION - global TEMPLATE_NAME - global TEMPLATE_DIR - global RESULT_DIR - global ITERATIONS - global RELEASE - - TEMPLATE_FILE_EXTENSION = '.yaml' - - # Check Section in Configuration File - InputValidation.\ - validate_configuration_file_section( - cf.CFS_GENERAL, - "Section " + cf.CFS_GENERAL + - "is not present in configuration file") - - InputValidation.\ - validate_configuration_file_section( - cf.CFS_OPENSTACK, - "Section " + cf.CFS_OPENSTACK + - "is not present in configuration file") - - TEMPLATE_DIR = '/tmp/apexlake/heat_templates/' - # if not os.path.exists(TEMPLATE_DIR): - # os.makedirs(TEMPLATE_DIR) - # cmd = "cp /tmp/apexlake/heat_templates/*.yaml {}".format(TEMPLATE_DIR) - # run_command(cmd) - - if not api: - # Validate template name - InputValidation.\ - validate_configuration_file_parameter( - cf.CFS_GENERAL, - cf.CFSG_TEMPLATE_NAME, - "Parameter " + cf.CFSG_TEMPLATE_NAME + - "is not present in configuration file") - TEMPLATE_NAME = CONF_FILE.get_variable(cf.CFS_GENERAL, - cf.CFSG_TEMPLATE_NAME) - InputValidation.validate_file_exist( - TEMPLATE_DIR + TEMPLATE_NAME, - "The provided template file does not exist") - - RESULT_DIR = "/tmp/apexlake/results/" - if not os.path.isdir(RESULT_DIR): - os.makedirs(RESULT_DIR) - - if cf.CFSO_RELEASE in CONF_FILE.get_variable_list(cf.CFS_OPENSTACK): - RELEASE = CONF_FILE.get_variable(cf.CFS_OPENSTACK, cf.CFSO_RELEASE) - if RELEASE not in allowed_releases: - raise ValueError("Release {} is not supported".format(RELEASE)) - - # Validate and assign Iterations - if cf.CFSG_ITERATIONS in CONF_FILE.get_variable_list(cf.CFS_GENERAL): - ITERATIONS = int(CONF_FILE.get_variable(cf.CFS_GENERAL, - cf.CFSG_ITERATIONS)) - else: - ITERATIONS = 1 - - -def init_log(): - global LOG - LOG = logging.getLogger() - debug = CONF_FILE.get_variable(cf.CFS_GENERAL, cf.CFSG_DEBUG) - if debug == 'true' or debug == 'True': - LOG.setLevel(level=logging.DEBUG) - else: - LOG.setLevel(level=logging.INFO) - log_formatter = logging.Formatter("%(asctime)s --- %(message)s") - file_handler = logging.FileHandler("{0}/{1}.log".format("./", "benchmark")) - file_handler.setFormatter(log_formatter) - file_handler.setLevel(logging.DEBUG) - LOG.addHandler(file_handler) - - -# ------------------------------------------------------ -# InfluxDB conf variables -# ------------------------------------------------------ -def init_influxdb(): - global INFLUXDB_IP - global INFLUXDB_PORT - global INFLUXDB_DB_NAME - - INFLUXDB_IP = CONF_FILE.get_variable(cf.CFS_INFLUXDB, cf.CFSI_IDB_IP) - INFLUXDB_PORT = CONF_FILE.get_variable(cf.CFS_INFLUXDB, cf.CFSI_IDB_PORT) - INFLUXDB_DB_NAME = CONF_FILE.get_variable(cf.CFS_INFLUXDB, - cf.CFSI_IDB_DB_NAME) - - -# ------------------------------------------------------ -# Packet Generator conf variables -# ------------------------------------------------------ -def init_pktgen(): - global PKTGEN - global PKTGEN_DIR - global PKTGEN_PROGRAM - global PKTGEN_COREMASK - global PKTGEN_MEMCHANNEL - global PKTGEN_BUS_SLOT_NIC_1 - global PKTGEN_BUS_SLOT_NIC_2 - global PKTGEN_DPDK_DIRECTORY - global PKTGEN_NAME_NIC_1 - global PKTGEN_NAME_NIC_2 - - msg = "Section {} is not present in the configuration file".\ - format(cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_section(cf.CFS_PKTGEN, msg) - - pktgen_var_list = CONF_FILE.get_variable_list(cf.CFS_PKTGEN) - PKTGEN = 'dpdk_pktgen' # default value - if cf.CFSP_PACKET_GENERATOR in pktgen_var_list: - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_PACKET_GENERATOR, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_PACKET_GENERATOR, msg) - PKTGEN = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_PACKET_GENERATOR) - - if PKTGEN not in fp.get_supported_packet_generators(): - raise ValueError('The specified packet generator is not supported ' - 'by the framework') - - # Check if the packet gen is dpdk_pktgen - if PKTGEN == cf.CFSP_PG_DPDK: - # Validation of DPDK pktgen directory - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_PKTGEN_DIRECTORY, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_PKTGEN_DIRECTORY, msg) - PKTGEN_DIR = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_PKTGEN_DIRECTORY) - msg = "The directory {} does not exist.".format(PKTGEN_DIR) - PKTGEN_DIR = InputValidation.validate_directory_exist_and_format( - PKTGEN_DIR, msg) - - # Validation of the DPDK program name - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_PROGRAM_NAME, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_PROGRAM_NAME, msg) - PKTGEN_PROGRAM = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_PROGRAM_NAME) - - # Validation of the DPDK Coremask parameter - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_COREMASK, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_COREMASK, msg) - PKTGEN_COREMASK = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_COREMASK) - - # Validation of the DPDK Memory Channel parameter - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_MEMORY_CHANNEL, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_MEMORY_CHANNEL, msg) - PKTGEN_MEMCHANNEL = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_MEMORY_CHANNEL) - - # Validation of the DPDK Bus Slot 1 - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_BUS_SLOT_NIC_1, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_BUS_SLOT_NIC_1, msg) - PKTGEN_BUS_SLOT_NIC_1 = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_BUS_SLOT_NIC_1) - - # Validation of the DPDK Bus Slot 2 - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_BUS_SLOT_NIC_2, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_BUS_SLOT_NIC_2, msg) - PKTGEN_BUS_SLOT_NIC_2 = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_BUS_SLOT_NIC_2) - - # Validation of the DPDK NIC 1 - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_NAME_IF_1, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_NAME_IF_1, msg) - PKTGEN_NAME_NIC_1 = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_NAME_IF_1) - - # Validation of the DPDK NIC 2 - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_NAME_IF_2, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_NAME_IF_2, msg) - PKTGEN_NAME_NIC_2 = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_NAME_IF_2) - - # Validation of DPDK directory parameter - msg = "Parameter {} is not present in section {}".format( - cf.CFSP_DPDK_DPDK_DIRECTORY, cf.CFS_PKTGEN) - InputValidation.validate_configuration_file_parameter( - cf.CFS_PKTGEN, cf.CFSP_DPDK_DPDK_DIRECTORY, msg) - PKTGEN_DPDK_DIRECTORY = CONF_FILE.get_variable( - cf.CFS_PKTGEN, cf.CFSP_DPDK_DPDK_DIRECTORY) - msg = "Directory {} does not exist".format( - cf.CFSP_DPDK_DPDK_DIRECTORY) - PKTGEN_DPDK_DIRECTORY = InputValidation.\ - validate_directory_exist_and_format(PKTGEN_DPDK_DIRECTORY, msg) - - -# ------------------------------------------------------ -# Configuration file access -# ------------------------------------------------------ - -class ConfigurationFile: - """ - Used to extract data from the configuration file - """ - - def __init__(self, sections, config_file='conf.cfg'): - """ - Reads configuration file sections - - :param sections: list of strings representing the sections to be - loaded - :param config_file: name of the configuration file (string) - :return: None - """ - InputValidation.validate_string( - config_file, "The configuration file name must be a string") - # config_file = BASE_DIR + config_file - InputValidation.validate_file_exist( - config_file, 'The provided configuration file does not exist') - self.config = six.moves.configparser.ConfigParser() - self.config.read(config_file) - for section in sections: - setattr( - self, section, ConfigurationFile. - _config_section_map(section, self.config)) - - @staticmethod - def _config_section_map(section, config_file): - """ - Returns a dictionary with the configuration values for the specific - section - - :param section: section to be loaded (string) - :param config_file: name of the configuration file (string) - :return: dict - """ - dict1 = dict() - options = config_file.options(section) - for option in options: - dict1[option] = config_file.get(section, option) - return dict1 - - def get_variable(self, section, variable_name): - """ - Returns the value correspondent to a variable - - :param section: section to be loaded (string) - :param variable_name: name of the variable (string) - :return: string - """ - message = "The variable name must be a string" - InputValidation.validate_string(variable_name, message) - if variable_name in self.get_variable_list(section): - sect = getattr(self, section) - return sect[variable_name] - else: - exc_msg = 'Parameter {} is not in the {} section of the ' \ - 'conf file'.format(variable_name, section) - raise ValueError(exc_msg) - - def get_variable_list(self, section): - """ - Returns the list of the available variables in a section - :param section: section to be loaded (string) - :return: list - """ - try: - return getattr(self, section) - except: - msg = 'Section {} not found in the configuration file'.\ - format(section) - raise ValueError(msg) - - -# ------------------------------------------------------ -# Get OpenStack Credentials -# ------------------------------------------------------ -def get_credentials(): - """ - Returns the credentials for OpenStack access from the configuration file - :return: dictionary - """ - credentials = dict() - credentials[cf.CFSO_IP_CONTROLLER] = CONF_FILE.get_variable( - cf.CFS_OPENSTACK, cf.CFSO_IP_CONTROLLER) - credentials[cf.CFSO_HEAT_URL] = CONF_FILE.get_variable( - cf.CFS_OPENSTACK, cf.CFSO_HEAT_URL) - credentials[cf.CFSO_USER] = CONF_FILE.get_variable( - cf.CFS_OPENSTACK, cf.CFSO_USER) - credentials[cf.CFSO_PASSWORD] = CONF_FILE.get_variable( - cf.CFS_OPENSTACK, cf.CFSO_PASSWORD) - credentials[cf.CFSO_AUTH_URI] = CONF_FILE.get_variable( - cf.CFS_OPENSTACK, cf.CFSO_AUTH_URI) - credentials[cf.CFSO_PROJECT] = CONF_FILE.get_variable( - cf.CFS_OPENSTACK, cf.CFSO_PROJECT) - return credentials - - -# ------------------------------------------------------ -# Manage files -# ------------------------------------------------------ - -def get_heat_template_params(): - """ - Returns the list of deployment parameters from the configuration file - for the heat template - - :return: dict - """ - heat_parameters_list = CONF_FILE.get_variable_list( - cf.CFS_DEPLOYMENT_PARAMETERS) - testcase_parameters = dict() - for param in heat_parameters_list: - testcase_parameters[param] = CONF_FILE.get_variable( - cf.CFS_DEPLOYMENT_PARAMETERS, param) - return testcase_parameters - - -def get_testcase_params(): - """ - Returns the list of testcase parameters from the configuration file - - :return: dict - """ - testcase_parameters = dict() - parameters = CONF_FILE.get_variable_list(cf.CFS_TESTCASE_PARAMETERS) - for param in parameters: - testcase_parameters[param] = CONF_FILE.get_variable( - cf.CFS_TESTCASE_PARAMETERS, param) - return testcase_parameters - - -def get_file_first_line(file_name): - """ - Returns the first line of a file - - :param file_name: name of the file to be read (str) - :return: str - """ - message = "The name of the file must be a string" - InputValidation.validate_string(file_name, message) - message = 'The file {} does not exist'.format(file_name) - InputValidation.validate_file_exist(file_name, message) - res = open(file_name, 'r') - return res.readline() - - -def replace_in_file(file, text_to_search, text_to_replace): - """ - Replaces a string within a file - - :param file: name of the file (str) - :param text_to_search: text to be replaced - :param text_to_replace: new text that will replace the previous - :return: None - """ - message = 'The text to be replaced in the file must be a string' - InputValidation.validate_string(text_to_search, message) - message = 'The text to replace in the file must be a string' - InputValidation.validate_string(text_to_replace, message) - message = "The name of the file must be a string" - InputValidation.validate_string(file, message) - message = "The file does not exist" - InputValidation.validate_file_exist(file, message) - for line in fileinput.input(file, inplace=True): - print((line.replace(text_to_search, text_to_replace).rstrip())) - - -# ------------------------------------------------------ -# Shell interaction -# ------------------------------------------------------ -def run_command(command): - LOG.info("Running command: {}".format(command)) - return os.system(command) - - -def push_data_influxdb(data): - ip = INFLUXDB_IP - port = INFLUXDB_PORT - db_name = INFLUXDB_DB_NAME - command = "curl -i -XPOST 'http://{}:{}/write?db={}' " \ - "--data-binary {}".format(ip, port, db_name, data) - run_command(command) - - -# ------------------------------------------------------ -# Expose variables to other modules -# ------------------------------------------------------ - -def get_base_dir(): - return BASE_DIR - - -def get_template_dir(): - return TEMPLATE_DIR - - -def get_result_dir(): - return RESULT_DIR - - -def get_dpdk_pktgen_vars(): - if not (PKTGEN == 'dpdk_pktgen'): - return dict() - ret_val = dict() - ret_val[cf.CFSP_DPDK_PKTGEN_DIRECTORY] = PKTGEN_DIR - ret_val[cf.CFSP_DPDK_DPDK_DIRECTORY] = PKTGEN_DPDK_DIRECTORY - ret_val[cf.CFSP_DPDK_PROGRAM_NAME] = PKTGEN_PROGRAM - ret_val[cf.CFSP_DPDK_COREMASK] = PKTGEN_COREMASK - ret_val[cf.CFSP_DPDK_MEMORY_CHANNEL] = PKTGEN_MEMCHANNEL - ret_val[cf.CFSP_DPDK_BUS_SLOT_NIC_1] = PKTGEN_BUS_SLOT_NIC_1 - ret_val[cf.CFSP_DPDK_BUS_SLOT_NIC_2] = PKTGEN_BUS_SLOT_NIC_2 - ret_val[cf.CFSP_DPDK_NAME_IF_1] = PKTGEN_NAME_NIC_1 - ret_val[cf.CFSP_DPDK_NAME_IF_2] = PKTGEN_NAME_NIC_2 - return ret_val - - -# ------------------------------------------------------ -# Configuration Variables from Config File -# ------------------------------------------------------ -def get_deployment_configuration_variables_from_conf_file(): - variables = dict() - types = dict() - all_variables = CONF_FILE.get_variable_list(cf.CFS_EXPERIMENT_VNF) - for var in all_variables: - v = CONF_FILE.get_variable(cf.CFS_EXPERIMENT_VNF, var) - type = re.findall(r'@\w*', v) - values = re.findall(r'\"(.+?)\"', v) - variables[var] = values - try: - types[var] = type[0][1:] - except IndexError: - LOG.debug("No type has been specified for variable " + var) - return variables - - -# ------------------------------------------------------ -# benchmarks from Config File -# ------------------------------------------------------ -def get_benchmarks_from_conf_file(): - requested_benchmarks = list() - benchmarks = \ - CONF_FILE.get_variable(cf.CFS_GENERAL, cf.CFSG_BENCHMARKS).split(', ') - for benchmark in benchmarks: - requested_benchmarks.append(benchmark) - return requested_benchmarks - - -class InputValidation(object): - - @staticmethod - def validate_string(param, message): - if not isinstance(param, str): - raise ValueError(message) - return True - - @staticmethod - def validate_integer(param, message): - if not isinstance(param, int): - raise ValueError(message) - return True - - @staticmethod - def validate_dictionary(param, message): - if not isinstance(param, dict): - raise ValueError(message) - return True - - @staticmethod - def validate_file_exist(file_name, message): - if not os.path.isfile(file_name): - raise ValueError(message + ' ' + file_name) - return True - - @staticmethod - def validate_directory_exist_and_format(directory, message): - if not os.path.isdir(directory): - raise ValueError(message) - if not directory.endswith('/'): - return directory + '/' - return directory - - @staticmethod - def validate_configuration_file_parameter(section, parameter, message): - params = CONF_FILE.get_variable_list(section) - if parameter not in params: - raise ValueError(message) - return True - - @staticmethod - def validate_configuration_file_section(section, message): - if section not in cf.get_sections(): - raise ValueError(message) - return True - - @staticmethod - def validate_boolean(boolean, message): - if isinstance(boolean, bool): - return boolean - if isinstance(boolean, str): - if boolean == 'True': - return True - if boolean == 'False': - return False - raise ValueError(message) - - @staticmethod - def validate_os_credentials(credentials): - if not isinstance(credentials, dict): - raise ValueError( - 'The provided openstack_credentials ' - 'variable must be in dictionary format') - - credential_keys = ['ip_controller', 'heat_url', 'user', 'password', - 'auth_uri', 'project'] - missing = [ - credential_key - for credential_key in credential_keys - if credential_key not in list(credentials.keys()) - ] - if len(missing) == 0: - return True - msg = 'OpenStack Credentials Error! ' \ - 'The following parameters are missing: {}'.\ - format(", ".join(missing)) - raise ValueError(msg) diff --git a/yardstick/vTC/apexlake/experimental_framework/constants/__init__.py b/yardstick/vTC/apexlake/experimental_framework/constants/__init__.py deleted file mode 100644 index 8178e022d..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/constants/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -Constants -""" diff --git a/yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py b/yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py deleted file mode 100644 index ce46d800a..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - - -# ------------------------------------------------------ -# Configuration File Sections -# ------------------------------------------------------ -CFS_PKTGEN = 'PacketGen' -CFS_GENERAL = 'General' -CFS_OPENSTACK = 'OpenStack' -CFS_EXPERIMENT_VNF = 'Experiment-VNF' -CFS_EXPERIMENT_GENERIC = 'Experiment-generic' -CFS_TESTCASE_PARAMETERS = 'Testcase-parameters' -CFS_DEPLOYMENT_PARAMETERS = 'Deployment-parameters' -CFS_INFLUXDB = 'InfluxDB' - - -def get_sections(): - return [ - CFS_PKTGEN, - CFS_GENERAL, - CFS_OPENSTACK, - CFS_EXPERIMENT_VNF, - # CFS_EXPERIMENT_GENERIC, - CFS_TESTCASE_PARAMETERS, - CFS_DEPLOYMENT_PARAMETERS, - CFS_INFLUXDB - # Add here eventually new sections in configuration file ... - ] - - -def get_sections_api(): - return [ - CFS_PKTGEN, - CFS_GENERAL, - CFS_INFLUXDB, - CFS_OPENSTACK - # Add here eventually new sections in configuration file ... - ] - -# ------------------------------------------------------ -# General section parameters -# ------------------------------------------------------ -CFSG_ITERATIONS = 'iterations' -CFSG_TEMPLATE_DIR = 'template_dir' -CFSG_TEMPLATE_NAME = 'template_base_name' -CFSG_RESULT_DIRECTORY = 'results_directory' -CFSG_BENCHMARKS = 'benchmarks' -CFSG_DEBUG = 'debug' - - -# ------------------------------------------------------ -# InfluxDB -# ------------------------------------------------------ -CFSI_IDB_IP = 'influxdb_ip_address' -CFSI_IDB_PORT = 'influxdb_port' -CFSI_IDB_DB_NAME = 'influxdb_db_name' - - -# ------------------------------------------------------ -# Packet generator section parameters -# ------------------------------------------------------ -CFSP_PACKET_GENERATOR = 'packet_generator' -CFSP_DPDK_PKTGEN_DIRECTORY = 'pktgen_directory' -CFSP_DPDK_DPDK_DIRECTORY = 'dpdk_directory' -CFSP_DPDK_PROGRAM_NAME = 'program_name' -CFSP_DPDK_COREMASK = 'coremask' -CFSP_DPDK_MEMORY_CHANNEL = 'memory_channels' -CFSP_DPDK_BUS_SLOT_NIC_1 = 'bus_slot_nic_1' -CFSP_DPDK_BUS_SLOT_NIC_2 = 'bus_slot_nic_2' -CFSP_DPDK_NAME_IF_1 = 'name_if_1' -CFSP_DPDK_NAME_IF_2 = 'name_if_2' - - -# ------------------------------------------------------ -# Supported Packet generators -# ------------------------------------------------------ -CFSP_PG_NONE = 'none' -CFSP_PG_DPDK = 'dpdk_pktgen' - - -# ------------------------------------------------------ -# OpenStack section variables -# ------------------------------------------------------ -CFSO_IP_CONTROLLER = 'ip_controller' -CFSO_HEAT_URL = 'heat_url' -CFSO_USER = 'user' -CFSO_PASSWORD = 'password' -CFSO_AUTH_URI = 'auth_uri' -CFSO_PROJECT = 'project' -CFSO_RELEASE = 'release' diff --git a/yardstick/vTC/apexlake/experimental_framework/constants/framework_parameters.py b/yardstick/vTC/apexlake/experimental_framework/constants/framework_parameters.py deleted file mode 100644 index 6e651bf19..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/constants/framework_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 experimental_framework.constants import conf_file_sections as cfs - -# ------------------------------------------------------ -# Directories and file locations -# ------------------------------------------------------ -EXPERIMENTAL_FRAMEWORK_DIR = 'experimental_framework/' -EXPERIMENT_TEMPLATE_NAME = 'experiment' -TEMPLATE_FILE_EXTENSION = '.yaml' -DPDK_PKTGEN_DIR = 'packet_generators/dpdk_pktgen/' -PCAP_DIR = 'packet_generators/pcap_files/' - - -def get_supported_packet_generators(): - return [ - cfs.CFSP_PG_NONE, - cfs.CFSP_PG_DPDK - # Add here any other supported packet generator - ] diff --git a/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py b/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py deleted file mode 100644 index 0bb507c51..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 os -import time - -from experimental_framework import heat_manager -from experimental_framework import common - -MAX_RETRY = 3 - - -class DeploymentUnit: - """ - This unit is in charge to manage the deployment of the workloads under - test and any other workloads necessary to - the benchmark - """ - - def __init__(self, openstack_credentials): - self.heat_manager = heat_manager.HeatManager(openstack_credentials) - self.deployed_stacks = list() - - def destroy_heat_template(self, stack_name): - """ - Destroys a stack - :param stack_name: Stack of the name to be destroyed (sting) - :return: None - """ - try: - if self.heat_manager.check_stack_status(stack_name): - if stack_name in self.deployed_stacks: - self.deployed_stacks.remove(stack_name) - self.heat_manager.delete_stack(stack_name) - - status = self.heat_manager.check_stack_status(stack_name) - while status and 'DELETE_IN_PROGRESS' in status: - common.LOG.info(status) - time.sleep(5) - status = self.heat_manager.check_stack_status(stack_name) - return True - except Exception: - common.LOG.debug("check_stack_status", exc_info=True) - return False - - def destroy_all_deployed_stacks(self): - """ - Destroys all the stacks currently deployed - :return: None - """ - for stack in self.deployed_stacks: - if self.heat_manager.is_stack_deployed(stack): - self.destroy_heat_template(stack) - - def deploy_heat_template(self, template_file, stack_name, parameters, - attempt=0): - """ - Deploys a heat template and in case of failure retries 3 times - :param template_file: full path file name of the heat template - :param stack_name: name of the stack to deploy - :param parameters: parameters to be given to the heat template - :param attempt: number of current attempt - :return: returns True in case the creation is completed - returns False in case the creation is failed - """ - if not os.path.isfile(template_file): - raise ValueError('The specified file does not exist ("' + - template_file + '")') - try: - self.heat_manager.create_stack(template_file, stack_name, - parameters) - deployed = True - except Exception: - common.LOG.debug("create_stack", exc_info=True) - deployed = False - - if not deployed and 'COMPLETE' in \ - self.heat_manager.check_stack_status(stack_name): - try: - self.destroy_heat_template(stack_name) - except Exception: - common.LOG.debug("destroy_heat_template", exc_info=True) - - status = self.heat_manager.check_stack_status(stack_name) - while status and 'CREATE_IN_PROGRESS' in status: - time.sleep(5) - status = self.heat_manager.check_stack_status(stack_name) - if status and ('FAILED' in status or 'NOT_FOUND' in status): - if attempt < MAX_RETRY: - attempt += 1 - try: - self.destroy_heat_template(stack_name) - except Exception: - common.LOG.debug("destroy_heat_template", exc_info=True) - return self.deploy_heat_template(template_file, stack_name, - parameters, attempt) - else: - try: - self.destroy_heat_template(stack_name) - except Exception: - common.LOG.debug("destroy_heat_template", exc_info=True) - finally: - return False - if self.heat_manager.check_stack_status(stack_name) and \ - 'COMPLETE' in self.heat_manager.\ - check_stack_status(stack_name): - self.deployed_stacks.append(stack_name) - return True diff --git a/yardstick/vTC/apexlake/experimental_framework/heat_manager.py b/yardstick/vTC/apexlake/experimental_framework/heat_manager.py deleted file mode 100644 index a3233349d..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/heat_manager.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 keystoneclient.v2_0 import client as keystoneClient -from heatclient import client as heatClient -from heatclient.common import template_utils - -import experimental_framework.common as common - -__author__ = 'vmriccox' - - -class HeatManager: - - def __init__(self, credentials): - self.ip_controller = credentials['ip_controller'] - self.heat_url = credentials['heat_url'] - self.user = credentials['user'] - self.password = credentials['password'] - self.auth_uri = credentials['auth_uri'] - self.project_id = credentials['project'] - self.heat = None - - def init_heat(self): - keystone = keystoneClient.Client(username=self.user, - password=self.password, - tenant_name=self.project_id, - auth_url=self.auth_uri) - auth_token = keystone.auth_token - self.heat_url = keystone.service_catalog.url_for( - service_type='orchestration') - self.heat = heatClient.Client('1', endpoint=self.heat_url, - token=auth_token) - - def print_stacks(self, name=None): - for stack in self.heat.stacks.list(): - if (name and stack.stack_name == name) or not name: - common.LOG.info("Stack Name: " + stack.stack_name) - common.LOG.info("Stack Status: " + stack.stack_status) - - def create_stack(self, template_file, stack_name, parameters): - self.init_heat() - # self.print_stacks() - tpl_files, template = \ - template_utils.get_template_contents(template_file) - - fields = { - 'template': template, - 'files': dict(list(tpl_files.items())) - } - self.heat.stacks.create(stack_name=stack_name, files=fields['files'], - template=template, parameters=parameters) - self.print_stacks(stack_name) - - def is_stack_deployed(self, stack_name): - self.init_heat() - if stack_name in self.heat.stacks.list(): - return True - return False - - def check_stack_status(self, stack_name): - """ - Returns a string representing the status of a stack from Heat - perspective - :param stack_name: Name of the stack to be checked (type: str) - :return: (type: str) - """ - if self.heat: - for stack in self.heat.stacks.list(): - if stack.stack_name == stack_name: - return stack.stack_status - return 'NOT_FOUND' - - def validate_heat_template(self, heat_template_file): - self.init_heat() - if not self.heat.stacks.validate(template=open(heat_template_file, - 'r').read()): - raise ValueError('The provided heat template "' + - heat_template_file + - '" is not in the correct format') - - def delete_stack(self, stack_name): - self.init_heat() - try: - for stack in self.heat.stacks.list(): - if stack.stack_name == stack_name: - self.heat.stacks.delete(stack.id) - return True - except Exception: - common.LOG.debug("destroy_heat_template", exc_info=True) - return False diff --git a/yardstick/vTC/apexlake/experimental_framework/heat_template_generation.py b/yardstick/vTC/apexlake/experimental_framework/heat_template_generation.py deleted file mode 100644 index bbf55853d..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/heat_template_generation.py +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - - -""" -Generation of the heat templates from the base template -""" - -from __future__ import absolute_import -import os -import shutil - -from oslo_serialization import jsonutils - -from experimental_framework import common -from experimental_framework.constants import framework_parameters as fp - - -class TreeNode: - """ - This class represent the node of the configuration tree.\ - Each node represents a single configuration value for a single - configuration parameter. - """ - - def __init__(self): - self.up = None - self.down = [] - self.variable_name = '' - self.variable_value = 0 - - def add_child(self, node): - """ - Adds a node as a child for the current node - :param node: node to be added as a child (type: TreeNode) - :return: None - """ - node.up = self - self.down.append(node) - - def get_parent(self): - """ - Returns the parent node of the current one - :return type: TreeNode - """ - return self.up - - def get_children(self): - """ - Returns the children of the current node - :return type: list of TreeNode - """ - if len(self.down) == 0: - # return [self] - return [] - return self.down - - def get_variable_name(self): - """ - Returns the name of the variable correspondent to the current node - :return type: str - """ - return self.variable_name - - def get_variable_value(self): - """ - Returns the value of the variable correspondent to the current node - :return type: str or int - """ - return self.variable_value - - def set_variable_name(self, name): - """ - Sets the name of the variable for the current node - :param name: Name of the variable (type: str) - :return None - """ - self.variable_name = name - - def set_variable_value(self, value): - """ - Sets the value of the variable for the current node - :param value: value of the variable (type: str) - :return None - """ - self.variable_value = value - - def get_path(self): - """ - Returns all the path from the current node to the root of the tree. - :return type: list of TreeNode - """ - ret_val = [] - if not self.up: - ret_val.append(self) - return ret_val - for node in self.up.get_path(): - ret_val.append(node) - ret_val.append(self) - return ret_val - - def __str__(self): - return str(self.variable_name) + " --> " + str(self.variable_value) - - def __repr__(self): - return str(self.variable_name) + " = " + str(self.variable_value) - - @staticmethod - def _get_leaves(node, leaves): - """ - Returns all the leaves of a tree. - It changes the "leaves" list. - :param node: root of the tree (type: TreeNode) - :param leaves: partial list of leaves (type: list of TreeNode) - :return type: None - """ - children = node.get_children() - if len(children) == 0: - leaves.append(node) - return - for child in children: - TreeNode._get_leaves(child, leaves) - - @staticmethod - def get_leaves(node): - """ - Returns all the leaves of a tree. - :param node: root of the tree (TreeNode) - :return type: list - """ - leaves = list() - TreeNode._get_leaves(node, leaves) - return leaves - - -template_name = fp.EXPERIMENT_TEMPLATE_NAME - - -def generates_templates(base_heat_template, deployment_configuration): - """ - Generates the heat templates for the experiments - :return: None - """ - # Load useful parameters from file - template_dir = common.get_template_dir() - template_file_extension = fp.TEMPLATE_FILE_EXTENSION - template_base_name = base_heat_template - - variables = deployment_configuration - - # Delete the templates eventually generated in previous running of the - # framework - common.LOG.info("Removing the heat templates previously generated") - command = "rm {}{}_*".format(template_dir, template_name) - os.system(command) - - # Creation of the tree with all the new configurations - common.LOG.info("Creation of the tree with all the new configurations") - tree = TreeNode() - for variable in variables: - leaves = TreeNode.get_leaves(tree) - common.LOG.debug("LEAVES: " + str(leaves)) - common.LOG.debug("VALUES: " + str(variables[variable])) - - for value in variables[variable]: - for leaf in leaves: - new_node = TreeNode() - new_node.set_variable_name(variable) - new_node.set_variable_value(value) - leaf.add_child(new_node) - - common.LOG.debug("CONFIGURATION TREE: " + str(tree)) - - common.LOG.info("Heat Template and metadata file creation") - leaves = TreeNode.get_leaves(tree) - counter = 1 - for leaf in leaves: - heat_template_vars = leaf.get_path() - if os.path.isabs(template_base_name): - base_template = template_base_name - else: - base_template = template_dir + template_base_name - new_template = template_dir + template_name - new_template += "_" + str(counter) + template_file_extension - shutil.copy(base_template, new_template) - - metadata = {} - for var in heat_template_vars: - if var.get_variable_name(): - common.replace_in_file(new_template, "#" + - var.get_variable_name(), - var.get_variable_value()) - metadata[var.get_variable_name()] = var.get_variable_value() - - # Save the metadata on a JSON file - with open(new_template + ".json", 'w') as outfile: - # sort keys to maintain persistent order for git - jsonutils.dump(metadata, outfile, sort_keys=True) - - common.LOG.debug("Heat Templates and Metadata file " + str(counter) + - " created") - counter += 1 - - # Creation of the template files - common.LOG.info(str(counter - 1) + " Heat Templates and Metadata files " - "created") - - -def get_all_heat_templates(template_dir, template_file_extension): - """ - Loads and returns all the generated heat templates - :param template_dir: directory to search in (type: str) - :param template_file_extension: extension of the file for templates - (type: str) - :return: type: list - """ - template_files = [] - for dirname, dirnames, filenames in os.walk(template_dir): - for filename in filenames: - if template_file_extension in filename and \ - filename.endswith(template_file_extension) and \ - template_name in filename: - template_files.append(filename) - template_files.sort() - return template_files diff --git a/yardstick/vTC/apexlake/experimental_framework/libraries/__init__.py b/yardstick/vTC/apexlake/experimental_framework/libraries/__init__.py deleted file mode 100644 index 876e3ca31..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/libraries/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -Libraries to be used by the framework. -""" - -__author__ = 'vmriccox' diff --git a/yardstick/vTC/apexlake/experimental_framework/libraries/packet_checker/Makefile b/yardstick/vTC/apexlake/experimental_framework/libraries/packet_checker/Makefile deleted file mode 100644 index 95a2b23b5..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/libraries/packet_checker/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - - -CC=gcc -LDFLAGS= -lpcap -testsniffmake: test_sniff.c - $(CC) $(CFLAGS) -o test_sniff test_sniff.c $(LDFLAGS) diff --git a/yardstick/vTC/apexlake/experimental_framework/libraries/packet_checker/test_sniff.c b/yardstick/vTC/apexlake/experimental_framework/libraries/packet_checker/test_sniff.c deleted file mode 100644 index a4eda3cff..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/libraries/packet_checker/test_sniff.c +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2015 Intel Research and Development Ireland Ltd. -// -// 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. - -#include <pcap.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netinet/if_ether.h> - -static int expected_tos = -1; -static int cmatch = 0; - - -/* 4 bytes IP address */ -typedef struct ip_address -{ - u_char byte1; - u_char byte2; - u_char byte3; - u_char byte4; -} ip_address; - - -/* IPv4 header */ -typedef struct ip_header -{ - u_char ver_ihl; - u_char tos; - u_short tlen; - u_short identification; - u_short flags_fo; - u_char ttl; - u_char proto; - u_short crc; - ip_address saddr; - ip_address daddr; - u_int op_pad; -} ip_header; - - -/* UDP header*/ -typedef struct udp_header -{ - u_short sport; // Source port - u_short dport; // Destination port - u_short len; // Datagram length - u_short crc; // Checksum -} udp_header; - - -/* Save results on file */ -void save_and_exit(int sig) -{ - write_file(); - exit(0); -} - - -/* - * This callback function is called for each received packet - */ -void stats_collection(u_char *useless, - const struct pcap_pkthdr* pkthdr, - const u_char* packet) -{ - ip_header *ih; - udp_header *uh; - u_int ip_len; - ih = (ip_header *) (packet + 14); - ip_len = (ih->ver_ihl & 0xf) * 4; - u_char tos = ih->tos; - // Counter update - if(tos==expected_tos) - cmatch ++; -} - - -int main(int argc,char **argv) -{ - int i; - char *dev; - char errbuf[PCAP_ERRBUF_SIZE]; - pcap_t* descr; - const u_char *packet; - struct pcap_pkthdr hdr; - struct ether_header *eptr; - - if(argc != 3) - { - fprintf(stdout,"Usage: %s interface_name expected_tos\n", argv[0]); - exit(1); - } - - expected_tos = atoi(argv[2]); - - /* Setup signal to stop the sniffer */ - signal(SIGTERM, save_and_exit); - - /* Take a device to read from */ - dev = argv[1]; - if(dev == NULL) - { - printf("%s\n",errbuf); - exit(1); - } - - /* Open device for reading */ - descr = pcap_open_live(dev, BUFSIZ, 0, -1, errbuf); - if(descr == NULL) - { - printf("pcap_open_live(): %s\n", errbuf); - exit(1); - } - - /* Start the loop to be run for each packet */ - pcap_loop(descr, -1, stats_collection, NULL); - return 0; -} - - -int write_file() -{ - FILE *f = fopen("/tmp/apexlake/results/packet_checker.res", "w"); - if (f == NULL) - { - printf("Error opening file!\n"); - exit(1); - } - fprintf(f, "%d\n", cmatch); - fclose(f); -} diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/__init__.py b/yardstick/vTC/apexlake/experimental_framework/packet_generators/__init__.py deleted file mode 100644 index 935f144f4..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -Packet generators -""" - -__author__ = 'vmriccox' diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/base_packet_generator.py b/yardstick/vTC/apexlake/experimental_framework/packet_generators/base_packet_generator.py deleted file mode 100644 index 57f586463..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/base_packet_generator.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 abc - - -class BasePacketGenerator: - - def __init__(self): - pass - - @abc.abstractmethod - def send_traffic(self): - """ - Starts the traffic generation. - According to the specific packet generator it requires prior - initialization - :return: None - """ - raise NotImplementedError("Subclass must implement abstract method") diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_packet_generator.py b/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_packet_generator.py deleted file mode 100644 index bd81527a2..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_packet_generator.py +++ /dev/null @@ -1,351 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 os -import time - - -import experimental_framework.common as common -from experimental_framework.constants import conf_file_sections as conf_file -from experimental_framework.constants import framework_parameters as fp -from experimental_framework.packet_generators import base_packet_generator - - -class DpdkPacketGenerator(base_packet_generator.BasePacketGenerator): - - def __init__(self): - base_packet_generator.BasePacketGenerator.__init__(self) - self.command = '' - self.directory = '' - self.program_name = '' - self.command_options = list() - self.dpdk_interfaces = -1 - - def send_traffic(self): - """ - Calls the packet generator and starts to send traffic - Blocking call - """ - current_dir = os.path.dirname(os.path.realpath(__file__)) - DpdkPacketGenerator._chdir(self.directory) - dpdk_vars = common.get_dpdk_pktgen_vars() - self._init_physical_nics(self.dpdk_interfaces, dpdk_vars) - common.run_command(self.command) - self._finalize_physical_nics(self.dpdk_interfaces, dpdk_vars) - DpdkPacketGenerator._chdir(current_dir) - - def init_dpdk_pktgen(self, - dpdk_interfaces, - lua_script='generic_test.lua', - pcap_file_0='', - pcap_file_1='', - vlan_0='', - vlan_1=''): - """ - Initializes internal parameters and configuration of the module. - Needs to be called before the send_traffic - :param dpdk_interfaces: Number of interfaces to be used (type: int) - :param lua_script: Full path of the Lua script to be used (type: str) - :param pcap_file_0: Full path of the Pcap file to be used for port 0 - (type: str) - :param pcap_file_1: Full path of the Pcap file to be used for port 1 - (type: str) - :param vlan_0: VLAN tag to be used for port 0 (type: str) - :param vlan_1: VLAN tag to be used for port 1 (type: str) - :return: - """ - # Input Validation - if pcap_file_0 and not vlan_0: - message = 'In order to use NIC_0, the parameter vlan_0 is required' - raise ValueError(message) - if dpdk_interfaces > 1 and pcap_file_1 and not vlan_1: - message = 'in order to use NIC_1, the parameter vlan_1 is required' - raise ValueError(message) - - self.dpdk_interfaces = dpdk_interfaces - vars = common.get_dpdk_pktgen_vars() - - lua_directory = common.get_base_dir() - lua_directory += fp.EXPERIMENTAL_FRAMEWORK_DIR - lua_directory += fp.DPDK_PKTGEN_DIR - - pcap_directory = common.get_base_dir() - pcap_directory += fp.EXPERIMENTAL_FRAMEWORK_DIR - pcap_directory += fp.PCAP_DIR - - DpdkPacketGenerator._init_input_validation(pcap_file_0, - pcap_file_1, - lua_script, - pcap_directory, - lua_directory, - vars) - - self.directory = vars[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] - self.program_name = vars[conf_file.CFSP_DPDK_PROGRAM_NAME] - - core_nics = DpdkPacketGenerator.\ - _get_core_nics(dpdk_interfaces, vars[conf_file.CFSP_DPDK_COREMASK]) - self.command_options = ['-c ' + vars[conf_file.CFSP_DPDK_COREMASK], - '-n ' + vars[conf_file. - CFSP_DPDK_MEMORY_CHANNEL], - '--proc-type auto', - '--file-prefix pg', - '-- -T', - '-P', - '-m "' + core_nics + '"', - '-f ' + lua_directory + lua_script, - '-s 0:' + pcap_directory + pcap_file_0] - - if pcap_file_1: - self.command_options.append('-s 1:' + pcap_directory + pcap_file_1) - - # Avoid to show the output of the packet generator - self.command_options.append('> /dev/null') - # Prepare the command to be invoked - self.command = 'sudo ' + self.directory + self.program_name - for opt in self.command_options: - self.command += (' ' + opt) - if pcap_file_0 and vlan_0: - DpdkPacketGenerator._change_vlan(pcap_directory, pcap_file_0, - vlan_0) - if pcap_file_1 and vlan_1: - DpdkPacketGenerator._change_vlan(pcap_directory, pcap_file_1, - vlan_1) - - @staticmethod - def _get_core_nics(dpdk_interfaces, coremask): - """ - Retruns the core_nics string to be used in the dpdk pktgen command - :param dpdk_interfaces: number of interfaces to be used in the pktgen - (type: int) - :param coremask: hexadecimal value representing the cores assigned to - the pktgen (type: str) - :return: Returns the core nics param for pktgen (type: str) - """ - if dpdk_interfaces == 1: - return DpdkPacketGenerator._cores_configuration(coremask, 1, 2, 0) - elif dpdk_interfaces == 2: - return DpdkPacketGenerator._cores_configuration(coremask, 1, 2, 2) - raise ValueError("This framework only supports two ports to generate " - "traffic") - - @staticmethod - def _change_vlan(pcap_directory, pcap_file, vlan): - common.LOG.info("Changing VLAN Tag on Packet: " + pcap_file + - ". New VLAN Tag is " + vlan) - command = "chmod +x {}{}".format(pcap_directory, 'vlan_tag.sh') - common.run_command(command) - command = pcap_directory + 'vlan_tag.sh ' - command += pcap_directory + pcap_file + ' ' + vlan - common.run_command(command) - - @staticmethod - def _init_input_validation(pcap_file_0, pcap_file_1, lua_script, - pcap_directory, lua_directory, variables): - """ - Validates the input parameters values and raises an exception if - there is any non valid param - :param pcap_file_0: file name of the pcap file for NIC 0 - (it does not includes the path) (type: str) - :param pcap_file_1: file name of the pcap file for NIC 1 - (it does not includes the path) (type: str) - :param lua_script: file name of the lua script to be used - (it does not includes the path) (type: str) - :param pcap_directory: directory where the pcap files are located - (type: str) - :param lua_directory: directory where the lua scripts are located - (type: str) - :param variables: variables for the packet gen from configuration file - (type: dict) - :return: None - """ - if not pcap_directory: - raise ValueError("pcap_directory not provided correctly") - if not pcap_file_0: - raise ValueError("pcap_file_0 not provided correctly") - if not pcap_file_1: - raise ValueError("pcap_file_1 not provided correctly") - if not lua_script: - raise ValueError("lua_script not provided correctly") - if not os.path.isfile(pcap_directory + pcap_file_0): - raise ValueError("The file " + pcap_file_0 + " does not exist") - if not os.path.isfile(pcap_directory + pcap_file_1): - raise ValueError("The file " + pcap_file_1 + " does not exist") - if not os.path.isfile(lua_directory + lua_script): - raise ValueError("The file " + lua_script + " does not exist") - for var in [conf_file.CFSP_DPDK_PKTGEN_DIRECTORY, - conf_file.CFSP_DPDK_PROGRAM_NAME, - conf_file.CFSP_DPDK_COREMASK, - conf_file.CFSP_DPDK_MEMORY_CHANNEL]: - if variables.get(var, '') == '': - raise ValueError("The variable " + var + " does not exist") - - @staticmethod - def _chdir(directory): - """ - Changes the current directory - :param directory: directory where to move (type: str) - :return: None - """ - os.chdir(directory) - - def _init_physical_nics(self, dpdk_interfaces, dpdk_vars): - """ - Initializes the physical interfaces - :param dpdk_interfaces: Number of interfaces to be used (type: int) - :param dpdk_vars: variables from config file related to DPDK pktgen - (type: dict) - :return: None - """ - if not dpdk_interfaces == 1 and not dpdk_interfaces == 2: - raise ValueError('The number of NICs can be 1 or 2') - # Initialize NIC 1 - # bus_address_1 = dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1] - interface_1 = dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_1] - common.run_command('sudo ifconfig ' + interface_1 + ' down') - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --unbind ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1]) - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --bind=igb_uio ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1]) - if dpdk_interfaces == 2: - # Initialize NIC 2 - # bus_address_2 = dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2] - interface_2 = dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_2] - common.run_command('sudo ifconfig ' + interface_2 + ' down') - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --unbind ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2]) - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --bind=igb_uio ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2]) - - def _finalize_physical_nics(self, dpdk_interfaces, dpdk_vars): - """ - Finalizes the physical interfaces - :param dpdk_interfaces: Number of interfaces to be used (type: int) - :param dpdk_vars: variables from config file related to DPDK pktgen - (type: dict) - :return: None - """ - if not dpdk_interfaces == 1 and not dpdk_interfaces == 2: - raise ValueError('No interfaces have been indicated for packet ' - 'generation usage. Please specify one or two ' - 'NICs') - # Initialize NIC 1 - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --unbind ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1]) - time.sleep(5) - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --bind=ixgbe ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1]) - common.run_command('sudo ifconfig ' + - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_1] + - ' up') - if dpdk_interfaces == 2: - # Initialize NIC 2 - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --unbind ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2]) - time.sleep(5) - common.run_command('sudo ' + - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] + - 'tools/dpdk_nic_bind.py --bind=ixgbe ' + - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2]) - common.run_command('sudo ifconfig ' + - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_2] + - ' up') - - @staticmethod - def _cores_configuration(coremask, pktgen_cores=1, nic_1_cores=2, - nic_2_cores=2): - """ - Calculation of the core_nics parameter which is necessary for the - packet generator to run - - :param coremask: Hexadecimal value indicating the cores to be assigned - to the whole dpdk pktgen software (included the - ones to receive and send packets from NICs) - (type: str) - :param pktgen_cores: number of cores to be assigned to main thread of - the pktgen directly - :param nic_1_cores: number of cores to be assigned to the first NIC - :param nic_2_nics: number of cores to be assigned to the second NIC - :return: returns the core_nics parameter (type: str) - """ - required_cores = pktgen_cores + nic_1_cores + nic_2_cores - bin_coremask = bin(int(coremask, 16))[2:] - index = len(bin_coremask) - cores = [] - while index >= 0: - index -= 1 - if bin_coremask[index] == '1': - core = index - cores.append(core) - if len(cores) < required_cores: - raise ValueError('The provided coremask does not provide' - ' enough cores for the DPDK packet generator') - # ret_pktgen_cores = [] - ret_nic_1_cores = [] - ret_nic_2_cores = [] - current_core = 0 - - if nic_2_cores > 0: - ret_nic_2_cores.append(cores[current_core]) - current_core += 1 - if nic_2_cores > 1: - ret_nic_2_cores.append(cores[current_core]) - current_core += 1 - - if nic_1_cores > 0: - ret_nic_1_cores.append(cores[current_core]) - current_core += 1 - if nic_1_cores > 1: - ret_nic_1_cores.append(cores[current_core]) - current_core += 1 - - # for n in range(0, pktgen_cores): - # ret_pktgen_cores.append(cores[n]) - # for n in range(0, nic_1_cores): - # ret_nic_1_cores.append(cores[pktgen_cores + n]) - # for n in range(0, nic_2_cores): - # ret_nic_2_cores.append(cores[pktgen_cores + nic_1_cores + n]) - - corenics = '' - if nic_1_cores > 0: - if nic_1_cores < 2: - corenics += str(ret_nic_1_cores[0]) + '.0' - if nic_1_cores == 2: - corenics += '[' + str(ret_nic_1_cores[0]) - corenics += ':' + str(ret_nic_1_cores[1]) - corenics += '].0' - if nic_2_cores > 0: - corenics += ',' - if nic_2_cores < 2: - corenics += str(ret_nic_2_cores[0]) + '.1' - if nic_2_cores == 2: - corenics += '[' + str(ret_nic_2_cores[0]) - corenics += ':' + str(ret_nic_2_cores[1]) - corenics += '].1' - return corenics diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/constant_traffic.lua b/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/constant_traffic.lua deleted file mode 100644 index 3348b286b..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/constant_traffic.lua +++ /dev/null @@ -1,74 +0,0 @@ ------------------------------------------------------------------------------ --- Copyright (c) 2015 Intel Research and Development Ireland Ltd. --- --- 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. ------------------------------------------------------------------------------ - ------------------------------------ ------ Constant traffic sender ----- ------------------------------------ - -package.path = package.path ..";?.lua;test/?.lua;app/?.lua;../?.lua" -require "Pktgen"; - ------ Packet Gen Configuration -local sendport = "0"; -pktgen.vlan(sendport, "on"); -pktgen.ping4("all"); -pktgen.icmp_echo("all", "on"); -pktgen.process("all", "on"); - - ------ Script Configuration -local traffic_delay = 0; -local traffic_rate = 0; -local out_file = ""; - - -function start_traffic(rate) - local endStats, diff, prev, iteration, flag, found; - flag = false; - found = false; - - -- Send traffic at the specified rate - print("Start Generation"); - pktgen.set(sendport, "rate", rate); - sleep(1); - pktgen.start(sendport); - sleep(traffic_delay); - pktgen.stop(sendport); - print("Stop Generation"); - - -- Collect statistics about the experiment - endStats = pktgen.portStats("all", "port"); - sent_packets = endStats[0].opackets - return sent_packets; -end - - -pktgen.clr(); -print("INSTANTIATION VALIDATION TEST") - --- Write output on log file -file = io.open(out_file, "w"); - --- Start experiment -packets = start_traffic(traffic_rate); -print("SENT PACKETS: " .. packets); -file:write(packets); - --- Close the log file -file:close(); - --- Quit the environment -os.exit(1); diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/rfc2544.lua b/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/rfc2544.lua deleted file mode 100644 index d20a29b03..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/rfc2544.lua +++ /dev/null @@ -1,132 +0,0 @@ ------------------------------------------------------------------------------ --- Copyright (c) 2015 Intel Research and Development Ireland Ltd. --- --- 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. ------------------------------------------------------------------------------ - -------------------------------- ------ RFC-2544 throughput ----- -------------------------------- - -package.path = package.path ..";?.lua;test/?.lua;app/?.lua;../?.lua" -require "Pktgen"; - ------ Packet Gen Configuration -local sendport = "0"; -local recvport = "1"; -pktgen.set(recvport, "rate", 1); -pktgen.vlan(sendport, "on"); -pktgen.ping4("all"); -pktgen.icmp_echo("all", "on"); -pktgen.process("all", "on"); - - ------ RFC2544 Configuration -local traffic_delay = 60; -- Time in seconds to delay. -local multicast_delay = 15; -- Time in seconds to delay. -local starting_rate = 100; -- Initial Rate in % -local step = 100; -- Initial Step in % -local down_limit = 0; -local up_limit = 100; - - --- Creation of a module ---local rfc2544 = {} -function start_traffic(rate) - local endStats, diff, prev, iteration, flag, found; - flag = false; - found = false; - - print("PACKET GENERATION - " .. rate .. "%\n"); - - -- Send packet to join the multicast group - print("Join Multicast Group"); - pktgen.start(recvport); - sleep(multicast_delay); - pktgen.stop(recvport); - pktgen.clr(); - - - -- Send traffic at the specified rate - print("Start Generation"); - pktgen.set(sendport, "rate", rate); - sleep(1); - pktgen.start(sendport); - sleep(traffic_delay); - pktgen.stop(sendport); - print("Stop Generation"); - sleep(5); - - -- Collect statistics about the experiment - endStats = pktgen.portStats("all", "port"); - diff = endStats[0].opackets - endStats[1].ipackets; - if ( endStats[0].opackets <= 0) then - diff = 0; - else - diff = diff / endStats[0].opackets; - end - pktgen.clr(); - - print("Missing packets: " .. (diff * 100)); - - -- Adjust variable for the next race - prev_rate = rate; - step = step/2; - - if ( diff > 0.01) then - if(endStats[0].opackets > 0) then - up_limit = rate; - rate = math.floor(rate - (step)); - end - else - down_limit = rate; - rate = math.floor(rate + (step)); - print("\nRATE: " .. rate .. " RECEIVED PACKETS: " .. endStats[1].ipackets .. " "); - found = true; - end - - printf("DOWN LIMIT: %d\n", down_limit); - printf("UP LIMIT: %d\n", up_limit); - - if ( rate >= 100 ) then - rate = 100; - end - - if ( prev ~= rate and rate < up_limit and rate >= down_limit and step >= 1 ) then - if (step < 1 and not found ) or (step >= 1 ) then - return start_traffic(rate); - end - end - sleep(3); - return down_limit; -end -local out_file = ""; -local starting_rate = 100; - -pktgen.clr(); -print("RFC 2544 THROUGHPUT CALCULATION"); - --- Write output on log file -file = io.open(out_file, "w"); - --- Start experiment ---rate = rfc2544.start_traffic(starting_rate) -rate = start_traffic(starting_rate); -print("RATE: " .. rate); -file:write(rate); - --- Close the log file -file:close(); - --- Quit the environment -os.exit(1); diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/LICENSE.rst b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/LICENSE.rst deleted file mode 100644 index 9223be6c9..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/LICENSE.rst +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2015 MediaNetLab of National Center of Scientific Research "Demokritos". - -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. - - -This license is related to the following files included in this directory: - -- igmp.pcap -- packet_1024.pcap -- packet_1280.pcap -- packet_128.pcap -- packet_1514.pcap -- packet_1518.pcap -- packet_256.pcap -- packet_512.pcap -- packet_64.pcap diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/igmp.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/igmp.pcap Binary files differdeleted file mode 100644 index 1b8f24b29..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/igmp.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1024.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1024.pcap Binary files differdeleted file mode 100644 index 445f05a26..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1024.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_128.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_128.pcap Binary files differdeleted file mode 100644 index df91f9bb9..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_128.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1280.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1280.pcap Binary files differdeleted file mode 100644 index 58cb704f9..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1280.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1514.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1514.pcap Binary files differdeleted file mode 100644 index be23d4e96..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1514.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1518.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1518.pcap Binary files differdeleted file mode 100644 index a99c4480a..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1518.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_256.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_256.pcap Binary files differdeleted file mode 100644 index 21c34c2c2..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_256.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_512.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_512.pcap Binary files differdeleted file mode 100644 index 8e52ecdd8..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_512.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_64.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_64.pcap Binary files differdeleted file mode 100644 index 9438270bc..000000000 --- a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_64.pcap +++ /dev/null diff --git a/yardstick/vTC/apexlake/heat_templates/stress_workload.yaml b/yardstick/vTC/apexlake/heat_templates/stress_workload.yaml deleted file mode 100644 index 559f46d92..000000000 --- a/yardstick/vTC/apexlake/heat_templates/stress_workload.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright (c) 2016-2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - name: - type: string - default: cpu_stress - cores: - type: string - memory: - type: string - network: - type: string - subnet: - type: string - -resources: - port: - type: OS::Neutron::Port - properties: - network: { get_param: network } - fixed_ips: - - subnet: { get_param: subnet } - - vm1: - type: OS::Nova::Server - properties: - name: traffic_vm1 - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - ifconfig eth1 up - dhclient eth1 - - sed -i 's/localhost/localhost traffic_vm1/g' /etc/hosts - touch /etc/resolvconf/resolv.conf.d/tail - echo 'nameserver 10.118.32.193' > /etc/resolvconf/resolv.conf.d/tail - resolvconf -u - echo 'nameserver 10.118.32.193' > /etc/resolv.conf - - - # Installation of stress - apt-get install -y stress - - cd /home/clouduser - - # workload setup - echo 'stress -c $CORES --vm-bytes $MEMORY' > ./stress.sh - chmod +x ./stress.sh - nohup ./stress.sh & - #nohup stress -c #CORES --vm-bytes #MEMORY - - params: - $NAME: { get_param: name } - $CORES: { get_param: cores } - $MEMORY: { get_param: memory } - - flavor: m1.small - networks: - - port: { get_resource: port } diff --git a/yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml b/yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml deleted file mode 100644 index 07f659063..000000000 --- a/yardstick/vTC/apexlake/heat_templates/stress_workload_liberty.yaml +++ /dev/null @@ -1,79 +0,0 @@ -############################################################################## -# Copyright (c) 2017 user@TRAFCLASS-PACKET1.fuel.local and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - name: - type: string - default: cpu_stress - cores: - type: string - memory: - type: string - network: - type: string - subnet: - type: string - -resources: - port: - type: OS::Neutron::Port - properties: - network: { get_param: network } - port_security_enabled: false - fixed_ips: - - subnet: { get_param: subnet } - - vm1: - type: OS::Nova::Server - properties: - name: traffic_vm1 - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - ifconfig eth1 up - dhclient eth1 - - sed -i 's/localhost/localhost traffic_vm1/g' /etc/hosts - touch /etc/resolvconf/resolv.conf.d/tail - echo 'nameserver 10.118.32.193' > /etc/resolvconf/resolv.conf.d/tail - resolvconf -u - echo 'nameserver 10.118.32.193' > /etc/resolv.conf - - - # Installation of stress - apt-get install -y stress - - cd /home/clouduser - - # workload setup - echo 'stress -c $CORES --vm-bytes $MEMORY' > ./stress.sh - chmod +x ./stress.sh - nohup ./stress.sh & - #nohup stress -c #CORES --vm-bytes #MEMORY - - params: - $NAME: { get_param: name } - $CORES: { get_param: cores } - $MEMORY: { get_param: memory } - - flavor: m1.small - networks: - - port: { get_resource: port } diff --git a/yardstick/vTC/apexlake/heat_templates/vTC.yaml b/yardstick/vTC/apexlake/heat_templates/vTC.yaml deleted file mode 100644 index 86692084d..000000000 --- a/yardstick/vTC/apexlake/heat_templates/vTC.yaml +++ /dev/null @@ -1,192 +0,0 @@ -# Copyright (c) 2016-2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -heat_template_version: 2014-10-16 -description: HOT template to deploy a virtual Traffic Classifier - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 2000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - ### DEFAULT NETWORK FOR MNGM - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: destination_subnet } - - server: - type: OS::Nova::Server - properties: - name: vTC - #key_name: { get_param: key_name } - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - # Creation of a user - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:yardstick | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - # Fix Network Confiuration - sed -i 's/localhost/localhost vtc/g' /etc/hosts - touch /etc/resolvconf/resolv.conf.d/tail - #echo 'nameserver 192.168.10.1' > /etc/resolvconf/resolv.conf.d/tail - #echo 'nameserver 10.20.0.2' > /etc/resolvconf/resolv.conf.d/tail - echo 'nameserver 10.118.32.193' > /etc/resolvconf/resolv.conf.d/tail - resolvconf -u - - - echo 'nameserver 10.118.32.193' > /etc/resolv.conf - - - # Install vTC Dependencies - apt-get update - apt-get install -y git build-essential gcc libnuma-dev bison flex byacc libjson0-dev libcurl4-gnutls-dev jq dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - apt-get install -y byacc libtool libcurl4-openssl-dev - - cd /home/clouduser - - # Setup multicast - echo mgroup from eth1 group 224.192.16.1 > /etc/smcroute.conf - git clone https://github.com/troglobit/smcroute.git - cd smcroute - git reset --hard c3f5c56 - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - rm resp.json - curl -X POST -u "mPkgwvJPsTFS8hYmHk:SDczcrK4cvnkMRWSEchB3ANcWbqFXqPx" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token=38uFQuhEdPvCTbhc7k >> resp.json - access_token=`jq -r '.access_token' resp.json` - git clone https://x-token-auth:${access_token}@bitbucket.org/akiskourtis/vtc.git - cd vtc - git checkout -b stable - #Build nDPI library - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - - #Build PF_RING library - cd .. - cd PF_RING - make - #Build PF_RING examples, including the modified pfbridge, with nDPI integrated. - cd userland/examples/ - sed -i 's#EXTRA_LIBS =#EXTRA_LIBS='"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c#' ./Makefile - sed -i 's# -Ithird-party# -Ithird-party/ -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'#' ./Makefile - echo $NDPI_DIR - make - cd ../.. - cd .. - cd .. - - # To use PF_RING driver use the following - #sudo rmmod pf_ring - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=16384 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - sleep 5 - - # To use the Linux kernel driver use the following - cd /home/clouduser/ - sudo nohup ./vtc/nDPI/example/ndpiReader -i eth1 -a eth2 & - sleep 5 - - curl --data-ascii "{\"classification_rules\":[{\"RuleId\":\"1\",\"ToS\":\"16\"}]}" http://localhost:9999/classifier/classification_rules/224.192.16.1 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - #$IP_FAMILY: { get_param: ip_family } - flavor: #vtc_flavor - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/heat_templates/vTC_liberty.yaml b/yardstick/vTC/apexlake/heat_templates/vTC_liberty.yaml deleted file mode 100644 index 715a181a5..000000000 --- a/yardstick/vTC/apexlake/heat_templates/vTC_liberty.yaml +++ /dev/null @@ -1,191 +0,0 @@ -############################################################################## -# Copyright (c) 2017 user@TRAFCLASS-PACKET1.fuel.local and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -heat_template_version: 2014-10-16 -description: HOT template to deploy a virtual Traffic Classifier - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 2000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - ### DEFAULT NETWORK FOR MNGM - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - port_security_enabled: true - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: #vnic_type - port_security_enabled: false - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: #vnic_type - port_security_enabled: false - fixed_ips: - - subnet: { get_param: destination_subnet } - - server: - type: OS::Nova::Server - properties: - name: vTC - #key_name: { get_param: key_name } - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - # Creation of a user - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:yardstick | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - ifconfig 10.254.254.253 up netmask 255.255.255.248 - - # Fix Network Confiuration - sed -i 's/localhost/localhost vtc/g' /etc/hosts - touch /etc/resolvconf/resolv.conf.d/tail - #echo 'nameserver 192.168.10.1' > /etc/resolvconf/resolv.conf.d/tail - #echo 'nameserver 10.20.0.2' > /etc/resolvconf/resolv.conf.d/tail - echo 'nameserver 10.118.32.193' > /etc/resolvconf/resolv.conf.d/tail - resolvconf -u - - - echo 'nameserver 10.118.32.193' > /etc/resolv.conf - - - # Install vTC Dependencies - apt-get update - apt-get install -y git build-essential gcc libnuma-dev bison flex byacc libjson0-dev libcurl4-gnutls-dev jq dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - apt-get install -y byacc libtool libcurl4-openssl-dev - - cd /home/clouduser - - # Setup multicast - echo mgroup from eth1 group 224.192.16.1 > /etc/smcroute.conf - git clone https://github.com/troglobit/smcroute.git - cd smcroute - git reset --hard c3f5c56 - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - rm resp.json - curl -X POST -u "mPkgwvJPsTFS8hYmHk:SDczcrK4cvnkMRWSEchB3ANcWbqFXqPx" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token=38uFQuhEdPvCTbhc7k >> resp.json - access_token=`jq -r '.access_token' resp.json` - git clone https://x-token-auth:${access_token}@bitbucket.org/akiskourtis/vtc.git - cd vtc - git checkout -b stable - #Build nDPI library - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - - #Build PF_RING library - cd .. - cd PF_RING - make - #Build PF_RING examples, including the modified pfbridge, with nDPI integrated. - cd userland/examples/ - sed -i 's#EXTRA_LIBS =#EXTRA_LIBS='"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c#' ./Makefile - sed -i 's# -Ithird-party# -Ithird-party/ -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'#' ./Makefile - echo $NDPI_DIR - make - cd ../.. - cd .. - cd .. - - # To use PF_RING driver use the following - #sudo rmmod pf_ring - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=16384 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - sleep 5 - - # To use the Linux kernel driver use the following - cd /home/clouduser/ - sudo nohup ./vtc/nDPI/example/ndpiReader -i eth1 -a eth2 & - sleep 5 - - curl --data-ascii "{\"classification_rules\":[{\"RuleId\":\"1\",\"ToS\":\"16\"}]}" http://localhost:9999/classifier/classification_rules/224.192.16.1 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - #$IP_FAMILY: { get_param: ip_family } - flavor: #vtc_flavor - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/setup.py b/yardstick/vTC/apexlake/setup.py deleted file mode 100644 index 0211a57c1..000000000 --- a/yardstick/vTC/apexlake/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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. - -""" -Experimental Framework -""" - -from __future__ import absolute_import -from distutils.core import setup - - -setup(name='apexlake', - version='1.0', - description='Framework to automatically run experiments/benchmarks ' - 'with VMs within OpenStack environments', - author='Intel Research and Development Ireland Ltd', - author_email='vincenzo.m.riccobene@intel.com', - license='Apache 2.0', - url='www.intel.com', - packages=['experimental_framework', - 'experimental_framework.benchmarks', - 'experimental_framework.packet_generators', - 'experimental_framework.libraries', - 'experimental_framework.constants'], - include_package_data=True, - package_data={ - 'experimental_framework': [ - 'packet_generators/dpdk_pktgen/*.lua', - 'packet_generators/pcap_files/*.pcap', - 'packet_generators/pcap_files/*.sh', - 'libraries/packet_checker/*' - ] - }, - data_files=[ - ('/tmp/apexlake/', ['apexlake.conf']), - ('/tmp/apexlake/heat_templates/', - ['heat_templates/vTC.yaml']), - ('/tmp/apexlake/heat_templates/', - ['heat_templates/stress_workload.yaml']), - ('/tmp/apexlake/heat_templates/', - ['heat_templates/vTC_liberty.yaml']), - ('/tmp/apexlake/heat_templates/', - ['heat_templates/stress_workload_liberty.yaml']) - ]) diff --git a/yardstick/vTC/apexlake/tests/api_test.py b/yardstick/vTC/apexlake/tests/api_test.py deleted file mode 100644 index b6191ed8f..000000000 --- a/yardstick/vTC/apexlake/tests/api_test.py +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import mock -import os -import experimental_framework.common as common -from experimental_framework import APEX_LAKE_ROOT -from experimental_framework.api import FrameworkApi -from experimental_framework.benchmarking_unit import BenchmarkingUnit -import experimental_framework.benchmarks.\ - instantiation_validation_benchmark as iv -from six.moves import map -from six.moves import range - - -class DummyBenchmarkingUnit(BenchmarkingUnit): - - def __init__(self): - BenchmarkingUnit.__init__(self) - - @staticmethod - def get_available_test_cases(): - return ['BenchA', 'BenchB'] - - @staticmethod - def get_required_benchmarks(required_benchmarks): - common.BASE_DIR = "base_dir/" - return [iv.InstantiationValidationBenchmark('benchmark', dict())] - - -class DummyBenchmarkingUnit2(BenchmarkingUnit): - - counter_init = 0 - counter_finalize = 0 - counter_run = 0 - - def __init__(self, base_heat_template, credentials, - heat_template_parameters, iterations, test_cases): - DummyBenchmarkingUnit.counter_init = 0 - DummyBenchmarkingUnit.counter_finalize = 0 - DummyBenchmarkingUnit.counter_run = 0 - - def initialize(self): - DummyBenchmarkingUnit2.counter_init += 1 - - def run_benchmarks(self): - DummyBenchmarkingUnit2.counter_run += 1 - - def finalize(self): - DummyBenchmarkingUnit2.counter_finalize += 1 - - -class TestGeneratesTemplate(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - pass - - @mock.patch('experimental_framework.common.init') - def test_init_for_success(self, mock_init): - FrameworkApi.init() - mock_init.assert_called_once_with(api=True) - - # @mock.patch('experimental_framework.benchmarking_unit.BenchmarkingUnit.' - # 'get_available_test_cases', - # side_effect=DummyBenchmarkingUnit.get_available_test_cases) - # def test_get_available_test_cases_for_success(self, mock_bench): - # expected = ['BenchA', 'BenchB'] - # output = FrameworkApi.get_available_test_cases() - # self.assertEqual(expected, output) - - @mock.patch('experimental_framework.benchmarking_unit.BenchmarkingUnit.' - 'get_required_benchmarks', - side_effect=DummyBenchmarkingUnit.get_required_benchmarks) - def test_get_test_case_features_for_success(self, mock_get_req_bench): - expected = dict() - expected['description'] = 'Instantiation Validation Benchmark' - expected['parameters'] = [ - iv.THROUGHPUT, - iv.VLAN_SENDER, - iv.VLAN_RECEIVER] - expected['allowed_values'] = dict() - expected['allowed_values'][iv.THROUGHPUT] = \ - list(map(str, list(range(0, 100)))) - expected['allowed_values'][iv.VLAN_SENDER] = \ - list(map(str, list(range(-1, 4096)))) - expected['allowed_values'][iv.VLAN_RECEIVER] = \ - list(map(str, list(range(-1, 4096)))) - expected['default_values'] = dict() - expected['default_values'][iv.THROUGHPUT] = '1' - expected['default_values'][iv.VLAN_SENDER] = '-1' - expected['default_values'][iv.VLAN_RECEIVER] = '-1' - - test_case = 'instantiation_validation_benchmark.' \ - 'InstantiationValidationBenchmark' - output = FrameworkApi.get_test_case_features(test_case) - self.assertEqual(expected, output) - - def test__get_test_case_features__for_failure(self): - self.assertRaises( - ValueError, FrameworkApi.get_test_case_features, 111) - - @mock.patch('experimental_framework.common.init') - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.common.get_credentials') - @mock.patch('experimental_framework.heat_template_generation.' - 'generates_templates') - @mock.patch('experimental_framework.benchmarking_unit.BenchmarkingUnit', - side_effect=DummyBenchmarkingUnit2) - def test_execute_framework_for_success(self, mock_b_unit, mock_heat, - mock_credentials, mock_log, - mock_common_init): - common.TEMPLATE_DIR = os.path.join(APEX_LAKE_ROOT, - 'tests/data/generated_templates/') - - test_cases = dict() - iterations = 1 - heat_template = 'VTC_base_single_vm_wait.tmp' - heat_template_parameters = dict() - deployment_configuration = '' - openstack_credentials = dict() - openstack_credentials['ip_controller'] = '' - openstack_credentials['heat_url'] = '' - openstack_credentials['user'] = '' - openstack_credentials['password'] = '' - openstack_credentials['auth_uri'] = '' - openstack_credentials['project'] = '' - FrameworkApi.execute_framework( - test_cases, iterations, heat_template, - heat_template_parameters, deployment_configuration, - openstack_credentials) diff --git a/yardstick/vTC/apexlake/tests/base_packet_generator_test.py b/yardstick/vTC/apexlake/tests/base_packet_generator_test.py deleted file mode 100644 index 153de171d..000000000 --- a/yardstick/vTC/apexlake/tests/base_packet_generator_test.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -from experimental_framework.packet_generators import base_packet_generator - - -class BasePacketGeneratorTest(unittest.TestCase): - - def setUp(self): - self.mut = base_packet_generator.BasePacketGenerator() - pass - - def tearDown(self): - pass - - def test_send_traffic_for_failure(self): - self.assertRaises(NotImplementedError, self.mut.send_traffic) diff --git a/yardstick/vTC/apexlake/tests/benchmark_base_class_test.py b/yardstick/vTC/apexlake/tests/benchmark_base_class_test.py deleted file mode 100644 index 4e5eb9fb0..000000000 --- a/yardstick/vTC/apexlake/tests/benchmark_base_class_test.py +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -from experimental_framework.benchmarks import benchmark_base_class as base - - -class DummyBechmarkBaseClass(base.BenchmarkBaseClass): - - def get_features(self): - features = dict() - features['description'] = '***' - features['parameters'] = ['A', 'B'] - features['allowed_values'] = dict() - features['allowed_values']['A'] = ['a'] - features['allowed_values']['B'] = ['b'] - features['default_values'] = dict() - features['default_values']['A'] = 'a' - features['default_values']['B'] = 'b' - return features - - -class TestBenchmarkBaseClass(unittest.TestCase): - - def setUp(self): - self.mut = base.BenchmarkBaseClass('name', dict()) - - def test_constructor_for_success(self): - name = 'name' - params = dict() - params['A'] = 'a' - params['B'] = 'b' - params['C'] = 'c' - bench_base = DummyBechmarkBaseClass(name, params) - self.assertEqual(name, bench_base.name) - self.assertIn('A', list(bench_base.params.keys())) - self.assertIn('B', list(bench_base.params.keys())) - self.assertEqual('a', bench_base.params['A']) - self.assertEqual('b', bench_base.params['B']) - - params = dict() - params['A'] = 'a' - # params['B'] = 'b' - bench_base = DummyBechmarkBaseClass(name, params) - # self.assertEqual(name, bench_base.name) - # self.assertIn('A', bench_base.params.keys()) - # self.assertIn('B', bench_base.params.keys()) - # self.assertEqual('a', bench_base.params['A']) - # self.assertEqual('b', bench_base.params['B']) - - def test_constructor_for_failure(self): - name = 'name' - params = 'params' - self.assertRaises(ValueError, DummyBechmarkBaseClass, name, params) - - def test_constructor_for_failure_2(self): - name = 'name' - params = dict() - params['A'] = 'a' - params['B'] = '*' - self.assertRaises(ValueError, DummyBechmarkBaseClass, name, params) - - def test_init_for_failure(self): - self.assertRaises(NotImplementedError, self.mut.init) - - def test_finalize_for_failure(self): - self.assertRaises(NotImplementedError, self.mut.finalize) - - def test_run_for_failure(self): - self.assertRaises(NotImplementedError, self.mut.run) - - def test_get_name_for_success(self): - self.assertEqual(self.mut.get_name(), 'name') diff --git a/yardstick/vTC/apexlake/tests/benchmarking_unit_test.py b/yardstick/vTC/apexlake/tests/benchmarking_unit_test.py deleted file mode 100644 index 7b33ba693..000000000 --- a/yardstick/vTC/apexlake/tests/benchmarking_unit_test.py +++ /dev/null @@ -1,481 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 os -import unittest -import mock - -from experimental_framework import APEX_LAKE_ROOT -from experimental_framework.benchmarking_unit import BenchmarkingUnit -# from experimental_framework.data_manager import DataManager -from experimental_framework.deployment_unit import DeploymentUnit -import experimental_framework.common as common -from experimental_framework.benchmarks.rfc2544_throughput_benchmark import \ - RFC2544ThroughputBenchmark - -__author__ = 'vmriccox' - - -# class DummyDataManager(DataManager): -# -# def __init__(self, experiment_directory): -# self.experiment_directory = experiment_directory -# self.experiments = dict() -# self.new_exp_counter = 0 -# self.add_bench_counter = 0 -# self.close_experiment_1_counter = 0 -# self.close_experiment_2_counter = 0 -# self.generate_csv_counter = 0 -# -# def create_new_experiment(self, experiment_name, get_counter=None): -# if not get_counter: -# self.new_exp_counter += 1 -# else: -# return self.new_exp_counter -# -# def add_benchmark(self, experiment_name, benchmark_name, get_counter=None): -# if not get_counter: -# self.add_bench_counter += 1 -# else: -# return self.add_bench_counter -# -# def close_experiment(self, experiment, get_counter=None): -# if get_counter: -# return [self.close_experiment_1_counter, -# self.close_experiment_2_counter] -# if experiment == 'VTC_base_single_vm_wait_1': -# self.close_experiment_1_counter += 1 -# if experiment == 'VTC_base_single_vm_wait_2': -# self.close_experiment_2_counter += 1 -# -# def generate_result_csv_file(self, get_counter=None): -# if get_counter: -# return self.generate_csv_counter -# else: -# self.generate_csv_counter += 1 -# -# def add_metadata(self, experiment_name, metadata): -# pass -# -# def add_configuration(self, experiment_name, configuration): -# pass -# -# def add_data_points(self, experiment_name, benchmark_name, result): -# pass - - -class Dummy_2544(RFC2544ThroughputBenchmark): - - def __init__(self, name, params): - self.name = name - self.init_counter = 0 - self.finalize_counter = 0 - self.run_counter = 0 - self.params = params - - def init(self, get_counter=None): - if get_counter: - return self.init_counter - else: - self.init_counter += 1 - - def finalize(self, get_counter=None): - if get_counter: - return self.finalize_counter - else: - self.finalize_counter += 1 - - def run(self, get_counter=None): - if get_counter: - return self.run_counter - else: - self.run_counter += 1 - return {'throughput': 10} - - -class DummyDeploymentUnit(DeploymentUnit): - - def __init__(self, openstack_credentials): - pass - - def deploy_heat_template(self, template_file, stack_name, parameters, - attempt=0): - return False - - -class TestBenchmarkingUnit(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - pass - - @mock.patch('time.time') - @mock.patch('experimental_framework.common.get_template_dir') - # @mock.patch('experimental_framework.data_manager.DataManager', - # side_effect=DummyDataManager) - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit') - @mock.patch('experimental_framework.benchmarking_unit.heat.' - 'get_all_heat_templates') - def test___init__(self, mock_heat, mock_dep_unit, - # mock_data_manager, - mock_temp_dir, mock_time): - mock_heat.return_value = list() - mock_time.return_value = '12345' - mock_temp_dir.return_value = 'tests/data/results/' - common.TEMPLATE_FILE_EXTENSION = '.ext' - common.RESULT_DIR = 'tests/data/results/' - heat_template_name = 'name' - openstack_credentials = { - 'name': 'aaa', - 'surname': 'bbb' - } - heat_template_parameters = { - 'param_1': 'name_1', - 'param_2': 'name_2' - } - iterations = 1 - benchmarks = ['bench_1', 'bench_2'] - bu = BenchmarkingUnit(heat_template_name, - openstack_credentials, - heat_template_parameters, - iterations, - benchmarks) - self.assertEqual(bu.required_benchmarks, benchmarks) - bu.heat_template_parameters = heat_template_parameters - # mock_data_manager.assert_called_once_with('tests/data/results/12345') - mock_dep_unit.assert_called_once_with(openstack_credentials) - mock_heat.assert_called_once_with('tests/data/results/', '.ext') - - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark', side_effect=Dummy_2544) - @mock.patch('time.time') - @mock.patch('experimental_framework.common.get_template_dir') - # @mock.patch('experimental_framework.data_manager.DataManager', - # side_effect=DummyDataManager) - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit') - @mock.patch('experimental_framework.benchmarking_unit.' - 'heat.get_all_heat_templates') - def test_initialize_for_success(self, mock_heat, mock_dep_unit, - # mock_data_manager, - mock_temp_dir, - mock_time, mock_rfc2544): - mock_heat.return_value = list() - mock_time.return_value = '12345' - mock_temp_dir.return_value = 'tests/data/test_templates/' - common.TEMPLATE_FILE_EXTENSION = '.yaml' - common.RESULT_DIR = 'tests/data/results/' - - heat_template_name = 'VTC_base_single_vm_wait_' - openstack_credentials = { - 'name': 'aaa', - 'surname': 'bbb' - } - heat_template_parameters = { - 'param_1': 'name_1', - 'param_2': 'name_2' - } - iterations = 1 - benchmarks = [ - { - 'name': - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark', - 'params': dict() - } - ] - bu = BenchmarkingUnit(heat_template_name, - openstack_credentials, - heat_template_parameters, - iterations, - benchmarks) - self.assertEqual(bu.required_benchmarks, benchmarks) - bu.heat_template_parameters = heat_template_parameters - bu.template_files = ['VTC_base_single_vm_wait_1.yaml', - 'VTC_base_single_vm_wait_2.yaml'] - bu.initialize() - self.assertTrue(len(bu.benchmarks) == 1) - self.assertEqual(bu.benchmarks[0].__class__, - Dummy_2544) - # self.assertEqual(bu.data_manager.create_new_experiment('', True), 2) - # self.assertEqual(bu.data_manager.add_benchmark('', '', True), 2) - - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark', side_effect=Dummy_2544) - @mock.patch('time.time') - @mock.patch('experimental_framework.common.get_template_dir') - # @mock.patch('experimental_framework.data_manager.DataManager', - # side_effect=DummyDataManager) - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit') - @mock.patch('experimental_framework.benchmarking_unit.' - 'heat.get_all_heat_templates') - def test_finalize_for_success( - self, mock_heat, mock_dep_unit, - # mock_data_manager, - mock_temp_dir, mock_time, mock_rfc2544): - mock_heat.return_value = list() - mock_time.return_value = '12345' - mock_temp_dir.return_value = 'tests/data/test_templates/' - common.TEMPLATE_FILE_EXTENSION = '.yaml' - common.RESULT_DIR = 'tests/data/results/' - - heat_template_name = 'VTC_base_single_vm_wait_' - openstack_credentials = { - 'name': 'aaa', - 'surname': 'bbb' - } - heat_template_parameters = { - 'param_1': 'name_1', - 'param_2': 'name_2' - } - iterations = 1 - benchmarks = [ - { - 'name': - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark', - 'params': dict() - } - ] - bu = BenchmarkingUnit(heat_template_name, - openstack_credentials, - heat_template_parameters, - iterations, - benchmarks) - bu.heat_template_parameters = heat_template_parameters - bu.template_files = ['VTC_base_single_vm_wait_1.yaml', - 'VTC_base_single_vm_wait_2.yaml'] - bu.finalize() - # self.assertEqual(bu.data_manager.close_experiment('', True), [1, 1]) - # self.assertEqual(bu.data_manager.generate_result_csv_file(True), 1) - - @mock.patch('experimental_framework.common.push_data_influxdb') - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark', side_effect=Dummy_2544) - @mock.patch('time.time') - @mock.patch('experimental_framework.common.get_template_dir') - # @mock.patch('experimental_framework.data_manager.DataManager', - # side_effect=DummyDataManager) - @mock.patch('experimental_framework.common.DEPLOYMENT_UNIT') - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit') - @mock.patch('experimental_framework.benchmarking_unit.' - 'heat.get_all_heat_templates') - def test_run_benchmarks_for_success(self, mock_heat, mock_common_dep_unit, - mock_dep_unit, - # mock_data_manager, - mock_temp_dir, mock_time, - mock_rfc2544, mock_log, mock_influx): - mock_heat.return_value = list() - mock_time.return_value = '12345' - mock_temp_dir.return_value = os.path.join(APEX_LAKE_ROOT, - 'tests/data/test_templates/') - common.TEMPLATE_FILE_EXTENSION = '.yaml' - common.RESULT_DIR = 'tests/data/results/' - common.INFLUXDB_IP = 'InfluxIP' - common.INFLUXDB_PORT = '8086' - common.INFLUXDB_DB_NAME = 'test_db' - - heat_template_name = 'VTC_base_single_vm_wait_' - openstack_credentials = { - 'name': 'aaa', - 'surname': 'bbb' - } - heat_template_parameters = { - 'param_1': 'name_1', - 'param_2': 'name_2' - } - iterations = 1 - benchmarks = [ - { - 'name': - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark', - 'params': dict() - } - ] - bu = BenchmarkingUnit(heat_template_name, - openstack_credentials, - heat_template_parameters, - iterations, - benchmarks) - # bu.data_manager = DummyDataManager('tests/data/results/12345') - bu.template_files = ['VTC_base_single_vm_wait_1.yaml', - 'VTC_base_single_vm_wait_2.yaml'] - bu.benchmarks = [Dummy_2544('dummy', {'param1': 'val1'})] - bu.run_benchmarks() - self.assertEqual(bu.benchmarks[0].init(True), 2) - self.assertEqual(bu.benchmarks[0].finalize(True), 2) - self.assertEqual(bu.benchmarks[0].run(True), 2) - # expected_metric = \ - # 'throughput,vnic_type=direct,ram=1024,benchmark=dummy,' \ - # 'vcpus=2,experiment_name=VTC_base_single_vm_wait_2,' \ - # 'param1=val1 value=10 12345000000000' - # mock_influx.assert_called_with(expected_metric) - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark', side_effect=Dummy_2544) - @mock.patch('time.time') - @mock.patch('experimental_framework.common.get_template_dir') - # @mock.patch('experimental_framework.data_manager.DataManager', - # side_effect=DummyDataManager) - @mock.patch('experimental_framework.common.DEPLOYMENT_UNIT') - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit') - @mock.patch('experimental_framework.benchmarking_unit.' - 'heat.get_all_heat_templates') - def test_run_benchmarks_2_for_success( - self, mock_heat, mock_common_dep_unit, mock_dep_unit, - # mock_data_manager, - mock_temp_dir, mock_time, mock_rfc2544, - mock_log): - mock_heat.return_value = list() - mock_time.return_value = '12345' - mock_temp_dir.return_value = os.path.join(APEX_LAKE_ROOT, - 'tests/data/test_templates/') - common.TEMPLATE_FILE_EXTENSION = '.yaml' - common.RESULT_DIR = 'tests/data/results/' - - heat_template_name = 'VTC_base_single_vm_wait_' - openstack_credentials = { - 'name': 'aaa', - 'surname': 'bbb' - } - heat_template_parameters = { - 'param_1': 'name_1', - 'param_2': 'name_2' - } - iterations = 1 - benchmarks = [ - { - 'name': - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark', - 'params': dict() - } - ] - bu = BenchmarkingUnit(heat_template_name, - openstack_credentials, - heat_template_parameters, - iterations, - benchmarks) - # bu.data_manager = DummyDataManager('tests/data/results/12345') - bu.template_files = ['VTC_base_single_vm_wait_1.yaml', - 'VTC_base_single_vm_wait_2.yaml'] - bu.benchmarks = [Dummy_2544('dummy', dict())] - common.DEPLOYMENT_UNIT = DummyDeploymentUnit(dict()) - bu.run_benchmarks() - self.assertEqual(bu.benchmarks[0].init(True), 2) - self.assertEqual(bu.benchmarks[0].finalize(True), 0) - self.assertEqual(bu.benchmarks[0].run(True), 0) - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark', side_effect=Dummy_2544) - @mock.patch('time.time') - @mock.patch('experimental_framework.common.get_template_dir') - # @mock.patch('experimental_framework.data_manager.DataManager', - # side_effect=DummyDataManager) - @mock.patch('experimental_framework.common.DEPLOYMENT_UNIT') - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit') - @mock.patch('experimental_framework.benchmarking_unit.' - 'heat.get_all_heat_templates') - def test_get_benchmark_name_for_success( - self, mock_heat, mock_common_dep_unit, mock_dep_unit, - # mock_data_manager, - mock_temp_dir, mock_time, mock_rfc2544, - mock_log): - mock_heat.return_value = list() - mock_time.return_value = '12345' - mock_temp_dir.return_value = 'tests/data/test_templates/' - common.TEMPLATE_FILE_EXTENSION = '.yaml' - common.RESULT_DIR = 'tests/data/results/' - - heat_template_name = 'VTC_base_single_vm_wait_' - openstack_credentials = { - 'name': 'aaa', - 'surname': 'bbb' - } - heat_template_parameters = { - 'param_1': 'name_1', - 'param_2': 'name_2' - } - iterations = 1 - benchmarks = [ - { - 'name': - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark', - 'params': dict() - } - ] - bu = BenchmarkingUnit(heat_template_name, - openstack_credentials, - heat_template_parameters, - iterations, - benchmarks) - - expected = 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark_0' - output = bu.get_benchmark_name( - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark') - self.assertEqual(expected, output) - - expected = 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark_1' - output = bu.get_benchmark_name( - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark') - self.assertEqual(expected, output) - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark', side_effect=Dummy_2544) - @mock.patch('time.time') - @mock.patch('experimental_framework.common.get_template_dir') - # @mock.patch('experimental_framework.data_manager.DataManager', - # side_effect=DummyDataManager) - @mock.patch('experimental_framework.common.DEPLOYMENT_UNIT') - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit') - @mock.patch('experimental_framework.benchmarking_unit.' - 'heat.get_all_heat_templates') - def test_get_required_benchmarks_for_success( - self, mock_heat, mock_common_dep_unit, mock_dep_unit, - # mock_data_manager, - mock_temp_dir, mock_time, mock_rfc2544, - mock_log): - mock_heat.return_value = list() - mock_time.return_value = '12345' - mock_temp_dir.return_value = 'tests/data/test_templates/' - common.TEMPLATE_FILE_EXTENSION = '.yaml' - common.RESULT_DIR = 'tests/data/results/' - openstack_credentials = { - 'name': 'aaa', - 'surname': 'bbb' - } - heat_template_parameters = { - 'param_1': 'name_1', - 'param_2': 'name_2' - } - iterations = 1 - benchmarks = [ - { - 'name': - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark', - 'params': dict() - } - ] - bu = BenchmarkingUnit('', - openstack_credentials, - heat_template_parameters, - iterations, - benchmarks) - req_benchs = \ - ['rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark'] - output = bu.get_required_benchmarks(req_benchs) - self.assertEqual(len(req_benchs), 1) - self.assertEqual(output[0].__class__, Dummy_2544) diff --git a/yardstick/vTC/apexlake/tests/common_test.py b/yardstick/vTC/apexlake/tests/common_test.py deleted file mode 100644 index b8dbfe6b8..000000000 --- a/yardstick/vTC/apexlake/tests/common_test.py +++ /dev/null @@ -1,665 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import mock -import os -import logging -import six.moves.configparser -import experimental_framework.common as common -import experimental_framework.constants.conf_file_sections as cf -from experimental_framework import APEX_LAKE_ROOT - -__author__ = 'vmricco' - - -def reset_common(): - common.LOG = None - common.CONF_FILE = None - common.DEPLOYMENT_UNIT = None - common.ITERATIONS = None - common.BASE_DIR = None - common.RESULT_DIR = None - common.TEMPLATE_DIR = None - common.TEMPLATE_NAME = None - common.TEMPLATE_FILE_EXTENSION = None - common.PKTGEN = None - common.PKTGEN_DIR = None - common.PKTGEN_DPDK_DIRECTORY = None - common.PKTGEN_PROGRAM = None - common.PKTGEN_COREMASK = None - common.PKTGEN_MEMCHANNEL = None - common.PKTGEN_BUS_SLOT_NIC_1 = None - common.PKTGEN_BUS_SLOT_NIC_2 = None - common.INFLUXDB_IP = None - common.INFLUXDB_PORT = None - common.INFLUXDB_DB_NAME = None - - -class DummyConfigurationFile(common.ConfigurationFile): - - def __init__(self, sections, conf_file=''): - pass - - def get_variable(self, section, variable_name): - return 'vTC.yaml' - - def get_variable_list(self, section): - return ['template_base_name'] - - -class DummyConfigurationFile2(common.ConfigurationFile): - - def __init__(self, sections): - self.pktgen_counter = 0 - - def get_variable(self, section, variable_name): - if variable_name == cf.CFSG_TEMPLATE_NAME: - return 'vTC.yaml' - if variable_name == cf.CFSG_ITERATIONS: - return '2' - if variable_name == cf.CFSG_DEBUG: - return 'True' - if variable_name == cf.CFSP_PACKET_GENERATOR: - if self.pktgen_counter == 1: - return 'non_supported' - self.pktgen_counter += 1 - return 'dpdk_pktgen' - if variable_name == cf.CFSP_DPDK_PKTGEN_DIRECTORY: - return APEX_LAKE_ROOT - if variable_name == cf.CFSP_DPDK_PROGRAM_NAME: - return 'program' - if variable_name == cf.CFSP_DPDK_COREMASK: - return 'coremask' - if variable_name == cf.CFSP_DPDK_MEMORY_CHANNEL: - return 'memchannel' - if variable_name == cf.CFSP_DPDK_BUS_SLOT_NIC_1: - return 'bus_slot_nic_1' - if variable_name == cf.CFSP_DPDK_BUS_SLOT_NIC_2: - return 'bus_slot_nic_2' - if variable_name == cf.CFSP_DPDK_DPDK_DIRECTORY: - return APEX_LAKE_ROOT - - def get_variable_list(self, section): - if section == cf.CFS_PKTGEN: - return [ - cf.CFSP_DPDK_NAME_IF_2, - cf.CFSP_DPDK_NAME_IF_1, - cf.CFSP_DPDK_BUS_SLOT_NIC_1, - cf.CFSP_DPDK_BUS_SLOT_NIC_2, - cf.CFSP_DPDK_COREMASK, - cf.CFSP_DPDK_DPDK_DIRECTORY, - cf.CFSP_DPDK_PKTGEN_DIRECTORY, - cf.CFSP_DPDK_MEMORY_CHANNEL, - cf.CFSP_DPDK_PROGRAM_NAME, - cf.CFSP_PACKET_GENERATOR - ] - else: - return [ - 'template_base_name', - 'iterations', - cf.CFSG_DEBUG - ] - - -class TestCommonInit(unittest.TestCase): - - def setUp(self): - common.CONF_FILE = DummyConfigurationFile('') - self.dir = os.path.join(APEX_LAKE_ROOT, 'experimental_framework/') - - def tearDown(self): - reset_common() - # common.CONF_FILE = None - - @mock.patch('os.getcwd') - @mock.patch('experimental_framework.common.init_conf_file') - @mock.patch('experimental_framework.common.init_general_vars') - @mock.patch('experimental_framework.common.init_log') - @mock.patch('experimental_framework.common.init_pktgen') - @mock.patch('experimental_framework.common.CONF_FILE') - def test_init_for_success(self, mock_conf_file, init_pkgen, init_log, - init_general_vars, init_conf_file, mock_getcwd): - mock_getcwd.return_value = self.dir - common.init(True) - if common.CONF_FILE.get_variable_list(cf.CFS_PKTGEN): - init_pkgen.assert_called_once() - init_conf_file.assert_called_once() - init_general_vars.assert_called_once() - init_log.assert_called_once() - expected = self.dir.split('experimental_framework/')[0] - self.assertEqual(common.BASE_DIR, expected) - - @mock.patch('experimental_framework.common.InputValidation') - @mock.patch('os.path.exists') - @mock.patch('os.makedirs') - @mock.patch('experimental_framework.common.LOG') - def test_init_general_vars_for_success(self, mock_log, mock_makedirs, - mock_path_exists, mock_val_file): - common.BASE_DIR = APEX_LAKE_ROOT - mock_path_exists.return_value = False - mock_val_file.return_value = True - common.init_general_vars() - self.assertEqual(common.TEMPLATE_FILE_EXTENSION, '.yaml') - self.assertEqual(common.TEMPLATE_DIR, '/tmp/apexlake/heat_templates/') - self.assertEqual(common.TEMPLATE_NAME, 'vTC.yaml') - self.assertEqual(common.RESULT_DIR, '/tmp/apexlake/results/') - self.assertEqual(common.ITERATIONS, 1) - # mock_makedirs.assert_called_once_with('/tmp/apexlake/heat_templates/') - - -class TestCommonInit2(unittest.TestCase): - - def setUp(self): - common.CONF_FILE = DummyConfigurationFile2('') - self.dir = os.path.join(APEX_LAKE_ROOT, 'experimental_framework') - - def tearDown(self): - reset_common() - common.CONF_FILE = None - - @mock.patch('experimental_framework.common.InputValidation') - @mock.patch('os.path.exists') - @mock.patch('os.makedirs') - @mock.patch('experimental_framework.common.LOG') - def test_init_general_vars_2_for_success(self, mock_log, mock_makedirs, - mock_path_exists, mock_val_file): - common.BASE_DIR = APEX_LAKE_ROOT - common.init_general_vars() - self.assertEqual(common.TEMPLATE_FILE_EXTENSION, '.yaml') - self.assertEqual(common.TEMPLATE_DIR, '/tmp/apexlake/heat_templates/') - self.assertEqual(common.TEMPLATE_NAME, 'vTC.yaml') - self.assertEqual(common.RESULT_DIR, '/tmp/apexlake/results/') - self.assertEqual(common.ITERATIONS, 2) - - def test_init_log_2_for_success(self): - common.init_log() - self.assertIsInstance(common.LOG, logging.RootLogger) - - def test_init_pktgen_for_success(self): - common.init_pktgen() - self.assertEqual(common.PKTGEN, 'dpdk_pktgen') - directory = self.dir.split('experimental_framework')[0] - self.assertEqual(common.PKTGEN_DIR, directory) - self.assertEqual(common.PKTGEN_PROGRAM, 'program') - self.assertEqual(common.PKTGEN_COREMASK, 'coremask') - self.assertEqual(common.PKTGEN_MEMCHANNEL, 'memchannel') - self.assertEqual(common.PKTGEN_BUS_SLOT_NIC_1, 'bus_slot_nic_1') - self.assertEqual(common.PKTGEN_BUS_SLOT_NIC_2, 'bus_slot_nic_2') - # we always add '/' to end of dirs for some reason - # probably because we aren't using os.path.join everywhere - expected_dir = APEX_LAKE_ROOT + '/' - self.assertEqual(common.PKTGEN_DPDK_DIRECTORY, expected_dir) - - def test_init_pktgen_for_failure(self): - common.CONF_FILE.get_variable('', cf.CFSP_PACKET_GENERATOR) - self.assertRaises(ValueError, common.init_pktgen) - - -class TestConfFileInitialization(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - reset_common() - - @mock.patch('experimental_framework.common.ConfigurationFile', - side_effect=DummyConfigurationFile) - def test_init_conf_file_for_success(self, conf_file): - common.CONF_FILE = None - common.init_conf_file(False) - self.assertIsInstance(common.CONF_FILE, - DummyConfigurationFile) - - common.CONF_FILE = None - common.init_conf_file(True) - self.assertIsInstance(common.CONF_FILE, - DummyConfigurationFile) - - @mock.patch('experimental_framework.common.CONF_FILE') - def test_init_log_for_success(self, mock_conf_file): - mock_conf_file.get_variable_list.return_value = 'value' - common.init_log() - self.assertIsInstance(common.LOG, logging.RootLogger) - - @mock.patch('experimental_framework.common.CONF_FILE') - def test_init_influxdb_for_success(self, mock_conf_file): - mock_conf_file.get_variable.return_value = 'value' - common.init_influxdb() - self.assertEqual(common.INFLUXDB_IP, 'value') - self.assertEqual(common.INFLUXDB_PORT, 'value') - self.assertEqual(common.INFLUXDB_DB_NAME, 'value') - - -class DummyConfigurationFile3(common.ConfigurationFile): - counter = 0 - - def __init__(self, sections, config_file='conf.cfg'): - common.ConfigurationFile.__init__(self, sections, config_file) - - @staticmethod - def _config_section_map(section, config_file, get_counter=None): - if get_counter: - return DummyConfigurationFile3.counter - else: - DummyConfigurationFile3.counter += 1 - return dict() - - -class TestConfigFileClass(unittest.TestCase): - - def setUp(self): - self.sections = [ - 'General', - 'OpenStack', - 'Experiment-VNF', - 'PacketGen', - 'Deployment-parameters', - 'Testcase-parameters' - ] - c_file = os.path.join(APEX_LAKE_ROOT, 'tests/data/common/conf.cfg') - common.BASE_DIR = APEX_LAKE_ROOT - self.conf_file = common.ConfigurationFile(self.sections, c_file) - - def tearDown(self): - reset_common() - common.BASE_DIR = None - - @mock.patch('experimental_framework.common.ConfigurationFile.' - '_config_section_map', - side_effect=DummyConfigurationFile3._config_section_map) - def test___init___for_success(self, mock_conf_map): - sections = ['General', 'OpenStack', 'Experiment-VNF', 'PacketGen', - 'Deployment-parameters', 'Testcase-parameters'] - c = DummyConfigurationFile3( - sections, config_file=os.path.join(APEX_LAKE_ROOT, - 'tests/data/common/conf.cfg')) - self.assertEqual( - DummyConfigurationFile3._config_section_map('', '', True), - 6) - for section in sections: - self.assertEqual(getattr(c, section), dict()) - - def test__config_section_map_for_success(self): - general_section = 'General' - # openstack_section = 'OpenStack' - config_file = os.path.join(APEX_LAKE_ROOT, - 'tests/data/common/conf.cfg') - config = six.moves.configparser.ConfigParser() - config.read(config_file) - - expected = { - 'benchmarks': 'b_marks', - 'iterations': '1', - 'template_base_name': 't_name' - } - output = common.\ - ConfigurationFile._config_section_map(general_section, config) - self.assertEqual(expected, output) - - @mock.patch('experimental_framework.common.' - 'ConfigurationFile.get_variable_list') - def test_get_variable_for_success(self, mock_get_var_list): - section = self.sections[0] - variable_name = 'template_base_name' - expected = 't_name' - mock_get_var_list.return_value = [variable_name] - output = self.conf_file.get_variable(section, variable_name) - self.assertEqual(expected, output) - - @mock.patch('experimental_framework.common.' - 'ConfigurationFile.get_variable_list') - def test_get_variable_for_failure(self, mock_get_var_list): - section = self.sections[0] - variable_name = 'something_else' - self.assertRaises( - ValueError, - self.conf_file.get_variable, - section, variable_name - ) - - def test_get_variable_list_for_success(self): - section = self.sections[0] - expected = { - 'benchmarks': 'b_marks', - 'iterations': '1', - 'template_base_name': 't_name' - } - output = self.conf_file.get_variable_list(section) - self.assertEqual(expected, output) - - def test_get_variable_list_for_failure(self): - section = 'something_else' - self.assertRaises( - ValueError, - self.conf_file.get_variable_list, - section) - - -class DummyConfigurationFile4(common.ConfigurationFile): - - def get_variable(self, section, variable_name): - if variable_name == 'vnic2_type': - return '"value"' - elif variable_name == cf.CFSG_BENCHMARKS: - return "BenchmarkClass1, BenchmarkClass2" - return '@string "value"' - - # def get_variable_list(self, section): - # return list() - - -class TestCommonMethods(unittest.TestCase): - - def setUp(self): - self.sections = [ - 'General', - 'OpenStack', - 'Experiment-VNF', - 'PacketGen', - 'Deployment-parameters', - 'Testcase-parameters' - ] - config_file = os.path.join(APEX_LAKE_ROOT, - 'tests/data/common/conf.cfg') - common.BASE_DIR = APEX_LAKE_ROOT - common.CONF_FILE = DummyConfigurationFile4(self.sections, config_file) - - def tearDown(self): - reset_common() - common.CONF_FILE = None - - def test_get_credentials_for_success(self): - expected = { - 'ip_controller': '@string "value"', - 'project': '@string "value"', - 'auth_uri': '@string "value"', - 'user': '@string "value"', - 'heat_url': '@string "value"', - 'password': '@string "value"' - } - output = common.get_credentials() - self.assertEqual(expected, output) - - def test_get_heat_template_params_for_success(self): - expected = { - 'param_1': '@string "value"', - 'param_2': '@string "value"', - 'param_3': '@string "value"', - 'param_4': '@string "value"' - } - output = common.get_heat_template_params() - self.assertEqual(expected, output) - - def test_get_testcase_params_for_success(self): - expected = {'test_case_param': '@string "value"'} - output = common.get_testcase_params() - self.assertEqual(expected, output) - - def test_get_file_first_line_for_success(self): - file = os.path.join(APEX_LAKE_ROOT, 'tests/data/common/conf.cfg') - expected = '[General]\n' - output = common.get_file_first_line(file) - self.assertEqual(expected, output) - - def test_replace_in_file_for_success(self): - filename = os.path.join(APEX_LAKE_ROOT, - 'tests/data/common/file_replacement.txt') - text_to_search = 'replacement of' - text_to_replace = '***' - common.replace_in_file(filename, text_to_search, text_to_replace) - after = open(filename, 'r').readline() - self.assertEqual(after, 'Test for the *** strings into a file\n') - text_to_search = '***' - text_to_replace = 'replacement of' - common.replace_in_file(filename, text_to_search, text_to_replace) - - @mock.patch('os.system') - @mock.patch('experimental_framework.common.LOG') - def test_run_command_for_success(self, mock_log, mock_os_system): - command = 'command to be run' - common.run_command(command) - mock_os_system.assert_called_once_with(command) - - @mock.patch('experimental_framework.common.run_command') - def test_push_data_influxdb_for_success(self, mock_run_cmd): - data = 'string that describes the data' - expected = "curl -i -XPOST 'http://None:None/write?db=None' " \ - "--data-binary string that describes the data" - common.push_data_influxdb(data) - mock_run_cmd.assert_called_once_with(expected) - - def test_get_base_dir_for_success(self): - base_dir = common.BASE_DIR - common.BASE_DIR = 'base_dir' - expected = 'base_dir' - output = common.get_base_dir() - self.assertEqual(expected, output) - common.BASE_DIR = base_dir - - def test_get_template_dir_for_success(self): - template_dir = common.TEMPLATE_DIR - common.TEMPLATE_DIR = 'base_dir' - expected = 'base_dir' - output = common.get_template_dir() - self.assertEqual(expected, output) - common.TEMPLATE_DIR = template_dir - - def test_get_dpdk_pktgen_vars_test(self): - # Test 1 - common.PKTGEN = 'dpdk_pktgen' - common.PKTGEN_DIR = 'var' - common.PKTGEN_PROGRAM = 'var' - common.PKTGEN_COREMASK = 'var' - common.PKTGEN_MEMCHANNEL = 'var' - common.PKTGEN_BUS_SLOT_NIC_1 = 'var' - common.PKTGEN_BUS_SLOT_NIC_2 = 'var' - common.PKTGEN_NAME_NIC_1 = 'var' - common.PKTGEN_NAME_NIC_2 = 'var' - common.PKTGEN_DPDK_DIRECTORY = 'var' - expected = { - 'bus_slot_nic_1': 'var', - 'bus_slot_nic_2': 'var', - 'name_if_1': 'var', - 'name_if_2': 'var', - 'coremask': 'var', - 'dpdk_directory': 'var', - 'memory_channels': 'var', - 'pktgen_directory': 'var', - 'program_name': 'var' - } - output = common.get_dpdk_pktgen_vars() - self.assertEqual(expected, output) - - # Test 2 - common.PKTGEN = 'something_else' - common.PKTGEN_DIR = 'var' - common.PKTGEN_PROGRAM = 'var' - common.PKTGEN_COREMASK = 'var' - common.PKTGEN_MEMCHANNEL = 'var' - common.PKTGEN_BUS_SLOT_NIC_1 = 'var' - common.PKTGEN_BUS_SLOT_NIC_2 = 'var' - common.PKTGEN_DPDK_DIRECTORY = 'var' - expected = {} - output = common.get_dpdk_pktgen_vars() - self.assertEqual(expected, output) - - @mock.patch('experimental_framework.common.LOG') - def test_get_deployment_configuration_variables_for_success(self, - mock_log): - expected = { - 'vcpu': ['value'], - 'vnic1_type': ['value'], - 'ram': ['value'], - 'vnic2_type': ['value'] - } - output = common.get_deployment_configuration_variables_from_conf_file() - self.assertEqual(expected, output) - - def test_get_benchmarks_from_conf_file_for_success(self): - expected = ['BenchmarkClass1', 'BenchmarkClass2'] - output = common.get_benchmarks_from_conf_file() - self.assertEqual(expected, output) - - -class TestinputValidation(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - reset_common() - - def test_validate_string_for_success(self): - output = common.InputValidation.validate_string('string', '') - self.assertTrue(output) - - def test_validate_string_for_failure(self): - self.assertRaises( - ValueError, - common.InputValidation.validate_string, - list(), '' - ) - - def test_validate_int_for_success(self): - output = common.InputValidation.validate_integer(1111, '') - self.assertTrue(output) - - def test_validate_int_for_failure(self): - self.assertRaises( - ValueError, - common.InputValidation.validate_integer, - list(), '' - ) - - def test_validate_dict_for_success(self): - output = common.InputValidation.validate_dictionary(dict(), '') - self.assertTrue(output) - - def test_validate_dict_for_failure(self): - self.assertRaises( - ValueError, - common.InputValidation.validate_dictionary, - list(), '' - ) - - def test_validate_directory_exist_and_format_for_success(self): - directory = os.path.join(APEX_LAKE_ROOT, 'tests/data/common/') - output = common.InputValidation.\ - validate_directory_exist_and_format(directory, '') - self.assertTrue(output) - - def test_validate_directory_exist_and_format_for_failure(self): - directory = os.path.join(APEX_LAKE_ROOT, 'tests/data/com/') - self.assertRaises( - ValueError, - common.InputValidation.validate_directory_exist_and_format, - directory, '' - ) - - @mock.patch('experimental_framework.common.CONF_FILE') - def test_validate_configuration_file_parameter_for_success(self, - mock_conf): - mock_conf.get_variable_list.return_value = ['param'] - section = '' - parameter = 'param' - message = '' - output = common.InputValidation.\ - validate_configuration_file_parameter(section, parameter, message) - self.assertTrue(output) - - @mock.patch('experimental_framework.common.CONF_FILE') - def test_validate_configuration_file_parameter_for_failure( - self, mock_conf_file): - section = '' - parameter = 'something_else' - message = '' - mock_conf_file.get_variable_list.return_value(['parameter']) - self.assertRaises( - ValueError, - common.InputValidation. - validate_configuration_file_parameter, - section, parameter, message - ) - - def test_validate_configuration_file_section_for_success(self): - section = 'General' - message = '' - output = common.InputValidation.\ - validate_configuration_file_section(section, message) - self.assertTrue(output) - - def test_validate_configuration_file_section_for_failure(self): - section = 'Something-Else' - message = '' - self.assertRaises( - ValueError, - common.InputValidation.validate_configuration_file_section, - section, message - ) - - def test_validate_boolean_for_success(self): - message = '' - boolean = True - output = common.InputValidation.validate_boolean(boolean, message) - self.assertTrue(output) - - boolean = 'True' - output = common.InputValidation.validate_boolean(boolean, message) - self.assertTrue(output) - - boolean = 'False' - output = common.InputValidation.validate_boolean(boolean, message) - self.assertFalse(output) - - def test_validate_boolean_for_failure(self): - message = '' - boolean = 'string' - self.assertRaises( - ValueError, - common.InputValidation.validate_boolean, - boolean, message - ) - - def test_validate_os_credentials_for_failure(self): - # Test 1 - credentials = list() - self.assertRaises(ValueError, - common.InputValidation.validate_os_credentials, - credentials) - - # Test 2 - credentials = dict() - credentials['ip_controller'] = '' - credentials['heat_url'] = '' - credentials['user'] = '' - credentials['password'] = '' - credentials['auth_uri'] = '' - # credentials['project'] = '' - self.assertRaises(ValueError, - common.InputValidation.validate_os_credentials, - credentials) - - def test_validate_os_credentials_for_success(self): - credentials = dict() - credentials['ip_controller'] = '' - credentials['heat_url'] = '' - credentials['user'] = '' - credentials['password'] = '' - credentials['auth_uri'] = '' - credentials['project'] = '' - self.assertTrue( - common.InputValidation.validate_os_credentials(credentials)) diff --git a/yardstick/vTC/apexlake/tests/conf_file_sections_test.py b/yardstick/vTC/apexlake/tests/conf_file_sections_test.py deleted file mode 100644 index abf4134a5..000000000 --- a/yardstick/vTC/apexlake/tests/conf_file_sections_test.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -from experimental_framework.constants import conf_file_sections as cfs - -__author__ = 'vmriccox' - - -class TestConfFileSection(unittest.TestCase): - - def setUp(self): - pass - - def test_get_sections_api_for_success(self): - expected = ['PacketGen', 'General', 'InfluxDB', 'OpenStack'] - output = cfs.get_sections_api() - self.assertEqual(expected, output) diff --git a/yardstick/vTC/apexlake/tests/data/common/conf.cfg b/yardstick/vTC/apexlake/tests/data/common/conf.cfg deleted file mode 100644 index 9266647e8..000000000 --- a/yardstick/vTC/apexlake/tests/data/common/conf.cfg +++ /dev/null @@ -1,43 +0,0 @@ -[General] -template_base_name = t_name -benchmarks = b_marks -iterations = 1 - -[OpenStack] -ip_controller = -heat_url = -user = -password = -auth_uri = -project = - - -[Experiment-VNF] -VNIC1_TYPE = @string "normal" "direct" @costs '0', '1' -VNIC2_TYPE = @string "normal", "direct" @costs '0', '1' -VCPU = @numeric "4" -RAM = @numeric "4096" - - -[PacketGen] -packet_generator = dpdk_pktgen -pktgen_directory = pktgen_dir -dpdk_directory = dpdk_dir -program_name = app/app/x86_64-native-linuxapp-gcc/pktgen -coremask = 1f -memory_channels = 3 -bus_slot_nic_1 = 01:00.0 -name_if_1 = enp1s0f0 -bus_slot_nic_2 = 01:00.1 -name_if_2 = enp1s0f2 - - -[Deployment-parameters] -param_1 = val_1 -param_2 = val_2 -param_3 = val_3 -param_4 = val_4 - - -[Testcase-parameters] -test_case_param = 1280 diff --git a/yardstick/vTC/apexlake/tests/data/common/file_replacement.txt b/yardstick/vTC/apexlake/tests/data/common/file_replacement.txt deleted file mode 100644 index 8122d9a91..000000000 --- a/yardstick/vTC/apexlake/tests/data/common/file_replacement.txt +++ /dev/null @@ -1 +0,0 @@ -Test for the replacement of strings into a file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait.tmp b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait.tmp deleted file mode 100644 index aa3959fc1..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait.tmp +++ /dev/null @@ -1,199 +0,0 @@ -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: #ram - vcpus: #vcpus - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs:
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml deleted file mode 100644 index 20fcb6718..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (c) 2016-2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: 1024 - vcpus: 2 - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml.json deleted file mode 100644 index 3af9a1cc7..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"vnic_type": "normal", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml deleted file mode 100644 index 493d81b7a..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (c) 2016-2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: direct - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: direct - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: 1024 - vcpus: 2 - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml.json deleted file mode 100644 index 9f246891d..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"vnic_type": "direct", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml deleted file mode 100644 index 5788980b0..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml +++ /dev/null @@ -1,199 +0,0 @@ -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: 1024 - vcpus: 2 - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml.json deleted file mode 100644 index 44a8aeb2e..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"ram": "1024", "vcpus": "2", "vnic_type": "normal"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml deleted file mode 100644 index 44a81d081..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml +++ /dev/null @@ -1,199 +0,0 @@ -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: direct - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: direct - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: 1024 - vcpus: 2 - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml.json deleted file mode 100644 index 0a66448b7..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"ram": "1024", "vcpus": "2", "vnic_type": "direct"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/vTC.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/vTC.yaml deleted file mode 100644 index 39dc095c1..000000000 --- a/yardstick/vTC/apexlake/tests/data/generated_templates/vTC.yaml +++ /dev/null @@ -1,207 +0,0 @@ -############################################################################## -# Copyright (c) 2016-2017 Intel Corporation -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: #ram - vcpus: #vcpus - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs:
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/benchmark_1.csv b/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/benchmark_1.csv deleted file mode 100644 index f5f2932d0..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/benchmark_1.csv +++ /dev/null @@ -1,3 +0,0 @@ -conf_1;conf_3;conf_2;point_4;point_5;point_6;point_1;point_2;point_3
-conf_value_1;conf_value_3;conf_value_2;?;?;?;value_1;value_2;value_3
-conf_value_1;conf_value_3;conf_value_2;value_4;value_5;value_6;?;?;?
diff --git a/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/metadata.json b/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/metadata.json deleted file mode 100644 index ff4cebf41..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"location": "tests/data/experiments/experiment_1/metadata.json", "item_2": "value_2", "item_3": "value_3", "item_1": "value_1"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_experiments/results_benchmark_1.csv b/yardstick/vTC/apexlake/tests/data/test_experiments/results_benchmark_1.csv deleted file mode 100644 index 4662dd2be..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_experiments/results_benchmark_1.csv +++ /dev/null @@ -1,5 +0,0 @@ -conf_5;conf_4;conf_6;conf_1;conf_3;conf_2;point_12;point_10;point_11;point_4;point_5;point_6;point_8;point_9;point_7;point_1;point_2;point_3
-?;?;?;conf_value_1;conf_value_3;conf_value_2;?;?;?;?;?;?;?;?;?;value_1;value_2;value_3
-?;?;?;conf_value_1;conf_value_3;conf_value_2;?;?;?;value_4;value_5;value_6;?;?;?;?;?;?
-conf_value_5;conf_value_4;conf_value_6;?;?;?;?;?;?;?;?;?;value_8;value_9;value_7;?;?;?
-conf_value_5;conf_value_4;conf_value_6;?;?;?;value_12;value_10;value_11;?;?;?;?;?;?;?;?;?
diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait.tmp b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait.tmp deleted file mode 100644 index aa3959fc1..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait.tmp +++ /dev/null @@ -1,199 +0,0 @@ -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: #vnic_type - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: #ram - vcpus: #vcpus - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs:
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml deleted file mode 100644 index 20fcb6718..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (c) 2016-2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: 1024 - vcpus: 2 - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml.json b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml.json deleted file mode 100644 index 3af9a1cc7..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"vnic_type": "normal", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml deleted file mode 100644 index 493d81b7a..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (c) 2016-2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -heat_template_version: 2014-10-16 -description: HOT template to create a DPI - -parameters: - default_net: - type: string - default_subnet: - type: string - source_net: - type: string - source_subnet: - type: string - destination_net: - type: string - destination_subnet: - type: string - internal_net: - type: string - internal_subnet: - type: string - node: - type: string - default: compB - name: - type: string - default: vtc - ip_family: - type: string - timeout: - type: number - description: Timeout for WaitCondition, depends on your image and environment - default: 1000 - -resources: - wait_condition: - type: OS::Heat::WaitCondition - properties: - handle: {get_resource: wait_handle} - count: 1 - timeout: {get_param: timeout} - - wait_handle: - type: OS::Heat::WaitConditionHandle - - - ### DEFAULT NETWORK FOR MERLIN DATA - port_1: - type: OS::Neutron::Port - properties: - network: { get_param: default_net } - binding:vnic_type: normal - fixed_ips: - - subnet: { get_param: default_subnet } - - ### NETWORK FOR RECEIVING TRAFFIC - port_2: - type: OS::Neutron::Port - properties: - network: { get_param: source_net } - binding:vnic_type: direct - fixed_ips: - - subnet: { get_param: source_subnet } - - ### NETWORK FOR SENDING TRAFFIC - port_3: - type: OS::Neutron::Port - properties: - network: { get_param: destination_net } - binding:vnic_type: direct - fixed_ips: - - subnet: { get_param: destination_subnet } - - flavor: - type: OS::Nova::Flavor - properties: - disk: 20 - ram: 1024 - vcpus: 2 - #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } - extra_specs: { node: { get_param: node } } - - server: - type: OS::Nova::Server - properties: - name: vTC - key_name: test - image: ubuntu1404 - user_data: - str_replace: - template: | - #!/bin/sh - - # Creation of a user - NAME=$name - echo "Creating custom user..." - useradd clouduser -g admin -s /bin/bash -m - echo clouduser:secrete | chpasswd - echo "Enabling ssh password login..." - sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config - service ssh restart - sleep 1 - - # wake up interfaces - ifconfig eth1 up - ifconfig eth2 up - dhclient eth1 - dhclient eth2 - - sed -i 's/localhost/localhost vtc/g' /etc/hosts - ip route del 0/0 - route add default gw 192.168.200.1 - - AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') - BB=$(echo $AA | awk '{ print $1 }') - - # Setup Instrumentation Agent - rm -rf cimmaron - mkdir cimmaron - cd cimmaron - apt-get install -y zip - wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip - unzip MerlinAgent-12-06-2015-TNovaVM-001.zip - ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm - ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" - nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & - cd .. - - # Setup for PF_RING and bridge between interfaces - apt-get update - apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config - - # Setup multicast - echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf - cd /home/clouduser/ - git clone https://github.com/troglobit/smcroute.git - cd smcroute - sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh - sed -i 's/automake-1.11/automake/g' ./autogen.sh - ./autogen.sh - ./configure - make - make install - cd .. - touch multicast.sh - echo "#!/bin/bash" > multicast.sh - echo "while [ true ]" >> multicast.sh - echo "do" >> multicast.sh - echo " smcroute -k" >> multicast.sh - echo " smcroute -d" >> multicast.sh - echo " sleep 50" >> multicast.sh - echo "done" >> multicast.sh - chmod +x multicast.sh - ./multicast.sh & - - # Setup for PF_RING and bridge between interfaces - # Akis Repository - #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git - #cd vtc - #git checkout stable - - # Intel Repository - git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git - cd vtc_master - - cd nDPI - NDPI_DIR=$(pwd) - echo $NDPI_DIR - NDPI_INCLUDE=$(pwd)/src/include - echo $NDPI_INCLUDE - ./autogen.sh - ./configure - make - make install - cd .. - cd PF_RING - make - cd userland/examples/ - sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile - sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile - make - cd ../.. - cd .. - cd .. - #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 - ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & - wc_notify --data-binary '{"status": "SUCCESS"}' - params: - wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } - $name: { get_param: name } - $IP_FAMILY: { get_param: ip_family } - - flavor: { get_resource: flavor } - networks: - - port: { get_resource: port_1 } - - port: { get_resource: port_2 } - - port: { get_resource: port_3 } -outputs: diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml.json b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml.json deleted file mode 100644 index 9f246891d..000000000 --- a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"vnic_type": "direct", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/deployment_unit_test.py b/yardstick/vTC/apexlake/tests/deployment_unit_test.py deleted file mode 100644 index 1ff4225d6..000000000 --- a/yardstick/vTC/apexlake/tests/deployment_unit_test.py +++ /dev/null @@ -1,279 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import logging -import mock -import experimental_framework.deployment_unit as mut -import experimental_framework.common as common - -__author__ = 'vmriccox' - - -class DummyHeatManager: - - def __init__(self, param): - self.counts = 0 - pass - - def validate_heat_template(self, template_file): - return True - - def check_stack_status(self, stack_name): - # return 'CREATE_COMPLETE' - self.counts += 1 - if self.counts >= 3: - return 'CREATE_COMPLETE' - else: - return 'CREATE_IN_PROGRESS' - - def delete_stack(self, stack_name): - pass - - -class DummyHeatManagerFailed(DummyHeatManager): - - def check_stack_status(self, stack_name): - return 'CREATE_FAILED' - - def create_stack(self, template_file, stack_name, parameters): - pass - - -class DummyHeatManagerComplete(DummyHeatManager): - - def check_stack_status(self, stack_name): - return 'CREATE_COMPLETE' - - def create_stack(self, template_file, stack_name, parameters): - raise Exception() - - -class DummyHeatManagerFailedException(DummyHeatManagerFailed): - - def create_stack(self, template_file, stack_name, parameters): - raise Exception - - def check_stack_status(self, stack_name): - return '' - - -class DummyHeatManagerDestroy: - - def __init__(self, credentials): - self.delete_stack_counter = 0 - self.check_stack_status_counter = 0 - - def check_stack_status(self, stack_name): - if self.check_stack_status_counter < 2: - self.check_stack_status_counter += 1 - return 'DELETE_IN_PROGRESS' - else: - return 'DELETE_COMPLETE' - - def create_stack(self, template_file, stack_name, parameters): - pass - - def delete_stack(self, stack_name=None): - if stack_name == 'stack': - self.delete_stack_counter += 1 - else: - return self.delete_stack_counter - - def is_stack_deployed(self, stack_name): - return True - - -class DummyHeatManagerDestroyException(DummyHeatManagerDestroy): - - def delete_stack(self, stack_name=None): - raise Exception - - -class DummyHeatManagerReiteration: - - def __init__(self, param): - self.counts = 0 - - def validate_heat_template(self, template_file): - return True - - def check_stack_status(self, stack_name): - return 'CREATE_FAILED' - - def delete_stack(self, stack_name): - pass - - def create_stack(self, template_file=None, stack_name=None, - parameters=None): - if template_file == 'template_reiteration' and \ - stack_name == 'stack_reiteration' and \ - parameters == 'parameters_reiteration': - self.counts += 1 - - -class DummyDeploymentUnit(mut.DeploymentUnit): - - def destroy_heat_template(self, stack_name): - raise Exception - - -@mock.patch("experimental_framework.deployment_unit.time") -class TestDeploymentUnit(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - pass - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManager) - def test_constructor_for_sanity(self, mock_heat_manager, mock_time): - du = mut.DeploymentUnit(dict()) - self.assertTrue(isinstance(du.heat_manager, DummyHeatManager)) - mock_heat_manager.assert_called_once_with(dict()) - self.assertEqual(du.deployed_stacks, list()) - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManager) - @mock.patch('os.path.isfile') - def test_deploy_heat_template_for_failure(self, mock_os_is_file, - mock_heat_manager, mock_time): - mock_os_is_file.return_value = False - du = mut.DeploymentUnit(dict()) - template_file = '' - stack_name = '' - parameters = '' - self.assertRaises(ValueError, du.deploy_heat_template, template_file, - stack_name, parameters, 0) - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManager) - @mock.patch('os.path.isfile') - def test_deploy_heat_template_for_success(self, mock_os_is_file, - mock_heat_manager, mock_time): - mock_os_is_file.return_value = True - du = mut.DeploymentUnit(dict()) - template_file = '' - stack_name = '' - parameters = '' - common.LOG = logging.getLogger() - output = du.deploy_heat_template(template_file, stack_name, - parameters, 0) - self.assertEqual(output, True) - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManagerComplete) - @mock.patch('os.path.isfile') - def test_deploy_heat_template_2_for_success(self, mock_os_is_file, - mock_heat_manager, mock_time): - mock_os_is_file.return_value = True - du = mut.DeploymentUnit(dict()) - template_file = '' - stack_name = '' - parameters = '' - common.LOG = logging.getLogger() - output = du.deploy_heat_template(template_file, stack_name, - parameters, 0) - self.assertEqual(output, True) - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManagerComplete) - @mock.patch('os.path.isfile') - @mock.patch('experimental_framework.deployment_unit.DeploymentUnit', - side_effect=DummyDeploymentUnit) - def test_deploy_heat_template_3_for_success(self, mock_dep_unit, - mock_os_is_file, - mock_heat_manager, mock_time): - mock_os_is_file.return_value = True - du = mut.DeploymentUnit(dict()) - template_file = '' - stack_name = '' - parameters = '' - common.LOG = logging.getLogger() - output = du.deploy_heat_template(template_file, stack_name, - parameters, 0) - self.assertEqual(output, True) - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManagerFailed) - @mock.patch('os.path.isfile') - def test_deploy_heat_template_for_success_2(self, mock_os_is_file, - mock_heat_manager, mock_log, mock_time): - mock_os_is_file.return_value = True - du = DummyDeploymentUnit(dict()) - template_file = '' - stack_name = '' - parameters = '' - output = du.deploy_heat_template(template_file, stack_name, - parameters, 0) - self.assertEqual(output, False) - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManagerDestroy) - @mock.patch('experimental_framework.common.LOG') - def test_destroy_heat_template_for_success(self, mock_log, - mock_heat_manager, mock_time): - openstack_credentials = dict() - du = mut.DeploymentUnit(openstack_credentials) - du.deployed_stacks = ['stack'] - stack_name = 'stack' - self.assertTrue(du.destroy_heat_template(stack_name)) - self.assertEqual(du.heat_manager.delete_stack(None), 1) - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManagerDestroyException) - @mock.patch('experimental_framework.common.LOG') - def test_destroy_heat_template_for_success_2(self, mock_log, - mock_heat_manager, mock_time): - openstack_credentials = dict() - du = mut.DeploymentUnit(openstack_credentials) - du.deployed_stacks = ['stack'] - stack_name = 'stack' - self.assertFalse(du.destroy_heat_template(stack_name)) - - def test_destroy_all_deployed_stacks_for_success(self, mock_time): - du = DeploymentUnitDestroy() - du.destroy_all_deployed_stacks() - self.assertTrue(du.destroy_heat_template()) - - @mock.patch('experimental_framework.heat_manager.HeatManager', - side_effect=DummyHeatManagerReiteration) - @mock.patch('os.path.isfile') - def test_deploy_heat_template_for_success_3(self, mock_os_is_file, - mock_heat_manager, mock_time): - mock_os_is_file.return_value = True - du = mut.DeploymentUnit(dict()) - template = 'template_reiteration' - stack = 'stack_reiteration' - parameters = 'parameters_reiteration' - output = du.deploy_heat_template(template, stack, parameters, 0) - self.assertFalse(output) - self.assertEqual(du.heat_manager.counts, 4) - - -class DeploymentUnitDestroy(mut.DeploymentUnit): - - def __init__(self): - self.deployed_stacks = ['stack'] - self.heat_manager = DummyHeatManagerDestroy(dict()) - self.destroy_all_deployed_stacks_called_correctly = False - - def destroy_heat_template(self, template_name=None): - if template_name == 'stack': - self.destroy_all_deployed_stacks_called_correctly = True - return self.destroy_all_deployed_stacks_called_correctly diff --git a/yardstick/vTC/apexlake/tests/dpdk_packet_generator_test.py b/yardstick/vTC/apexlake/tests/dpdk_packet_generator_test.py deleted file mode 100644 index 9fa860ab4..000000000 --- a/yardstick/vTC/apexlake/tests/dpdk_packet_generator_test.py +++ /dev/null @@ -1,710 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import mock -from experimental_framework.constants import conf_file_sections as conf_file - - -from experimental_framework.packet_generators \ - import dpdk_packet_generator as mut - - -def dummy_get_dpdk_pktgen_vars(): - vars = dict() - vars[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'pktgen_dir/' - vars[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program' - vars[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - vars[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memchannel' - return vars - - -def dummy_get_base_dir(): - return 'base_dir/' - - -def dummy_dirname(dir): - if dir == 'pktgen_dir_test': - return 'pktgen_dir' - return 'test_directory' - - -class MockChangeVlan(): - - ret_val = [False, False] - - @staticmethod - def mock_change_vlan(pcap_dir=None, pcap_file=None, vlan=None): - if not pcap_file and not vlan: - return MockChangeVlan.ret_val - - if pcap_dir == 'base_dir/experimental_framework/packet_generators/' \ - 'pcap_files/' and \ - pcap_file == 'pcap_file_1' and vlan == 'vlan0': - MockChangeVlan.ret_val[0] = True - if pcap_dir == 'base_dir/experimental_framework/packet_generators/' \ - 'pcap_files/' and \ - pcap_file == 'pcap_file_2' and vlan == 'vlan1': - MockChangeVlan.ret_val[1] = True - return False - - -class TestDpdkPacketGenConstructor(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_constructor(self): - obj = mut.DpdkPacketGenerator() - self.assertEqual(obj.command, '') - self.assertEqual(obj.directory, '') - self.assertEqual(obj.dpdk_interfaces, -1) - - -class TestDpdkPacketGenInitialization(unittest.TestCase): - - def setUp(self): - self.mut = mut.DpdkPacketGenerator() - pass - - def tearDown(self): - pass - - @mock.patch('os.path') - @mock.patch('experimental_framework.common.get_dpdk_pktgen_vars', - side_effect=dummy_get_dpdk_pktgen_vars) - @mock.patch('experimental_framework.common.get_base_dir', - side_effect=dummy_get_base_dir) - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator._get_core_nics') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_init_input_validation') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator._change_vlan') - def test_init_dpdk_pktgen_for_success(self, m_change_vlan, - mock_init_input_validation, - mock_get_core_nics, - common_get_base_dir, - common_get_dpdk_vars, - mock_path): - """ - Tests the initialization of the packet generator - """ - mock_init_input_validation.return_value = None - mock_get_core_nics.return_value = "{corenics}" - mock_path.isfile.return_value = True - expected = 'sudo pktgen_dir/program -c coremask -n memchannel ' \ - '--proc-type auto --file-prefix pg -- -T -P -m ' \ - '"{corenics}" -f base_dir/experimental_framework/' \ - 'packet_generators/dpdk_pktgen/lua_file ' \ - '-s 0:base_dir/experimental_framework/packet_generators' \ - '/pcap_files/pcap_file > /dev/null' - self.mut.init_dpdk_pktgen(dpdk_interfaces=1, lua_script='lua_file', - pcap_file_0='pcap_file', vlan_0='vlan0') - self.assertEqual(expected, self.mut.command) - m_change_vlan.assert_called_once_with('base_dir/' - 'experimental_framework/' - 'packet_generators/pcap_files/', - 'pcap_file', 'vlan0') - - @mock.patch('os.path') - @mock.patch('experimental_framework.common.get_dpdk_pktgen_vars', - side_effect=dummy_get_dpdk_pktgen_vars) - @mock.patch('experimental_framework.common.get_base_dir', - side_effect=dummy_get_base_dir) - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator._get_core_nics') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_init_input_validation') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_change_vlan', side_effect=MockChangeVlan.mock_change_vlan) - def test_init_dpdk_pktgen_2_for_success(self, m_change_vlan, - mock_init_input_validation, - mock_get_core_nics, - common_get_base_dir, - common_get_dpdk_vars, mock_path): - """ - Tests the initialization of the packet generator - :param common_get_base_dir: mock obj - :param common_get_dpdk_vars: mock obj - :param mock_path: mock obj - :return: None - """ - mock_init_input_validation.return_value = None - mock_get_core_nics.return_value = "{corenics}" - mock_path.isfile.return_value = True - expected = 'sudo pktgen_dir/program -c coremask -n memchannel ' \ - '--proc-type auto --file-prefix pg -- -T -P -m ' \ - '"{corenics}" -f base_dir/experimental_framework/' \ - 'packet_generators/dpdk_pktgen/lua_file ' \ - '-s 0:base_dir/experimental_framework/packet_generators/' \ - 'pcap_files/pcap_file_1 ' \ - '-s 1:base_dir/experimental_framework/packet_generators/' \ - 'pcap_files/pcap_file_2 ' \ - '> /dev/null' - self.mut.init_dpdk_pktgen(dpdk_interfaces=1, lua_script='lua_file', - pcap_file_0='pcap_file_1', - pcap_file_1='pcap_file_2', vlan_0='vlan0', - vlan_1='vlan1') - self.assertEqual(expected, self.mut.command) - self.assertEqual(MockChangeVlan.mock_change_vlan(), [True, True]) - - @mock.patch('os.path') - @mock.patch('experimental_framework.common.get_dpdk_pktgen_vars', - side_effect=dummy_get_dpdk_pktgen_vars) - @mock.patch('experimental_framework.common.get_base_dir', - side_effect=dummy_get_base_dir) - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator._get_core_nics') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_init_input_validation') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator._change_vlan') - def test_init_dpdk_pktgen_for_failure(self, m_change_vlan, - mock_init_input_validation, - mock_get_core_nics, - common_get_base_dir, - common_get_dpdk_vars, - mock_path): - """ - Tests the initialization of the packet generator - :param common_get_base_dir: mock obj - :param common_get_dpdk_vars: mock obj - :param mock_path: mock obj - :return: None - """ - mock_init_input_validation.return_value = None - mock_get_core_nics.return_value = "{corenics}" - self.assertRaises(ValueError, self.mut.init_dpdk_pktgen, 1, - 'lua_file', 'pcap_file') - - @mock.patch('os.path') - @mock.patch('experimental_framework.common.get_dpdk_pktgen_vars', - side_effect=dummy_get_dpdk_pktgen_vars) - @mock.patch('experimental_framework.common.get_base_dir', - side_effect=dummy_get_base_dir) - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_get_core_nics') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_init_input_validation') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_change_vlan') - def test_init_dpdk_pktgen_for_failure_2(self, m_change_vlan, - mock_init_input_validation, - mock_get_core_nics, - common_get_base_dir, - common_get_dpdk_vars, - mock_path): - """ - Tests the initialization of the packet generator - :param common_get_base_dir: mock obj - :param common_get_dpdk_vars: mock obj - :param mock_path: mock obj - :return: None - """ - mock_init_input_validation.return_value = None - mock_get_core_nics.return_value = "{corenics}" - self.assertRaises(ValueError, self.mut.init_dpdk_pktgen, 2, - 'lua_file_1', 'pcap_file_1', 'pcap_file_2', - 'vlan_0') - - -class DpdkPacketGeneratorDummy(mut.DpdkPacketGenerator): - - def __init__(self): - self.directory = 'self_directory' - self.dpdk_interfaces = 1 - self.command = 'command' - self._count = 0 - - chdir_test = [False, False] - - @staticmethod - def _chdir(directory=None): - if not directory: - return DpdkPacketGeneratorDummy.chdir_test - if directory == 'current_directory': - DpdkPacketGeneratorDummy.chdir_test[0] = True - # self._count += 1 - if directory == 'self_directory': - DpdkPacketGeneratorDummy.chdir_test[1] = True - # self._count += 1 - return DpdkPacketGeneratorDummy.chdir_test - - -class TestDpdkPacketGenSendTraffic(unittest.TestCase): - - def setUp(self): - self.mut = DpdkPacketGeneratorDummy() - - @mock.patch('os.system') - @mock.patch('os.path') - @mock.patch('os.path.dirname', side_effect=dummy_dirname) - @mock.patch('experimental_framework.common.get_dpdk_pktgen_vars', - side_effect=dummy_get_dpdk_pktgen_vars) - @mock.patch('experimental_framework.common.get_base_dir', - side_effect=dummy_get_base_dir) - @mock.patch('experimental_framework.common.run_command') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator._get_core_nics') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_init_physical_nics') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_finalize_physical_nics') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator._chdir', - side_effect=DpdkPacketGeneratorDummy._chdir) - def test_send_traffic_for_success(self, mock_ch_dir, - mock_finalize_physical_nics, - mock_init_physical_nics, - mock_get_core_nics, - common_run_command, - common_get_base_dir, - common_get_dpdk_vars, - mock_dir_name, - mock_os_path, - mock_os_system): - """ - Calls the packet generator and starts to send traffic - Blocking call - """ - mock_get_core_nics.return_value = "{corenics}" - mock_os_path.realpath.return_value = 'pktgen_dir_test' - mock_os_path.dirname.return_value = 'current_directory' - self.mut.send_traffic() - - self.assertEqual(DpdkPacketGeneratorDummy._chdir(), [True, True]) - mock_init_physical_nics.\ - assert_called_once_with(1, {'coremask': 'coremask', - 'program_name': 'program', - 'memory_channels': 'memchannel', - 'pktgen_directory': 'pktgen_dir/'}) - mock_finalize_physical_nics.\ - assert_called_once_with(1, {'coremask': 'coremask', - 'program_name': 'program', - 'memory_channels': 'memchannel', - 'pktgen_directory': 'pktgen_dir/'}) - common_run_command.assert_called_once_with('command') - - -class MockRunCommand: - - ret_val = [False, False, False, False, False, False] - ret_val_finalization = [False, False, False, False, False, False] - - @staticmethod - def mock_run_command(command=None): - if command == 'sudo ifconfig interface_1 down': - MockRunCommand.ret_val[0] = True - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--unbind 1:00.0': - MockRunCommand.ret_val[1] = True - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--bind=igb_uio 1:00.0': - MockRunCommand.ret_val[2] = True - if command == 'sudo ifconfig interface_2 down': - MockRunCommand.ret_val[3] = True - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--unbind 1:00.1': - MockRunCommand.ret_val[4] = True - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--bind=igb_uio 1:00.1': - MockRunCommand.ret_val[5] = True - else: - return MockRunCommand.ret_val - - @staticmethod - def mock_run_command_finalization(command=None): - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--unbind 1:00.0': - MockRunCommand.ret_val_finalization[0] = True - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--bind=ixgbe 1:00.0': - MockRunCommand.ret_val_finalization[1] = True - if command == 'sudo ifconfig interface_1 up': - MockRunCommand.ret_val_finalization[2] = True - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--unbind 1:00.1': - MockRunCommand.ret_val_finalization[3] = True - if command == 'sudo dpdk_directory/tools/dpdk_nic_bind.py ' \ - '--bind=ixgbe 1:00.1': - MockRunCommand.ret_val_finalization[4] = True - if command == 'sudo ifconfig interface_2 up': - MockRunCommand.ret_val_finalization[5] = True - else: - return MockRunCommand.ret_val_finalization - - -@mock.patch('experimental_framework.packet_generators.dpdk_packet_generator.time') -class TestDpdkPacketGenOthers(unittest.TestCase): - - def setUp(self): - self.mut = mut.DpdkPacketGenerator() - - def tearDown(self): - pass - - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_cores_configuration') - def test__get_core_nics_for_failure(self, mock_cores_configuration, mock_time): - mock_cores_configuration.return_value = None - self.assertRaises(ValueError, mut.DpdkPacketGenerator._get_core_nics, - '', '') - - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_cores_configuration') - def test__get_core_nics_one_nic_for_success(self, - mock_cores_configuration, mock_time): - mock_cores_configuration.return_value = 'ret_val' - expected = 'ret_val' - output = mut.DpdkPacketGenerator._get_core_nics(1, 'coremask') - self.assertEqual(expected, output) - mock_cores_configuration.assert_called_once_with('coremask', 1, 2, 0) - - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator.' - '_cores_configuration') - def test__get_core_nics_two_nics_for_success(self, - mock_cores_configuration, mock_time): - mock_cores_configuration.return_value = 'ret_val' - expected = 'ret_val' - output = mut.DpdkPacketGenerator._get_core_nics(2, 'coremask') - self.assertEqual(expected, output) - mock_cores_configuration.assert_called_once_with('coremask', 1, 2, 2) - - @mock.patch('os.path.isfile') - def test__init_input_validation_for_success(self, mock_is_file, mock_time): - mock_is_file.return_value = True - - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = 'pcap_file_1' - lua_script = 'lua_script' - pcap_directory = 'pcap_directory' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertEqual(mut.DpdkPacketGenerator._init_input_validation( - pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, - variables), None) - - @mock.patch('os.path.isfile') - def test__init_input_validation_for_failure(self, mock_is_file, mock_time): - mock_is_file.return_value = True - - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = 'pcap_file_1' - lua_script = 'lua_script' - pcap_directory = 'pcap_directory' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - # variables[common.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.path.isfile') - def test__init_input_validation_for_failure_2(self, mock_is_file, mock_time): - mock_is_file.return_value = True - - pcap_directory = None - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = 'pcap_file_1' - lua_script = 'lua_script' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.path.isfile') - def test__init_input_validation_for_failure_3(self, mock_is_file, mock_time): - mock_is_file.return_value = True - - pcap_directory = 'directory' - pcap_file_0 = None - pcap_file_1 = 'pcap_file_1' - lua_script = 'lua_script' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.path.isfile') - def test__init_input_validation_for_failure_4(self, mock_is_file, mock_time): - mock_is_file.return_value = True - - pcap_directory = 'directory' - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = None - lua_script = 'lua_script' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.path.isfile') - def test__init_input_validation_for_failure_5(self, mock_is_file, mock_time): - mock_is_file.return_value = True - - pcap_directory = 'directory' - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = 'pcap_file_1' - lua_script = None - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.path.isfile', side_effect=[False]) - def test__init_input_validation_for_failure_6(self, mock_is_file, mock_time): - # mock_is_file.return_value = False - - pcap_directory = 'directory' - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = 'pcap_file_1' - lua_script = 'lua_script' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.path.isfile', side_effect=[True, False]) - def test__init_input_validation_for_failure_7(self, mock_is_file, mock_time): - pcap_directory = 'directory' - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = 'pcap_file_1' - lua_script = 'lua_script' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.path.isfile', side_effect=[True, True, False]) - def test__init_input_validation_for_failure_8(self, mock_is_file, mock_time): - pcap_directory = 'directory' - pcap_file_0 = 'pcap_file_0' - pcap_file_1 = 'pcap_file_1' - lua_script = 'lua_script' - lua_directory = 'lua_directory' - - variables = dict() - variables[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'directory' - variables[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - variables[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - variables[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - - self.assertRaises(ValueError, - mut.DpdkPacketGenerator. - _init_input_validation, pcap_file_0, pcap_file_1, - lua_script, pcap_directory, lua_directory, variables) - - @mock.patch('os.chdir') - def test__chdir_for_success(self, mock_os_chdir, mock_time): - mut.DpdkPacketGenerator._chdir('directory') - mock_os_chdir.assert_called_once_with('directory') - - @mock.patch('experimental_framework.common.run_command', - side_effect=MockRunCommand.mock_run_command) - def test__init_physical_nics_for_success(self, mock_run_command, mock_time): - dpdk_interfaces = 1 - dpdk_vars = dict() - - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] = 'dpdk_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'pktgen_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - dpdk_vars[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - dpdk_vars[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1] = '1:00.0' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2] = '1:00.1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_1] = 'interface_1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_2] = 'interface_2' - self.mut._init_physical_nics(dpdk_interfaces, dpdk_vars) - self.assertEqual(MockRunCommand.mock_run_command(), - [True, True, True, False, False, False]) - - @mock.patch('experimental_framework.common.run_command', - side_effect=MockRunCommand.mock_run_command) - def test__init_physical_nics_for_success_2(self, mock_run_command, mock_time): - dpdk_interfaces = 2 - dpdk_vars = dict() - - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] = 'dpdk_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'pktgen_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - dpdk_vars[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - dpdk_vars[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1] = '1:00.0' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2] = '1:00.1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_1] = 'interface_1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_2] = 'interface_2' - self.mut._init_physical_nics(dpdk_interfaces, dpdk_vars) - self.assertEqual(MockRunCommand.mock_run_command(), - [True, True, True, True, True, True]) - - @mock.patch('experimental_framework.common.run_command') - def test__init_physical_nics_for_failure(self, mock_run_command, mock_time): - dpdk_interfaces = 3 - dpdk_vars = dict() - self.assertRaises(ValueError, self.mut._init_physical_nics, - dpdk_interfaces, dpdk_vars) - - @mock.patch('experimental_framework.common.run_command', - side_effect=MockRunCommand.mock_run_command_finalization) - def test__finalize_physical_nics_for_success(self, mock_run_command, mock_time): - dpdk_interfaces = 1 - dpdk_vars = dict() - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] = 'dpdk_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'pktgen_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - dpdk_vars[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - dpdk_vars[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1] = '1:00.0' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2] = '1:00.1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_1] = 'interface_1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_2] = 'interface_2' - self.mut._finalize_physical_nics(dpdk_interfaces, dpdk_vars) - self.assertEqual(MockRunCommand.mock_run_command_finalization(), - [True, True, True, False, False, False]) - - @mock.patch('experimental_framework.common.run_command', - side_effect=MockRunCommand.mock_run_command_finalization) - def test__finalize_physical_nics_for_success_2(self, mock_run_command, mock_time): - dpdk_interfaces = 2 - dpdk_vars = dict() - dpdk_vars[conf_file.CFSP_DPDK_DPDK_DIRECTORY] = 'dpdk_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PKTGEN_DIRECTORY] = 'pktgen_directory/' - dpdk_vars[conf_file.CFSP_DPDK_PROGRAM_NAME] = 'program_name' - dpdk_vars[conf_file.CFSP_DPDK_COREMASK] = 'coremask' - dpdk_vars[conf_file.CFSP_DPDK_MEMORY_CHANNEL] = 'memory_channels' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_1] = '1:00.0' - dpdk_vars[conf_file.CFSP_DPDK_BUS_SLOT_NIC_2] = '1:00.1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_1] = 'interface_1' - dpdk_vars[conf_file.CFSP_DPDK_NAME_IF_2] = 'interface_2' - self.mut._finalize_physical_nics(dpdk_interfaces, dpdk_vars) - self.assertEqual(MockRunCommand.mock_run_command_finalization(), - [True, True, True, True, True, True]) - - def test__finalize_physical_nics_for_failure(self, mock_time): - dpdk_interfaces = 0 - dpdk_vars = dict() - self.assertRaises(ValueError, self.mut._finalize_physical_nics, - dpdk_interfaces, dpdk_vars) - - def test__cores_configuration_for_success(self, mock_time): - coremask = '1f' - expected = '[2:1].0,[4:3].1' - output = mut.DpdkPacketGenerator._cores_configuration(coremask, - 1, 2, 2) - self.assertEqual(expected, output) - - def test__cores_configuration_for_success_2(self, mock_time): - coremask = '1f' - expected = '2.0,[4:3].1' - output = mut.DpdkPacketGenerator._cores_configuration(coremask, - 1, 1, 2) - self.assertEqual(expected, output) - - def test__cores_configuration_for_success_3(self, mock_time): - coremask = '1f' - expected = '[3:2].0,4.1' - output = mut.DpdkPacketGenerator._cores_configuration(coremask, - 1, 2, 1) - self.assertEqual(expected, output) - - def test__cores_configuration_for_failure(self, mock_time): - coremask = '1' - self.assertRaises(ValueError, - mut.DpdkPacketGenerator._cores_configuration, - coremask, 1, 2, 2) - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.common.run_command') - def test__change_vlan_for_success(self, mock_run_command, mock_log, mock_time): - mut.DpdkPacketGenerator._change_vlan('/directory/', 'pcap_file', '10') - expected_param = '/directory/vlan_tag.sh /directory/pcap_file 10' - mock_run_command.assert_called_with(expected_param) diff --git a/yardstick/vTC/apexlake/tests/generates_template_test.py b/yardstick/vTC/apexlake/tests/generates_template_test.py deleted file mode 100644 index cc3e1bf6e..000000000 --- a/yardstick/vTC/apexlake/tests/generates_template_test.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import experimental_framework.heat_template_generation as heat_gen -import mock -import os -import experimental_framework.common as common -from experimental_framework import APEX_LAKE_ROOT - -__author__ = 'gpetralx' - - -def reset_common(): - common.LOG = None - common.CONF_FILE = None - common.DEPLOYMENT_UNIT = None - common.ITERATIONS = None - common.BASE_DIR = None - common.RESULT_DIR = None - common.TEMPLATE_DIR = None - common.TEMPLATE_NAME = None - common.TEMPLATE_FILE_EXTENSION = None - common.PKTGEN = None - common.PKTGEN_DIR = None - common.PKTGEN_DPDK_DIRECTORY = None - common.PKTGEN_PROGRAM = None - common.PKTGEN_COREMASK = None - common.PKTGEN_MEMCHANNEL = None - common.PKTGEN_BUS_SLOT_NIC_1 = None - common.PKTGEN_BUS_SLOT_NIC_2 = None - common.INFLUXDB_IP = None - common.INFLUXDB_PORT = None - common.INFLUXDB_DB_NAME = None - - -class TestGeneratesTemplate(unittest.TestCase): - - def setUp(self): - self.deployment_configuration = { - 'vnic_type': ['normal', 'direct'], - 'ram': ['1024'], - 'vcpus': ['2'] - } - self.template_name = 'VTC_base_single_vm_wait.tmp' - # common.init() - - def tearDown(self): - reset_common() - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.common.get_template_dir') - def test_generates_template_for_success(self, mock_template_dir, - mock_log): - generated_templates_dir = os.path.join( - APEX_LAKE_ROOT, 'tests/data/generated_templates/') - mock_template_dir.return_value = generated_templates_dir - test_templates = os.path.join(APEX_LAKE_ROOT, - 'tests/data/test_templates/') - heat_gen.generates_templates(self.template_name, - self.deployment_configuration) - for dirname, dirnames, filenames in os.walk(test_templates): - for filename in filenames: - with open(test_templates + filename) as test: - with open(generated_templates_dir + filename) as generated: - self.assertListEqual(test.readlines(), - generated.readlines()) - - self.template_name = os.path.join( - APEX_LAKE_ROOT, - 'tests/data/generated_templates/VTC_base_single_vm_wait.tmp') - heat_gen.generates_templates(self.template_name, - self.deployment_configuration) - for dirname, dirnames, filenames in os.walk(test_templates): - for filename in filenames: - with open(test_templates + filename) as test: - with open(generated_templates_dir + filename) as generated: - self.assertListEqual(test.readlines(), - generated.readlines()) - - @mock.patch('experimental_framework.common.get_template_dir') - def test_get_all_heat_templates_for_success(self, template_dir): - generated_templates = os.path.join(APEX_LAKE_ROOT, - 'tests/data/generated_templates/') - template_dir.return_value = generated_templates - extension = '.yaml' - expected = ['experiment_1.yaml', 'experiment_2.yaml'] - result = heat_gen.get_all_heat_templates(generated_templates, - extension) - self.assertListEqual(expected, result) diff --git a/yardstick/vTC/apexlake/tests/heat_manager_test.py b/yardstick/vTC/apexlake/tests/heat_manager_test.py deleted file mode 100644 index 58bd75560..000000000 --- a/yardstick/vTC/apexlake/tests/heat_manager_test.py +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 print_function - -from __future__ import absolute_import -import os -import unittest -import logging -import experimental_framework.common as common - -from experimental_framework import heat_manager, APEX_LAKE_ROOT -import mock - -__author__ = 'gpetralx' - - -def get_mock_heat(version, *args, **kwargs): - return MockHeat() - - -class MockStacks(object): - - def __init__(self, stacks): - self.stacks = stacks - - def list(self): - list_name = list() - for stack in self.stacks: - list_name.append(stack.stack_name) - print(list_name) - return self.stacks - - def validate(self, template=None): - return False - - def delete(self, id): - for stack in self.stacks: - if stack.id == id: - return self.stacks.remove(stack) - - def create(self, stack_name=None, files=None, template=None, - parameters=None): - print(stack_name) - self.stacks.append(MockStack(stack_name)) - - -class MockStacks_2(object): - - def __init__(self, stacks): - self.stacks = stacks - - def list(self): - raise Exception - - -class MockStack(object): - - def __init__(self, stack_name): - self.name = stack_name - - @property - def stack_status(self): - return self.stack_name + '_status' - - @property - def stack_name(self): - return self.name - - @property - def id(self): - return self.name - - def __eq__(self, other): - return self.name == other - - -class MockHeat(object): - - def __init__(self): - stacks = [MockStack('stack_1'), MockStack('stack_2')] - self.stacks_list = MockStacks(stacks) - - @property - def stacks(self): - return self.stacks_list - - -class MockHeat_2(MockHeat): - - def __init__(self): - stacks = [MockStack('stack_1'), MockStack('stack_2')] - self.stacks_list = MockStacks_2(stacks) - - -class HeatManagerMock(heat_manager.HeatManager): - - def init_heat(self): - if self.heat is None: - self.heat = MockHeat() - - -class HeatManagerMock_2(heat_manager.HeatManager): - - def init_heat(self): - if self.heat is None: - self.heat = MockHeat_2() - - -class TestHeatManager(unittest.TestCase): - - def setUp(self): - credentials = dict() - credentials['ip_controller'] = '1.1.1.1' - credentials['heat_url'] = 'http://heat_url' - credentials['user'] = 'user' - credentials['password'] = 'password' - credentials['auth_uri'] = 'auth_uri' - credentials['project'] = 'project' - self.heat_manager = HeatManagerMock(credentials) - self.heat_manager.init_heat() - - def tearDown(self): - pass - - def test_is_stack_deployed_for_success(self): - self.assertTrue(self.heat_manager.is_stack_deployed('stack_1')) - self.assertFalse(self.heat_manager.is_stack_deployed('stack_n')) - - def test_check_status_for_success(self): - self.assertEqual('stack_1_status', - self.heat_manager.check_stack_status('stack_1')) - self.assertEqual('NOT_FOUND', - self.heat_manager.check_stack_status('stack_x')) - - def test_validate_template_for_success(self): - template_file = os.path.join( - APEX_LAKE_ROOT, - 'tests/data/test_templates/VTC_base_single_vm_wait_1.yaml') - with self.assertRaises(ValueError): - self.heat_manager.validate_heat_template(template_file) - - def test_delete_stack_for_success(self): - self.assertTrue(self.heat_manager.delete_stack('stack_1')) - self.assertFalse(self.heat_manager.delete_stack('stack_x')) - - def test_delete_stack_for_success_2(self): - self.assertTrue(self.heat_manager.delete_stack('stack_1')) - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('heatclient.common.template_utils.get_template_contents') - @mock.patch('heatclient.client.Client') - # @mock.patch('heatclient.client.Client', side_effect=DummyHeatClient) - def test_create_stack_for_success(self, mock_stack_create, - mock_get_template_contents, - mock_log): - return_value = ({'template': 'template'}, 'template') - mock_get_template_contents.return_value = return_value - self.heat_manager.create_stack('template', 'stack_n', 'parameters') - self.assertTrue(self.heat_manager.is_stack_deployed('stack_n')) - - -class TestHeatManager_2(unittest.TestCase): - - def setUp(self): - credentials = dict() - credentials['ip_controller'] = '1.1.1.1' - credentials['heat_url'] = 'http://heat_url' - credentials['user'] = 'user' - credentials['password'] = 'password' - credentials['auth_uri'] = 'auth_uri' - credentials['project'] = 'project' - self.heat_manager = HeatManagerMock_2(credentials) - - def tearDown(self): - pass - - def test_delete_stack_for_success_2(self): - common.LOG = logging.getLogger() - self.assertFalse(self.heat_manager.delete_stack('stack_1')) - - -class ServiceCatalog(): - - def url_for(self, service_type): - return 'http://heat_url' - - -class KeystoneMock(object): - - @property - def auth_token(self): - return 'token' - - service_catalog = ServiceCatalog() - - -class TestHeatInit(unittest.TestCase): - - def setUp(self): - credentials = dict() - credentials['ip_controller'] = '1.1.1.1' - credentials['heat_url'] = 'http://heat_url' - credentials['user'] = 'user' - credentials['password'] = 'password' - credentials['auth_uri'] = 'auth_uri' - credentials['project'] = 'project' - self.heat_manager = heat_manager.HeatManager(credentials) - - def tearDown(self): - pass - - @mock.patch('heatclient.client.Client') - @mock.patch('keystoneclient.v2_0.client.Client') - def test_heat_init_for_sanity(self, keystone_client, heat_client): - keystone_client.return_value = KeystoneMock() - heat_client.return_value = MockHeat() - self.heat_manager.init_heat() - keystone_client.assert_called_once_with(username='user', - tenant_name='project', - password='password', - auth_url='auth_uri') - heat_client.assert_called_once_with('1', endpoint='http://heat_url', - token='token') diff --git a/yardstick/vTC/apexlake/tests/instantiation_validation_bench_test.py b/yardstick/vTC/apexlake/tests/instantiation_validation_bench_test.py deleted file mode 100644 index 69c5d745e..000000000 --- a/yardstick/vTC/apexlake/tests/instantiation_validation_bench_test.py +++ /dev/null @@ -1,339 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import mock -import os -import experimental_framework.constants.conf_file_sections as cfs -import experimental_framework.common as common -import experimental_framework.benchmarks.\ - instantiation_validation_benchmark as iv_module -from experimental_framework.benchmarks.\ - instantiation_validation_benchmark import InstantiationValidationBenchmark -from six.moves import map -from six.moves import range - - -kill_counter = [0, 0] -command_counter = [0, 0, 0, 0, 0] -replace_counter = [0, 0, 0] - - -def dummy_os_kill(pid, signal, get_counters=None): - if get_counters: - return kill_counter - if pid == 1234: - kill_counter[0] += 1 - return - if pid == 4321: - kill_counter[1] += 1 - return - raise Exception(pid) - - -def dummy_run_command(command, get_counters=None): - if get_counters: - return command_counter - if command == 'sudo smcroute -k': - command_counter[0] += 1 - return - elif command == 'sudo ip link delete interface.100': - command_counter[1] += 1 - return - elif command == 'sudo kill 1234': - kill_counter[0] += 1 - return - elif command == 'sudo kill 4321': - kill_counter[1] += 1 - return - raise Exception(command) - - -def dummy_run_command_2(command, get_counters=None): - if get_counters: - return command_counter - if command == 'sudo ip link add link interface name interface.' \ - '100 type vlan id 100': - command_counter[0] += 1 - return - elif command == 'sudo ifconfig interface.100 10.254.254.254 up' \ - ' netmask 255.255.255.248': - command_counter[1] += 1 - return - elif command == "sudo echo 'mgroup from interface.100 group" \ - " 224.192.16.1' > /etc/smcroute.conf": - command_counter[2] += 1 - return - elif command == "sudo smcroute -d": - command_counter[3] += 1 - return - elif command == "sudo test_sniff interface.100 128 &": - command_counter[4] += 1 - return - - -def dummy_replace_in_file(file, str_from, str_to, get_couters=None): - if get_couters: - return replace_counter - if file == 'file': - if str_from == 'local out_file = "result_file"': - if str_to == 'local out_file = ""': - replace_counter[0] += 1 - return - if str_from == 'local traffic_rate = 100': - if str_to == 'local traffic_rate = 0': - replace_counter[1] += 1 - return - if str_from == 'local traffic_delay = 60': - if str_to == 'local traffic_delay = 0': - replace_counter[2] += 1 - return - if str_from == 'local out_file = ""': - if str_to == 'local out_file = "result_file"': - replace_counter[3] += 1 - return - if str_from == 'local traffic_rate = 0': - if str_to == 'local traffic_rate = 100': - replace_counter[4] += 1 - return - if str_from == 'local traffic_delay = 0': - if str_to == 'local traffic_delay = 60': - replace_counter[5] += 1 - return - raise Exception(file + ' ' + str_from + ' ' + str_to) - - -class DummyDpdkPacketGenerator(): - - counter = 0 - - def __init__(self): - DummyDpdkPacketGenerator.counter = [0, 0] - - def init_dpdk_pktgen(self, dpdk_interfaces, lua_script, pcap_file_0, - pcap_file_1, vlan_0, vlan_1): - if dpdk_interfaces == 1: - if lua_script == 'constant_traffic.lua': - if pcap_file_0 == 'packet_512.pcap': - if pcap_file_1 == 'igmp.pcap': - if vlan_0 == '-1': - if vlan_1 == '-1': - DummyDpdkPacketGenerator.counter[0] += 1 - - def send_traffic(self): - DummyDpdkPacketGenerator.counter[1] += 1 - return - - -class DummyInstantiaionValidationBenchmark(InstantiationValidationBenchmark): - - counter = [0, 0, 0, 0, 0] - - def _configure_lua_file(self, traffic_rate_percentage, traffic_time): - DummyInstantiaionValidationBenchmark.counter[0] += 1 - - def _init_packet_checker(self): - DummyInstantiaionValidationBenchmark.counter[1] += 1 - - def _finalize_packet_checker(self): - DummyInstantiaionValidationBenchmark.counter[2] += 1 - - def _reset_lua_file(self, traffic_rate_percentage, traffic_time): - if traffic_rate_percentage == '1' and traffic_time == '10': - DummyInstantiaionValidationBenchmark.counter[3] += 1 - - def _get_results(self): - DummyInstantiaionValidationBenchmark.counter[4] += 1 - res = {'test': 'result'} - return res - - -class InstantiationValidationInitTest(unittest.TestCase): - - def setUp(self): - common.BASE_DIR = os.getcwd() - self.iv = InstantiationValidationBenchmark('InstantiationValidation', - dict()) - - def tearDown(self): - common.BASE_DIR = None - - @mock.patch('experimental_framework.common.get_base_dir') - def test___init___for_success(self, mock_base_dir): - mock_base_dir.return_value = 'base_dir/' - iv = InstantiationValidationBenchmark('InstantiationValidation', - dict()) - self.assertEqual(iv.base_dir, - 'base_dir/experimental_framework/' - 'packet_generators/dpdk_pktgen/') - self.assertEqual(iv.results_file, - 'base_dir/experimental_framework/' - 'packet_generators/dpdk_pktgen/packets.res') - self.assertEqual(iv.lua_file, - 'base_dir/experimental_framework/' - 'packet_generators/dpdk_pktgen/constant_traffic.lua') - self.assertEqual(iv.pkt_checker_command, - 'base_dir/experimental_framework/' - 'libraries/packet_checker/test_sniff ') - self.assertEqual(iv.res_dir, '') - self.assertEqual(iv.interface_name, '') - - def test_init_for_success(self): - self.iv.init() - - def test_finalize_for_success(self): - self.iv.finalize() - - def test_get_features_for_success(self): - - expected = dict() - expected['description'] = 'Instantiation Validation Benchmark' - expected['parameters'] = [ - iv_module.THROUGHPUT, - iv_module.VLAN_SENDER, - iv_module.VLAN_RECEIVER - ] - expected['allowed_values'] = dict() - expected['allowed_values'][iv_module.THROUGHPUT] = \ - list(map(str, list(range(0, 100)))) - expected['allowed_values'][iv_module.VLAN_SENDER] = \ - list(map(str, list(range(-1, 4096)))) - expected['allowed_values'][iv_module.VLAN_RECEIVER] = \ - list(map(str, list(range(-1, 4096)))) - expected['default_values'] = dict() - expected['default_values'][iv_module.THROUGHPUT] = '1' - expected['default_values'][iv_module.VLAN_SENDER] = '-1' - expected['default_values'][iv_module.VLAN_RECEIVER] = '-1' - output = self.iv.get_features() - self.assertEqual(expected, output) - - @mock.patch('subprocess.check_output') - def test__get_pids_for_success(self, mock_getoutput): - expected = [1234] - mock_getoutput.return_value = '1234' - output = self.iv._get_pids() - self.assertEqual(expected, output) - - expected = [1234, 4321] - mock_getoutput.return_value = '1234\n4321' - output = self.iv._get_pids() - self.assertEqual(expected, output) - - expected = [] - mock_getoutput.return_value = None - output = self.iv._get_pids() - self.assertEqual(expected, output) - - @mock.patch('experimental_framework.common.run_command', - side_effect=dummy_run_command) - @mock.patch('os.kill', side_effect=dummy_os_kill) - @mock.patch('experimental_framework.benchmarks.' - 'instantiation_validation_benchmark.' - 'InstantiationValidationBenchmark._get_pids') - def test__finalize_packet_checker_for_success(self, - mock_pids, - mock_os_kill, - mock_run_command): - global command_counter - global kill_counter - command_counter = [0, 0, 0, 0, 0] - kill_counter = [0, 0] - mock_pids.return_value = [1234, 4321] - self.iv.interface_name = 'interface' - self.iv.params[iv_module.VLAN_RECEIVER] = '100' - self.iv._finalize_packet_checker() - self.assertEqual(dummy_os_kill('', '', True), [1, 1]) - self.assertEqual(dummy_run_command('', True), [1, 1, 0, 0, 0]) - - @mock.patch('experimental_framework.benchmarks.instantiation_validation_benchmark.time') - @mock.patch('os.chdir') - @mock.patch('experimental_framework.common.run_command', - side_effect=dummy_run_command_2) - @mock.patch('experimental_framework.benchmarks.' - 'instantiation_validation_benchmark.' - 'InstantiationValidationBenchmark._get_pids') - @mock.patch('os.kill', side_effect=dummy_os_kill) - def test__init_packet_checker_for_success(self, mock_kill, mock_pids, - mock_run_command, mock_chdir, mock_time): - global command_counter - command_counter = [0, 0, 0, 0, 0] - mock_pids.return_value = [1234, 4321] - self.iv.pkt_checker_command = 'test_sniff ' - self.iv.interface_name = 'interface' - self.iv.params[iv_module.VLAN_RECEIVER] = '100' - self.iv._init_packet_checker() - self.assertEqual(dummy_run_command('', True), [1, 1, 1, 1, 1]) - - @mock.patch('experimental_framework.common.get_file_first_line') - def test__get_results_for_success(self, mock_get_file): - self.iv.res_dir = 'directory' - mock_get_file.side_effect = ['100', '50'] - expected = {'failure': '0'} - output = self.iv._get_results() - self.assertEqual(expected, output) - - mock_get_file.side_effect = ['10', '50'] - expected = {'failure': '1'} - output = self.iv._get_results() - self.assertEqual(expected, output) - - @mock.patch('experimental_framework.common.replace_in_file', - side_effect=dummy_replace_in_file) - def test__reset_lua_file_for_success(self, mock_replace): - global replace_counter - replace_counter = [0, 0, 0, 0, 0, 0] - traffic_rate_percentage = '100' - traffic_time = '60' - self.iv.lua_file = 'file' - self.iv.results_file = 'result_file' - self.iv._reset_lua_file(traffic_rate_percentage, traffic_time) - self.assertEqual(dummy_replace_in_file('', '', '', True), - [1, 1, 1, 0, 0, 0]) - - @mock.patch('experimental_framework.common.replace_in_file', - side_effect=dummy_replace_in_file) - def test__configure_lua_file_for_success(self, mock_replace): - global replace_counter - replace_counter = [0, 0, 0, 0, 0, 0] - traffic_rate_percentage = '100' - traffic_time = '60' - self.iv.lua_file = 'file' - self.iv.results_file = 'result_file' - self.iv._configure_lua_file(traffic_rate_percentage, traffic_time) - self.assertEqual(dummy_replace_in_file('', '', '', True), - [0, 0, 0, 1, 1, 1]) - - @mock.patch('experimental_framework.benchmarks.instantiation_validation_benchmark.time') - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.packet_generators.' - 'dpdk_packet_generator.DpdkPacketGenerator', - side_effect=DummyDpdkPacketGenerator) - @mock.patch('experimental_framework.common.get_dpdk_pktgen_vars') - def test_run_for_success(self, mock_common_get_vars, mock_pktgen, - mock_log, mock_time): - rval = dict() - rval[cfs.CFSP_DPDK_BUS_SLOT_NIC_2] = 'bus_2' - rval[cfs.CFSP_DPDK_NAME_IF_2] = 'if_2' - mock_common_get_vars.return_value = rval - expected = {'test': 'result'} - iv = DummyInstantiaionValidationBenchmark('InstantiationValidation', - dict()) - iv.params[iv_module.THROUGHPUT] = '1' - output = iv.run() - self.assertEqual(expected, output) - self.assertEqual(DummyDpdkPacketGenerator.counter, - [1, 1]) - self.assertEqual(DummyInstantiaionValidationBenchmark.counter, - [1, 1, 1, 1, 1]) diff --git a/yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py b/yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py deleted file mode 100644 index f9aa9473f..000000000 --- a/yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import mock - -from six.moves import range - -import experimental_framework.common as common -import experimental_framework.deployment_unit as deploy -import experimental_framework.benchmarks.\ - instantiation_validation_noisy_neighbors_benchmark as mut -from experimental_framework import APEX_LAKE_ROOT - - -class InstantiationValidationInitTest(unittest.TestCase): - - def setUp(self): - name = 'instantiation_validation_noisy' - params = {'param': 'value'} - openstack_credentials = dict() - openstack_credentials['ip_controller'] = '' - openstack_credentials['project'] = '' - openstack_credentials['auth_uri'] = '' - openstack_credentials['user'] = '' - openstack_credentials['heat_url'] = '' - openstack_credentials['password'] = '' - common.DEPLOYMENT_UNIT = deploy.DeploymentUnit(openstack_credentials) - common.BASE_DIR = APEX_LAKE_ROOT - common.TEMPLATE_DIR = 'tests/data/generated_templates' - self.iv = mut.\ - InstantiationValidationNoisyNeighborsBenchmark(name, params) - - def tearDown(self): - common.BASE_DIR = None - common.TEMPLATE_DIR = None - - @mock.patch('experimental_framework.benchmarks.' - 'instantiation_validation_benchmark.' - 'InstantiationValidationBenchmark') - @mock.patch('experimental_framework.common.get_template_dir') - def test___init___for_success(self, mock_get_template_dir, - mock_instant_validation): - mock_get_template_dir.return_value = '/directory/' - name = 'instantiation_validation_noisy' - params = {'param': 'value'} - obj = mut.InstantiationValidationNoisyNeighborsBenchmark(name, params) - self.assertEqual(obj.template_file, '/directory/stress_workload.yaml') - self.assertEqual(obj.stack_name, 'neighbour') - self.assertEqual(obj.neighbor_stack_names, list()) - - def test_get_features_for_success(self): - expected = dict() - expected['description'] = 'Instantiation Validation Benchmark with ' \ - 'noisy neghbors' - expected['parameters'] = list() - expected['allowed_values'] = dict() - expected['default_values'] = dict() - expected['parameters'].append('throughput') - expected['parameters'].append('vlan_sender') - expected['parameters'].append('vlan_receiver') - expected['parameters'].append('network') - expected['parameters'].append('subnet') - expected['parameters'].append(mut.NUM_OF_NEIGHBORS) - expected['parameters'].append(mut.AMOUNT_OF_RAM) - expected['parameters'].append(mut.NUMBER_OF_CORES) - expected['allowed_values']['throughput'] = [str(x) for x in range(100)] - expected['allowed_values']['vlan_sender'] = [str(x) for x in - range(-1, 4096)] - expected['allowed_values']['vlan_receiver'] = [str(x) for x in - range(-1, 4096)] - expected['allowed_values'][mut.NUM_OF_NEIGHBORS] = \ - ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] - expected['allowed_values'][mut.NUMBER_OF_CORES] = \ - ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] - expected['allowed_values'][mut.AMOUNT_OF_RAM] = \ - ['256M', '1G', '2G', '3G', '4G', '5G', '6G', '7G', '8G', '9G', - '10G'] - expected['default_values']['throughput'] = '1' - expected['default_values']['vlan_sender'] = '-1' - expected['default_values']['vlan_receiver'] = '-1' - expected['default_values']['network'] = '' - expected['default_values']['subnet'] = '' - expected['default_values'][mut.NUM_OF_NEIGHBORS] = '1' - expected['default_values'][mut.NUMBER_OF_CORES] = '1' - expected['default_values'][mut.AMOUNT_OF_RAM] = '256M' - output = self.iv.get_features() - self.assertEqual(expected['description'], output['description']) - - for item in output['parameters']: - self.assertIn(item, expected['parameters']) - for key in output['allowed_values'].keys(): - self.assertEqual(expected['allowed_values'][key], - output['allowed_values'][key]) - for key in output['default_values'].keys(): - self.assertEqual(expected['default_values'][key], - output['default_values'][key]) - - @mock.patch('experimental_framework.common.replace_in_file') - @mock.patch('experimental_framework.common.' - 'DEPLOYMENT_UNIT.deploy_heat_template') - def test_init_for_success(self, mock_deploy_heat, mock_replace): - self.iv.lua_file = 'file' - self.iv.results_file = 'res_file' - self.iv.params = {'number_of_cores': 1, - 'amount_of_ram': 1, - 'network': 1, - 'subnet': 1, - 'num_of_neighbours': 1} - self.iv.template_file = 'template.yaml' - self.iv.init() - mock_replace.assert_called_once_with('file', - 'local out_file = ""', - 'local out_file = "' + - 'res_file' + '"') - mock_deploy_heat.assert_called_once_with('template.yaml', - 'neighbour0', - {'cores': 1, - 'memory': 1, - 'network': 1, - 'subnet': 1}) - self.assertEqual(self.iv.neighbor_stack_names, ['neighbour0']) - - @mock.patch('experimental_framework.common.replace_in_file') - @mock.patch('experimental_framework.common.' - 'DEPLOYMENT_UNIT.destroy_heat_template') - def test_finalize_for_success(self, mock_heat_destroy, mock_replace): - self.iv.lua_file = 'file' - self.iv.results_file = 'res_file' - self.iv.neighbor_stack_names = ['neighbor0'] - stack_name = 'neighbor0' - self.iv.finalize() - mock_heat_destroy.assert_called_once_with(stack_name) - mock_replace.assert_called_once_with('file', - 'local out_file = "' + - 'res_file' + '"', - 'local out_file = ""') - self.assertEqual(self.iv.neighbor_stack_names, list()) diff --git a/yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py b/yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py deleted file mode 100644 index 39b38d7d3..000000000 --- a/yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import mock -import os -import experimental_framework.common as common -from experimental_framework.benchmarks \ - import multi_tenancy_throughput_benchmark as bench -from six.moves import range - -__author__ = 'gpetralx' - - -class MockDeploymentUnit(object): - - def deploy_heat_template(self, temp_file, stack_name, heat_param): - pass - - def destroy_heat_template(self, stack_name): - pass - - -def get_deployment_unit(): - return MockDeploymentUnit() - - -class TestMultiTenancyThroughputBenchmark(unittest.TestCase): - - def setUp(self): - name = 'benchmark' - params = dict() - common.BASE_DIR = os.getcwd() - self.benchmark = bench.MultiTenancyThroughputBenchmark(name, params) - - def tearDown(self): - pass - - def test_get_features_for_sanity(self): - output = self.benchmark.get_features() - self.assertIsInstance(output, dict) - self.assertIn('parameters', list(output.keys())) - self.assertIn('allowed_values', list(output.keys())) - self.assertIn('default_values', list(output.keys())) - self.assertIsInstance(output['parameters'], list) - self.assertIsInstance(output['allowed_values'], dict) - self.assertIsInstance(output['default_values'], dict) - - @mock.patch('experimental_framework.common.DEPLOYMENT_UNIT', - side_effect=get_deployment_unit) - @mock.patch('experimental_framework.common.replace_in_file') - def test_init_for_success(self, replace_in_file, deployment_unit): - num_of_neighbours = 5 - num_of_cores = '3' - amount_of_ram = '250M' - - self.benchmark.lua_file = 'lua_file' - self.benchmark.results_file = 'result_file' - self.benchmark.params['num_of_neighbours'] = str(num_of_neighbours) - self.benchmark.params['number_of_cores'] = num_of_cores - self.benchmark.params['amount_of_ram'] = amount_of_ram - self.benchmark.init() - - param_1 = 'lua_file' - param_2 = 'local out_file = ""' - param_3 = 'local out_file = "result_file"' - replace_in_file.assert_called_once_with(param_1, param_2, param_3) - - heat_param = dict() - heat_param['cores'] = num_of_cores - heat_param['memory'] = amount_of_ram - heat_param['network'] = '' - heat_param['subnet'] = '' - neighbor_stack_names = list() - - deployment_unit.\ - deploy_heat_template.assert_called_with( - self.benchmark.template_file, - 'neighbour' + str(num_of_neighbours - 1), heat_param) - - for i in range(0, num_of_neighbours): - neighbor_stack_names.append('neighbour' + str(i)) - - self.assertListEqual(neighbor_stack_names, - self.benchmark.neighbor_stack_names) - - @mock.patch('experimental_framework.common.DEPLOYMENT_UNIT', - side_effect=get_deployment_unit) - @mock.patch('experimental_framework.common.replace_in_file') - def test_finalize_for_success(self, replace_in_file, deployment_unit): - num_of_neighbours = 5 - self.benchmark.lua_file = 'lua_file' - self.benchmark.results_file = 'result_file' - self.benchmark.params['num_of_neighbours'] = str(num_of_neighbours) - self.benchmark.neighbor_stack_names = list() - self.benchmark.neighbor_stack_names.append(str(num_of_neighbours - 1)) - self.benchmark.finalize() - - param_1 = 'lua_file' - param_2 = 'local out_file = "result_file"' - param_3 = 'local out_file = ""' - replace_in_file.assert_called_once_with(param_1, param_2, param_3) - - deployment_unit.\ - destroy_heat_template.\ - assert_called_with(str(num_of_neighbours - 1)) - self.assertListEqual(list(), self.benchmark.neighbor_stack_names) diff --git a/yardstick/vTC/apexlake/tests/rfc2544_throughput_benchmark_test.py b/yardstick/vTC/apexlake/tests/rfc2544_throughput_benchmark_test.py deleted file mode 100644 index 487de7775..000000000 --- a/yardstick/vTC/apexlake/tests/rfc2544_throughput_benchmark_test.py +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import mock -import os -from experimental_framework.benchmarks import rfc2544_throughput_benchmark \ - as mut -import experimental_framework.common as common - - -class RFC2544ThroughputBenchmarkRunTest(unittest.TestCase): - - def setUp(self): - name = 'benchmark' - params = dict() - params[mut.VLAN_SENDER] = '1' - params[mut.VLAN_RECEIVER] = '2' - common.BASE_DIR = os.getcwd() - self.benchmark = mut.RFC2544ThroughputBenchmark(name, params) - - def tearDown(self): - common.BASE_DIR = None - - def test_get_features_for_sanity(self): - output = self.benchmark.get_features() - self.assertIsInstance(output, dict) - self.assertIn('parameters', list(output.keys())) - self.assertIn('allowed_values', list(output.keys())) - self.assertIn('default_values', list(output.keys())) - self.assertIsInstance(output['parameters'], list) - self.assertIsInstance(output['allowed_values'], dict) - self.assertIsInstance(output['default_values'], dict) - - def test_init(self): - self.assertEqual(self.benchmark.init(), None) - - def test_finalize(self): - self.assertEqual(self.benchmark.finalize(), None) - - @mock.patch('experimental_framework.common.LOG') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark.' - '_reset_lua_file') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark.' - '_configure_lua_file') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark.' - '_extract_packet_size_from_params') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark.RFC2544ThroughputBenchmark.' - '_get_results') - @mock.patch('experimental_framework.benchmarks.' - 'rfc2544_throughput_benchmark.dpdk.DpdkPacketGenerator') - def test_run_for_success(self, mock_dpdk, mock_get_results, - mock_extract_size, conf_lua_file_mock, - reset_lua_file_mock, mock_common_log): - expected = {'results': 0} - mock_extract_size.return_value = '1' - mock_get_results.return_value = {'results': 0} - output = self.benchmark.run() - self.assertEqual(expected, output) - conf_lua_file_mock.assert_called_once() - dpdk_instance = mock_dpdk() - dpdk_instance.init_dpdk_pktgen.assert_called_once_with( - dpdk_interfaces=2, pcap_file_0='packet_1.pcap', - pcap_file_1='igmp.pcap', lua_script='rfc2544.lua', - vlan_0='1', vlan_1='2') - dpdk_instance.send_traffic.assert_called_once_with() - - -class RFC2544ThroughputBenchmarkOthers(unittest.TestCase): - - def setUp(self): - name = 'benchmark' - params = {'packet_size': '128'} - common.BASE_DIR = os.getcwd() - self.benchmark = mut.RFC2544ThroughputBenchmark(name, params) - - def tearDown(self): - common.BASE_DIR = None - - def test__extract_packet_size_from_params_for_success(self): - expected = '128' - output = self.benchmark._extract_packet_size_from_params() - self.assertEqual(expected, output) - - @mock.patch('experimental_framework.common.replace_in_file') - def test__configure_lua_file(self, mock_common_replace_in_file): - self.benchmark.lua_file = 'lua_file' - self.benchmark.results_file = 'result_file' - self.benchmark._configure_lua_file() - mock_common_replace_in_file.\ - assert_called_once_with('lua_file', 'local out_file = ""', - 'local out_file = "result_file"') - - @mock.patch('experimental_framework.common.replace_in_file') - def test__reset_lua_file(self, mock_common_replace_in_file): - self.benchmark.lua_file = 'lua_file' - self.benchmark.results_file = 'result_file' - self.benchmark._reset_lua_file() - mock_common_replace_in_file.\ - assert_called_once_with('lua_file', - 'local out_file = "result_file"', - 'local out_file = ""') - - -class RFC2544ThroughputBenchmarkGetResultsTest(unittest.TestCase): - - def setUp(self): - common.BASE_DIR = os.getcwd() - - def tearDown(self): - common.BASE_DIR = None - - @mock.patch('experimental_framework.common.get_file_first_line') - def test__get_results_for_success(self, mock_common_file_line): - name = 'benchmark' - params = {'packet_size': '128'} - self.benchmark = mut.RFC2544ThroughputBenchmark(name, params) - self.benchmark.results_file = 'base_dir/experimental_framework/' \ - 'packet_generators/dpdk_pktgen/' \ - 'experiment.res' - mock_common_file_line.return_value = '10' - expected = {'throughput': 10} - output = self.benchmark._get_results() - self.assertEqual(expected, output) - mock_common_file_line.\ - assert_called_once_with('base_dir/experimental_framework/' - 'packet_generators/dpdk_pktgen/' - 'experiment.res') - - @mock.patch('experimental_framework.common.get_file_first_line') - def test__get_results_for_success_2(self, mock_common_file_line): - name = 'benchmark' - params = {'packet_size': '128'} - self.benchmark = mut.RFC2544ThroughputBenchmark(name, params) - self.benchmark.results_file = 'base_dir/experimental_framework/' \ - 'packet_generators/dpdk_pktgen/' \ - 'experiment.res' - mock_common_file_line.return_value = '1XXX0' - expected = {'throughput': 0} - output = self.benchmark._get_results() - self.assertEqual(expected, output) - mock_common_file_line.\ - assert_called_once_with('base_dir/experimental_framework/' - 'packet_generators/dpdk_pktgen/' - 'experiment.res') diff --git a/yardstick/vTC/apexlake/tests/tree_node_test.py b/yardstick/vTC/apexlake/tests/tree_node_test.py deleted file mode 100644 index fb38b69bd..000000000 --- a/yardstick/vTC/apexlake/tests/tree_node_test.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) 2015 Intel Research and Development Ireland Ltd. -# -# 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 unittest -import experimental_framework.heat_template_generation as heat_gen - -__author__ = 'gpetralx' - - -class TestTreeNode(unittest.TestCase): - - def setUp(self): - self.tree = heat_gen.TreeNode() - - def tearDown(self): - pass - - def test_add_child_for_success(self): - child = heat_gen.TreeNode() - self.tree.add_child(child) - self.assertIn(child, self.tree.down) - - def test_get_parent_for_success(self): - self.assertIsNone(self.tree.get_parent()) - child = heat_gen.TreeNode() - self.tree.add_child(child) - self.assertEqual(self.tree, child.get_parent()) - - def test_get_children_for_success(self): - self.assertListEqual(list(), self.tree.get_children()) - child = heat_gen.TreeNode() - self.tree.add_child(child) - children = [child] - self.assertListEqual(children, self.tree.get_children()) - - def test_variable_name_for_success(self): - self.assertEqual('', self.tree.get_variable_name()) - variable_name = 'test' - self.tree.set_variable_name(variable_name) - self.assertEqual(variable_name, self.tree.get_variable_name()) - - def test_variable_value_for_success(self): - self.assertEqual(0, self.tree.get_variable_value()) - variable_value = 1 - self.tree.set_variable_value(variable_value) - self.assertEqual(variable_value, self.tree.get_variable_value()) - - def test_get_path_for_success(self): - child_1 = heat_gen.TreeNode() - self.tree.add_child(child_1) - child_2 = heat_gen.TreeNode() - child_1.add_child(child_2) - child_3 = heat_gen.TreeNode() - child_2.add_child(child_3) - - path = [self.tree, child_1, child_2, child_3] - - self.assertListEqual(path, child_3.get_path()) - - def test_str_for_success(self): - name = 'name' - value = 0 - self.tree.set_variable_name(name) - self.tree.set_variable_value(value) - self.assertEqual(name + " --> " + str(value), str(self.tree)) - - def test_repr_for_success(self): - name = 'name' - value = 0 - self.tree.set_variable_name(name) - self.tree.set_variable_value(value) - self.assertEqual(name + " = " + str(value), repr(self.tree)) - - def test_get_leaves_for_success(self): - child_1 = heat_gen.TreeNode() - self.tree.add_child(child_1) - child_2 = heat_gen.TreeNode() - child_1.add_child(child_2) - child_3 = heat_gen.TreeNode() - child_2.add_child(child_3) - child_4 = heat_gen.TreeNode() - child_2.add_child(child_4) - child_5 = heat_gen.TreeNode() - child_2.add_child(child_5) - leaves = [child_3, child_4, child_5] - self.assertListEqual(leaves, heat_gen.TreeNode.get_leaves(self.tree)) |