Fix l2 Honeycomb tests 37/18737/3
authorMichal Cmarada <mcmarada@cisco.com>
Mon, 8 Apr 2019 10:27:32 +0000 (12:27 +0200)
committerMichal Cmarada <mcmarada@cisco.com>
Tue, 9 Apr 2019 06:09:21 +0000 (08:09 +0200)
Change-Id: Ic75a9279fffe3a5d11211f4e57fc635d7d33ee5f
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
resources/libraries/robot/honeycomb/bridge_domain.robot
resources/libraries/robot/honeycomb/l2_fib.robot
resources/libraries/robot/honeycomb/persistence.robot
resources/libraries/robot/honeycomb/sub_interface.robot
resources/test_data/honeycomb/l2_fib.py
tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot
tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot
tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot

index e26c18d..44dd450 100644 (file)
 | | ... | ${if2_data['v3po:l2']['bridged-virtual-interface']}
 | | ... | ${settings['bvi']}
 
-| VAT should show interfaces assigned to bridge domain
+| PAPI should show interfaces assigned to bridge domain
 | | [Documentation] | Uses VAT to verify interface assignment to\
 | | ... | bridge domain.
 | | ...
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| VAT should show interfaces assigned to bridge domain \
+| | ... | \| PAPI should show interfaces assigned to bridge domain \
 | | ... | \| ${nodes['DUT1']} \| ${4} \| GigabitEthernet0/8/0 \
 | | ... | \| GigabitEthernet0/9/0 \| ${{split_horizon_group:2, bvi:False}} \|
 | | [Arguments] | ${node} | ${index} | ${interface1} | ${interface2}
 | | ... | ${node['interfaces']['${if1_link}']['vpp_sw_index']}
 | | ... | ${node['interfaces']['${if2_link}']['vpp_sw_index']}
 | | ${bd_data}= | VPP get bridge domain data | ${node}
-| | ${bd_interfaces}= | Set Variable | ${bd_data[${index}]['sw_if']}
+| | ${bd_interfaces}= | Set Variable | ${bd_data[${index}]['sw_if_details']}
 | | @{bd_interfaces}= | Create List | ${bd_interfaces[0]} | ${bd_interfaces[1]}
 | | :FOR | ${interface} | IN | @{bd_interfaces}
-| | | Should contain | ${if_indices} | ${interface['sw_if_index']}
-| | | Should be equal | ${interface['shg']} | ${settings['split_horizon_group']}
+# interface[1] = sw_if_index, interface[2] = shg
+| | | Should contain | ${if_indices} | ${interface[1]}
+| | | Should be equal | ${interface[2]} | ${settings['split_horizon_group']}
 
 | Honeycomb removes all bridge domains
 | | [Documentation] | Uses Honeycomb API to remove all bridge domains from the \
 | | Run keyword and expect error | *Not possible*Status code: 404*
 | | ... | Get all BDs oper data | ${node}
 
-| VAT should show no bridge domains
+| PAPI should show no bridge domains
 | | [Documentation] | Uses VAT to verify the removal of all bridge domains.
 | | ...
 | | ... | *Arguments:*
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| VAT should show no bridge domains \| ${nodes['DUT1']} \|
+| | ... | \| PAPI should show no bridge domains \| ${nodes['DUT1']} \|
 | | [Arguments] | ${node}
-| | Run Keyword And Expect Error | ValueError: No JSON object could be decoded
-| | ... | VPP get bridge domain data | ${node}
+| | ${data}= | VPP get bridge domain data | ${node}
+| | Should be empty | ${data}
 
 | Honeycomb adds interface to bridge domain
 | | [Documentation] | Uses Honeycomb API to assign interface to a bridge\
index 6889fb2..d103d41 100644 (file)
 | | ... | Modify L2 FIB Entry
 | | ... | ${node} | ${bd_name} | ${mac} | ${param} | ${value}
 
-| L2 FIB entry from VAT should be
+| L2 FIB entry from PAPI should be
 | | [Documentation] | Retrieves the operational data about the specified L2 \
 | | ... | FIB entry using Python API and checks if it is as expected.
 | | ...
 | | ... | - l2_fib_ref_data - L2 FIB entry referential data. Type: dictionay
 | | ...
 | | ... | *Example:*
-| | ... | \| L2 FIB entry from VAT should be \
+| | ... | \| L2 FIB entry from PAPI should be \
 | | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_forward_oper} \|
 | | ...
 | | [Arguments] | ${node} | ${bd_index} | ${l2_fib_ref_data}
 | | ... | ${l2_fib_ref_data['mac']}
 | | Compare Data Structures | ${l2_fib_data} | ${l2_fib_ref_data}
 
