VIRL test: Replace IP probe for VXLAN test 23/4723/2
authorMatej Klotton <mklotton@cisco.com>
Tue, 17 Jan 2017 11:14:23 +0000 (12:14 +0100)
committerMatej Klotton <mklotton@cisco.com>
Tue, 17 Jan 2017 11:17:10 +0000 (12:17 +0100)
Change-Id: Ic16f91beabdc2ac2e19ccc65c04790d36c15d477
Signed-off-by: Matej Klotton <mklotton@cisco.com>
resources/libraries/python/InterfaceUtil.py
resources/libraries/robot/vxlan.robot
tests/func/vxlan/vxlan_bd_dot1q.robot

index 0447ba5..2980afa 100644 (file)
@@ -225,6 +225,9 @@ class InterfaceUtil(object):
         """
 
         if_data = InterfaceUtil.vpp_get_interface_data(node, interface)
         """
 
         if_data = InterfaceUtil.vpp_get_interface_data(node, interface)
+        if if_data['sup_sw_if_index'] != if_data['sw_if_index']:
+            if_data = InterfaceUtil.vpp_get_interface_data(
+                node, if_data['sup_sw_if_index'])
         mac_data = [str(hex(item))[2:] for item in if_data['l2_address'][:6]]
         mac_data_nice = []
         for item in mac_data:
         mac_data = [str(hex(item))[2:] for item in if_data['l2_address'][:6]]
         mac_data_nice = []
         for item in mac_data:
index f6506bb..0b53c85 100644 (file)
@@ -20,6 +20,7 @@
 | Library  | resources.libraries.python.L2Util
 | Library  | resources.libraries.python.IPUtil
 | Library  | resources.libraries.python.IPv4Util
 | Library  | resources.libraries.python.L2Util
 | Library  | resources.libraries.python.IPUtil
 | Library  | resources.libraries.python.IPv4Util
+| Library  | resources.libraries.python.IPv6Util
 | Library  | resources.libraries.python.IPv4Setup
 | Library  | resources.libraries.python.NodePath
 
 | Library  | resources.libraries.python.IPv4Setup
 | Library  | resources.libraries.python.NodePath
 
 | | ${DUT2_INT_INDEX}= | Run Keyword If | ${DUT2_INT_INDEX} is None
 | |                    | ... | Get Interface Sw Index | ${DUT2} | ${DUT2_INT_KEY}
 | |                    | ... | ELSE | Set Variable | ${DUT2_INT_INDEX}
 | | ${DUT2_INT_INDEX}= | Run Keyword If | ${DUT2_INT_INDEX} is None
 | |                    | ... | Get Interface Sw Index | ${DUT2} | ${DUT2_INT_KEY}
 | |                    | ... | ELSE | Set Variable | ${DUT2_INT_INDEX}
+| | ${DUT1_INT_MAC}= | Vpp Get Interface Mac | ${DUT1} | ${DUT1_INT_INDEX}
+| | ${DUT2_INT_MAC}= | Vpp Get Interface Mac | ${DUT2} | ${DUT2_INT_INDEX}
 | | Set Interface Address | ${DUT1} | ${DUT1_INT_INDEX}
 | | ... | ${dut1s_ip_address} | ${duts_ip_address_prefix}
 | | Set Interface Address | ${DUT2} | ${DUT2_INT_INDEX}
 | | ... | ${dut2s_ip_address} | ${duts_ip_address_prefix}
 | | Set Interface Address | ${DUT1} | ${DUT1_INT_INDEX}
 | | ... | ${dut1s_ip_address} | ${duts_ip_address_prefix}
 | | Set Interface Address | ${DUT2} | ${DUT2_INT_INDEX}
 | | ... | ${dut2s_ip_address} | ${duts_ip_address_prefix}
-| | VPP IP Probe | ${DUT1} | ${DUT1_INT_NAME} | ${dut2s_ip_address} | if_type=name
-| | VPP IP Probe | ${DUT2} | ${DUT2_INT_NAME} | ${dut1s_ip_address} | if_type=name
+| | Add IP Neighbor | ${DUT1} | ${DUT1_INT_INDEX} | ${dut2s_ip_address} | ${DUT2_INT_MAC}
+| | Add IP Neighbor | ${DUT2} | ${DUT2_INT_INDEX} | ${dut1s_ip_address} | ${DUT1_INT_MAC}
 
 | VXLAN interface is created
 | | [Arguments] | ${DUT} | ${VNI} | ${SRC_IP} | ${DST_IP}
 
 | VXLAN interface is created
 | | [Arguments] | ${DUT} | ${VNI} | ${SRC_IP} | ${DST_IP}
index 9da1e3c..a5303e6 100644 (file)
 | |       ...         | ${dut2_node} | ${dut2s_vlan_name} | ${dut2s_vlan_index}
 | | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1_node} | ${VNI}
 | |                 | ...  | ${dut1s_ip_address} | ${dut2s_ip_address}
 | |       ...         | ${dut2_node} | ${dut2s_vlan_name} | ${dut2s_vlan_index}
 | | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1_node} | ${VNI}
 | |                 | ...  | ${dut1s_ip_address} | ${dut2s_ip_address}
+| |                   And  Set Interface State | ${dut1_node} | ${dut1s_vxlan}
+| |                   ...  | up
 | |                   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 | ${dut1_node} | ${BID}
 | |                   ...  | ${dut1_to_tg} | ${dut1s_vxlan}
 | | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2_node} | ${VNI}
 | |                 | ...  | ${dut2s_ip_address} | ${dut1s_ip_address}
+| |                   And  Set Interface State | ${dut2_node} | ${dut2s_vxlan}
+| |                   ...  | up
 | |                   And  Interfaces are added to BD | ${dut2_node} | ${BID}
 | |                   ...  | ${dut2_to_tg} | ${dut2s_vxlan}
 | | Then Send and receive ICMPv4 bidirectionally
 | |                   And  Interfaces are added to BD | ${dut2_node} | ${BID}
 | |                   ...  | ${dut2_to_tg} | ${dut2s_vxlan}
 | | Then Send and receive ICMPv4 bidirectionally