Add library for set path variables for testing. 15/915/22
authorMatej Klotton <mklotton@cisco.com>
Thu, 28 Apr 2016 14:39:18 +0000 (16:39 +0200)
committerMatej Klotton <mklotton@cisco.com>
Wed, 11 May 2016 14:59:12 +0000 (14:59 +0000)
Change-Id: Icb243bacc9329c4bf3bc28098fced473b4e3c991
Signed-off-by: Matej Klotton <mklotton@cisco.com>
16 files changed:
resources/libraries/robot/bridge_domain.robot
resources/libraries/robot/cop.robot [deleted file]
resources/libraries/robot/iacl.robot [deleted file]
resources/libraries/robot/interfaces.robot
resources/libraries/robot/tagging.robot
resources/libraries/robot/testing_path.robot [new file with mode: 0644]
resources/libraries/robot/vxlan.robot
tests/suites/bridge_domain/bridge_domain_untagged.robot
tests/suites/cop/cop_whitelist_blacklist.robot
tests/suites/cop/cop_whitelist_blacklist_IPv6.robot
tests/suites/ipv4/ipv4_iacl_untagged.robot
tests/suites/ipv6/ipv6_iacl_untagged.robot
tests/suites/tagging/qinq_l2_xconnect.robot
tests/suites/vxlan/vxlan_bd_dot1q.robot
tests/suites/vxlan/vxlan_bd_untagged.robot
tests/suites/vxlan/vxlan_xconnect_untagged.robot

index 9cd3a70..f1458a0 100644 (file)
 | 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
 | | ... | 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
 | | ...
 | | ... | *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.
 | | 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 (file)
index c958b3e..0000000
+++ /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 (file)
index 659edb8..0000000
+++ /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}
index 330cc79..60e1480 100644 (file)
 | | ${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}
index e0f26a5..c58acfd 100644 (file)
 | 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 (file)
index 0000000..763b34e
--- /dev/null
@@ -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}
index ebf5d35..e3d5f35 100644 (file)
 | 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
index 6f7cd6e..bada88d 100644 (file)
@@ -14,6 +14,7 @@
 *** Settings ***
 | Resource | resources/libraries/robot/default.robot
 | Resource | resources/libraries/robot/bridge_domain.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/qemu.robot
 | Library  | resources.libraries.python.Trace
 | Force Tags | HW_ENV | VM_ENV
 | | ...             | add there two interfaces and check traffic
 | | ...             | bidirectionally.
 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
-| | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
+| | Given Path for 2-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Interfaces in 2-node path are up
 | | When Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
 | | ...                                     | ${bd_id1}
 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
 | | ...                                     | ${bd_id1}
-| | And Interfaces on all VPP nodes in the path are up | ${dut_node}
 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
 | | ...                                     | ${tg_to_dut_if2}
 
@@ -62,8 +64,9 @@
 | | ...             | add two interfaces to each bridge domain and check traffic
 | | ...             | bidirectionally.
 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
-| | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
-| | ...                                     | ${nodes['DUT2']}
+| | Given Path for 3-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
+| | And Interfaces in 3-node path are up
 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
 | | ...                                     | ${bd_id1}
@@ -74,8 +77,6 @@
 | | ...                                     | ${bd_id2}
 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
 | | ...                                     | ${bd_id2}
-| | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
-| | ...                                                | ${dut2_node}
 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
 | | ...                                          | ${tg_to_dut2}
 
@@ -85,8 +86,9 @@
 | | ...             | static L2FIB entry on each interface and check traffic
 | | ...             | bidirectionally.
 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
-| | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
-| | ...                                     | ${nodes['DUT2']}
+| | Given Path for 3-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
+| | And Interfaces in 3-node path are up
 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
 | | ...                                       | learn=${FALSE}
 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
 | | ...                                                | ${dut2_node}
 | | ...                                                | ${dut2_to_tg}
 | | ...                                                | ${bd_id2}
-| | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
-| | ...                                                | ${dut2_node}
 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
 | | ...                                          | ${tg_to_dut2}
 
 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
 | | ...                                         | ${nodes['DUT1']}
 | | ...                                         | ${nodes['DUT2']}
+| | And Interfaces in 3-node BD-SHG testing are up
 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
 | | ...                                     | ${bd_id1} | ${shg1}
 | | ...                                     | ${bd_id2} | ${shg2}
 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
 | | ...                                     | ${bd_id2}
-| | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
-| | ...                                                | ${dut2_node}
 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node}
 | | ...                                          | ${tg_to_dut1_if1}
 | | ...                                          | ${tg_to_dut2_if1}
 | | ...             | interfaces and check packet forwarding through VM via two
 | | ...             | L2 bridge domains with learning enabled.
 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
-| | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
+| | Given Path for 2-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Interfaces in 2-node path are up
 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
 | | ...                                                     | ${sock1}
 | | ...                                                     | ${sock2}
 | | ...                                     | ${bd_id2}
 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
 | | ...                                     | ${bd_id2}
-| | And Interfaces on all VPP nodes in the path are up | ${dut_node}
 | | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
 | | ...                                       | ${sock2}
 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
 | | ...             | L2 bridge domains with learning disabled (static L2BFIB
 | | ...             | entries).
 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
-| | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
+| | Given Path for 2-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Interfaces in 2-node path are up
 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
 | | ...                                                     | ${sock1}
 | | ...                                                     | ${sock2}
 | | ...                                     | ${bd_id2}
 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
 | | ...                                     | ${bd_id2}
-| | And Interfaces on all VPP nodes in the path are up | ${dut_node}
 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
 | | ...                                                | ${tg_to_dut_if2}
 | | ...                                                | ${dut_node}
index ad02b4c..00267bf 100644 (file)
 # limitations under the License.
 
 *** Settings ***
-| Library | resources.libraries.python.topology.Topology
-| Library | resources.libraries.python.NodePath
 | Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.Cop
 | Resource | resources/libraries/robot/default.robot
 | Resource | resources/libraries/robot/interfaces.robot
 | Resource | resources/libraries/robot/ipv4.robot
 | Resource | resources/libraries/robot/traffic.robot
-| Resource | resources/libraries/robot/cop.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/l2_xconnect.robot
 | Variables  | resources/libraries/python/IPv4NodeAddress.py | ${nodes}
 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
 *** Test Cases ***
 | VPP permits packets based on IPv4 src addr
 | | [Documentation] | COP Whitelist test with basic setup.
-| | Given Setup Nodes And Variables | ${tg_node} | ${dut1_node} | ${dut2_node}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
+| | Given Path for 3-node testing is set
+| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
+| | And Interfaces in 3-node path are up
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
 | | And Set Interface Address
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix}
 | | And Set Interface Address
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix}
 | | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip_GW} | ${tg_if1_mac}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac}
 | | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac}
 | | And Vpp Route Add | ${dut1_node}
-| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_if2}
+| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2}
 | | And Add fib table | ${dut1_node}
 | | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | local
 | | When COP Add whitelist Entry
-| | ... | ${dut1_node} | ${dut1_if1} | ip4 | ${fib_table_number}
-| | And COP interface enable or disable | ${dut1_node} | ${dut1_if1} | enable
-| | Then Send Packet And Check Headers | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number}
+| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable
+| | Then Send Packet And Check Headers | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
+| | ... | ${tg_to_dut2_mac}
 
 
 | VPP drops packets based on IPv4 src addr
 | | [Documentation] | COP blacklist test with basic setup.
-| | Given Setup Nodes And Variables | ${tg_node} | ${dut1_node} | ${dut2_node}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
+| | Given Path for 3-node testing is set
+| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
+| | And Interfaces in 3-node path are up
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
 | | And Set Interface Address
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix}
 | | And Set Interface Address
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix}
 | | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip_GW} | ${tg_if1_mac}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac}
 | | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac}
 | | And Vpp Route Add | ${dut1_node}
-| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_if2}
+| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2}
 | | And Add fib table | ${dut1_node}
 | | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | drop
 | | When COP Add whitelist Entry
-| | ... | ${dut1_node} | ${dut1_if1} | ip4 | ${fib_table_number}
-| | And COP interface enable or disable | ${dut1_node} | ${dut1_if1} | enable
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number}
+| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
+| | ... | ${tg_to_dut2_mac}
index a48ae01..cb3871c 100644 (file)
 # limitations under the License.
 
 *** Settings ***
-| Library | resources.libraries.python.topology.Topology
-| Library | resources.libraries.python.NodePath
 | Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.Cop
 | Resource | resources/libraries/robot/default.robot
 | Resource | resources/libraries/robot/interfaces.robot
 | Resource | resources/libraries/robot/ipv6.robot
-| Resource | resources/libraries/robot/ipv4.robot
 | Resource | resources/libraries/robot/traffic.robot
-| Resource | resources/libraries/robot/cop.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/l2_xconnect.robot
 | Variables  | resources/libraries/python/IPv6NodesAddr.py | ${nodes}
 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
 *** Test Cases ***
 | VPP permits packets based on IPv6 src addr
 | | [Documentation] | COP Whitelist test with basic setup.
-| | Given Setup Nodes And Variables | ${tg_node} | ${dut1_node} | ${dut2_node}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
+| | Given Path for 3-node testing is set
+| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
+| | And Interfaces in 3-node path are up
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut2_node} | ${dut2_if1} | ${dut2_if1_ip} | ${ip_prefix}
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip} | ${ip_prefix}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut2_node} | ${dut2_if2} | ${dut2_if2_ip} | ${ip_prefix}
-| | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip_GW} | ${tg_if1_mac}
-| | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip} | ${ip_prefix}
+| | And Add IP Neighbor
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac}
+| | And Add IP Neighbor
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac}
 | | And Vpp Route Add | ${dut1_node}
-| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_if2}
+| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2}
 | | And Vpp All Ra Suppress Link Layer | ${nodes}
 | | And Add fib table | ${dut1_node} | ${cop_dut_ip} | ${ip_prefix} |
 | | ... | ${fib_table_number} | local
-| | When COP Add whitelist Entry | ${dut1_node} | ${dut1_if1} | ip6 |
+| | When COP Add whitelist Entry | ${dut1_node} | ${dut1_to_tg} | ip6 |
 | | ... | ${fib_table_number}
-| | And COP interface enable or disable | ${dut1_node} | ${dut1_if1} | enable
-| | Then Send Packet And Check Headers | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable
+| | Then Send Packet And Check Headers | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
+| | ... | ${tg_to_dut2_mac}
 
 
 | VPP drops packets based on IPv6 src addr
 | | [Documentation] | COP blacklist test with basic setup.
-| | Given Setup Nodes And Variables | ${tg_node} | ${dut1_node} | ${dut2_node}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
+| | Given Path for 3-node testing is set
+| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node}
+| | And Interfaces in 3-node path are up
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip} | ${ip_prefix}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut2_node} | ${dut2_if1} | ${dut2_if1_ip} | ${ip_prefix}
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip} | ${ip_prefix}
 | | And VPP Set IF IPv6 Addr
-| | ... | ${dut2_node} | ${dut2_if2} | ${dut2_if2_ip} | ${ip_prefix}
-| | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip_GW} | ${tg_if1_mac}
-| | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip} | ${ip_prefix}
+| | And Add IP Neighbor
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac}
+| | And Add IP Neighbor
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac}
 | | And Vpp Route Add | ${dut1_node}
-| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_if2}
+| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2}
 | | And Vpp All Ra Suppress Link Layer | ${nodes}
 | | And Add fib table | ${dut1_node}
 | | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | drop
 | | When COP Add whitelist Entry
-| | ... | ${dut1_node} | ${dut1_if1} | ip6 | ${fib_table_number}
-| | And COP interface enable or disable | ${dut1_node} | ${dut1_if1} | enable
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${fib_table_number}
+| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
+| | ... | ${tg_to_dut2_mac}
index 2e3d11c..43460df 100644 (file)
@@ -15,8 +15,8 @@
 | Resource | resources/libraries/robot/default.robot
 | Resource | resources/libraries/robot/counters.robot
 | Resource | resources/libraries/robot/interfaces.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/ipv4.robot
-| Resource | resources/libraries/robot/iacl.robot
 | Resource | resources/libraries/robot/l2_xconnect.robot
 | Resource | resources/libraries/robot/traffic.robot
 | Library | resources.libraries.python.Classify.Classify
@@ -29,9 +29,9 @@
 | Test Teardown | Show packet trace on all DUTs | ${nodes}
 
 *** Variables ***
-| ${dut1_if1_ip}= | 192.168.1.1
-| ${dut1_if2_ip}= | 192.168.2.1
-| ${dut1_if2_ip_GW}= | 192.168.2.2
+| ${dut1_to_tg_ip}= | 192.168.1.1
+| ${dut1_to_dut2_ip}= | 192.168.2.1
+| ${dut1_to_dut2_ip_GW}= | 192.168.2.2
 | ${test_dst_ip}= | 32.0.0.1
 | ${test_src_ip}= | 16.0.0.1
 | ${prefix_length}= | 24
 | | [Documentation] | Create classify table on VPP, add source IP address
 | | ...             | of traffic into table and setup 'deny' traffic
 | | ...             | and check if traffic is dropped.
-| | Given Node path computed for 3-node topology
+| | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
-| | And Interfaces in path are up
-| | And IPv4 Addresses set on the node interfaces
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${dut1_if2}
-| | ... | ${dut1_if2_ip} | ${prefix_length}
+| | And Interfaces in 3-node path are up
+| | And Set Interface Address | ${dut1_node}
+| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
+| | And Set Interface Address | ${dut1_node}
+| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table
 | | ... | ${dut1_node} | ip4 | src
 | | And Vpp Configure Classify Session
 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
 | | ... | ip4 | src | ${test_src_ip}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip4 | ${table_index}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${table_index}
 | | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
+| | ... | ${tg_to_dut2_mac}
 | | And Vpp Route Add
-| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} | ${dut1_if2_ip_GW}
-| | ... | ${dut1_if2}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
+| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
+| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
+
 
 | VPP drops packets based on IPv4 destination addresses
 | | [Documentation] | Create classify table on VPP, add destination IP address
 | | ...             | of traffic into table and setup 'deny' traffic
 | | ...             | and check if traffic is dropped.
-| | Given Node path computed for 3-node topology
+| | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
-| | And Interfaces in path are up
-| | And IPv4 Addresses set on the node interfaces
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${dut1_if2}
-| | ... | ${dut1_if2_ip} | ${prefix_length}
+| | And Interfaces in 3-node path are up
+| | And Set Interface Address | ${dut1_node}
+| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
+| | And Set Interface Address | ${dut1_node}
+| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table
 | | ... | ${dut1_node} | ip4 | dst
 | | And Vpp Configure Classify Session
 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
 | | ... | ip4 | dst | ${test_dst_ip}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip4 | ${table_index}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${table_index}
 | | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
+| | ... | ${tg_to_dut2_mac}
 | | And Vpp Route Add
-| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} | ${dut1_if2_ip_GW}
-| | ... | ${dut1_if2}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
+| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
+| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
 
 
 | VPP drops packets based on IPv4 src-addr and dst-addr
 | | [Documentation] | Create classify table on VPP, add source and destination
 | | ...             | IP address of traffic into table and setup 'deny' traffic
 | | ...             | and check if traffic is dropped.