-| L2 FIB Table from VAT should be empty
+| L2 FIB Table from PAPI should be empty
 | | [Documentation] | Check if the L2 FIB table in the specified bridge domain \
 | | ... | is empty. Python API is used to get operational data.
 | | ...
 | | ... | - bd_index - Index of the bridge domain. Type: integer
 | | ...
 | | ... | *Example:*
-| | ... | \| L2 FIB Table from VAT should be empty \
+| | ... | \| L2 FIB Table from PAPI should be empty \
 | | ... | \| ${nodes['DUT1']} \| test_bd \|
 | | ...
 | | [Arguments] | ${node} | ${bd_index}
index 257f227..969b333 100644 (file)
 | | Interface state from VAT should be | ${node} | ${interface} | up
 | | Sub-interface bridge domain Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${interface} | ${sub_if_id} | ${sub_bd_settings}
-| | Sub-interface bridge domain Operational Data From VAT Should Be
+| | Sub-interface bridge domain Operational Data From PAPI Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_bd_settings}
 | | Rewrite tag from Honeycomb should be
 | | ... | ${node} | ${interface} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
 | | ... | ${node} | ${vx_interface}
 | | VxLAN Operational Data From VAT Should Be empty | ${node}
 | | Honeycomb should show no bridge domains | ${node}
-| | VAT should show no bridge domains | ${node}
+| | PAPI should show no bridge domains | ${node}
 | | TAP Operational Data From Honeycomb Should Be empty
 | | ... | ${node} | ${tap_interface}
 | | TAP Operational Data From VAT Should Be empty
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | L2 FIB Entry from Honeycomb should be
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
-| | L2 FIB entry from VAT should be
+| | L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
\ No newline at end of file
index 69eb900..a7f739b 100644 (file)
 | | Should be equal | ${if_data['bridge-domain']}
 | | ... | ${settings['bridge-domain']}
 
-| Sub-interface bridge domain Operational Data From VAT Should Be
+| Sub-interface bridge domain Operational Data From PAPI Should Be
 | | [Documentation] | Uses VAT to verify sub-interface assignment to a bridge\
 | | ... | domain.
 | | ...
 | | ... | - setings - Parameters to be checked. Type: dictionary
 | | ...
 | | ... | *Example:*
-| | ... | \| Sub-interface bridge domain Operational Data From VAT Should Be\
+| | ... | \| Sub-interface bridge domain Operational Data From PAPI Should Be\
 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_bd_setings} \|
 | | ...
 | | [Arguments] | ${node} | ${interface} | ${settings}
 | | ...
 | | ${bd_data}= | VPP get bridge domain data | ${node}
 | | ${bd_intf}= | Set Variable | ${bd_data[0]}
-| | ${sw_if_data}= | Set Variable | ${bd_intf['sw_if'][0]}
+| | ${sw_if_data}= | Set Variable | ${bd_intf['sw_if_details'][0]}
 | | Should be equal as integers | ${bd_intf['flood']} | ${bd_settings['flood']}
 | | Should be equal as integers | ${bd_intf['forward']}
 | | ... | ${bd_settings['forward']}
 | | Should be equal as integers | ${bd_intf['learn']} | ${bd_settings['learn']}
-| | Should be equal as strings | ${sw_if_data['shg']}
+# interface[1] = sw_if_index, interface[2] = shg
+| | Should be equal as strings | ${sw_if_data[2]}
 | | ... | ${settings['split-horizon-group']}
 
 | Honeycomb fails to remove all sub-interfaces
index 5c9558d..70b1e74 100644 (file)
@@ -46,7 +46,7 @@ def get_variables(node, interface, interface2):
         'bd_settings': {
             'flood': True,
             'forward': True,
-            'learn': True,
+            'learn': False,
             'unknown-unicast-flood': True,
             'arp-termination': True
         },
@@ -81,7 +81,7 @@ def get_variables(node, interface, interface2):
 
         # Expected VAT data:
         'l2_fib_forward_vat': {
-            "mac": [int(x, 16) for x in notstatic.split(":")],
+            "mac": notstatic,
             "sw_if_index": sw_if_index,
             "static_mac": 0,
             "filter_mac": 0,
@@ -108,7 +108,7 @@ def get_variables(node, interface, interface2):
 
         # Expected VAT data:
         'l2_fib_static_forward_vat': {
-            "mac": [int(x, 16) for x in static.split(":")],
+            "mac": static,
             "sw_if_index": sw_if_index,
             "static_mac": 1,
             "filter_mac": 0,
@@ -133,7 +133,7 @@ def get_variables(node, interface, interface2):
 
         # Expected VAT data:
         'l2_fib_filter_vat': {
-            "mac": [int(x, 16) for x in filtered.split(":")],
+            "mac": filtered,
             "static_mac": 1,
             "filter_mac": 1,
             "bvi_mac": 0
index 82bb5b2..12483ad 100644 (file)
 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings}
 | | Then sub-interface bridge domain Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings}
-| | And sub-interface bridge domain Operational Data From VAT Should Be
+| | And Sub-interface bridge domain Operational Data From PAPI Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_bd_settings}
 | | And sub-interface Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
