aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/libraries/robot/honeycomb/sub_interface.robot72
-rw-r--r--tests/suites/honeycomb/6 - sub_interface.robot128
2 files changed, 149 insertions, 51 deletions
diff --git a/resources/libraries/robot/honeycomb/sub_interface.robot b/resources/libraries/robot/honeycomb/sub_interface.robot
index c21b860f64..bdadad8b8b 100644
--- a/resources/libraries/robot/honeycomb/sub_interface.robot
+++ b/resources/libraries/robot/honeycomb/sub_interface.robot
@@ -69,6 +69,49 @@
| | ... | ${node} | ${super_interface} | ${identifier}
| | interfaceAPI.Compare Data Structures | ${api_data} | ${sub_if_settings}
+| Sub-interface configuration from Honeycomb should be empty
+| | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
+| | ... | and expects no data.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - super_interface - Super-interface. Type: string
+| | ... | - identifier - Sub-interface ID. Type: integer or string
+| | ...
+| | ... | *Example:*
+| | ... | \| Sub-interface configuration from Honeycomb should be empty\
+| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
+| | ...
+| | [Arguments] | ${node} | ${super_interface} | ${identifier}
+| | ...
+| | Run keyword and expect error | *KeyError: 'sub-interface'*
+| | ... | interfaceAPI.Get sub interface oper data
+| | ... | ${node} | ${super_interface} | ${identifier}
+
+| Sub-interface state from Honeycomb should be
+| | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
+| | ... | and checks the administrative and operational state.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - super_interface - Super-interface. Type: string
+| | ... | - identifier - Sub-interface ID. Type: integer or string
+| | ... | - admin_state - Required administrative state - up or down. \
+| | ... | Type: string
+| | ... | - oper_state - Required operational state - up or down. Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| Sub-interface state from Honeycomb should be\
+| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| up \| up \|
+| | ...
+| | [Arguments] | ${node} | ${super_interface} | ${identifier}
+| | ... | ${admin_state} | ${oper_state}
+| | ...
+| | ${api_data}= | interfaceAPI.Get sub interface oper data
+| | ... | ${node} | ${super_interface} | ${identifier}
+| | Should be equal | ${api_data['admin-status']} | ${admin_state}
+| | Should be equal | ${api_data['oper-status']} | ${oper_state}
+
| Sub-interface configuration from VAT should be
| | [Documentation] | Retrieves sub-interface configuration through VAT and\
| | ... | compares it with settings supplied in argument.
@@ -99,6 +142,35 @@
| | ... | Should be equal as strings
| | ... | ${sub_interface_settings['oper-status']} | up
+| Sub-interface state from VAT should be
+| | [Documentation] | Retrieves sub-interface configuration through VAT and \
+| | ... | checks the administrative and operational state.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - sub_interface - Name of an sub-interface on the specified node. \
+| | ... | Type: string
+| | ... | - admin_state - Required administrative state - up or down. \
+| | ... | Type: string
+| | ... | - oper_state - Required operational state - up or down. Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| Sub-interface state from VAT should be \
+| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| up \| up \|
+| | ...
+| | [Arguments] | ${node} | ${sub_interface} | ${admin_state} | ${oper_state}
+| | ...
+| | ${vat_data}= | InterfaceCLI.VPP get interface data
+| | ... | ${node} | ${sub_interface}
+| | Run keyword if | '${admin_state}' == 'down'
+| | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 0
+| | Run keyword if | '${admin_state}' == 'up'
+| | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 1
+| | Run keyword if | '${oper_state}' == 'down'
+| | ... | Should be equal as strings | ${vat_data['link_up_down']} | 0
+| | Run keyword if | '${oper_state}' == 'up'
+| | ... | Should be equal as strings | ${vat_data['link_up_down']} | 1
+
| Sub-interface indices from Honeycomb and VAT should correspond
| | [Documentation] | Uses VAT and Honeycomb to get operational data about the\
| | ... | given sub-interface and compares the interface indexes. The
diff --git a/tests/suites/honeycomb/6 - sub_interface.robot b/tests/suites/honeycomb/6 - sub_interface.robot
index 8913814320..49f56914be 100644
--- a/tests/suites/honeycomb/6 - sub_interface.robot
+++ b/tests/suites/honeycomb/6 - sub_interface.robot
@@ -20,7 +20,7 @@
| Suite Teardown | Honeycomb removes all bridge domains | ${node}
| Documentation | *Honeycomb sub-interface management test suite.*
| ...
-| ... | This test suite tests if it is posible to create, modify and\
+| ... | This test suite tests if it is posible to create, modify and \
| ... | delete a sub-interface.
| Force Tags | honeycomb_sanity
@@ -36,8 +36,8 @@
| Honycomb creates sub-interface
| | [Documentation] | Check if Honeycomb creates a sub-interface.
| | ...
-| | Given interface configuration from Honeycomb should be empty
-| | ... | ${node} | ${sub_if_name}
+| | Given sub-interface configuration from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
| | And interface configuration from VAT should be empty
| | ... | ${node} | ${sub_if_name}
| | When Honeycomb creates sub-interface | ${node} | ${super_if}
@@ -52,7 +52,7 @@
| | ... | ${node} | ${super_if} | ${sub_if_id}
| Honeycomb sets interface and sub-interface up
-| | [Documentation] | Honeycomb changes the state of interface up and then\
+| | [Documentation] | Honeycomb changes the state of interface up and then \
| | ... | changes the state of its sub-interface up, in this order.
| | ...
| | Given interface state from Honeycomb should be
@@ -65,45 +65,48 @@
| | ... | ${node} | ${super_if} | up
| | And interface state from VAT should be
| | ... | ${node} | ${super_if} | up
-| | Given interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | down
-| | And interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | down
+| | Given run keyword and continue on failure
+| | ... | Sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
+| | And run keyword and continue on failure
+| | ... | Sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | down | down
| | When Honeycomb sets the sub-interface up
| | ... | ${node} | ${super_if} | ${sub_if_id}
-| | Then interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | up
-| | And Interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | up
+| | Then run keyword and continue on failure
+| | ... | Sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | up | up
+| | And sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | up | up
| Honeycomb sets sub-interface down while its super-interface is up
-| | [Documentation] | Honeycomb sets the sub-interface down while its\
+| | [Documentation] | Honeycomb sets the sub-interface down while its \
| | ... | super-interface is up. It must be possible.
| | ...
| | [Teardown] | Set super and sub interfaces up
| | ... | ${node} | ${super_if} | ${sub_if_id}
| | ...
-| | Given interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | up
-| | And interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | up
+| | Given sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | up | up
+| | And sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | up | up
| | And interface state from Honeycomb should be
| | ... | ${node} | ${super_if} | up
| | And interface state from VAT should be
| | ... | ${node} | ${super_if} | up
| | When Honeycomb sets the sub-interface down
| | ... | ${node} | ${super_if} | ${sub_if_id}
-| | Then interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | down
-| | And interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | down
+| | Then sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
+| | And sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | down | down
| | And interface state from Honeycomb should be
| | ... | ${node} | ${super_if} | up
| | And interface state from VAT should be
| | ... | ${node} | ${super_if} | up
| Honeycomb sets interface and sub-interface down
-| | [Documentation] | Honeycomb changes the state of interface down and then\
+| | [Documentation] | Honeycomb changes the state of interface down and then \
| | ... | changes the state of its sub-interface down, in this order.
| | ...
| | [Teardown] | Set super and sub interfaces down
@@ -119,39 +122,39 @@
| | ... | ${node} | ${super_if} | down
| | And interface state from VAT should be
| | ... | ${node} | ${super_if} | down
-| | Given interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | up
-| | And interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | up
+| | Given sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | up | down
+| | And sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | up | down
| | When Honeycomb sets the sub-interface down
| | ... | ${node} | ${super_if} | ${sub_if_id}
-| | Then interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | down
-| | And interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | down
+| | Then sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
+| | And sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | down | down
| Honeycomb fails to set sub-interface up while its super-interface is down
-| | [Documentation] | Honeycomb tries to set the sub-interface up while its\
+| | [Documentation] | Honeycomb tries to set the sub-interface up while its \
| | ... | super-interface is down. It must not be possible.
| | ...
| | Given interface state from Honeycomb should be
| | ... | ${node} | ${super_if} | down
| | And interface state from VAT should be
| | ... | ${node} | ${super_if} | down
-| | And interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | down
-| | And interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | down
+| | And sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
+| | And sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | down | down
| | When Honeycomb fails to set sub-interface up
| | ... | ${node} | ${super_if} | ${sub_if_id}
| | Then interface state from Honeycomb should be
| | ... | ${node} | ${super_if} | down
| | And interface state from VAT should be
| | ... | ${node} | ${super_if} | down
-| | And interface state from Honeycomb should be
-| | ... | ${node} | ${sub_if_name} | down
-| | And interface state from VAT should be
-| | ... | ${node} | ${sub_if_name} | down
+| | And sub-interface state from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
+| | And sub-interface state from VAT should be
+| | ... | ${node} | ${sub_if_name} | down | down
| Honeycomb fails to delete sub-interface
| | [Documentation] | Check if Honeycomb can delete an existing sub-interface.
@@ -194,10 +197,11 @@
| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
| Honeycomb enables tag-rewrite pop 1
-| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its\
+| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
| | ... | parameters correctly. Case: pop 1.
| | ...
-| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id}
+| | [Teardown] | Honeycomb disables tag rewrite
+| | ... | ${node} | ${super_if} | ${sub_if_id}
| | ...
| | Given rewrite tag from Honeycomb should be empty
| | ... | ${node} | ${super_if} | ${sub_if_id}
@@ -209,10 +213,11 @@
| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
| Honeycomb enables tag-rewrite push
-| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its\
+| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
| | ... | parameters correctly. Case: push.
| | ...
-| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id}
+| | [Teardown] | Honeycomb disables tag rewrite
+| | ... | ${node} | ${super_if} | ${sub_if_id}
| | ...
| | Given rewrite tag from Honeycomb should be empty
| | ... | ${node} | ${super_if} | ${sub_if_id}
@@ -224,10 +229,11 @@
| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT}
| Honeycomb enables tag-rewrite translate 1-2
-| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its\
+| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
| | ... | parameters correctly. Case: translate 1-2.
| | ...
-| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id}
+| | [Teardown] | Honeycomb disables tag rewrite
+| | ... | ${node} | ${super_if} | ${sub_if_id}
| | ...
| | Given rewrite tag from Honeycomb should be empty
| | ... | ${node} | ${super_if} | ${sub_if_id}
@@ -242,7 +248,8 @@
| Honeycomb disables tag-rewrite
| | [Documentation] | Check if Honeycomb disables the tag-rewrite.
| | ...
-| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id}
+| | [Teardown] | Honeycomb disables tag rewrite
+| | ... | ${node} | ${super_if} | ${sub_if_id}
| | ...
| | When Honeycomb configures tag rewrite
| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
@@ -256,10 +263,11 @@
| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
| Honeycomb enables tag-rewrite pop 1 again
-| | [Documentation] | Check if Honeycomb can enable tag-rewrite again, once it\
+| | [Documentation] | Check if Honeycomb can enable tag-rewrite again, once it \
| | ... | was disabled by Honeycomb.
| | ...
-| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id}
+| | [Teardown] | Honeycomb disables tag rewrite
+| | ... | ${node} | ${super_if} | ${sub_if_id}
| | ...
| | Given rewrite tag from Honeycomb should be empty
| | ... | ${node} | ${super_if} | ${sub_if_id}
@@ -277,7 +285,8 @@
| | ... | 3. translate 1 - 2
| | ... | Then Honeycomb disables the tag-rewrite.
| | ...
-| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id}
+| | [Teardown] | Honeycomb disables tag rewrite
+| | ... | ${node} | ${super_if} | ${sub_if_id}
| | ...
| | Given rewrite tag from Honeycomb should be empty
| | ... | ${node} | ${super_if} | ${sub_if_id}
@@ -308,7 +317,7 @@
| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
| Honeycomb fails to set wrong vlan-type in tag-rewrite
-| | [Documentation] | Check that Honeycomb does not accept wrong values of\
+| | [Documentation] | Check that Honeycomb does not accept wrong values of \
| | ... | vlan-type in tag-rewrite.
| | ...
| | Given rewrite tag from Honeycomb should be empty
@@ -323,7 +332,7 @@
*** Keywords ***
| Set super and sub interfaces up
-| | [Documentation] | Honeycomb sets super-interface and sub-interface up, in\
+| | [Documentation] | Honeycomb sets super-interface and sub-interface up, in \
| | ... | this order.
| | ...
| | ... | *Arguments:*
@@ -361,3 +370,20 @@
| | ... | ${node} | ${super_interface} | down
| | Honeycomb sets the sub-interface down
| | ... | ${node} | ${super_interface} | ${identifier}
+
+| Honeycomb disables tag rewrite
+| | [Documentation] |
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - super_if - Super-interface. Type: string
+| | ... | - identifier - Sub-interface ID. Type: integer or string
+| | ...
+| | ... | *Example:*
+| | ... | \| Honeycomb disables tag rewrite \
+| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
+| | ...
+| | [Arguments] | ${node} | ${super_if} | ${sub_if_id}
+| | ...
+| | Honeycomb configures tag rewrite
+| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled}