Modify tests and keywords for sub-interfaces. 26/1726/4
authorTibor Frank <tifrank@cisco.com>
Thu, 23 Jun 2016 11:12:36 +0000 (13:12 +0200)
committerMatej Klotton <mklotton@cisco.com>
Mon, 27 Jun 2016 11:43:04 +0000 (11:43 +0000)
JIRA: CSIT-175

- modify tests and keywords for sub-interfaces to reflect the last changes
  introduced by https://gerrit.fd.io/r/#/c/1700/
- fix typos

Change-Id: I0839fe9f17149fa8c39ac31004bb2096d79c469f
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/libraries/robot/honeycomb/sub_interface.robot
tests/suites/honeycomb/6 - sub_interface.robot

index c21b860..bdadad8 100644 (file)
 | | ... | ${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.
 | | ... | 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
index 8913814..49f5691 100644 (file)
@@ -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
 | | ... | ${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
 | | ... | ${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.
 | | ... | ${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}
 | | ... | ${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}
 | | ... | ${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}
 | 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}
 | | ... | ${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}
 | | ... | 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}
 | | ... | ${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
 
 *** 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:*
 | | ... | ${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}