-| | Given Node path computed for 3-node topology
+| | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
-| | And Interfaces in path are up
-| | And IPv4 Addresses set on the node interfaces
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${dut1_if2}
-| | ... | ${dut1_if2_ip} | ${prefix_length}
+| | And Interfaces in 3-node path are up
+| | And Set Interface Address | ${dut1_node}
+| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
+| | And Set Interface Address | ${dut1_node}
+| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
 | | ${table_index_1} | ${skip_n_1} | ${match_n_1}=
 | | ... | When Vpp Create Classify Table | ${dut1_node} | ip4 | src
 | | ${table_index_2} | ${skip_n_2} | ${match_n_2}=
 | | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2}
 | | ... | ip4 | dst | ${test_dst_ip}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip4 | ${table_index_1}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${table_index_1}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip4 | ${table_index_2}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${table_index_2}
 | | And Add Arp On Dut
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
+| | ... | ${tg_to_dut2_mac}
 | | And Vpp Route Add
-| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} | ${dut1_if2_ip_GW}
-| | ... | ${dut1_if2}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
+| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
+| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
index 24a408b..ed91616 100644 (file)
@@ -15,7 +15,7 @@
 | Resource | resources/libraries/robot/default.robot
 | Resource | resources/libraries/robot/counters.robot
 | Resource | resources/libraries/robot/interfaces.robot
-| Resource | resources/libraries/robot/iacl.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/ipv6.robot
 | Resource | resources/libraries/robot/l2_xconnect.robot
 | Resource | resources/libraries/robot/traffic.robot
 | Test Teardown | Show packet trace on all DUTs | ${nodes}
 
 *** Variables ***
-| ${dut1_if1_ip}= | 3ffe:62::1
-| ${dut1_if2_ip}= | 3ffe:63::1
-| ${dut1_if2_ip_GW}= | 3ffe:63::2
-| ${dut2_if1_ip}= | 3ffe:72::1
-| ${dut2_if2_ip}= | 3ffe:73::1
+| ${dut1_to_tg_ip}= | 3ffe:62::1
+| ${dut1_to_dut2_ip}= | 3ffe:63::1
+| ${dut1_to_dut2_ip_GW}= | 3ffe:63::2
+| ${dut2_to_dut1_ip}= | 3ffe:72::1
+| ${dut2_to_tg_ip}= | 3ffe:73::1
 | ${test_dst_ip}= | 3ffe:64::1
 | ${test_src_ip}= | 3ffe:61::1
 | ${prefix_length}= | 64
 | | [Documentation] | Create classify table on VPP, add source IP address
 | | ...             | of traffic into table and setup 'deny' traffic
 | | ...             | and check if traffic is dropped.
-| | Given Node path computed for 3-node topology
+| | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
-| | And Interfaces in path are up
-| | And IPv6 Addresses set on the node interfaces
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${dut1_if2}
-| | ... | ${dut1_if2_ip} | ${prefix_length}
+| | And Interfaces in 3-node path are up
+| | And Vpp Set If Ipv6 Addr | ${dut1_node}
+| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
+| | And Vpp Set If Ipv6 Addr  | ${dut1_node}
+| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table
 | | ... | ${dut1_node} | ip6 | src
 | | And Vpp Configure Classify Session
 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
 | | ... | ip6 | src | ${test_src_ip}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip6 | ${table_index}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${table_index}
 | | And Add Ip Neighbor
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
+| | ... | ${tg_to_dut2_mac}
 | | And Vpp Route Add
-| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} | ${dut1_if2_ip_GW}
-| | ... | ${dut1_if2}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
+| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
+| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
 
 
 | VPP drops packets based on IPv6 destination addresses
 | | [Documentation] | Create classify table on VPP, add destination IP address
 | | ...             | of traffic into table and setup 'deny' traffic
 | | ...             | and check if traffic is dropped.
