aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-06-21 12:15:56 +0000
committerPeter Mikus <pmikus@cisco.com>2019-06-25 06:02:52 +0000
commit1577123a3c27541181097cb4186aa8855f20b1cc (patch)
tree8db2e4a954e97f7734988fd3d10b69504f370998 /resources
parentcac8f76ce1f9085e9eede19b250f4a4cb9b199e0 (diff)
Align suite/test teardown/setup
+ Phase II - aligning FUNC/PERF setup. + 2n/3n compatibility of suite setup. + Same structure of testcase for DEV/PERF. + DEVICE tests are now running VPP startup config in same way as PERF. + DEVICE is using COREKEEPER! - DEVICE tests are running topology compute twice for backward compatibility. TODO to remove. - Still phase III needed to align TAGS, LIBRARIES and remove OLD setup phase. Change-Id: Ib6e1b0ebf4abebf3cbe73b4fda5cac953c2a7270 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/InterfaceUtil.py3
-rw-r--r--resources/libraries/python/VPPUtil.py8
-rw-r--r--resources/libraries/robot/crypto/ipsec.robot16
-rw-r--r--resources/libraries/robot/honeycomb/honeycomb.robot4
-rw-r--r--resources/libraries/robot/performance/performance_configuration.robot57
-rw-r--r--resources/libraries/robot/performance/performance_setup.robot616
-rw-r--r--resources/libraries/robot/shared/container.robot73
-rw-r--r--resources/libraries/robot/shared/default.robot168
-rw-r--r--resources/libraries/robot/shared/suite_setup.robot246
-rw-r--r--resources/libraries/robot/shared/suite_teardown.robot2
-rw-r--r--resources/libraries/robot/shared/test_setup.robot57
-rw-r--r--resources/libraries/robot/shared/test_teardown.robot27
-rw-r--r--resources/libraries/robot/tcp/tcp_setup.robot22
13 files changed, 461 insertions, 838 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 46b1ffb034..34bfc1efe5 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1543,9 +1543,6 @@ class InterfaceUtil(object):
:rtype: list
:raises RuntimeError: If a reason preventing initialization is found.
"""
- ssh = SSH()
- ssh.connect(node)
-
# Read PCI address and driver.
pf_pci_addr = Topology.get_interface_pci_addr(node, ifc_key)
pf_mac_addr = Topology.get_interface_mac(node, ifc_key).split(":")
diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py
index c60509f018..03d39d3e23 100644
--- a/resources/libraries/python/VPPUtil.py
+++ b/resources/libraries/python/VPPUtil.py
@@ -216,7 +216,7 @@ class VPPUtil(object):
host=node['host'], if_data=if_data))
@staticmethod
- def vpp_enable_traces_on_dut(node, fail_on_error=True):
+ def vpp_enable_traces_on_dut(node, fail_on_error=False):
"""Enable vpp packet traces on the DUT node.
:param node: DUT node to set up.
@@ -234,14 +234,12 @@ class VPPUtil(object):
for cmd in cmds:
try:
PapiExecutor.run_cli_cmd(node, cmd)
- except AssertionError as err:
+ except AssertionError:
if fail_on_error:
raise
- else:
- logger.error(repr(err))
@staticmethod
- def vpp_enable_traces_on_all_duts(nodes, fail_on_error=True):
+ def vpp_enable_traces_on_all_duts(nodes, fail_on_error=False):
"""Enable vpp packet traces on all DUTs in the given topology.
:param nodes: Nodes in the topology.
diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot
index 135881f83e..95fdb9134d 100644
--- a/resources/libraries/robot/crypto/ipsec.robot
+++ b/resources/libraries/robot/crypto/ipsec.robot
@@ -236,19 +236,3 @@
| | ${args}= | Set Variable If | "${r_tunnel}" == "${None}" | ${args}
| | ... | ${args} --dst_tun ${r_tunnel}
| | Run Traffic Script On Node | ipsec.py | ${node} | ${args}
-
-| Set up IPSec SW device functional test
-| | [Documentation]
-| | ... | Set up IPSec SW device functional test for required IP version.
-| | ...
-| | ... | *Arguments:*
-| | ... | - ${ip_version} - IP version: IPv4 or IPv6. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up IPSec SW device functional test \| IPv4 \|
-| | ...
-| | [Arguments] | ${ip_version}
-| | ...
-| | Set up VPP device test
-| | Run Keyword | Configure topology for ${ip_version} IPsec testing
diff --git a/resources/libraries/robot/honeycomb/honeycomb.robot b/resources/libraries/robot/honeycomb/honeycomb.robot
index d446b7ca16..bd392931d8 100644
--- a/resources/libraries/robot/honeycomb/honeycomb.robot
+++ b/resources/libraries/robot/honeycomb/honeycomb.robot
@@ -233,7 +233,7 @@
| | Restart Vpp Service | ${node}
| | Verify Vpp | ${node}
| | VPP Enable Traces On DUT | ${node}
-| | Configure all TGs for traffic script
+| | All TGs Set Interface Default Driver | ${nodes}
| | Configure Honeycomb for functional testing | ${node}
| | Configure ODL Client for functional testing | ${node}
@@ -372,4 +372,4 @@
| | Run Keyword | HC_config.Set SSH Security provider
| | Run Keyword | HC_config.Set Memory Size | ${32}
| | Run Keyword | HC_config.Set Metaspace Size | ${32}
-| | Run Keyword | HC_config.Apply config | ${node} \ No newline at end of file
+| | Run Keyword | HC_config.Apply config | ${node}
diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot
index 0f13730c66..47dec46d49 100644
--- a/resources/libraries/robot/performance/performance_configuration.robot
+++ b/resources/libraries/robot/performance/performance_configuration.robot
@@ -14,7 +14,7 @@
*** Settings ***
| Library | Collections
| Library | String
-| Library | resources.libraries.python.Classify
+| Library | resources.libraries.python.Classify.Classify
| Library | resources.libraries.python.DpdkUtil
| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.IPUtil
@@ -2096,61 +2096,6 @@
| | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
| | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
-| Add PCI devices to all DUTs
-| | [Documentation]
-| | ... | Add PCI devices to VPP configuration file.
-| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
-| | | ... | Variable Should Exist | ${${dut}_if1}
-| | | ${if1_pci}= | Run Keyword If | '${if1_status}' == 'PASS'
-| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
-| | | ${if1_1_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
-| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_1}
-| | | ${if1_2_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
-| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_2}
-| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
-| | | ... | Variable Should Exist | ${${dut}_if2}
-| | | ${if2_pci}= | Run Keyword If | '${if2_status}' == 'PASS'
-| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2}
-| | | ${if2_1_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
-| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_1}
-| | | ${if2_2_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
-| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_2}
-| | | @{pci_devs}= | Run Keyword If | '${if1_status}' == 'PASS'
-| | | ... | Create List | ${if1_pci}
-| | | ... | ELSE
-| | | ... | Create List | ${if1_1_pci} | ${if1_2_pci}
-| | | Run Keyword If | '${if2_status}' == 'PASS'
-| | | ... | Append To List | ${pci_devs} | ${if2_pci}
-| | | ... | ELSE
-| | | ... | Append To List | ${pci_devs} | ${if2_1_pci} | ${if2_2_pci}
-| | | Run keyword | ${dut}.Add DPDK Dev | @{pci_devs}
-| | | Run Keyword If | '${if1_status}' == 'PASS'
-| | | ... | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
-| | | Run Keyword Unless | '${if1_status}' == 'PASS'
-| | | ... | Set Test Variable | ${${dut}_if1_1_pci} | ${if1_1_pci}
-| | | Run Keyword Unless | '${if1_status}' == 'PASS'
-| | | ... | Set Test Variable | ${${dut}_if1_2_pci} | ${if1_2_pci}
-| | | Run Keyword If | '${if2_status}' == 'PASS'
-| | | ... | Set Test Variable | ${${dut}_if2_pci} | ${if2_pci}
-| | | Run Keyword Unless | '${if2_status}' == 'PASS'
-| | | ... | Set Test Variable | ${${dut}_if2_1_pci} | ${if2_1_pci}
-| | | Run Keyword Unless | '${if2_status}' == 'PASS'
-| | | ... | Set Test Variable | ${${dut}_if2_2_pci} | ${if2_2_pci}
-
-| Add single PCI device to all DUTs
-| | [Documentation]
-| | ... | Add single (first) PCI device on DUT1 and single (last) PCI device on
-| | ... | DUT2 to VPP configuration file.
-| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
-| | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci}
-| | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
-
| Add VLAN strip offload switch off between DUTs in 3-node single link topology
| | [Documentation]
| | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
diff --git a/resources/libraries/robot/performance/performance_setup.robot b/resources/libraries/robot/performance/performance_setup.robot
deleted file mode 100644
index 3e27c18d6a..0000000000
--- a/resources/libraries/robot/performance/performance_setup.robot
+++ /dev/null
@@ -1,616 +0,0 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# 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.
-
-*** Settings ***
-| Library | resources.libraries.python.DUTSetup
-| Library | resources.tools.wrk.wrk
-| Resource | resources/libraries/robot/performance/performance_configuration.robot
-| Resource | resources/libraries/robot/performance/performance_limits.robot
-| Resource | resources/libraries/robot/performance/performance_utils.robot
-| Resource | resources/libraries/robot/tcp/tcp_setup.robot
-| Documentation | Performance suite keywords - Suite and test setups and
-| ... | teardowns.
-
-*** Keywords ***
-
-# Keywords used in setups and teardowns
-
-| Set variables in 2-node circular topology with DUT interface model
-| | [Documentation]
-| | ... | Compute path for testing on two given nodes in circular topology
-| | ... | based on interface model provided as an argument and set
-| | ... | corresponding suite variables.
-| | ...
-| | ... | *Arguments:*
-| | ... | - iface_model - Interface model. Type: string
-| | ...
-| | ... | _NOTE:_ This KW sets following suite variables:
-| | ... | - tg - TG node
-| | ... | - tg_if1 - 1st TG interface towards DUT.
-| | ... | - tg_if1 - 1st TG interface MAC address.
-| | ... | - tg_if2 - 2nd TG interface towards DUT.
-| | ... | - tg_if2 - 2nd TG interface MAC address.
-| | ... | - dut1 - DUT1 node
-| | ... | - dut1_if1 - 1st DUT interface towards TG.
-| | ... | - dut1_if2 - 2nd DUT interface towards TG.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set variables in 2-node circular topology with DUT interface model\
-| | ... | \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${iface_model}
-| | ...
-| | ${iface_model_list}= | Create list | ${iface_model}
-| | Append Node | ${nodes['TG']}
-| | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
-| | Append Node | ${nodes['TG']}
-| | Compute Path | always_same_link=${FALSE}
-| | ${tg_if1} | ${tg}= | First Interface
-| | ${dut1_if1} | ${dut1}= | First Ingress Interface
-| | ${dut1_if2} | ${dut1}= | Last Egress Interface
-| | ${tg_if2} | ${tg}= | Last Interface
-| | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
-| | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
-| | Set Suite Variable | ${tg}
-| | Set Suite Variable | ${tg_if1}
-| | Set Suite Variable | ${tg_if1_mac}
-| | Set Suite Variable | ${tg_if2}
-| | Set Suite Variable | ${tg_if2_mac}
-| | Set Suite Variable | ${dut1}
-| | Set Suite Variable | ${dut1_if1}
-| | Set Suite Variable | ${dut1_if2}
-
-| Set variables in 3-node circular topology with DUT interface model
-| | [Documentation]
-| | ... | Compute path for testing on three given nodes in circular topology
-| | ... | based on interface model provided as an argument and set
-| | ... | corresponding suite variables.
-| | ...
-| | ... | *Arguments:*
-| | ... | - iface_model - Interface model. Type: string
-| | ...
-| | ... | _NOTE:_ This KW sets following suite variables:
-| | ... | - tg - TG node
-| | ... | - tg_if1 - 1st TG interface towards DUT.
-| | ... | - tg_if1 - 1st TG interface MAC address.
-| | ... | - tg_if2 - 2nd TG interface towards DUT.
-| | ... | - tg_if2 - 2nd TG interface MAC address.
-| | ... | - dut1 - DUT1 node
-| | ... | - dut1_if1 - DUT1 interface towards TG.
-| | ... | - dut1_if2 - DUT1 interface towards DUT2.
-| | ... | - dut2 - DUT2 node
-| | ... | - dut2_if1 - DUT2 interface towards DUT1.
-| | ... | - dut2_if2 - DUT2 interface towards TG.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set variables in 3-node circular topology with DUT interface model\
-| | ... | \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${iface_model}
-| | ...
-| | ${iface_model_list}= | Create list | ${iface_model}
-| | Append Node | ${nodes['TG']}
-| | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
-| | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
-| | Append Node | ${nodes['TG']}
-| | Compute Path
-| | ${tg_if1} | ${tg}= | Next Interface
-| | ${dut1_if1} | ${dut1}= | Next Interface
-| | ${dut1_if2} | ${dut1}= | Next Interface
-| | ${dut2_if1} | ${dut2}= | Next Interface
-| | ${dut2_if2} | ${dut2}= | Next Interface
-| | ${tg_if2} | ${tg}= | Next Interface
-| | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
-| | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
-| | Set Suite Variable | ${tg}
-| | Set Suite Variable | ${tg_if1}
-| | Set Suite Variable | ${tg_if1_mac}
-| | Set Suite Variable | ${tg_if2}
-| | Set Suite Variable | ${tg_if2_mac}
-| | Set Suite Variable | ${dut1}
-| | Set Suite Variable | ${dut1_if1}
-| | Set Suite Variable | ${dut1_if2}
-| | Set Suite Variable | ${dut2}
-| | Set Suite Variable | ${dut2_if1}
-| | Set Suite Variable | ${dut2_if2}
-
-| Set variables in 3-node circular topology with DUT interface model with double link between DUTs
-| | [Documentation]
-| | ... | Compute path for testing on three given nodes in circular topology
-| | ... | with double link between DUTs based on interface model provided as an
-| | ... | argument and set corresponding suite variables.
-| | ...
-| | ... | *Arguments:*
-| | ... | - iface_model - Interface model. Type: string
-| | ...
-| | ... | _NOTE:_ This KW sets following suite variables:
-| | ... | - tg - TG node
-| | ... | - tg_if1 - 1st TG interface towards DUT.
-| | ... | - tg_if1 - 1st TG interface MAC address.
-| | ... | - tg_if2 - 2nd TG interface towards DUT.
-| | ... | - tg_if2 - 2nd TG interface MAC address.
-| | ... | - dut1 - DUT1 node
-| | ... | - dut1_if1 - DUT1 interface towards TG.
-| | ... | - dut1_if2_1 - DUT1 interface 1 towards DUT2.
-| | ... | - dut1_if2_2 - DUT1 interface 2 towards DUT2.
-| | ... | - dut2 - DUT2 node
-| | ... | - dut2_if1_1 - DUT2 interface 1 towards DUT1.
-| | ... | - dut2_if1_2 - DUT2 interface 2 towards DUT1.
-| | ... | - dut2_if2 - DUT2 interface towards TG.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set variables in 3-node circular topology with DUT interface model\
-| | ... | with double link between DUTs \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${iface_model}
-| | ...
-| | ${iface_model_list}= | Create list | ${iface_model}
-| | # Compute path TG - DUT1 with single link in between
-| | Append Node | ${nodes['TG']}
-| | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
-| | Append Node | ${nodes['TG']}
-| | Compute Path
-| | ${tg_if1} | ${tg}= | Next Interface
-| | ${dut1_if1} | ${dut1}= | Next Interface
-| | # Compute path TG - DUT2 with single link in between
-| | Clear Path
-| | Append Node | ${nodes['TG']}
-| | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
-| | Append Node | ${nodes['TG']}
-| | Compute Path
-| | ${tg_if2} | ${tg}= | Next Interface
-| | ${dut2_if2} | ${dut2}= | Next Interface
-| | # Compute path DUT1 - DUT2 with double link in between
-| | Clear Path
-| | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
-| | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
-| | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
-| | Compute Path | always_same_link=${FALSE}
-| | ${dut1_if2_1} | ${dut1}= | First Interface
-| | ${dut1_if2_2} | ${dut1}= | Last Interface
-| | ${dut2_if1_1} | ${dut2}= | First Ingress Interface
-| | ${dut2_if1_2} | ${dut2}= | Last Egress Interface
-| | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
-| | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
-| | # Set suite variables
-| | Set Suite Variable | ${tg}
-| | Set Suite Variable | ${tg_if1}
-| | Set Suite Variable | ${tg_if1_mac}
-| | Set Suite Variable | ${tg_if2}
-| | Set Suite Variable | ${tg_if2_mac}
-| | Set Suite Variable | ${dut1}
-| | Set Suite Variable | ${dut1_if1}
-| | Set Suite Variable | ${dut1_if2_1}
-| | Set Suite Variable | ${dut1_if2_2}
-| | Set Suite Variable | ${dut2}
-| | Set Suite Variable | ${dut2_if1_1}
-| | Set Suite Variable | ${dut2_if1_2}
-| | Set Suite Variable | ${dut2_if2}
-
-# Suite setups
-
-| Set up 2-node performance topology with DUT's NIC model
-| | [Documentation]
-| | ... | Suite preparation phase that sets the default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name}
-| | ...
-| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_name}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
-
-| Set up 2-node-switched performance topology with DUT's NIC model
-| | [Documentation]
-| | ... | Suite preparation phase that sets the default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
-| | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
-| | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name} | ${tg_if1_dest_mac}
-| | ... | ${tg_if2_dest_mac}
-| | ...
-| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_name}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
-| | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
-
-| Set up 3-node performance topology with DUT's NIC model
-| | [Documentation]
-| | ... | Suite preparation phase that sets the default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
-| | ... | \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name}
-| | ...
-| | Set variables in 3-node circular topology with DUT interface model
-| | ... | ${nic_name}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
-
-| Set up 3-node performance topology with DUT's NIC model with double link between DUTs
-| | [Documentation]
-| | ... | Suite preparation phase that sets the default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up 3-node performance topology with DUT's NIC model with \
-| | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name}
-| | ...
-| | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
-| | ... | ${nic_name}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
-
-| Set up DPDK 2-node performance topology with DUT's NIC model
-| | [Documentation]
-| | ... | Updates interfaces on all nodes and sets the global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator. Initializes DPDK test
-| | ... | environment.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
-| | ... | \| L2 \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name}
-| | ...
-| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_name}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
-| | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
-
-| Set up DPDK 3-node performance topology with DUT's NIC model
-| | [Documentation]
-| | ... | Updates interfaces on all nodes and sets the global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator. Initializes DPDK test
-| | ... | environment.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name}
-| | ...
-| | Set variables in 3-node circular topology with DUT interface model
-| | ... | ${nic_name}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
-| | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
-| | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
-
-| Set up SRIOV 2-node performance topology with DUT's NIC model
-| | [Documentation]
-| | ... | Suite preparation phase that sets default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator.
-| | ... | It configures PCI device with VFs on all DUTs.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ... | - vf_driver - Virtual function driver. Type: string
-| | ... | - numvfs - Number of VFs. Type: integer
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \
-| | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name} | ${vf_driver}
-| | ... | ${numvfs}=${1}
-| | ...
-| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_name}
-| | Run Keyword If | '${vf_driver}' == 'AVF'
-| | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
-| | ... | osi_layer=${osi_layer}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0}
-| | ... | ${osi_layer}
-
-| Set up SRIOV 3-node performance topology with DUT's NIC model
-| | [Documentation]
-| | ... | Suite preparation phase that sets default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator.
-| | ... | It configures PCI device with VFs on all DUTs.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ... | - vf_driver - Virtual function driver. Type: string
-| | ... | - numvfs - Number of VFs. Type: integer
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \
-| | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name} | ${vf_driver}
-| | ... | ${numvfs}=${1}
-| | ...
-| | Set variables in 3-node circular topology with DUT interface model
-| | ... | ${nic_name}
-| | Run Keyword If | '${vf_driver}' == 'AVF'
-| | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
-| | ... | osi_layer=${osi_layer}
-| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0}
-| | ... | ${osi_layer}
-
-| Set up IPSec performance test suite
-| | [Documentation]
-| | ... | Suite preparation phase that sets default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Initializes traffic generator.
-| | ... | Then it configures crypto device and kernel module on all DUTs.
-| | ...
-| | ... | TODO CSIT-1481: Crypto HW should be read from topology file instead.
-| | ...
-| | ... | *Arguments:*
-| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
-| | ... | - nic_name - Interface model. Type: string
-| | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx or
-| | ... | SW_cryptodev. Type: string, default value: HW_DH895xcc
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up IPSec performance test suite \| L2 \
-| | ... | \| Intel-X520-DA2 \| HW_DH895xcc \|
-| | ...
-| | [Arguments] | ${osi_layer} | ${nic_name} | ${crypto_type}=HW_DH895xcc
-| | ...
-| | Set up 3-node performance topology with DUT's NIC model
-| | ... | ${osi_layer} | ${nic_name}
-| | Return From Keyword If | '${crypto_type}' == 'SW_cryptodev'
-| | ${numvfs}= | Set Variable If
-| | ... | '${crypto_type}' == 'HW_DH895xcc' | ${32}
-| | ... | '${crypto_type}' == 'HW_C3xxx' | ${16}
-| | Configure crypto device on all DUTs | ${crypto_type} | numvfs=${numvfs}
-| | ... | force_init=${True}
-| | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
-
-| Set up performance test suite with MEMIF
-| | [Documentation]
-| | ... | Append memif_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | memif_plugin.so
-
-| Set up performance test suite with NAT
-| | [Documentation]
-| | ... | Append nat_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | nat_plugin.so
-
-| Set up performance test suite with ACL
-| | [Documentation]
-| | ... | Append acl_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | acl_plugin.so
-
-| Set up performance test suite with AVF driver
-| | [Documentation]
-| | ... | Append avf_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | avf_plugin.so
-
-| Set up performance test suite with Static SRv6 proxy
-| | [Documentation]
-| | ... | Append srv6as_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | srv6as_plugin.so
-
-| Set up performance test suite with Dynamic SRv6 proxy
-| | [Documentation]
-| | ... | Append srv6ad_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | srv6ad_plugin.so
-
-| Set up performance test suite with Masquerading SRv6 proxy
-| | [Documentation]
-| | ... | Append srv6am_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | srv6am_plugin.so
-
-| Set up performance test suite with LACP mode link bonding
-| | [Documentation]
-| | ... | Append lacp_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | lacp_plugin.so
-
-| Set up performance test suite with crypto ipsecmb
-| | [Documentation]
-| | ... | Append crypto_ipsecmb_plugin.so to the list of enabled plugins.
-| | ...
-| | Set Suite Variable | @{plugins_to_enable}
-| | Append To List | ${plugins_to_enable} | crypto_ia32_plugin.so
-| | Append To List | ${plugins_to_enable} | crypto_ipsecmb_plugin.so
-| | Append To List | ${plugins_to_enable} | crypto_openssl_plugin.so
-
-| Set up 3-node performance topology with wrk and DUT's NIC model
-| | [Documentation]
-| | ... | Suite preparation phase that sets the default startup configuration of
-| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
-| | ... | variables used in test cases based on interface model provided as an
-| | ... | argument. Installs the traffic generator.
-| | ...
-| | ... | *Arguments:*
-| | ... | - iface_model - Interface model. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
-| | ... | \| Intel-X520-DA2 \|
-| | ...
-| | [Arguments] | ${iface_model}
-| | ...
-| | Set variables in 3-node circular topology with DUT interface model
-| | ... | ${iface_model}
-| | Iface update numa node | ${tg}
-# Make sure TRex is stopped
-| | ${running}= | Is TRex running | ${tg}
-| | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
-| | ${curr_driver}= | Get PCI dev driver | ${tg}
-| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
-| | Run keyword if | '${curr_driver}'!='${None}'
-| | ... | PCI Driver Unbind | ${tg} |
-| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
-# Bind tg_if1 to driver specified in the topology
-| | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
-| | PCI Driver Bind | ${tg}
-| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
-# Set IP on tg_if1
-| | ${intf_name}= | Get Linux interface name | ${tg}
-| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
-| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
-| | Set Linux interface up | ${tg} | ${intf_name}
-| | Install wrk | ${tg}
-
-# Tests setups
-
-| Set up performance test
-| | [Documentation] | Common test setup for performance tests.
-| | ...
-| | Reset PAPI History On All DUTs | ${nodes}
-| | Create base startup configuration of VPP on all DUTs
-
-| Set up tcp performance test
-| | [Documentation] | Common test setup for TCP performance tests.
-| | ...
-| | Reset PAPI History On All DUTs | ${nodes}
-| | Create base startup configuration of VPP for TCP tests on all DUTs
-
-| Set up performance test with Ligato Kubernetes
-| | [Documentation] | Common test setup for performance tests with Ligato \
-| | ... | Kubernetes.
-| | ...
-| | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
-| | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
-| | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
-| | Apply Kubernetes resource on all duts | ${nodes}
-| | ... | configmaps/vswitch-agent-cfg.yaml
-| | Apply Kubernetes resource on all duts | ${nodes}
-| | ... | configmaps/vnf-agent-cfg.yaml
-| | Apply Kubernetes resource on all duts | ${nodes}
-| | ... | pods/contiv-sfc-controller.yaml
-| | Apply Kubernetes resource on all duts | ${nodes}
-| | ... | pods/contiv-vswitch.yaml
-
-| Set up performance test with containers
-| | [Documentation]
-| | ... | Common test setup for performance tests with containers
-| | ...
-| | ... | *Arguments:*
-| | ... | - chains: Total number of chains. Type: integer
-| | ... | - nodeness: Total number of nodes per chain. Type: integer
-| | ... | - auto_scale - If True, use same amount of Dataplane threads for
-| | ... | network function as DUT, otherwise use single physical core for
-| | ... | every network function. Type: boolean
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up performance test with containers \| 1 \| 1 \|
-| | ...
-| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
-| | ...
-| | Set Test Variable | @{container_groups} | @{EMPTY}
-| | Set Test Variable | ${container_group} | CNF
-| | Set Test Variable | ${nf_nodes}
-| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
-| | ... | engine=${container_engine} | WITH NAME | ${container_group}
-| | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
-| | ... | auto_scale=${auto_scale}
-| | Acquire all '${container_group}' containers
-| | Create all '${container_group}' containers
-| | Configure VPP in all '${container_group}' containers
-| | Stop VPP service on all DUTs | ${nodes}
-| | Start VPP in all '${container_group}' containers
-| | Restart VPP service on all DUTs | ${nodes}
-| | Verify VPP on all DUTs | ${nodes}
-| | Save VPP PIDs
-| | Append To List | ${container_groups} | ${container_group}
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot
index c1ab1af18d..0b2fcd489b 100644
--- a/resources/libraries/robot/shared/container.robot
+++ b/resources/libraries/robot/shared/container.robot
@@ -181,3 +181,76 @@
| | ... | all DUT nodes.
| | ...
| | Run Keyword | ${group}.Destroy all containers
+
+| Start containers for performance test
+| | [Documentation]
+| | ... | Start containers for performance test.
+| | ...
+| | ... | *Arguments:*
+| | ... | - nf_chains: Total number of chains. Type: integer
+| | ... | - nf_nodes: Total number of nodes per chain. Type: integer
+| | ... | - auto_scale - If True, use same amount of Dataplane threads for
+| | ... | network function as DUT, otherwise use single physical core for
+| | ... | every network function. Type: boolean
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set up performance test with containers \| 1 \| 1 \|
+| | ...
+| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
+| | ...
+| | Set Test Variable | @{container_groups} | @{EMPTY}
+| | Set Test Variable | ${container_group} | CNF
+| | Set Test Variable | ${nf_nodes}
+| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
+| | ... | engine=${container_engine} | WITH NAME | ${container_group}
+| | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
+| | ... | auto_scale=${auto_scale}
+| | Acquire all '${container_group}' containers
+| | Create all '${container_group}' containers
+| | Configure VPP in all '${container_group}' containers
+| | Stop VPP service on all DUTs | ${nodes}
+| | Start VPP in all '${container_group}' containers
+| | Restart VPP service on all DUTs | ${nodes}
+| | Verify VPP on all DUTs | ${nodes}
+| | Save VPP PIDs
+| | Append To List | ${container_groups} | ${container_group}
+
+| Start containers for device test
+| | [Documentation]
+| | ... | Start containers for device test.
+| | ...
+| | ... | *Arguments:*
+| | ... | - nf_chains: Total number of chains (Optional). Type: integer, default
+| | ... | value: ${1}
+| | ... | - nf_nodes: Total number of nodes per chain (Optional). Type: integer,
+| | ... | default value: ${1}
+| | ...
+| | ... | _NOTE:_ This KW sets following test case variables:
+| | ... | - dcr_uuid - Parent container UUID.
+| | ... | - dcr_root - Parent container overlay.
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set up functional test with containers \| 1 \| 1 \|
+| | ...
+| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1}
+| | ...
+| | Set Test Variable | @{container_groups} | @{EMPTY}
+| | Set Test Variable | ${container_group} | CNF
+| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
+| | ... | engine=${container_engine} | WITH NAME | ${container_group}
+| | ...
+| | ${dcr_uuid}= | Get Environment Variable | CSIT_DUT1_UUID
+| | ${dcr_root}= | Run Keyword | Get Docker Mergeddir | ${nodes['DUT1']}
+| | ... | ${dcr_uuid}
+| | Set Test Variable | ${dcr_uuid}
+| | Set Test Variable | ${dcr_root}
+| | ...
+| | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
+| | ... | nested=${True}
+| | Acquire all '${container_group}' containers
+| | Create all '${container_group}' containers
+| | Configure VPP in all '${container_group}' containers
+| | Start VPP in all '${container_group}' containers
+| | Append To List | ${container_groups} | ${container_group}
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index b7e4a75773..31c4ae3e0a 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -33,18 +33,18 @@
| Library | resources.libraries.python.Trace
| Library | resources.libraries.python.topology.Topology
| ...
+| Resource | resources/libraries/robot/crypto/ipsec.robot
+| Resource | resources/libraries/robot/performance/performance_configuration.robot
+| Resource | resources/libraries/robot/performance/performance_limits.robot
+| Resource | resources/libraries/robot/performance/performance_utils.robot
| Resource | resources/libraries/robot/shared/container.robot
| Resource | resources/libraries/robot/shared/qemu.robot
| Resource | resources/libraries/robot/shared/suite_teardown.robot
+| Resource | resources/libraries/robot/shared/suite_setup.robot
| Resource | resources/libraries/robot/shared/test_teardown.robot
-
+| Resource | resources/libraries/robot/shared/test_setup.robot
*** Keywords ***
-| Configure all TGs for traffic script
-| | [Documentation] | Prepare all TGs before traffic scripts execution.
-| | ...
-| | All TGs Set Interface Default Driver | ${nodes}
-
| Show Vpp Errors On All DUTs
| | [Documentation] | Show VPP errors verbose on all DUTs.
| | ...
@@ -59,14 +59,6 @@
| | :FOR | ${dut} | IN | @{duts}
| | | Vpp Get Bridge Domain Data | ${nodes['${dut}']}
-| Setup Scheduler Policy for Vpp On All DUTs
-| | [Documentation] | Set realtime scheduling policy (SCHED_RR) with priority 1
-| | ... | on all VPP worker threads on all DUTs.
-| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | Set VPP Scheduling rr | ${nodes['${dut}']}
-
| Configure crypto device on all DUTs
| | [Documentation] | Verify if Crypto QAT device virtual functions are
| | ... | initialized on all DUTs. If parameter force_init is set to True, then
@@ -85,37 +77,10 @@
| | ...
| | [Arguments] | ${crypto_type} | ${numvfs} | ${force_init}=${False}
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Crypto Device Verify | ${nodes['${dut}']} | ${crypto_type}
| | | ... | ${numvfs} | force_init=${force_init}
-| Configure AVF interfaces on all DUTs
-| | [Documentation] | Configure virtual functions for AVF interfaces on PCI
-| | ... | interface on all DUTs.
-| | ...
-| | ... | *Arguments:*
-| | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs
-| | ... | (Optional). Type: integer, default value: ${1}
-| | ... | - osi_layer - OSI Layer type to initialize TG with.
-| | ... | (Optional). Type: string, default value: L2
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Configure AVF device on all DUTs \| ${1} \| L2 \|
-| | ...
-| | [Arguments] | ${numvfs}=${1} | ${osi_layer}=L2
-| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | ${if1_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if1}
-| | | ... | numvfs=${numvfs} | osi_layer=${osi_layer}
-| | | ${if2_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if2}
-| | | ... | numvfs=${numvfs} | osi_layer=${osi_layer}
-# Currently only one AVF is supported.
-| | | Set Suite Variable | ${${dut}_if1_vf0} | ${if1_avf_arr[0]}
-| | | Set Suite Variable | ${${dut}_if2_vf0} | ${if2_avf_arr[0]}
-
| Configure kernel module on all DUTs
| | [Documentation] | Verify if specific kernel module is loaded on all DUTs.
| | ... | If parameter force_load is set to True, then try to load.
@@ -136,7 +101,6 @@
| Create base startup configuration of VPP on all DUTs
| | [Documentation] | Create base startup configuration of VPP to all DUTs.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Import Library | resources.libraries.python.VppConfigGenerator
| | | ... | WITH NAME | ${dut}
@@ -176,7 +140,6 @@
| | ...
| | ${cpu_count_int} | Convert to Integer | ${phy_cores}
| | ${thr_count_int} | Convert to Integer | ${phy_cores}
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
| | | ... | Variable Should Exist | ${${dut}_if1}
@@ -241,7 +204,6 @@
| | ...
| | ${cpu_count_int} | Convert to Integer | ${phy_cores}
| | ${thr_count_int} | Convert to Integer | ${phy_cores}
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']}
| | | ... | ${${dut}_if1} | ${${dut}_if2}
@@ -289,17 +251,68 @@
| | ... | cpu_skip=${cpu_skip} | filename=/tmp/vnf${i}.conf
| | ... | i=${i_int}
+| Add PCI devices to all DUTs
+| | [Documentation]
+| | ... | Add PCI devices to VPP configuration file.
+| | ...
+| | :FOR | ${dut} | IN | @{duts}
+| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if1}
+| | | ${if1_pci}= | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
+| | | ${if1_1_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_1}
+| | | ${if1_2_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_2}
+| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if2}
+| | | ${if2_pci}= | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2}
+| | | ${if2_1_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_1}
+| | | ${if2_2_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_2}
+| | | @{pci_devs}= | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | Create List | ${if1_pci}
+| | | ... | ELSE
+| | | ... | Create List | ${if1_1_pci} | ${if1_2_pci}
+| | | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | Append To List | ${pci_devs} | ${if2_pci}
+| | | ... | ELSE
+| | | ... | Append To List | ${pci_devs} | ${if2_1_pci} | ${if2_2_pci}
+| | | Run keyword | ${dut}.Add DPDK Dev | @{pci_devs}
+| | | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
+| | | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if1_1_pci} | ${if1_1_pci}
+| | | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if1_2_pci} | ${if1_2_pci}
+| | | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if2_pci} | ${if2_pci}
+| | | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if2_1_pci} | ${if2_1_pci}
+| | | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if2_2_pci} | ${if2_2_pci}
+
+| Add single PCI device to all DUTs
+| | [Documentation]
+| | ... | Add single (first) PCI device on DUT1 and single (last) PCI device on
+| | ... | DUT2 to VPP configuration file.
+| | ...
+| | :FOR | ${dut} | IN | @{duts}
+| | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
+| | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci}
+| | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
+
| Add no multi seg to all DUTs
| | [Documentation] | Add No Multi Seg to VPP startup configuration to all DUTs.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Add DPDK No Multi Seg
| Add DPDK no PCI to all DUTs
| | [Documentation] | Add DPDK no-pci to VPP startup configuration to all DUTs.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Add DPDK no PCI
@@ -316,7 +329,6 @@
| | ...
| | [Arguments] | ${rxd}
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Add DPDK Dev Default RXD | ${rxd}
@@ -333,7 +345,6 @@
| | ...
| | [Arguments] | ${txd}
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Add DPDK Dev Default TXD | ${txd}
@@ -350,14 +361,12 @@
| | ...
| | [Arguments] | ${uio_driver}
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Add DPDK Uio Driver | ${uio_driver}
| Add NAT to all DUTs
| | [Documentation] | Add NAT configuration to all DUTs.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Add NAT
@@ -372,7 +381,7 @@
| | ... | \| Add cryptodev to all DUTs \| ${4} \|
| | ...
| | [Arguments] | ${count}
-| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | ...
| | :FOR | ${dut} | IN | @{duts}
| | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']}
| | | ${thr_count_int}= | Run keyword if | ${smt_used}
@@ -413,7 +422,6 @@
| Write startup configuration on all VPP DUTs
| | [Documentation] | Write VPP startup configuration on all DUTs.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Write Config
@@ -421,7 +429,6 @@
| | [Documentation] | Write VPP startup configuration and restart VPP on all
| | ... | DUTs.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Apply Config
| | Save VPP PIDs
@@ -435,6 +442,7 @@
| | ...
| | ${setup_vpp_pids}= | Get VPP PIDs | ${nodes}
| | ${keys}= | Get Dictionary Keys | ${setup_vpp_pids}
+| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${key} | IN | @{keys}
| | | ${pid}= | Get From Dictionary | ${setup_vpp_pids} | ${key}
| | | Run Keyword If | $pid is None | FAIL | No VPP PID found on node ${key}
@@ -462,7 +470,7 @@
| | Verify Vpp On All Duts | ${nodes}
| | VPP Enable Traces On All Duts | ${nodes}
| | Save VPP PIDs
-| | Configure all TGs for traffic script
+| | All TGs Set Interface Default Driver | ${nodes}
| | Update All Interface Data On All Nodes | ${nodes}
| | Reset PAPI History On All DUTs | ${nodes}
@@ -475,19 +483,6 @@
| | Vpp Show Errors On All DUTs | ${nodes}
| | Verify VPP PID in Teardown
-| Set up VPP device test
-# TODO: Generalize this KW if it will not diverge from Functional derivate too
-# much
-| | [Documentation] | Common test setup for vpp-device tests.
-| | ...
-| | Restart Vpp Service On All Duts | ${nodes}
-| | Verify Vpp On All Duts | ${nodes}
-| | VPP Enable Traces On All Duts | ${nodes}
-| | Save VPP PIDs
-| | Configure all TGs for traffic script
-| | Update All Interface Data On All Nodes | ${nodes} | skip_tg_udev=${True}
-| | Reset PAPI History On All DUTs | ${nodes}
-
| Tear down LISP functional test
| | [Documentation] | Common test teardown for functional tests with LISP.
| | ...
@@ -499,45 +494,6 @@
| | Vpp Show Errors On All DUTs | ${nodes}
| | Verify VPP PID in Teardown
-| Set up functional test with containers
-| | [Documentation]
-| | ... | Common test setup for functional tests with containers.
-| | ...
-| | ... | *Arguments:*
-| | ... | - chains: Total number of chains (Optional). Type: integer, default
-| | ... | value: ${1}
-| | ... | - nodeness: Total number of nodes per chain (Optional). Type: integer,
-| | ... | default value: ${1}
-| | ...
-| | ... | _NOTE:_ This KW sets following test case variables:
-| | ... | - dcr_uuid - Parent container UUID.
-| | ... | - dcr_root - Parent container overlay.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up functional test with containers \| 1 \| 1 \|
-| | ...
-| | [Arguments] | ${chains}=${1} | ${nodeness}=${1}
-| | ...
-| | Set Test Variable | @{container_groups} | @{EMPTY}
-| | Set Test Variable | ${container_group} | CNF
-| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
-| | ... | engine=${container_engine} | WITH NAME | ${container_group}
-| | ...
-| | ${dcr_uuid}= | Get Environment Variable | CSIT_DUT1_UUID
-| | ${dcr_root}= | Run Keyword | Get Docker Mergeddir | ${nodes['DUT1']}
-| | ... | ${dcr_uuid}
-| | Set Test Variable | ${dcr_uuid}
-| | Set Test Variable | ${dcr_root}
-| | ...
-| | Construct chains of containers on all DUTs | ${chains} | ${nodeness}
-| | ... | nested=${True}
-| | Acquire all '${container_group}' containers
-| | Create all '${container_group}' containers
-| | Configure VPP in all '${container_group}' containers
-| | Start VPP in all '${container_group}' containers
-| | Append To List | ${container_groups} | ${container_group}
-
| Stop VPP Service on DUT
| | [Documentation] | Stop the VPP service on the specified node.
| | ...
diff --git a/resources/libraries/robot/shared/suite_setup.robot b/resources/libraries/robot/shared/suite_setup.robot
new file mode 100644
index 0000000000..30fb5ac206
--- /dev/null
+++ b/resources/libraries/robot/shared/suite_setup.robot
@@ -0,0 +1,246 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# 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.
+
+"""Keywords used in suite setups."""
+
+*** Settings ***
+| Library | resources.libraries.python.DPDK.DPDKTools
+| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.TrafficGenerator
+| Library | resources.tools.wrk.wrk
+| ...
+| Documentation | Suite setup keywords.
+
+*** Keywords ***
+| Setup suite single link
+| | [Documentation]
+| | ... | Common suite setup for single link tests.
+| | ... |
+| | ... | Compute path for testing on two given nodes in circular topology
+| | ... | based on interface model provided as an argument and set
+| | ... | corresponding suite variables.
+| | ...
+| | ... | _NOTE:_ This KW sets following suite variables:
+| | ... | - duts - List of DUT nodes
+| | ... | - duts_count - Number of DUT nodes.
+| | ... | - tg - TG node
+| | ... | - tg_if1 - 1st TG interface towards DUT.
+| | ... | - tg_if1_mac - 1st TG interface MAC address.
+| | ... | - tg_if2 - 2nd TG interface towards DUT.
+| | ... | - tg_if2_mac - 2nd TG interface MAC address.
+| | ... | - dut{n} - DUTx node
+| | ... | - dut{n}_if1 - 1st DUT interface.
+| | ... | - dut{n}_if1_mac - 1st DUT interface MAC address.
+| | ... | - dut{n}_if2 - 2nd DUT interface.
+| | ... | - dut{n}_if2_mac - 2nd DUT interface MAC address.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${actions} - Additional setup action. Type: list
+| | ...
+| | [Arguments] | @{actions}
+| | ...
+| | ${nic_model_list}= | Create list | ${nic_name}
+| | Append Node | ${nodes['TG']}
+| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | :FOR | ${dut} | IN | @{duts}
+| | | Append Node | ${nodes['${dut}']} | filter_list=${nic_model_list}
+| | Append Node | ${nodes['TG']}
+| | Compute Path | always_same_link=${FALSE}
+| | ${tg_if1} | ${tg}= | Next Interface
+| | :FOR | ${dut} | IN | @{duts}
+| | | ${dutx_if1} | ${dutx}= | Next Interface
+| | | ${dutx_if2} | ${dutx}= | Next Interface
+| | | ${dutx_if1_mac}= | Get Interface MAC | ${dutx} | ${dutx_if1}
+| | | ${dutx_if2_mac}= | Get Interface MAC | ${dutx} | ${dutx_if2}
+| | | ${dut_str}= | Convert To Lowercase | ${dut}
+| | | Set Suite Variable | ${${dut_str}} | ${dutx}
+| | | Set Suite Variable | ${${dut_str}_if1} | ${dutx_if1}
+| | | Set Suite Variable | ${${dut_str}_if2} | ${dutx_if2}
+| | | Set Suite Variable | ${${dut_str}_if1_mac} | ${dutx_if1_mac}
+| | | Set Suite Variable | ${${dut_str}_if2_mac} | ${dutx_if2_mac}
+| | ${tg_if2} | ${tg}= | Next Interface
+| | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
+| | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
+| | ${duts_count}= | Get Length | ${duts}
+| | Set Suite Variable | ${duts}
+| | Set Suite Variable | ${duts_count}
+| | Set Suite Variable | ${tg}
+| | Set Suite Variable | ${tg_if1}
+| | Set Suite Variable | ${tg_if1_mac}
+| | Set Suite Variable | ${tg_if2}
+| | Set Suite Variable | ${tg_if2_mac}
+| | :FOR | ${action} | IN | @{actions}
+| | | Run Keyword | Additional Suite setup Action For ${action}
+
+| Setup suite double link
+| | [Documentation]
+| | ... | Common suite setup for double link tests.
+| | ... |
+| | ... | Compute path for testing on three given nodes in circular topology
+| | ... | with double link between DUTs based on interface model provided as an
+| | ... | argument and set corresponding suite variables.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${actions} - Additional setup action. Type: list
+| | ...
+| | ... | _NOTE:_ This KW sets following suite variables:
+| | ... | - duts - List of DUT nodes
+| | ... | - duts_count - Number of DUT nodes.
+| | ... | - tg - TG node
+| | ... | - tg_if1 - 1st TG interface towards DUT.
+| | ... | - tg_if1 - 1st TG interface MAC address.
+| | ... | - tg_if2 - 2nd TG interface towards DUT.
+| | ... | - tg_if2 - 2nd TG interface MAC address.
+| | ... | - dut1 - DUT1 node
+| | ... | - dut1_if1 - DUT1 interface towards TG.
+| | ... | - dut1_if2_1 - DUT1 interface 1 towards DUT2.
+| | ... | - dut1_if2_2 - DUT1 interface 2 towards DUT2.
+| | ... | - dut2 - DUT2 node
+| | ... | - dut2_if1_1 - DUT2 interface 1 towards DUT1.
+| | ... | - dut2_if1_2 - DUT2 interface 2 towards DUT1.
+| | ... | - dut2_if2 - DUT2 interface towards TG.
+| | ...
+| | [Arguments] | @{actions}
+| | ...
+| | ${nic_model_list}= | Create list | ${nic_name}
+| | # Compute path TG - DUT1 with single link in between
+| | Append Node | ${nodes['TG']}
+| | Append Node | ${nodes['DUT1']} | filter_list=${nic_model_list}
+| | Append Node | ${nodes['TG']}
+| | Compute Path
+| | ${tg_if1} | ${tg}= | Next Interface
+| | ${dut1_if1} | ${dut1}= | Next Interface
+| | # Compute path TG - DUT2 with single link in between
+| | Clear Path
+| | Append Node | ${nodes['TG']}
+| | Append Node | ${nodes['DUT2']} | filter_list=${nic_model_list}
+| | Append Node | ${nodes['TG']}
+| | Compute Path
+| | ${tg_if2} | ${tg}= | Next Interface
+| | ${dut2_if2} | ${dut2}= | Next Interface
+| | # Compute path DUT1 - DUT2 with double link in between
+| | Clear Path
+| | Append Node | ${nodes['DUT1']} | filter_list=${nic_model_list}
+| | Append Node | ${nodes['DUT2']} | filter_list=${nic_model_list}
+| | Append Node | ${nodes['DUT1']} | filter_list=${nic_model_list}
+| | Compute Path | always_same_link=${FALSE}
+| | ${dut1_if2_1} | ${dut1}= | First Interface
+| | ${dut1_if2_2} | ${dut1}= | Last Interface
+| | ${dut2_if1_1} | ${dut2}= | First Ingress Interface
+| | ${dut2_if1_2} | ${dut2}= | Last Egress Interface
+| | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
+| | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
+| | ${duts_count}= | Set Variable | 2
+| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | # Set suite variables
+| | Set Suite Variable | ${duts}
+| | Set Suite Variable | ${duts_count}
+| | Set Suite Variable | ${tg}
+| | Set Suite Variable | ${tg_if1}
+| | Set Suite Variable | ${tg_if1_mac}
+| | Set Suite Variable | ${tg_if2}
+| | Set Suite Variable | ${tg_if2_mac}
+| | Set Suite Variable | ${dut1}
+| | Set Suite Variable | ${dut1_if1}
+| | Set Suite Variable | ${dut1_if2_1}
+| | Set Suite Variable | ${dut1_if2_2}
+| | Set Suite Variable | ${dut2}
+| | Set Suite Variable | ${dut2_if1_1}
+| | Set Suite Variable | ${dut2_if1_2}
+| | Set Suite Variable | ${dut2_if2}
+| | :FOR | ${action} | IN | @{actions}
+| | | Run Keyword | Additional Suite setup Action For ${action}
+
+| Additional Suite Setup Action For performance
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement.
+| | ...
+| | Run Keyword If | ${duts_count} == 1
+| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
+| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
+| | Run Keyword If | ${duts_count} == 2
+| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
+| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
+
+| Additional Suite Setup Action For dpdk
+| | [Documentation]
+| | ... | Additional Setup for suites which uses dpdk.
+| | ...
+| | :FOR | ${dut} | IN | @{duts}
+| | | ${dut_str}= | Convert To Lowercase | ${dut}
+| | | Initialize DPDK Environment | ${nodes['${dut}']}
+| | | ... | ${${dut_str}_if1} | ${${dut_str}_if2}
+
+| Additional Suite Setup Action For performance_avf
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement over
+| | ... | SRIOV AVF.
+| | ...
+| | :FOR | ${dut} | IN | @{duts}
+| | | ${if1_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if1}
+| | | ... | numvfs=${1} | osi_layer=${osi_layer}
+| | | ${if2_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if2}
+| | | ... | numvfs=${1} | osi_layer=${osi_layer}
+# Currently only one AVF is supported.
+| | | Set Suite Variable | ${${dut}_if1_vf0} | ${if1_avf_arr[0]}
+| | | Set Suite Variable | ${${dut}_if2_vf0} | ${if2_avf_arr[0]}
+| | Run Keyword If | ${duts_count} == 1
+| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
+| | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0} | ${osi_layer}
+| | Run Keyword If | ${duts_count} == 2
+| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
+| | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0} | ${osi_layer}
+
+| Additional Suite Setup Action For ipsechw
+| | [Documentation]
+| | ... | Additional Setup for suites which uses QAT HW.
+| | ...
+| | ${numvfs}= | Set Variable If
+| | ... | '${crypto_type}' == 'HW_DH895xcc' | ${32}
+| | ... | '${crypto_type}' == 'HW_C3xxx' | ${16}
+| | Configure crypto device on all DUTs | ${crypto_type} | numvfs=${numvfs}
+| | ... | force_init=${True}
+| | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
+
+| Additional Suite Setup Action For wrk
+| | [Documentation]
+| | ... | Additional Setup for suites which uses WRK TG.
+| | ...
+| | Iface update numa node | ${tg}
+# Make sure TRex is stopped
+| | ${running}= | Is TRex running | ${tg}
+| | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
+| | ${curr_driver}= | Get PCI dev driver | ${tg}
+| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
+| | Run keyword if | '${curr_driver}'!='${None}'
+| | ... | PCI Driver Unbind | ${tg} |
+| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
+# Bind tg_if1 to driver specified in the topology
+| | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
+| | PCI Driver Bind | ${tg}
+| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
+# Set IP on tg_if1
+| | ${intf_name}= | Get Linux interface name | ${tg}
+| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
+| | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
+| | Set Linux interface up | ${tg} | ${intf_name}
+| | Install wrk | ${tg}
diff --git a/resources/libraries/robot/shared/suite_teardown.robot b/resources/libraries/robot/shared/suite_teardown.robot
index 1b738eaeef..e5db4f05d8 100644
--- a/resources/libraries/robot/shared/suite_teardown.robot
+++ b/resources/libraries/robot/shared/suite_teardown.robot
@@ -15,6 +15,7 @@
*** Settings ***
| Library | resources.libraries.python.DPDK.DPDKTools
+| Library | resources.libraries.python.TrafficGenerator
| ...
| Documentation | Suite teardown keywords.
@@ -41,7 +42,6 @@
| | [Documentation]
| | ... | Additional teardown for suites which uses dpdk.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Cleanup DPDK Environment
| | | ... | ${nodes['${dut}']} | ${${dut}_if1} | ${${dut}_if2}
diff --git a/resources/libraries/robot/shared/test_setup.robot b/resources/libraries/robot/shared/test_setup.robot
new file mode 100644
index 0000000000..17e9e6c459
--- /dev/null
+++ b/resources/libraries/robot/shared/test_setup.robot
@@ -0,0 +1,57 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# 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.
+
+"""Keywords used in test setups."""
+
+*** Settings ***
+| Library | resources.libraries.python.PapiHistory
+| ...
+| Documentation | Test Setup keywords.
+
+*** Keywords ***
+| Setup test
+| | [Documentation]
+| | ... | Common test setup for tests.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${actions} - Additional setup action. Type: list
+| | ...
+| | [Arguments] | @{actions}
+| | ...
+| | Reset PAPI History On All DUTs | ${nodes}
+| | Create base startup configuration of VPP on all DUTs
+| | :FOR | ${action} | IN | @{actions}
+| | | Run Keyword | Additional Test Setup Action For ${action}
+
+| Additional Test Setup Action For namespace
+| | [Documentation]
+| | ... | Additional Setup for tests which uses namespace.
+| | ...
+| | :FOR | ${dut} | IN | @{duts}
+| | | Clean Up Namespaces | ${nodes['${dut}']}
+
+| Additional Test Setup Action For ligato
+| | [Documentation]
+| | ... | Additional Setup for tests which uses Ligato Kubernetes.
+| | ...
+| | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
+| | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
+| | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | configmaps/vswitch-agent-cfg.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | configmaps/vnf-agent-cfg.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | pods/contiv-sfc-controller.yaml
+| | Apply Kubernetes resource on all duts | ${nodes}
+| | ... | pods/contiv-vswitch.yaml
diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot
index e30aa9f41e..f95e369b65 100644
--- a/resources/libraries/robot/shared/test_teardown.robot
+++ b/resources/libraries/robot/shared/test_teardown.robot
@@ -14,6 +14,11 @@
"""Keywords used in test teardowns."""
*** Settings ***
+| Resource | resources/libraries/robot/shared/container.robot
+| Resource | resources/libraries/robot/shared/qemu.robot
+| Library | resources.libraries.python.PapiHistory
+| Library | resources.libraries.python.topology.Topology
+| ...
| Documentation | Test teardown keywords.
*** Keywords ***
@@ -28,8 +33,10 @@
| | ...
| | Remove All Added Ports On All DUTs From Topology | ${nodes}
| | Show PAPI History On All DUTs | ${nodes}
-| | Get Core Files on All Nodes | ${nodes}
-| | Verify VPP PID in Teardown
+| | Run Keyword If Test Failed
+| | ... | Get Core Files on All Nodes | ${nodes}
+| | Run Keyword If Test Failed
+| | ... | Verify VPP PID in Teardown
| | :FOR | ${action} | IN | @{actions}
| | | Run Keyword | Additional Test Tear Down Action For ${action}
@@ -59,7 +66,6 @@
| | [Documentation]
| | ... | Additional teardown for tests which uses vhost(s) and VM(s).
| | ...
-| | # TODO: Remove IF condition once devicetest is running KernelVM.
| | Show VPP vhost on all DUTs | ${nodes}
| | Run Keyword If | "PERFTEST" in @{TEST TAGS} | vnf_manager.Kill All VMs
| | Run Keyword If | "DEVICETEST" in @{TEST TAGS} | vm_node.Qemu Kill
@@ -68,15 +74,14 @@
| | [Documentation]
| | ... | Additional teardown for tests which uses NAT feature.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
-| | | Show NAT verbose | ${nodes['${dut}']}
+| | | Run Keyword If Test Failed
+| | | ... | Show NAT verbose | ${nodes['${dut}']}
| Additional Test Tear Down Action For namespace
| | [Documentation]
| | ... | Additional teardown for tests which uses namespace.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Clean Up Namespaces | ${nodes['${dut}']}
@@ -84,7 +89,6 @@
| | [Documentation]
| | ... | Additional teardown for tests which uses linux_bridge.
| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Linux Del Bridge | ${nodes['${dut}']} | ${bid_TAP}
@@ -94,16 +98,16 @@
| | ...
| | Run Keyword If Test Failed
| | ... | Vpp Log Plugin Acl Settings | ${dut1}
-| | Run Keyword If Test Failed | Run Keyword And Ignore Error
+| | Run Keyword If Test Failed
| | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
| Additional Test Tear Down Action For macipacl
| | [Documentation]
| | ... | Additional teardown for tests which uses MACIP ACL feature.
| | ...
-| | Run Keyword If Test Failed | Run Keyword And Ignore Error
+| | Run Keyword If Test Failed
| | ... | Vpp Log Macip Acl Settings | ${dut1}
-| | Run Keyword And Ignore Error
+| | Run Keyword If Test Failed
| | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
| Additional Test Tear Down Action For srv6
@@ -114,7 +118,8 @@
| | ... | Show SR Policies on all DUTs | ${nodes}
| | Run Keyword If Test Failed
| | ... | Show SR Steering Policies on all DUTs | ${nodes}
-| | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}
+| | Run Keyword If Test Failed
+| | ... | Show SR LocalSIDs on all DUTs | ${nodes}
| Additional Test Tear Down Action For ligato
| | [Documentation]
diff --git a/resources/libraries/robot/tcp/tcp_setup.robot b/resources/libraries/robot/tcp/tcp_setup.robot
index 8a39a0bc4a..39a570c20a 100644
--- a/resources/libraries/robot/tcp/tcp_setup.robot
+++ b/resources/libraries/robot/tcp/tcp_setup.robot
@@ -21,28 +21,6 @@
| Documentation | L2 keywords to set up VPP to test tcp.
*** Keywords ***
-| Create base startup configuration of VPP for TCP tests on all DUTs
-| | [Documentation] | Create base startup configuration of VPP for TCP related
-| | ... | tests to all DUTs.
-| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | Import Library | resources.libraries.python.VppConfigGenerator
-| | | ... | WITH NAME | ${dut}
-| | | Run keyword | ${dut}.Set Node | ${nodes['${dut}']}
-| | | Run keyword | ${dut}.Add Unix Log
-| | | Run keyword | ${dut}.Add Unix CLI Listen
-| | | Run keyword | ${dut}.Add Unix Nodaemon
-| | | Run keyword | ${dut}.Add DPDK Socketmem | 4096,4096
-| | | Run keyword | ${dut}.Add DPDK Log Level | debug
-| | | Run keyword | ${dut}.Add DPDK Uio Driver
-| | | Run keyword | ${dut}.Add Heapsize | 4G
-| | | Run keyword | ${dut}.Add Plugin | disable | default
-| | | Run keyword | ${dut}.Add Plugin | enable | @{plugins_to_enable}
-| | | Run keyword | ${dut}.Add IP6 Hash Buckets | 2000000
-| | | Run keyword | ${dut}.Add IP6 Heap Size | 4G
-| | | Run keyword | ${dut}.Add IP Heap Size | 4G
-
| Set up HTTP server with paramters on the VPP node
| | [Documentation]
| | ... | Configure IP address on the port, set it up and start HTTP server on