aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2016-06-23 13:12:36 +0200
committerMatej Klotton <mklotton@cisco.com>2016-06-27 11:43:04 +0000
commit49b73e488fc9b4835e51027387d4ca6e1c748b2b (patch)
treee4c5e63eb9e7b7969c0904ed875705baafdd6ffc /resources/libraries
parentbcf99a0eb0e8770f28c2e3c8c0965ad6c0acba94 (diff)
Modify tests and keywords for sub-interfaces.
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>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/robot/honeycomb/sub_interface.robot72
1 files changed, 72 insertions, 0 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