index a869e96..5f20c6c 100644 (file)
@@ -73,7 +73,7 @@
 | | ... | ${node} | ${bd1_name} | ${bd_settings}
 | | When Honeycomb removes all bridge domains | ${node}
 | | Then Honeycomb should show no bridge domains | ${node}
-| | And VAT should show no bridge domains | ${node}
+| | And PAPI should show no bridge domains | ${node}
 
 | TC04: Honeycomb assigns interfaces to bridge domain
 | | [Documentation] | Check if Honeycomb can assign VPP interfaces to an\
@@ -89,7 +89,7 @@
 | | ... | ${node} | ${0} | ${bd_settings}
 | | And Honeycomb should show interfaces assigned to bridge domain
 | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings}
-| | And VAT should show interfaces assigned to bridge domain
+| | And PAPI should show interfaces assigned to bridge domain
 | | ... | ${node} | ${0} | @{interfaces} | ${if_settings}
 
 | TC05: Honeycomb cannot remove bridge domain with an interface assigned
 | | ... | ${node} | ${0} | ${bd_settings}
 | | And Honeycomb should show interfaces assigned to bridge domain
 | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings}
-| | And VAT should show interfaces assigned to bridge domain
+| | And PAPI should show interfaces assigned to bridge domain
 | | ... | ${node} | ${0} | @{interfaces} | ${if_settings}
 | | When Run keyword and expect error | HoneycombError* Status code: 500.
 | | ... | Honeycomb removes all bridge domains | ${node}
 | | ... | ${node} | ${0} | ${bd_settings}
 | | And Honeycomb should show interfaces assigned to bridge domain
 | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings}
-| | And VAT should show interfaces assigned to bridge domain
+| | And PAPI should show interfaces assigned to bridge domain
 | | ... | ${node} | ${0} | @{interfaces} | ${if_settings}
index 9aae85c..d13bb63 100644 (file)
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | Given L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb adds L2 FIB entry to bridge domain
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
 | | Then L2 FIB Entry from Honeycomb should be
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
 
 | TC02: Honeycomb adds L2 FIB entry (static, forward)
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | And L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb adds L2 FIB entry to bridge domain
 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg}
 | | Then L2 FIB Entry from Honeycomb should be
 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
 
 | TC03: Honeycomb adds L2 FIB entry (static, filter)
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | And L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb adds L2 FIB entry to bridge domain
 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg}
 | | Then L2 FIB Entry from Honeycomb should be
 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
 
 | TC04: Honeycomb adds and removes L2 FIB entry (forward)
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | And L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb adds L2 FIB entry to bridge domain
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
 | | Then L2 FIB Entry from Honeycomb should be
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
 | | When Honeycomb removes L2 FIB entry
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
 | | Then L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 
 | TC05: Honeycomb adds more than one L2 FIB entry
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | And L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb adds L2 FIB entry to bridge domain
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
 | | And L2 FIB Entry from Honeycomb should be
 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
 
 | TC06: Honeycomb fails to set wrong L2 FIB entry
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | And L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb fails to add wrong L2 FIB entry
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_mac}
 | | Then L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb fails to add wrong L2 FIB entry
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_if}
 | | Then L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb fails to add wrong L2 FIB entry
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_action}
 | | Then L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 
 | TC07: Honeycomb fails to modify existing L2 FIB entry
 | | ... | ${node} | ${interface} | ${if_bd_settings}
 | | And L2 FIB Table from Honeycomb should be empty
 | | ... | ${node} | ${bd_name}
-| | And L2 FIB Table from VAT should be empty
+| | And L2 FIB Table from PAPI should be empty
 | | ... | ${node} | ${bd_index}
 | | When Honeycomb adds L2 FIB entry to bridge domain
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
 | | ... | ${l2_fib_forward_modified_cfg['outgoing-interface']}
 | | Then L2 FIB Entry from Honeycomb should be
 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
-| | And L2 FIB entry from VAT should be
+| | And L2 FIB entry from PAPI should be
 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
 
 *** Keywords ***