HC Test: improve functional suite setup and teardown
[csit.git] / tests / func / honeycomb / mgmt-cfg-int-subint-apihc-apivat-func.robot
index 9ee12e1..45ffd93 100644 (file)
 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
 | Variables | resources/test_data/honeycomb/sub_interfaces.py
-| Suite Teardown | Run keywords
-| ... | Run Keyword If Any Tests Failed
-| ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
-| ... | AND | Honeycomb removes all bridge domains | ${node}
-| Force Tags | honeycomb_sanity
+| ...
+| Suite Setup | Run Keywords
+| ... | Set Up Honeycomb Functional Test Suite | ${node} | AND
+| ... | Add Interface local0 To Topology | ${node}
+| ...
+| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
+| ...
+| Force Tags | HC_FUNC
+| ...
 | Documentation | *Honeycomb sub-interface management test suite.*
 
 *** Variables ***
-# Test interface 1 and its sub-interface parameters:
+# Test interfaces and their sub-interface parameters:
 | ${super_if}= | ${node['interfaces']['port1']['name']}
+| ${super_if2}= | ${node['interfaces']['port3']['name']}
 | ${sub_if_id}= | ${sub_if_1_settings['identifier']}
 | ${sub_if_name}= | ${super_if}.${sub_if_id}
+| ${sub_if2_name}= | ${super_if2}.${sub_if_id}
 
 *** Test Cases ***
-| TC01: Honycomb creates sub-interface
+| TC01: Honeycomb creates sub-interface
 | | [Documentation] | Check if Honeycomb creates a sub-interface.
 | | ...
-| | Given Honeycomb sets interface state | ${node} | ${super_if} | down
-| | And sub-interface configuration from Honeycomb should be empty
+| | Given Honeycomb configures interface state | ${node} | ${super_if} | down
+| | And sub-interface Operational Data From Honeycomb Should Be empty
 | | ... | ${node} | ${super_if} | ${sub_if_id}
-| | And interface configuration from VAT should be empty
+| | And interface Operational Data From VAT Should Be empty
 | | ... | ${node} | ${sub_if_name}
 | | When Honeycomb creates sub-interface | ${node} | ${super_if}
 | | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings}
-| | Then Sub-interface configuration from Honeycomb should be
+| | Then Sub-interface Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
-| | And Sub-interface configuration from VAT should be
+| | And Sub-interface Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
 | | And sub-interface indices from Honeycomb and VAT should correspond
 | | ... | ${node} | ${super_if} | ${sub_if_id}
@@ -61,7 +67,7 @@
 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
 | | Sub-interface state from VAT should be
 | | ... | ${node} | ${sub_if_name} | down | down
-| | When Honeycomb sets interface state
+| | When Honeycomb configures interface state
 | | ... | ${node} | ${super_if} | up
 | | Then interface state from Honeycomb should be
 | | ... | ${node} | ${super_if} | up
 | | ... | ${node} | ${super_if} | up
 | | And interface state from VAT should be
 | | ... | ${node} | ${super_if} | up
-| | When Honeycomb sets interface state
+| | When Honeycomb configures interface state
 | | ... | ${node} | ${super_if} | down
 | | Then interface state from Honeycomb should be
 | | ... | ${node} | ${super_if} | down
 | | [Setup] | Set super and sub interfaces down
 | | ... | ${node} | ${super_if} | ${sub_if_id}
 | | ...
-| | Given sub-interface configuration from Honeycomb should be
+| | Given sub-interface Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
-| | And sub-interface configuration from VAT should be
+| | And sub-interface Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
 | | When Honeycomb fails to remove all sub-interfaces
 | | ... | ${node} | ${super_if}
-| | Then sub-interface configuration from Honeycomb should be
+| | Then sub-interface Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
-| | And sub-interface configuration from VAT should be
+| | And sub-interface Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
 
 | TC07: Honeycomb adds sub-interface to new bridge domain
 | | [Setup] | Set super and sub interfaces down
 | | ... | ${node} | ${super_if} | ${sub_if_id}
 | | ...
-| | Given sub-interface configuration from Honeycomb should be
+| | Given sub-interface Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
-| | And sub-interface configuration from VAT should be
+| | And sub-interface Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
 | | When Honeycomb creates first L2 bridge domain
 | | ... | ${node} | ${bd_name} | ${bd_settings}
-| | Then bridge domain configuration from Honeycomb should be
+| | Then bridge domain Operational Data From Honeycomb Should Be
 | | ... | ${node} | ${bd_name} | ${bd_settings}
 | | When Honeycomb adds sub-interface to bridge domain
 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings}
-| | Then sub-interface bridge domain configuration from Honeycomb should be
+| | 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 configuration from VAT should be
+| | And sub-interface bridge domain Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_bd_settings}
-| | And sub-interface configuration from VAT should be
+| | And sub-interface Operational Data From VAT Should Be
 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
 
 | TC08: Honeycomb enables tag-rewrite pop 1
 | TC17: Honeycomb modifies existing sub-interface ipv4 address
 | | [Documentation] | Check if Honeycomb can modify an ipv4 address already\
 | | ... | configured on the sub-interface.
+| | ...
 | | [Teardown] | Honeycomb removes all sub-interface ipv4 addresses
 | | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ...
 | | Given sub-interface ipv4 address from Honeycomb should be empty
 | | ... | ${node} | ${super_if} | ${sub_if_id}
 | | And sub-interface ipv4 address from VAT should be empty
 | | ... | ${node} | ${sub_if_name}
 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
 