-| | Given Node path computed for 3-node topology
+| | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
-| | And Interfaces in path are up
-| | And IPv6 Addresses set on the node interfaces
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${dut1_if2}
-| | ... | ${dut1_if2_ip} | ${prefix_length}
+| | And Interfaces in 3-node path are up
+| | And Vpp Set If Ipv6 Addr | ${dut1_node}
+| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
+| | And Vpp Set If Ipv6 Addr  | ${dut1_node}
+| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table
 | | ... | ${dut1_node} | ip6 | dst
 | | And Vpp Configure Classify Session
 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
 | | ... | ip6 | dst | ${test_dst_ip}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip6 | ${table_index}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${table_index}
 | | And Add Ip Neighbor
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
+| | ... | ${tg_to_dut2_mac}
 | | And Vpp Route Add
-| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} | ${dut1_if2_ip_GW}
-| | ... | ${dut1_if2}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
+| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
+| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
 
 
 | VPP drops packets based on IPv6 src-addr and dst-addr
 | | [Documentation] | Create classify table on VPP, add source and destination
 | | ...             | IP address of traffic into table and setup 'deny' traffic
 | | ...             | and check if traffic is dropped.
-| | Given Node path computed for 3-node topology
+| | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
-| | And Interfaces in path are up
-| | And IPv6 Addresses set on the node interfaces
-| | ... | ${dut1_node} | ${dut1_if1} | ${dut1_if1_ip} | ${dut1_if2}
-| | ... | ${dut1_if2_ip} | ${prefix_length}
+| | And Interfaces in 3-node path are up
+| | And Vpp Set If Ipv6 Addr | ${dut1_node}
+| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
+| | And Vpp Set If Ipv6 Addr  | ${dut1_node}
+| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
 | | ${table_index_1} | ${skip_n_1} | ${match_n_1}=
 | | ... | When Vpp Create Classify Table | ${dut1_node} | ip6 | src
 | | ${table_index_2} | ${skip_n_2} | ${match_n_2}=
 | | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2}
 | | ... | ip6 | dst | ${test_dst_ip}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip6 | ${table_index_1}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${table_index_1}
 | | And Vpp Enable Input Acl Interface
-| | ... | ${dut1_node} | ${dut1_if1} | ip6 | ${table_index_2}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${table_index_2}
 | | And Add Ip Neighbor
-| | ... | ${dut1_node} | ${dut1_if2} | ${dut1_if2_ip_GW} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
+| | ... | ${tg_to_dut2_mac}
 | | And Vpp Route Add
-| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} | ${dut1_if2_ip_GW}
-| | ... | ${dut1_if2}
-| | And L2 setup xconnect on DUT | ${dut2_node} | ${dut2_if1} | ${dut2_if2}
-| | Then Send packet from Port to Port should failed | ${tg_node} |
-| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_if1} | ${tg_if1_mac} |
-| | ... | ${dut1_if1_mac} | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac}
+| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
+| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
+| | And L2 setup xconnect on DUT
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
+| | Then Send packet from Port to Port should failed | ${tg_node}
+| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
+| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
+| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
index 786f870..856d3ac 100644 (file)
@@ -13,6 +13,7 @@
 
 *** Settings ***
 | Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/tagging.robot
 | Resource | resources/libraries/robot/l2_traffic.robot
 | Library  | resources.libraries.python.Trace
 | ${tag_rewrite_method}= | pop-2
 
 *** Test Cases ***
-| VPP can push and pop two VLAN tags to traffic transfering through xconnect
+| VPP can push and pop two VLAN tags to traffic transferring through xconnect
 | | [Documentation] | Push two tags on DUT 1 to traffic sent from TG,
 | | ...             | pop two tags on DUT 2 from this traffic
 | | ...             | and receive untagged traffic on TG.
 | | ...
-| | Given Node path computed for 3-node topology
+| | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
-| | And Interfaces in path are up
+| | And Interfaces in 3-node path are up
 | | When VLAN subinterfaces initialized on 3-node topology
-| | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut2_node} | ${dut2_to_dut1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | And L2 tag rewrite pop 2 tags setup on interfaces
-| | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
+| | ... | ${dut1_node} | ${subif_index_1} | ${dut2_node} | ${subif_index_2}
 | | ... | ${tag_rewrite_method}
 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
-| | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
-| | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
-| | Then Send and receive ICMPv4 | ${tg} | ${tg_if1} | ${tg_if2}
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${subif_index_1}
+| | ... | ${dut2_node} | ${dut2_to_tg} | ${subif_index_2}
+| | Then Send and receive ICMPv4 | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
index f570e58..8b6b050 100644 (file)
@@ -14,6 +14,7 @@
 *** Settings ***
 | Documentation | VXLAN tunnel over Dot1Q tagged IPv4 traffic tests using bridge domain.
 | Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/vxlan.robot
 | Resource | resources/libraries/robot/l2_traffic.robot
 | Library  | resources.libraries.python.Trace
 *** Test Cases ***
 | VPP can encapsulate L2 in VXLAN over IPv4 over Dot1Q
 | | [ Tags ] | EXPECTED_FAILING
-| | Given Path for VXLAN testing is set
-| | ...   | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
-| | And   Interfaces in path are up
+| | Given Path for 3-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
+| | And   Interfaces in 3-node path are up
 | | And   Vlan interfaces for VXLAN are created | ${VLAN}
-| |       ...                                   | ${dut1} | ${dut1s_to_dut2}
-| |       ...                                   | ${dut2} | ${dut2s_to_dut1}
+| |       ...                                   | ${dut1_node} | ${dut1_to_dut2}
+| |       ...                                   | ${dut2_node} | ${dut2_to_dut1}
 | | And   IP addresses are set on interfaces
-| |       ...         | ${dut1} | ${dut1s_vlan_name} | ${dut1s_vlan_index}
-| |       ...         | ${dut2} | ${dut2s_vlan_name} | ${dut2s_vlan_index}
-| | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1} | ${VNI}
+| |       ...         | ${dut1_node} | ${dut1s_vlan_name} | ${dut1s_vlan_index}
+| |       ...         | ${dut2_node} | ${dut2s_vlan_name} | ${dut2s_vlan_index}
+| | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1_node} | ${VNI}
 | |                 | ...  | ${dut1s_ip_address} | ${dut2s_ip_address}
-| |                   And  Interfaces are added to BD | ${dut1} | ${BID}
-| |                   ...  | ${dut1s_to_tg} | ${dut1s_vxlan}
-| | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2} | ${VNI}
+| |                   And  Interfaces are added to BD | ${dut1_node} | ${BID}
+| |                   ...  | ${dut1_to_tg} | ${dut1s_vxlan}
+| | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2_node} | ${VNI}
 | |                 | ...  | ${dut2s_ip_address} | ${dut1s_ip_address}
-| |                   And  Interfaces are added to BD | ${dut2} | ${BID}
-| |                   ...  | ${dut2s_to_tg} | ${dut2s_vxlan}
+| |                   And  Interfaces are added to BD | ${dut2_node} | ${BID}
+| |                   ...  | ${dut2_to_tg} | ${dut2s_vxlan}
 | | Then Send and receive ICMPv4 bidirectionally
-| | ... | ${tg} | ${tgs_to_dut1} | ${tgs_to_dut2}
+| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
index 1eea3e9..ecf2c55 100644 (file)
@@ -14,6 +14,7 @@
 *** Settings ***
 | Documentation | VXLAN tunnel over untagged IPv4 traffic tests using bridge domain.
 | Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/vxlan.robot
 | Resource | resources/libraries/robot/l2_traffic.robot
 | Library  | resources.libraries.python.Trace
 
 *** Test Cases ***
 | VPP can pass IPv4 bidirectionally through VXLAN
