FIX: Remove old restart sequence - Honeycomb
[csit.git] / resources / libraries / robot / honeycomb / persistence.robot
index 1390254..9bf8287 100644 (file)
@@ -13,7 +13,6 @@
 
 *** Settings ***
 | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
-| ...     | WITH NAME | InterfaceAPI
 | Library | resources.libraries.python.honeycomb.HcPersistence
 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
 | Resource | resources/libraries/robot/honeycomb/tap.robot
 | Resource | resources/libraries/robot/honeycomb/vhost_user.robot
 | Resource | resources/libraries/robot/honeycomb/sub_interface.robot
-| Variables | tests/suites/honeycomb/resources/persistence.py | ${interface}
+| Variables | resources/test_data/honeycomb/persistence.py | ${interface}
 | Documentation | Keywords used to test Honeycomb persistence.
 
 *** Keywords ***
-| Honeycomb is restarted
+| Restart Honeycomb
 | | [Documentation] | Restarts Honeycomb without clearing persistence data.
 | | ...
 | | ... | *Arguments:*
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Honeycomb is restarted \| ${nodes['DUT1']} \|
+| | ... | \| Restart Honeycomb \| ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
 | | Stop Honeycomb service on DUTs | ${node}
-| | Setup Honeycomb service on DUTs | ${node}
+| | Log Persisted Configuration | ${node}
+| | Configure Honeycomb service on DUTs | ${node}
 
-| VPP is restarted
+| Restart VPP
 | | [Documentation] | Restarts VPP and waits until it reconnects with Honeycomb.
 | | ...
 | | ... | *Arguments:*
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| VPP is restarted \| ${nodes['DUT1']} \|
+| | ... | \| Restart VPP \| ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
-| | Setup DUT | ${node}
+| | Restart Vpp Service | ${node}
+| | Verify Vpp | ${node}
+| | VPP Enable Traces On DUT | ${node}
 | | Check VPP connection | ${node}
 
 | Check VPP connection
 | | ... | *Example:*
 | | ...
 | | ... | \| Check VPP connection \| ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
 | | Wait until keyword succeeds | 2min | 20sec
 | | ... | Check Honeycomb startup state | ${node}
 
-| Honeycomb and VPP are restarted
+| Restart Honeycomb and VPP in pesistence test
 | | [Documentation] | Stops Honeycomb, restarts VPP and then starts Honeycomb\
 | | ... | again.
 | | ...
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Honeycomb and VPP are restarted \| ${nodes['DUT1']} \|
+| | ... | \| Restart Honeycomb and VPP \| ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
 | | Stop Honeycomb service on DUTs | ${node}
-| | Setup DUT | ${node}
-| | Setup Honeycomb service on DUTs | ${node}
+| | Log Persisted Configuration | ${node}
+| | Restart Vpp Service | ${node}
+| | Verify Vpp | ${node}
+| | VPP Enable Traces On DUT | ${node}
+| | Configure Honeycomb service on DUTs | ${node}
 
-| Honeycomb configures every setting
+| Multi-Feature Persistence Test Configuration
 | | [Documentation] | Uses Honeycomb to set basic settings for VxLAN,\
 | | ... | bridge domains, TAP, vhost-user and VLAN.
 | | ...
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Honeycomb configures every setting \| ${nodes['DUT1']} \
+| | ... | \| Multi-Feature Persistence Test Configuration \| ${nodes['DUT1']} \
 | | ... | \| GigabitEthernet0/8/0 \|
+| | ...
 | | [Arguments] | ${node} | ${interface}
 | | Honeycomb sets interface VxLAN configuration
 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
 | | Honeycomb creates TAP interface
 | | ... | ${node} | ${tap_interface} | ${tap_settings}
 | | Honeycomb creates vhost-user interface
-| | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
+| | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
 | | Honeycomb creates sub-interface | ${node} | ${interface}
 | | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings}
-| | Honeycomb sets interface state | ${node} | ${interface} | up
+| | Honeycomb configures interface state | ${node} | ${interface} | up
 | | Honeycomb sets the sub-interface up
 | | ... | ${node} | ${interface} | ${sub_if_id}
 | | Honeycomb adds sub-interface to bridge domain
 | | Honeycomb configures tag rewrite
 | | ... | ${node} | ${interface} | ${sub_if_id} | ${tag_rewrite_pop_1}
 
-| Honeycomb and VPP should verify every setting
+| Multi-Feature persistence Test Verification
 | | [Documentation] | Uses Honeycomb and VAT to verify settings for VxLAN,\
 | | ... | bridge domains, TAP, vhost-user and VLAN.
 | | ...
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Honeycomb and VPP should verify every setting \| ${nodes['DUT1']} \
+| | ... | \| Multi-Feature persistence Test Verification \| ${nodes['DUT1']} \
 | | ... | \| GigabitEthernet0/8/0 \|
+| | ...
 | | [Arguments] | ${node} | ${interface}
-| | VxLAN configuration from Honeycomb should be
+| | VxLAN Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
-| | VxLAN configuration from VAT should be
+| | VxLAN Operational Data From VAT Should Be
 | | ... | ${node} | ${vxlan_settings}
-| | Bridge domain configuration from Honeycomb should be
+| | Bridge domain Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${bd_name} | ${bd_settings}
-| | Bridge domain configuration from VAT should be
+| | Bridge domain Operational Data From VAT Should Be
 | | ... | ${node} | ${0} | ${bd_settings}
-| | TAP configuration from Honeycomb should be
-| | ... | ${node} | ${tap_interface} | ${tap_settings}
-| | TAP configuration from VAT should be
-| | ... | ${node} | ${tap_interface} | ${tap_settings}
-| | Vhost-user configuration from Honeycomb should be
-| | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
-| | Vhost-user configuration from VAT should be
-| | ... | ${node} | ${vhost_user_server}
-| | Sub-interface configuration from Honeycomb should be
+| | TAP Operational Data From Honeycomb Should Be
+| | ... | ${node} | ${tap_interface} | ${tap_settings_oper}
+| | TAP Operational Data From VAT Should Be
+| | ... | ${node} | ${tap_interface_vat} | ${tap_settings_vat}
+| | Vhost-user Operational Data From Honeycomb Should Be
+| | ... | ${node} | ${vhost_interface} | ${vhost_user_client}
+| | Vhost-user Operational Data From VAT Should Be
+| | ... | ${node} | ${vhost_user_client}
+| | Sub-interface Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${interface} | ${sub_if_id} | ${sub_if_1_oper}
-| | Sub-interface configuration from VAT should be
+| | Sub-interface Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
 | | Interface state from Honeycomb should be | ${node} | ${interface} | up
 | | Interface state from VAT should be | ${node} | ${interface} | up
-| | Sub-interface bridge domain configuration from Honeycomb should be
+| | Sub-interface bridge domain Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${interface} | ${sub_if_id} | ${sub_bd_settings}
-| | Sub-interface bridge domain configuration 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}
 | | Rewrite tag from VAT should be
 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
+| | ${data_conf}= | Get all interfaces cfg data | ${node}
+| | ${data_oper}= | Get all interfaces oper data | ${node}
+| | Compare interface lists | ${data_conf} | ${data_oper}
 
 | Honeycomb and VPP should have default configuration
 | | [Documentation] | Uses Honeycomb and VAT to verify settings for VxLAN,\
 | | ...
 | | ... | \| Honeycomb and VPP should have default configuration \|
 | | ... | ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
-| | VxLAN configuration from Honeycomb should be empty
+| | VxLAN Operational Data From Honeycomb Should Be empty
 | | ... | ${node} | ${vx_interface}
-| | VxLAN configuration from VAT should be empty | ${node}
+| | VxLAN Operational Data From VAT Should Be empty | ${node}
 | | Honeycomb should show no bridge domains | ${node}
-| | VAT should show no bridge domains | ${node}
-| | TAP configuration from Honeycomb should be empty
+| | PAPI should show no bridge domains | ${node}
+| | TAP Operational Data From Honeycomb Should Be empty
 | | ... | ${node} | ${tap_interface}
-| | TAP configuration from VAT should be empty
+| | TAP Operational Data From VAT Should Be empty
 | | ... | ${node} | ${tap_interface}
-| | Vhost-user configuration from Honeycomb should be empty
+| | Vhost-user Operational Data From Honeycomb Should Be empty
 | | ... | ${node} | ${vhost_interface}
-| | Vhost-user configuration from VAT should be empty
+| | Vhost-user Operational Data From VAT Should Be empty
 | | ... | ${node}
 | | interface state from Honeycomb should be
 | | ... | ${node} | ${interface} | down
 | | And interface state from VAT should be
 | | ... | ${node} | ${interface} | down
 