+| TC18: Honeycomb modifies sub-interface exact tag match
+| | [Documentation] | Check if Honeycomb can modify a sub-interface with exact\
+| | ... | tag match.
+| | ...
+| | Given Honeycomb configures interface state | ${node} | ${super_if2} | down
+| | And sub-interface Operational Data From Honeycomb Should Be empty
+| | ... | ${node} | ${super_if2} | ${sub_if_id}
+| | And interface Operational Data From VAT Should Be empty
+| | ... | ${node} | ${sub_if2_name}
+| | When Honeycomb creates sub-interface | ${node} | ${super_if2}
+| | ... | ${sub_if_2_match} | ${sub_if_2_tags} | ${sub_if_2_settings}
+| | Then Sub-interface Operational Data From Honeycomb Should Be
+| | ... | ${node} | ${super_if2} | ${sub_if_id} | ${sub_if_2_oper}
+| | And Sub-interface Operational Data From VAT Should Be
+| | ... | ${node} | ${sub_if2_name} | ${sub_if_2_oper}
+| | And sub-interface indices from Honeycomb and VAT should correspond
+| | ... | ${node} | ${super_if2} | ${sub_if_id}
+
+| TC19: Honeycomb configures sub-interface ipv6 address
+| | [Documentation] | Check if Honeycomb can configure an ipv6 address on the\
+| | ... | sub-interface.
+| | ...
+| | Given sub-interface ipv6 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv6 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+| | When Honeycomb sets sub-interface ipv6 address
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv6['address']} | ${ipv6['prefix-length']}
+| | Then sub-interface IPv6 address from Honeycomb should contain
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv6['address']} | ${ipv6['prefix-length']}
+| | And sub-interface IPv6 address from VAT should contain
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv6['address']} | ${ipv6['prefix-length']}
+
+| TC20: Honeycomb removes sub-interface ipv6 address
+| | [Documentation] | Check if Honeycomb can remove configured ipv6 addresses\
+| | ... | from the sub-interface.
+| | ...
+| | Given sub-interface IPv6 address from Honeycomb should contain
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv6['address']} | ${ipv6['prefix-length']}
+| | Run Keyword And Continue On Failure
+| | ... | And sub-interface IPv6 address from VAT should contain
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv6['address']} | ${ipv6['prefix-length']}
+| | When Honeycomb removes all sub-interface ipv6 addresses
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | Then sub-interface ipv6 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv6 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+
+| TC21: Honeycomb modifies existing sub-interface ipv6 address
+| | [Documentation] | Check if Honeycomb can modify an ipv6 address already\
+| | ... | configured on the sub-interface.
+| | ...
+| | [Teardown] | Honeycomb removes all sub-interface ipv6 addresses
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ...
+| | Given sub-interface ipv6 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv6 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+| | When Honeycomb sets sub-interface ipv6 address
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv6['address']} | ${ipv6['prefix-length']}
+| | And Honeycomb sets sub-interface ipv6 address
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']}
+| | Then sub-interface IPv6 address from Honeycomb should contain
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']}
+| | And sub-interface IPv6 address from VAT should contain
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']}
+
+| TC22: Honeycomb can configure unnumbered sub-interface
+| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\
+| | ... | on a sub-interface, borrowing the IP address of 'local0'.
+| | ...
+| | Given sub-interface ipv4 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv4 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+| | And Honeycomb sets interface IPv4 address | ${node}
+| | ... | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | When Honeycomb adds unnumbered configuration to interface
+| | ... | ${node} | ${super_if}.${sub_if_id} | local0
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And sub-interface ipv4 address from VAT should be
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+
+| TC23: Honeycomb removes sub-interface unnumbered configuration
+| | [Documentation] | Check if Honeycomb can remove unnumbered configuration\
+| | ... | from a sub-interface.
+| | ...
+| | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node}
+| | ... | local0
+| | ...
+| | Given IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And sub-interface ipv4 address from VAT should be
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | When Honeycomb removes unnumbered configuration from interface
+| | ... | ${node} | ${super_if}.${sub_if_id}
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv4 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+
+| TC24: Honeycomb can configure unnumbered interface using a sub-interface
+| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\
+| | ... | on an interface, borrowing the IP address of a sub-interface.
+| | ...
+| | Given IPv4 address from Honeycomb should be empty | ${node} | local0
+| | And ipv4 address from VAT should be empty | ${node} | local0
+| | And sub-interface ipv4 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv4 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+| | And Honeycomb sets sub-interface ipv4 address
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | When Honeycomb adds unnumbered configuration to interface
+| | ... | ${node} | local0 | ${super_if}.${sub_if_id}
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And sub-interface ipv4 address from VAT should be
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+
 *** Keywords ***
 | Set super and sub interfaces up
 | | [Documentation] | Honeycomb sets super-interface and sub-interface up, in \
 | | ...
 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
 | | ...
-| | Honeycomb sets interface state
+| | Honeycomb configures interface state
 | | ... | ${node} | ${super_interface} | up
 | | Honeycomb sets the sub-interface up
 | | ... | ${node} | ${super_interface} | ${identifier}
 | | ...
 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
 | | ...
-| | Honeycomb sets interface state
+| | Honeycomb configures interface state
 | | ... | ${node} | ${super_interface} | down
 | | Honeycomb sets the sub-interface down
 | | ... | ${node} | ${super_interface} | ${identifier}