-| | Given Path for VXLAN testing is set
-| | ...   | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
-| | And   Interfaces in path are up
-| | And   IP addresses are set on interfaces | ${dut1} | ${dut1s_to_dut2} | ${NONE}
-| |       ...                                | ${dut2} | ${dut2s_to_dut1} | ${NONE}
-| | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1} | ${VNI}
+| | Given Path for 3-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
+| | And   Interfaces in 3-node path are up
+| | And   IP addresses are set on interfaces | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
+| |       ...                                | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
+| | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1_node} | ${VNI}
 | |                 | ...  | ${dut1s_ip_address} | ${dut2s_ip_address}
-| |                   And  Interfaces are added to BD | ${dut1} | ${BID}
-| |                   ...  | ${dut1s_to_tg} | ${dut1s_vxlan}
-| | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2} | ${VNI}
+| |                   And  Interfaces are added to BD | ${dut1_node} | ${BID}
+| |                   ...  | ${dut1_to_tg} | ${dut1s_vxlan}
+| | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2_node} | ${VNI}
 | |                 | ...  | ${dut2s_ip_address} | ${dut1s_ip_address}
-| |                   And  Interfaces are added to BD | ${dut2} | ${BID}
-| |                   ...  | ${dut2s_to_tg} | ${dut2s_vxlan}
+| |                   And  Interfaces are added to BD | ${dut2_node} | ${BID}
+| |                   ...  | ${dut2_to_tg} | ${dut2s_vxlan}
 | | Then Send and receive ICMPv4 bidirectionally
-| | ... | ${tg} | ${tgs_to_dut1} | ${tgs_to_dut2}
+| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
index 2a57468..5c52664 100644 (file)
@@ -14,6 +14,7 @@
 *** Settings ***
 | Documentation | VXLAN tunnel over untagged IPv4 traffic tests using xconnect.
 | Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/testing_path.robot
 | Resource | resources/libraries/robot/vxlan.robot
 | Resource | resources/libraries/robot/l2_traffic.robot
 | Library  | resources.libraries.python.Trace
 
 *** Test Cases ***
 | VPP can pass IPv4 bidirectionally through VXLAN
-| | Given Path for VXLAN testing is set
-| | ...   | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
-| | And   Interfaces in path are up
-| | And   IP addresses are set on interfaces | ${dut1} | ${dut1s_to_dut2} | ${NONE}
-| |       ...                                | ${dut2} | ${dut2s_to_dut1} | ${NONE}
-| | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1} | ${VNI}
+| | Given Path for 3-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
+| | And   Interfaces in 3-node path are up
+| | And   IP addresses are set on interfaces | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
+| |       ...                                | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
+| | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1_node} | ${VNI}
 | |                 | ...  | ${dut1s_ip_address} | ${dut2s_ip_address}
-| |                   And  Interfaces are added to xconnect | ${dut1}
-| |                   ...  | ${dut1s_to_tg} | ${dut1s_vxlan}
-| | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2} | ${VNI}
+| |                   And  Interfaces are added to xconnect | ${dut1_node}
+| |                   ...  | ${dut1_to_tg} | ${dut1s_vxlan}
+| | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2_node} | ${VNI}
 | |                 | ...  | ${dut2s_ip_address} | ${dut1s_ip_address}
-| |                   And  Interfaces are added to xconnect | ${dut2}
-| |                   ...  | ${dut2s_to_tg} | ${dut2s_vxlan}
+| |                   And  Interfaces are added to xconnect | ${dut2_node}
+| |                   ...  | ${dut2_to_tg} | ${dut2s_vxlan}
 | | Then Send and receive ICMPv4 bidirectionally
-| | ... | ${tg} | ${tgs_to_dut1} | ${tgs_to_dut2}
+| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}