-| Honeycomb and VPP should not have default configuration
-| | [Documentation] | Uses Honeycomb and VAT to verify settings for VxLAN,\
-| | ... | bridge domains, TAP, vhost-user and VLAN. Expects any\
-| | ... | configuration other than default.
+| Persistence file is damaged during restart
+| | [Documentation] | Shuts down Honeycomb, modifies persistence files to\
+| | ... | simulate damage, then restarts VPP and starts up Honeycomb again.
 | | ...
 | | ... | *Arguments:*
 | | ... | - node - information about a DUT node. Type: dictionary
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Honeycomb and VPP should not have default configuration \
-| | ... | \| ${nodes['DUT1']} \|
+| | ... | \| Persistence file is damaged during restart \| ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
-| | Run keyword and expect error | *
-| | ... | Honeycomb and VPP should have default configuration | ${node}
+| | Stop Honeycomb service on DUTs | ${node}
+| | Modify persistence files | ${node} | { | abc
+| | Setup DUT | ${node}
+| | Configure Honeycomb service on DUTs | ${node}
 
+| Log persisted configuration on node
+| | [Documentation] | Logs the content of Honeycomb's persitence files.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Log persisted configuration on node \| ${nodes['DUT1']} \|
+| | ...
+| | [Arguments] | ${node}
+| | Log persisted configuration | ${node}
 
-| Honeycomb should show no rogue interfaces
-| | [Documentation] | Checks if operational data contains interfaces not\
-| | ... | present in configuration and vice versa.
+| Interface Persistence Setup
+| | [Documentation] | Configure interface state, ipv4 and ipv6 addresses
+| | ... | and neighbors.
 | | ...
 | | ... | *Arguments:*
 | | ... | - node - information about a DUT node. Type: dictionary
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Honeycomb should show no rogue interfaces \| ${nodes['DUT1']} \|
+| | ... | \| Interface Persistence Setup \| ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
-| | ${data_conf}= | InterfaceAPI.Get all interfaces cfg data | ${node}
-| | ${data_oper}= | InterfaceAPI.Get all interfaces oper data | ${node}
-| | Compare interface lists | ${data_conf} | ${data_oper}
+| | Honeycomb and VPP should have default configuration | ${node}
+| | Import Variables | resources/test_data/honeycomb/interface_ip.py
+| | Honeycomb configures interface state | ${node} | ${interface} | up
+| | Honeycomb sets interface IPv4 address with prefix
+| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
+| | Honeycomb adds interface IPv4 neighbor
+| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac}
+| | Honeycomb sets interface IPv6 address
+| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix}
+| | Honeycomb adds interface IPv6 neighbor
+| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac}
 
-| Persistence file is damaged during restart
-| | [Documentation] | Shuts down Honeycomb, modifies persistence files to\
-| | ... | simulate damage, then restarts VPP and starts up Honeycomb again.
+| Interface Persistence Check
+| | [Documentation] | Verify interface state, ipv4 and ipv6 addresses
+| | ... | and neighbors.
 | | ...
 | | ... | *Arguments:*
 | | ... | - node - information about a DUT node. Type: dictionary
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Persistence file is damaged during restart \| ${nodes['DUT1']} \|
+| | ... | \| Interface Persistence Check \| ${nodes['DUT1']} \|
+| | ...
 | | [Arguments] | ${node}
-| | Stop Honeycomb service on DUTs | ${node}
-| | Modify persistence files | ${node} | { | abc
-| | Setup DUT | ${node}
-| | Setup Honeycomb service on DUTs | ${node}
+| | Interface state from Honeycomb should be | ${node} | ${interface} | up
+| | IPv4 address from Honeycomb should be
+| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
+| | IPv4 address from VAT should be
+| | ... | ${node} | ${interface} | ${ipv4_address}
+| | ... | ${ipv4_prefix} | ${ipv4_mask}
+| | IPv4 neighbor from Honeycomb should be
+| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac}
+| | IPv6 address from Honeycomb should contain
+| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix}
+| | IPv6 address from VAT should contain
+| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix}
+| | IPv6 neighbor from Honeycomb should be
+| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac}
+
+| Bridge Domain Persistence Setup
+| | [Documentation] | Configure bridge domain, BD interface assignment
+| | ... | and L2 fib entry.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Bridge Domain Persistence Setup \| ${nodes['DUT1']} \|
+| | ...
+| | [Arguments] | ${node}
+| | Honeycomb and VPP should have default configuration | ${node}
+| | Import Variables | resources/test_data/honeycomb/l2_fib.py
+| | ... | ${node} | ${interface} | ${interface}
+| | Honeycomb creates first l2 bridge domain
+| | ... | ${node} | ${bd_name} | ${bd_settings}
+| | Honeycomb adds interface to bridge domain
+| | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings}
+| | Honeycomb adds L2 FIB entry to bridge domain
+| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
+
+| Bridge Domain Persistence Check
+| | [Documentation] | Verify bridge domain, BD interface assignment
+| | ... | and L2 fib entry.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Bridge Domain Persistence Check \| ${nodes['DUT1']} \|
+| | ...
+| | [Arguments] | ${node}
+| | Bridge domain Operational Data From Honeycomb Should Be
+| | ... | ${node} | ${bd_name} | ${bd_settings}
+| | Bridge domain Operational Data From VAT Should Be
+| | ... | ${node} | ${0} | ${bd_settings}
+| | Bridge domain Operational Interface Assignment should be
+| | ... | ${node} | ${interface} | ${if_bd_settings}
+| | L2 FIB Entry from Honeycomb should be
+| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
+| | L2 FIB entry from PAPI should be
+| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
\ No newline at end of file