aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorMatej Klotton <mklotton@cisco.com>2016-04-28 16:39:18 +0200
committerMatej Klotton <mklotton@cisco.com>2016-05-11 14:59:12 +0000
commit7dbda72563912b656bde2ee4b4611a0b284b933e (patch)
tree91f9001d402ee5971013a0ebc2edbf28649f4888 /resources
parent10f3b07a5c883e20ef345c8b1c8e24063a50281f (diff)
Add library for set path variables for testing.
Change-Id: Icb243bacc9329c4bf3bc28098fced473b4e3c991 Signed-off-by: Matej Klotton <mklotton@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/robot/bridge_domain.robot117
-rw-r--r--resources/libraries/robot/cop.robot85
-rw-r--r--resources/libraries/robot/iacl.robot125
-rw-r--r--resources/libraries/robot/interfaces.robot17
-rw-r--r--resources/libraries/robot/tagging.robot51
-rw-r--r--resources/libraries/robot/testing_path.robot192
-rw-r--r--resources/libraries/robot/vxlan.robot45
7 files changed, 225 insertions, 407 deletions
diff --git a/resources/libraries/robot/bridge_domain.robot b/resources/libraries/robot/bridge_domain.robot
index 9cd3a70a97..f1458a0023 100644
--- a/resources/libraries/robot/bridge_domain.robot
+++ b/resources/libraries/robot/bridge_domain.robot
@@ -21,43 +21,6 @@
| Resource | resources/libraries/robot/l2_traffic.robot
*** Keywords ***
-| Path for 2-node BD testing is set
-| | [Documentation] | Compute path for bridge domain testing on two given nodes
-| | ... | and set corresponding test case variables.
-| | ...
-| | ... | *Arguments:*
-| | ... | - ${tg_node} - TG node. Type: dictionary
-| | ... | - ${dut_node} - DUT node. Type: dictionary
-| | ...
-| | ... | *Return:*
-| | ... | - No value returned
-| | ...
-| | ... | _NOTE:_ This KW sets following test case variables:
-| | ... | - ${tg_node} - TG node.
-| | ... | - ${tg_to_dut_if1} - 1st TG interface towards DUT.
-| | ... | - ${tg_to_dut_if2} - 2nd TG interface towards DUT.
-| | ... | - ${dut_node} - DUT node.
-| | ... | - ${dut_to_tg_if1} - 1st DUT interface towards TG.
-| | ... | - ${dut_to_tg_if2} - 2nd DUT interface towards TG.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Given Path for 2-node BD testing is set \| ${nodes['TG']} \
-| | ... | \| ${nodes['DUT1']} \|
-| | [Arguments] | ${tg_node} | ${dut_node}
-| | Append Nodes | ${tg_node} | ${dut_node} | ${tg_node}
-| | Compute Path | always_same_link=${FALSE}
-| | ${tg_to_dut_if1} | ${tmp}= | First Interface
-| | ${tg_to_dut_if2} | ${tmp}= | Last Interface
-| | ${dut_to_tg_if1} | ${tmp}= | First Ingress Interface
-| | ${dut_to_tg_if2} | ${tmp}= | Last Egress Interface
-| | Set Test Variable | ${tg_to_dut_if1}
-| | Set Test Variable | ${tg_to_dut_if2}
-| | Set Test Variable | ${dut_to_tg_if1}
-| | Set Test Variable | ${dut_to_tg_if2}
-| | Set Test Variable | ${tg_node}
-| | Set Test Variable | ${dut_node}
-
| Vpp l2bd forwarding setup
| | [Documentation] | Setup BD between 2 interfaces on VPP node and if learning
| | ... | is off set static L2FIB entry on second interface
@@ -69,52 +32,6 @@
| | ... | Vpp Add L2fib Entry | ${node} | ${mac} | ${if2} | ${1}
| | All Vpp Interfaces Ready Wait | ${nodes}
-| Path for 3-node BD testing is set
-| | [Documentation] | Compute path for bridge domain testing on three given
-| | ... | nodes and set corresponding test case variables.
-| | ...
-| | ... | *Arguments:*
-| | ... | - ${tg_node} - TG node. Type: dictionary
-| | ... | - ${dut1_node} - DUT1 node. Type: dictionary
-| | ... | - ${dut2_node} - DUT2 node. Type: dictionary
-| | ...
-| | ... | *Return:*
-| | ... | - No value returned
-| | ... |
-| | ... | _NOTE:_ This KW sets following test case variables:
-| | ... | - ${tg_node} - TG node.
-| | ... | - ${tg_to_dut1} - TG interface towards DUT1.
-| | ... | - ${tg_to_dut2} - TG interface towards DUT2.
-| | ... | - ${dut1_node} - DUT1 node.
-| | ... | - ${dut1_to_tg} - DUT1 interface towards TG.
-| | ... | - ${dut1_to_dut2} - DUT1 interface towards DUT2.
-| | ... | - ${dut2_node} - DUT2 node.
-| | ... | - ${dut2_to_tg} - DUT2 interface towards TG.
-| | ... | - ${dut2_to_dut1} - DUT2 interface towards DUT1.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Given Path for 3-node BD testing is set \| ${nodes['TG']} \
-| | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \|
-| | [Arguments] | ${tg_node} | ${dut1_node} | ${dut2_node}
-| | Append Nodes | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
-| | Compute Path
-| | ${tg_to_dut1} | ${tmp}= | Next Interface
-| | ${dut1_to_tg} | ${tmp}= | Next Interface
-| | ${dut1_to_dut2} | ${tmp}= | Next Interface
-| | ${dut2_to_dut1} | ${tmp}= | Next Interface
-| | ${dut2_to_tg} | ${tmp}= | Next Interface
-| | ${tg_to_dut2} | ${tmp}= | Next Interface
-| | Set Test Variable | ${tg_to_dut1}
-| | Set Test Variable | ${dut1_to_tg}
-| | Set Test Variable | ${tg_to_dut2}
-| | Set Test Variable | ${dut2_to_tg}
-| | Set Test Variable | ${dut1_to_dut2}
-| | Set Test Variable | ${dut2_to_dut1}
-| | Set Test Variable | ${tg_node}
-| | Set Test Variable | ${dut1_node}
-| | Set Test Variable | ${dut2_node}
-
| Path for 3-node BD-SHG testing is set
| | [Documentation] | Compute path for bridge domain split-horizon group testing
| | ... | on three given nodes with following interconnections
@@ -128,7 +45,7 @@
| | ...
| | ... | *Return:*
| | ... | - No value returned
-| | ... |
+| | ...
| | ... | _NOTE:_ This KW sets following test case variables:
| | ... | - ${tg_node} - TG node.
| | ... | - ${tg_to_dut1_if1} - TG interface 1 towards DUT1.
@@ -185,6 +102,38 @@
| | Set Test Variable | ${dut1_node}
| | Set Test Variable | ${dut2_node}
+| Interfaces in 3-node BD-SHG testing are up
+| | [Documentation] | Set UP state on interfaces in 3-node path on nodes and
+| | ... | wait for all interfaces are ready.
+| | ...
+| | ... | *Arguments:*
+| | ... | - No arguments.
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned.
+| | ...
+| | ... | _NOTE:_ This KW uses test variables sets in
+| | ... | "Path for 3-node BD-SHG testing is set" KW.
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Path for 3-node BD-SHG testing is set \| ${nodes['TG']} \
+| | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \|
+| | ... | \| Interfaces in 3-node BD-SHG testing are up \|
+| | ...
+| | Set Interface State | ${tg_node} | ${tg_to_dut1_if1} | up
+| | Set Interface State | ${tg_node} | ${tg_to_dut1_if2} | up
+| | Set Interface State | ${tg_node} | ${tg_to_dut2_if1} | up
+| | Set Interface State | ${tg_node} | ${tg_to_dut2_if2} | up
+| | Set Interface State | ${dut1_node} | ${dut1_to_tg_if1} | up
+| | Set Interface State | ${dut1_node} | ${dut1_to_tg_if2} | up
+| | Set Interface State | ${dut2_node} | ${dut2_to_tg_if1} | up
+| | Set Interface State | ${dut2_node} | ${dut2_to_tg_if2} | up
+| | Set Interface State | ${dut1_node} | ${dut1_to_dut2} | up
+| | Set Interface State | ${dut2_node} | ${dut2_to_dut1} | up
+| | Vpp Node Interfaces Ready Wait | ${dut1_node}
+| | Vpp Node Interfaces Ready Wait | ${dut2_node}
+
| Bridge domain on DUT node is created
| | [Documentation] | Create bridge domain on given VPP node with defined
| | ... | learning status.
diff --git a/resources/libraries/robot/cop.robot b/resources/libraries/robot/cop.robot
deleted file mode 100644
index c958b3e211..0000000000
--- a/resources/libraries/robot/cop.robot
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright (c) 2016 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 ***
-| Resource | resources/libraries/robot/default.robot
-| Resource | resources/libraries/robot/counters.robot
-| Library | resources.libraries.python.NodePath
-| Library | resources.libraries.python.Cop
-| Library | resources.libraries.python.Routing
-| Library | resources.libraries.python.TrafficScriptExecutor
-| Library | resources.libraries.python.InterfaceUtil
-
-*** Keywords ***
-| Setup Nodes And Variables
-| | [Documentation] | Setup of test variables and bring interfaces up.
-| | ...
-| | ... | *Arguments:*
-| | ...
-| | ... | - {tg_node} : Node where to start/end. Type: dictionary
-| | ... | - {dut1_node} - Next node from start. Type: dictionary
-| | ... | - {dut2_node} - Third node. Type: dictionary
-| | ...
-| | ... | *Return:*
-| | ...
-| | ... | - No value returned
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Setup Nodes And Variables \| ${nodes['TG']} \
-| | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \|
-| | ...
-| | ... | _NOTE:_ This KW sets following test case variables:
-| | ...
-| | ... | - ${tg_if1} - Iterface of TG towards DUT (1st).
-| | ... | - ${tg_if2} - Interface of TG towards DUT (2nd).
-| | ... | - ${dut1_if1} - Interface of DUT towards TG (1st).
-| | ... | - ${dut1_if2} - Interface of DUT towards TG (2nd).
-| | ... | - ${dut2_if1} - Interface of DUT2 towards DUT (1st).
-| | ... | - ${dut2_if2} - Interface of DUT2 towards TG (2nd).
-| | ... | - ${tg_if1_mac} - MAC address of TG interface (1st).
-| | ... | - ${tg_if2_mac} - MAC address of TG interface (2nd).
-| | ... | - ${dut1_if1_mac} - MAC address of DUT1 interface (1st).
-| | ... | - ${dut1_if2_mac} - MAC address of DUT1 interface (2nd).
-| | ...
-| | [Arguments] | ${tg_node} | ${dut1_node} | ${dut2_node}
-| | Append Nodes | ${tg_node} | ${dut1_node} | ${dut2_node} |
-| | ... | ${tg_node}
-| | 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}
-| | ${dut1_if1_mac}= | Get interface mac | ${dut1} | ${dut1_if1}
-| | ${dut1_if2_mac}= | Get interface mac | ${dut1} | ${dut1_if2}
-| | Set Test Variable | ${tg_if1}
-| | Set Test Variable | ${tg_if2}
-| | Set Test Variable | ${dut1_if1}
-| | Set Test Variable | ${dut1_if2}
-| | Set Test Variable | ${dut2_if1}
-| | Set Test Variable | ${dut2_if2}
-| | Set Test Variable | ${tg_if1_mac}
-| | Set Test Variable | ${tg_if2_mac}
-| | Set Test Variable | ${dut1_if1_mac}
-| | Set Test Variable | ${dut1_if2_mac}
-| | Set Interface State | ${tg_node} | ${tg_if1} | up
-| | Set Interface State | ${tg_node} | ${tg_if2} | up
-| | Set Interface State | ${dut1_node} | ${dut1_if1} | up
-| | Set Interface State | ${dut1_node} | ${dut1_if2} | up
-| | Set Interface State | ${dut2_node} | ${dut2_if1} | up
-| | Set Interface State | ${dut2_node} | ${dut2_if2} | up
-| | All Vpp Interfaces Ready Wait | ${nodes}
diff --git a/resources/libraries/robot/iacl.robot b/resources/libraries/robot/iacl.robot
deleted file mode 100644
index 659edb8c30..0000000000
--- a/resources/libraries/robot/iacl.robot
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright (c) 2016 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 ***
-| Documentation | Keywords for iACL tests
-| Resource | resources/libraries/robot/default.robot
-| Library | resources.libraries.python.InterfaceUtil
-| Library | resources.libraries.python.NodePath
-
-*** Keywords ***
-| Node path computed for 3-node topology
-| | [Arguments] | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
-| | [Documentation] | *Create interface variables for 3-node topology.*
-| | ...
-| | ... | *Arguments:*
-| | ... | - ${tg_node} - Node attached to the path. Type: dictionary
-| | ... | - ${dut1_node} - Node attached to the path. Type: dictionary
-| | ... | - ${dut2_node} - Node attached to the path. Type: dictionary
-| | ...
-| | ... | _Set testcase variables for nodes and interfaces._
-| | ... | - ${tg_node} - Variable for node in path. Type: dictionary
-| | ... | - ${dut1_node} - Variable for node in path. Type: dictionary
-| | ... | - ${dut2_node} - Variable for node in path. Type: dictionary
-| | ... | - ${tg_if1} - First interface of TG node. Type: str
-| | ... | - ${tg_if2} - Second interface of TG node. Type: str
-| | ... | - ${dut1_if1} - First interface of first DUT node. Type: str
-| | ... | - ${dut1_if2} - Second interface of first DUT node. Type: str
-| | ... | - ${dut2_if1} - First interface of second DUT node. Type: str
-| | ... | - ${dut2_if2} - Second interface of second DUT node. Type: str
-| | ... | - ${tg_if1_mac} - MAC address of TG interface (1st).
-| | ... | - ${tg_if2_mac} - MAC address of TG interface (2nd).
-| | ... | - ${dut1_if1_mac} - MAC address of DUT1 interface (1st).
-| | ... | - ${dut1_if2_mac} - MAC address of DUT1 interface (2nd).
-| | ...
-| | Append Nodes | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
-| | Compute Path
-| | ${tg_if1} | ${tg_node}= | Next Interface
-| | ${dut1_if1} | ${dut1_node}= | Next Interface
-| | ${dut1_if2} | ${dut1_node}= | Next Interface
-| | ${dut2_if1} | ${dut2_node}= | Next Interface
-| | ${dut2_if2} | ${dut2_node}= | Next Interface
-| | ${tg_if2} | ${tg_node}= | Next Interface
-| | ${tg_if1_mac}= | Get interface mac | ${tg_node} | ${tg_if1}
-| | ${tg_if2_mac}= | Get interface mac | ${tg_node} | ${tg_if2}
-| | ${dut1_if1_mac}= | Get interface mac | ${dut1_node} | ${dut1_if1}
-| | ${dut1_if2_mac}= | Get interface mac | ${dut1_node} | ${dut1_if2}
-| | Set Test Variable | ${tg_node}
-| | Set Test Variable | ${tg_if1}
-| | Set Test Variable | ${tg_if2}
-| | Set Test Variable | ${dut1_node}
-| | Set Test Variable | ${dut1_if1}
-| | Set Test Variable | ${dut1_if2}
-| | Set Test Variable | ${dut2_node}
-| | Set Test Variable | ${dut2_if1}
-| | Set Test Variable | ${dut2_if2}
-| | Set Test Variable | ${tg_if1_mac}
-| | Set Test Variable | ${tg_if2_mac}
-| | Set Test Variable | ${dut1_if1_mac}
-| | Set Test Variable | ${dut1_if2_mac}
-
-| Interfaces in path are up
-| | [Documentation] | *Set UP state on interfaces in path on nodes.*
-| | ...
-| | Set Interface State | ${tg_node} | ${tg_if1} | up
-| | Set Interface State | ${tg_node} | ${tg_if2} | up
-| | Set Interface State | ${dut1_node} | ${dut1_if1} | up
-| | Set Interface State | ${dut1_node} | ${dut1_if2} | up
-| | Set Interface State | ${dut2_node} | ${dut2_if1} | up
-| | Set Interface State | ${dut2_node} | ${dut2_if2} | up
-| | Vpp Node Interfaces Ready Wait | ${dut1_node}
-| | Vpp Node Interfaces Ready Wait | ${dut2_node}
-
-| IPv4 Addresses set on the node interfaces
-| | [Arguments] | ${dut_node} | ${int1} | ${ip_addr1} | ${int2} | ${ip_addr2}
-| | ... | ${prefix_length}
-| | [Documentation] | Setup IPv4 adresses on the node interfaces
-| | ...
-| | ... | *Arguments*
-| | ... | - ${dut_node} - VPP node.
-| | ... | - ${int1} - First node interface.
-| | ... | - ${ip_addr1} - First IP address.
-| | ... | - ${int2} - Second node interface.
-| | ... | - ${ip_addr2} - Second IP address.
-| | ... | - ${prefix_length} - IP prefix length.
-| | ...
-| | ... | *Example*
-| | ... | \| IPv4 Addresses set on the node interfaces \
-| | ... | \| ${dut1_node} \| ${dut1_if1} \| ${dut1_if1_ip} \
-| | ... | \| ${dut1_if2} \| ${dut1_if2_ip} \| ${prefix_length} \|
-| | ...
-| | Set Interface Address | ${dut_node} | ${int1} | ${ip_addr1}
-| | ... | ${prefix_length}
-| | Set Interface Address | ${dut_node} | ${int2} | ${ip_addr2}
-| | ... | ${prefix_length}
-
-| IPv6 Addresses set on the node interfaces
-| | [Arguments] | ${dut_node} | ${int1} | ${ip_addr1} | ${int2} | ${ip_addr2}
-| | ... | ${prefix_length}
-| | [Documentation] | Setup IPv6 adresses on the node interfaces
-| | ...
-| | ... | *Arguments*
-| | ... | - ${dut_node} - VPP node.
-| | ... | - ${int1} - First node interface.
-| | ... | - ${ip_addr1} - First IP address.
-| | ... | - ${int2} - Second node interface.
-| | ... | - ${ip_addr2} - Second IP address.
-| | ... | - ${prefix_length} - IP prefix length.
-| | ...
-| | ... | *Example*
-| | ... | \| IPv6 Addresses set on the node interfaces \
-| | ... | \| ${dut1_node} \| ${dut1_if1} \| ${dut1_if1_ip} \
-| | ... | \| ${dut1_if2} \| ${dut1_if2_ip} \| ${prefix_length} \|
-| | ...
-| | Vpp Set If Ipv6 Addr | ${dut_node} | ${int1} | ${ip_addr1} | ${prefix_length}
-| | Vpp Set If Ipv6 Addr | ${dut_node} | ${int2} | ${ip_addr2} | ${prefix_length}
diff --git a/resources/libraries/robot/interfaces.robot b/resources/libraries/robot/interfaces.robot
index 330cc79b23..60e1480633 100644
--- a/resources/libraries/robot/interfaces.robot
+++ b/resources/libraries/robot/interfaces.robot
@@ -34,20 +34,3 @@
| | ${eth_mtu}= | Evaluate | ${mtu} - 14 - 4
| | Set Interface Ethernet MTU | ${tg_node} | ${tg_port} | ${eth_mtu}
-| Interfaces on all VPP nodes in the path are up
-| | [Documentation] | Wait until all interfaces of the given VPP node
-| | ... | with admin-up state are in link-up state.
-| | ...
-| | ... | *Arguments:*
-| | ... | - @{node_list} - DUT nodes. Type: list
-| | ...
-| | ... | *Return:*
-| | ... | - No value returned
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Interfaces on all VPP nodes in the path are up \
-| | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \|
-| | [Arguments] | @{node_list}
-| | :FOR | ${node} | IN | @{node_list}
-| | | VPP Node Interfaces Ready Wait | ${node}
diff --git a/resources/libraries/robot/tagging.robot b/resources/libraries/robot/tagging.robot
index e0f26a5938..c58acfd9c5 100644
--- a/resources/libraries/robot/tagging.robot
+++ b/resources/libraries/robot/tagging.robot
@@ -20,57 +20,6 @@
| Library | resources.libraries.python.NodePath
*** Keywords ***
-
-| Node path computed for 3-node topology
-| | [Arguments] | ${TG} | ${DUT1} | ${DUT2} | ${TG}
-| | [Documentation] | *Create interface variables for 3-node topology.*
-| | ...
-| | ... | *Arguments:*
-| | ... | - ${TG} - Node attached to the path. Type: dictionary
-| | ... | - ${DUT1} - Node attached to the path. Type: dictionary
-| | ... | - ${DUT2} - Node attached to the path. Type: dictionary
-| | ...
-| | ... | _Set testcase variables for nodes and interfaces._
-| | ... | - ${tg} - Variable for node in path. Type: dictionary
-| | ... | - ${dut1} - Variable for node in path. Type: dictionary
-| | ... | - ${dut2} - Variable for node in path. Type: dictionary
-| | ... | - ${tg_if1} - First interface of TG node. Type: str
-| | ... | - ${tg_if2} - Second interface of TG node. Type: str
-| | ... | - ${dut1_if1} - First interface of first DUT node. Type: str
-| | ... | - ${dut1_if2} - Second interface of first DUT node. Type: str
-| | ... | - ${dut2_if1} - First interface of second DUT node. Type: str
-| | ... | - ${dut2_if2} - Second interface of second DUT node. Type: str
-| | ...
-| | Append Nodes | ${TG} | ${DUT1} | ${DUT2} | ${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
-| | Set Test Variable | ${tg}
-| | Set Test Variable | ${tg_if1}
-| | Set Test Variable | ${tg_if2}
-| | Set Test Variable | ${dut1}
-| | Set Test Variable | ${dut1_if1}
-| | Set Test Variable | ${dut1_if2}
-| | Set Test Variable | ${dut2}
-| | Set Test Variable | ${dut2_if1}
-| | Set Test Variable | ${dut2_if2}
-
-| Interfaces in path are up
-| | [Documentation] | *Set UP state on interfaces in path on nodes.*
-| | ...
-| | Set Interface State | ${tg} | ${tg_if1} | up
-| | Set Interface State | ${tg} | ${tg_if2} | up
-| | Set Interface State | ${dut1} | ${dut1_if1} | up
-| | Set Interface State | ${dut1} | ${dut1_if2} | up
-| | Set Interface State | ${dut2} | ${dut2_if1} | up
-| | Set Interface State | ${dut2} | ${dut2_if2} | up
-| | Vpp Node Interfaces Ready Wait | ${dut1}
-| | Vpp Node Interfaces Ready Wait | ${dut2}
-
| VLAN subinterfaces initialized on 3-node topology
| | [Arguments] | ${DUT1} | ${INT1} | ${DUT2} | ${INT2} | ${SUB_ID}
| | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} | ${TYPE_SUBIF}
diff --git a/resources/libraries/robot/testing_path.robot b/resources/libraries/robot/testing_path.robot
new file mode 100644
index 0000000000..763b34e18a
--- /dev/null
+++ b/resources/libraries/robot/testing_path.robot
@@ -0,0 +1,192 @@
+# Copyright (c) 2016 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.InterfaceUtil
+| Library | resources.libraries.python.NodePath
+
+*** Keywords ***
+| Path for 2-node testing is set
+| | [Documentation] | Compute path for testing on two given nodes in circular
+| | ... | topology and set corresponding test case variables.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${tg_node} - TG node. Type: dictionary
+| | ... | - ${dut_node} - DUT node. Type: dictionary
+| | ... | - ${tg2_node} - Node where the path ends. Must be the same as TG node
+| | ... | parameter in circular topology. Type: dictionary
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | _NOTE:_ This KW sets following test case variables:
+| | ... | - ${tg_node} - TG node.
+| | ... | - ${tg_to_dut_if1} - 1st TG interface towards DUT.
+| | ... | - ${tg_to_dut_if2} - 2nd TG interface towards DUT.
+| | ... | - ${dut_node} - DUT node.
+| | ... | - ${dut_to_tg_if1} - 1st DUT interface towards TG.
+| | ... | - ${dut_to_tg_if2} - 2nd DUT interface towards TG.
+| | ... | - ${tg_to_dut_if1_mac}
+| | ... | - ${tg_to_dut_if2_mac}
+| | ... | - ${dut_to_tg_if1_mac}
+| | ... | - ${dut_to_tg_if2_mac}
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Given Path for 2-node testing is set \| ${nodes['TG']} \
+| | ... | \| ${nodes['DUT1']} \| ${nodes['TG']} \|
+| | ...
+| | [Arguments] | ${tg_node} | ${dut_node} | ${tg2_node}
+| | Should Be Equal | ${tg_node} | ${tg2_node}
+| | Append Nodes | ${tg_node} | ${dut_node} | ${tg_node}
+| | Compute Path | always_same_link=${FALSE}
+| | ${tg_to_dut_if1} | ${tmp}= | First Interface
+| | ${tg_to_dut_if2} | ${tmp}= | Last Interface
+| | ${dut_to_tg_if1} | ${tmp}= | First Ingress Interface
+| | ${dut_to_tg_if2} | ${tmp}= | Last Egress Interface
+| | ${tg_to_dut_if1_mac}= | Get interface mac | ${tg_node} | ${tg_to_dut_if1}
+| | ${tg_to_dut_if2_mac}= | Get interface mac | ${tg_node} | ${tg_to_dut_if2}
+| | ${dut_to_tg_if1_mac}= | Get interface mac | ${dut_node} | ${dut_to_tg_if1}
+| | ${dut_to_tg_if2_mac}= | Get interface mac | ${dut_node} | ${dut_to_tg_if2}
+| | Set Test Variable | ${tg_to_dut_if1}
+| | Set Test Variable | ${tg_to_dut_if2}
+| | Set Test Variable | ${dut_to_tg_if1}
+| | Set Test Variable | ${dut_to_tg_if2}
+| | Set Test Variable | ${tg_to_dut_if1_mac}
+| | Set Test Variable | ${tg_to_dut_if2_mac}
+| | Set Test Variable | ${dut_to_tg_if1_mac}
+| | Set Test Variable | ${dut_to_tg_if2_mac}
+| | Set Test Variable | ${tg_node}
+| | Set Test Variable | ${dut_node}
+
+| Interfaces in 2-node path are up
+| | [Documentation] | Set UP state on interfaces in 2-node path on nodes and
+| | ... | wait for all interfaces are ready. Requires more than
+| | ... | one link between nodes.
+| | ...
+| | ... | *Arguments:*
+| | ... | - No arguments.
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned.
+| | ...
+| | ... | _NOTE:_ This KW uses test variables sets in
+| | ... | "Path for 2-node testing is set" KW.
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Given Path for 2-node testing is set \| ${nodes['TG']} \
+| | ... | \| ${nodes['DUT1']} \| ${nodes['TG']} \|
+| | ... | \| And Interfaces in 2-node path are up \|
+| | ...
+| | Set Interface State | ${tg_node} | ${tg_to_dut_if1} | up
+| | Set Interface State | ${tg_node} | ${tg_to_dut_if2} | up
+| | Set Interface State | ${dut_node} | ${dut_to_tg_if1} | up
+| | Set Interface State | ${dut_node} | ${dut_to_tg_if2} | up
+| | Vpp Node Interfaces Ready Wait | ${dut_node}
+
+| Path for 3-node testing is set
+| | [Documentation] | Compute path for testing on three given nodes in circular
+| | ... | topology and set corresponding test case variables.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${tg_node} - TG node. Type: dictionary
+| | ... | - ${dut1_node} - DUT1 node. Type: dictionary
+| | ... | - ${dut2_node} - DUT2 node. Type: dictionary
+| | ... | - ${tg2_node} - Node where the path ends. Must be the same as TG node
+| | ... | parameter in circular topology. Type: dictionary
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ... |
+| | ... | _NOTE:_ This KW sets following test case variables:
+| | ... | - ${tg_node} - TG node.
+| | ... | - ${tg_to_dut1} - TG interface towards DUT1.
+| | ... | - ${tg_to_dut2} - TG interface towards DUT2.
+| | ... | - ${dut1_node} - DUT1 node.
+| | ... | - ${dut1_to_tg} - DUT1 interface towards TG.
+| | ... | - ${dut1_to_dut2} - DUT1 interface towards DUT2.
+| | ... | - ${dut2_node} - DUT2 node.
+| | ... | - ${dut2_to_tg} - DUT2 interface towards TG.
+| | ... | - ${dut2_to_dut1} - DUT2 interface towards DUT1.
+| | ... | - ${tg_to_dut1_mac}
+| | ... | - ${tg_to_dut2_mac}
+| | ... | - ${dut1_to_tg_mac}
+| | ... | - ${dut1_to_dut2_mac}
+| | ... | - ${dut2_to_tg_mac}
+| | ... | - ${dut2_to_dut1_mac}
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Given Path for 3-node testing is set \| ${nodes['TG']} \
+| | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \| ${nodes['TG']} \|
+| | ...
+| | [Arguments] | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg2_node}
+| | Should Be Equal | ${tg_node} | ${tg2_node}
+| | Append Nodes | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
+| | Compute Path
+| | ${tg_to_dut1} | ${tmp}= | Next Interface
+| | ${dut1_to_tg} | ${tmp}= | Next Interface
+| | ${dut1_to_dut2} | ${tmp}= | Next Interface
+| | ${dut2_to_dut1} | ${tmp}= | Next Interface
+| | ${dut2_to_tg} | ${tmp}= | Next Interface
+| | ${tg_to_dut2} | ${tmp}= | Next Interface
+| | ${tg_to_dut1_mac}= | Get interface mac | ${tg_node} | ${tg_to_dut1}
+| | ${tg_to_dut2_mac}= | Get interface mac | ${tg_node} | ${tg_to_dut2}
+| | ${dut1_to_tg_mac}= | Get interface mac | ${dut1_node} | ${dut1_to_tg}
+| | ${dut1_to_dut2_mac}= | Get interface mac | ${dut1_node} | ${dut1_to_dut2}
+| | ${dut2_to_tg_mac}= | Get interface mac | ${dut2_node} | ${dut2_to_tg}
+| | ${dut2_to_dut1_mac}= | Get interface mac | ${dut2_node} | ${dut2_to_dut1}
+| | Set Test Variable | ${tg_to_dut1}
+| | Set Test Variable | ${dut1_to_tg}
+| | Set Test Variable | ${tg_to_dut2}
+| | Set Test Variable | ${dut2_to_tg}
+| | Set Test Variable | ${dut1_to_dut2}
+| | Set Test Variable | ${dut2_to_dut1}
+| | Set Test Variable | ${tg_to_dut1_mac}
+| | Set Test Variable | ${tg_to_dut2_mac}
+| | Set Test Variable | ${dut1_to_tg_mac}
+| | Set Test Variable | ${dut1_to_dut2_mac}
+| | Set Test Variable | ${dut2_to_tg_mac}
+| | Set Test Variable | ${dut2_to_dut1_mac}
+| | Set Test Variable | ${tg_node}
+| | Set Test Variable | ${dut1_node}
+| | Set Test Variable | ${dut2_node}
+
+| Interfaces in 3-node path are up
+| | [Documentation] | Set UP state on interfaces in 3-node path on nodes and
+| | ... | wait for all interfaces are ready.
+| | ...
+| | ... | *Arguments:*
+| | ... | - No arguments.
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned.
+| | ...
+| | ... | _NOTE:_ This KW uses test variables sets in
+| | ... | "Path for 3-node testing is set" KW.
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Given Path for 3-node testing is set \| ${nodes['TG']} \
+| | ... | \| ${nodes['DUT1']} \| ${nodes['TG']} \|
+| | ... | \| And Interfaces in 3-node path are up \|
+| | ...
+| | Set Interface State | ${tg_node} | ${tg_to_dut1} | up
+| | Set Interface State | ${tg_node} | ${tg_to_dut2} | up
+| | Set Interface State | ${dut1_node} | ${dut1_to_tg} | up
+| | Set Interface State | ${dut1_node} | ${dut1_to_dut2} | up
+| | Set Interface State | ${dut2_node} | ${dut2_to_tg} | up
+| | Set Interface State | ${dut2_node} | ${dut2_to_dut1} | up
+| | Vpp Node Interfaces Ready Wait | ${dut1_node}
+| | Vpp Node Interfaces Ready Wait | ${dut2_node}
diff --git a/resources/libraries/robot/vxlan.robot b/resources/libraries/robot/vxlan.robot
index ebf5d351ca..e3d5f3578e 100644
--- a/resources/libraries/robot/vxlan.robot
+++ b/resources/libraries/robot/vxlan.robot
@@ -24,51 +24,6 @@
| Library | resources.libraries.python.NodePath
*** Keywords ***
-| Path for VXLAN testing is set
-| | [Documentation] | *Compute path for VXLAN testing on nodes.*
-| | ...
-| | ... | _Set testcase variables with interfaces and nodes:_
-| | ... | - ${tgs_to_dut1}
-| | ... | - ${dut1s_to_tg}
-| | ... | - ${tgs_to_dut2}
-| | ... | - ${dut2s_to_tg}
-| | ... | - ${dut1s_to_dut2}
-| | ... | - ${dut2s_to_dut1}
-| | ... | - ${tg}
-| | ... | - ${dut1}
-| | ... | - ${dut2}
-| | ...
-| | [Arguments] | ${TG} | ${DUT1} | ${DUT2}
-| | Append Nodes | ${TG} | ${DUT1} | ${DUT2} | ${TG}
-| | Compute Path
-| | ${tgs_to_dut1} | ${tg}= | Next Interface
-| | ${dut1s_to_tg} | ${dut1}= | Next Interface
-| | ${dut1s_to_dut2} | ${dut1}= | Next Interface
-| | ${dut2s_to_dut1} | ${dut2}= | Next Interface
-| | ${dut2s_to_tg} | ${dut2}= | Next Interface
-| | ${tgs_to_dut2} | ${tg}= | Next Interface
-| | Set Test Variable | ${tgs_to_dut1}
-| | Set Test Variable | ${dut1s_to_tg}
-| | Set Test Variable | ${tgs_to_dut2}
-| | Set Test Variable | ${dut2s_to_tg}
-| | Set Test Variable | ${dut1s_to_dut2}
-| | Set Test Variable | ${dut2s_to_dut1}
-| | Set Test Variable | ${tg}
-| | Set Test Variable | ${dut1}
-| | Set Test Variable | ${dut2}
-
-| Interfaces in path are up
-| | [Documentation] | *Set UP state on interfaces in path on nodes.*
-| | ...
-| | Set Interface State | ${tg} | ${tgs_to_dut1} | up
-| | Set Interface State | ${tg} | ${tgs_to_dut2} | up
-| | Set Interface State | ${dut1} | ${dut1s_to_tg} | up
-| | Set Interface State | ${dut1} | ${dut1s_to_dut2} | up
-| | Set Interface State | ${dut2} | ${dut2s_to_tg} | up
-| | Set Interface State | ${dut2} | ${dut2s_to_dut1} | up
-| | Vpp Node Interfaces Ready Wait | ${dut1}
-| | Vpp Node Interfaces Ready Wait | ${dut2}
-
| IP addresses are set on interfaces
| | [Documentation] | *Set IPv4 addresses on interfaces on DUTs.*
| | ... | If interface index is None then is determines with Get Interface Sw Index