X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fhoneycomb%2Fsub_interface.robot;h=69eb9003d147b4d62c1fcb61206b949d39ddf9c7;hp=5a42b56d1118b006a57619a7a79177dbd7b5d324;hb=b7f0c133f672b39b49e0480f71dd0629986bcf72;hpb=e3171449c75d948461ac24b0df7212e8a2ca45f9 diff --git a/resources/libraries/robot/honeycomb/sub_interface.robot b/resources/libraries/robot/honeycomb/sub_interface.robot index 5a42b56d11..69eb9003d1 100644 --- a/resources/libraries/robot/honeycomb/sub_interface.robot +++ b/resources/libraries/robot/honeycomb/sub_interface.robot @@ -13,10 +13,8 @@ *** Settings *** | Library | resources.libraries.python.InterfaceUtil -| ... | WITH NAME | interfaceCLI | Library | resources.libraries.python.L2Util | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| ... | WITH NAME | InterfaceAPI | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot | Documentation | Keywords used to manipulate sub-interfaces. @@ -43,10 +41,10 @@ | | [Arguments] | ${node} | ${super_interface} | | ... | ${match} | ${tags} | ${sub_interface_settings} | | ... -| | interfaceAPI.Create sub interface | ${node} | ${super_interface} +| | Honeycomb Create sub interface | ${node} | ${super_interface} | | ... | ${match} | ${tags} | &{sub_interface_settings} -| Sub-interface configuration from Honeycomb should be +| Sub-interface Operational Data From Honeycomb Should Be | | [Documentation] | Retrieves sub-interface configuration through Honeycomb\ | | ... | and compares it with settings supplied in argument. | | ... @@ -58,18 +56,18 @@ | | ... | Type: dictionary | | ... | | ... | *Example:* -| | ... | \| Sub-interface configuration from Honeycomb should be\ +| | ... | \| Sub-interface Operational Data From Honeycomb Should Be\ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\ | | ... | \| ${sub_if_1_params} \| | | ... | | [Arguments] | ${node} | ${super_interface} | ${identifier} | | ... | ${sub_if_settings} | | ... -| | ${api_data}= | interfaceAPI.Get sub interface oper data +| | ${api_data}= | Get sub interface oper data | | ... | ${node} | ${super_interface} | ${identifier} -| | interfaceAPI.Compare Data Structures | ${api_data} | ${sub_if_settings} +| | Compare Data Structures | ${api_data} | ${sub_if_settings} -| Sub-interface configuration from Honeycomb should be empty +| Sub-interface Operational Data From Honeycomb Should Be empty | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \ | | ... | and expects no data. | | ... @@ -79,13 +77,13 @@ | | ... | - identifier - Sub-interface ID. Type: integer or string | | ... | | ... | *Example:* -| | ... | \| Sub-interface configuration from Honeycomb should be empty\ +| | ... | \| Sub-interface Operational Data From Honeycomb Should Be empty\ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| | | ... | | [Arguments] | ${node} | ${super_interface} | ${identifier} | | ... | | Run keyword and expect error | *KeyError: 'vpp-vlan:sub-interfaces'* -| | ... | interfaceAPI.Get sub interface oper data +| | ... | Get sub interface oper data | | ... | ${node} | ${super_interface} | ${identifier} | Sub-interface state from Honeycomb should be @@ -107,12 +105,12 @@ | | [Arguments] | ${node} | ${super_interface} | ${identifier} | | ... | ${admin_state} | ${oper_state} | | ... -| | ${api_data}= | interfaceAPI.Get sub interface oper data +| | ${api_data}= | 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 +| Sub-interface Operational Data From VAT Should Be | | [Documentation] | Retrieves sub-interface configuration through VAT and\ | | ... | compares it with settings supplied in argument. | | ... @@ -124,12 +122,12 @@ | | ... | sub-interface to be checked. Type: dictionary | | ... | | ... | *Example:* -| | ... | \| Sub-interface configuration from VAT should be\ +| | ... | \| Sub-interface Operational Data From VAT Should Be\ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_if_1_params} \| | | ... | | [Arguments] | ${node} | ${sub_interface} | ${sub_interface_settings} | | ... -| | ${vat_data}= | InterfaceCLI.VPP get interface data +| | ${vat_data}= | VPP get interface data | | ... | ${node} | ${sub_interface} | | Should be equal as strings | ${vat_data['sub_id']} | | ... | ${sub_interface_settings['identifier']} @@ -160,7 +158,7 @@ | | ... | | [Arguments] | ${node} | ${sub_interface} | ${admin_state} | ${oper_state} | | ... -| | ${vat_data}= | InterfaceCLI.VPP get interface data +| | ${vat_data}= | VPP get interface data | | ... | ${node} | ${sub_interface} | | Run keyword if | '${admin_state}' == 'down' | | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 0 @@ -189,9 +187,9 @@ | | ... | | [Arguments] | ${node} | ${super_interface} | ${identifier} | | ... -| | ${api_data}= | interfaceAPI.Get sub interface oper data +| | ${api_data}= | Get sub interface oper data | | ... | ${node} | ${super_interface} | ${identifier} -| | ${vat_data}= | InterfaceCLI.VPP get interface data +| | ${vat_data}= | VPP get interface data | | ... | ${node} | ${super_interface}.${identifier} | | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1 | | Should be equal as strings @@ -211,7 +209,7 @@ | | ... | | [Arguments] | ${node} | ${super_interface} | ${identifier} | | ... -| | interfaceAPI.Set sub interface state +| | Set sub interface state | | ... | ${node} | ${super_interface} | ${identifier} | up | Honeycomb sets the sub-interface down @@ -228,7 +226,7 @@ | | ... | | [Arguments] | ${node} | ${super_interface} | ${identifier} | | ... -| | interfaceAPI.Set sub interface state +| | Set sub interface state | | ... | ${node} | ${super_interface} | ${identifier} | down | Honeycomb fails to set sub-interface up @@ -246,7 +244,7 @@ | | [Arguments] | ${node} | ${super_interface} | ${identifier} | | ... | | Run keyword and expect error | *HoneycombError: * was not successful. * 500. -| | ... | interfaceAPI.Set sub interface state +| | ... | Set sub interface state | | ... | ${node} | ${super_interface} | ${identifier} | up | Honeycomb adds sub-interface to bridge domain @@ -265,10 +263,10 @@ | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings} | | ... -| | interfaceAPI.Add bridge domain to sub interface +| | Add bridge domain to sub interface | | ... | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings} -| Sub-interface bridge domain configuration from Honeycomb should be +| Sub-interface bridge domain Operational Data From Honeycomb Should Be | | [Documentation] | Uses Honeycomb API to verify sub-interface assignment to\ | | ... | a bridge domain. | | ... @@ -279,17 +277,17 @@ | | ... | - settings - Bridge domain parameters to be checked. Type: dictionary | | ... | | ... | *Example:* -| | ... | \| Sub-interface bridge domain configuration from Honeycomb should be\ +| | ... | \| Sub-interface bridge domain Operational Data From Honeycomb Should Be\ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} | | ... -| | ${if_data}= | interfaceAPI.Get BD data from sub interface +| | ${if_data}= | Get BD data from sub interface | | ... | ${node} | ${super_if} | ${identifier} | | Should be equal | ${if_data['bridge-domain']} | | ... | ${settings['bridge-domain']} -| Sub-interface bridge domain configuration from VAT should be +| Sub-interface bridge domain Operational Data From VAT Should Be | | [Documentation] | Uses VAT to verify sub-interface assignment to a bridge\ | | ... | domain. | | ... @@ -300,7 +298,7 @@ | | ... | - setings - Parameters to be checked. Type: dictionary | | ... | | ... | *Example:* -| | ... | \| Sub-interface bridge domain configuration from VAT should be\ +| | ... | \| Sub-interface bridge domain Operational Data From VAT Should Be\ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_bd_setings} \| | | ... | | [Arguments] | ${node} | ${interface} | ${settings} @@ -330,7 +328,7 @@ | | [Arguments] | ${node} | ${super_if} | | ... | | Run keyword and expect error | *HoneycombError:*not successful. * code: 500. -| | ... | interfaceAPI.Remove all sub interfaces +| | ... | Remove all sub interfaces | | ... | ${node} | ${super_if} | Honeycomb configures tag rewrite @@ -349,7 +347,7 @@ | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} | | ... -| | interfaceAPI.Configure tag rewrite +| | Configure tag rewrite | | ... | ${node} | ${super_if} | ${identifier} | ${settings} | Rewrite tag from Honeycomb should be empty @@ -367,7 +365,7 @@ | | [Arguments] | ${node} | ${super_if} | ${identifier} | | ... | | Run keyword and expect error | *Hon*Error*oper*does not contain*tag-rewrite* -| | ... | interfaceAPI.Get tag rewrite oper data +| | ... | Get tag rewrite oper data | | ... | ${node} | ${super_if} | ${identifier} | Rewrite tag from Honeycomb should be @@ -387,9 +385,9 @@ | | ... | \| ${tag_rewrite_push_oper} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} -| | ${api_data}= | interfaceAPI.Get tag rewrite oper data +| | ${api_data}= | Get tag rewrite oper data | | ... | ${node} | ${super_if} | ${identifier} -| | interfaceAPI.Compare Data Structures +| | Compare Data Structures | | ... | ${api_data} | ${settings} | Rewrite tag from VAT should be @@ -409,8 +407,8 @@ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${rw_params} \| | | ... | | [Arguments] | ${node} | ${interface} | ${rw_settings} -| | ${vat_data}= | InterfaceCLI.VPP get interface data | ${node} | ${interface} -| | interfaceAPI.Compare Data Structures | ${vat_data} | ${rw_settings} +| | ${vat_data}= | VPP get interface data | ${node} | ${interface} +| | Compare Data Structures | ${vat_data} | ${rw_settings} | Honeycomb fails to set wrong rewrite tag | | [Documentation] | Honeycomb tries to set wrong rewrite tag and expects\ @@ -429,26 +427,9 @@ | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} | | Run keyword and expect error | *HoneycombError: * was not successful. *00. -| | ... | interfaceAPI.Configure tag rewrite +| | ... | Configure tag rewrite | | ... | ${node} | ${super_if} | ${identifier} | ${settings} -| VAT disables tag-rewrite -| | [Documentation] | The keyword disables the tag-rewrite using VAT. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - sub_interface - Name of an sub-interface on the specified node.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... | \| VAT disables tag-rewrite\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| -| | ... -| | [Arguments] | ${node} | ${sub_interface} -| | ... -| | ${sw_if_index}= | interfaceCLI.Get sw if index | ${node} | ${sub_interface} -| | L2 tag rewrite | ${node} | ${sw_if_index} | disable - | Honeycomb sets sub-interface ipv4 address | | [Documentation] | Uses Honeycomb API to configure an ipv4 address on the\ | | ... | spcified sub-interface. Replaces any existing ipv4 addresses. @@ -486,7 +467,7 @@ | | ... | \| 192.168.0.2 \| ${24} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} -| | ${if_data}= | interfaceAPI.Get sub interface oper data +| | ${if_data}= | Get sub interface oper data | | ... | ${node} | ${super_if} | ${identifier} | | Should be equal | | ... | ${if_data['ipv4']['address'][0]['ip']} | ${address} @@ -509,7 +490,7 @@ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| | | ... | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix} -| | ${data}= | interfaceCLI.VPP get interface ip addresses +| | ${data}= | VPP get interface ip addresses | | ... | ${node} | ${sub_interface} | ipv4 | | Should be equal | ${data[0]['ip']} | ${address} | | Should be equal | ${data[0]['prefix_length']} | ${prefix} @@ -545,7 +526,7 @@ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} -| | ${if_data}= | interfaceAPI.Get sub interface oper data +| | ${if_data}= | Get sub interface oper data | | ... | ${node} | ${super_if} | ${identifier} | | Run keyword and expect error | *KeyError: 'ipv4'* | | ... | Set Variable | ${if_data['ipv4']['address'][0]['ip']} @@ -565,7 +546,7 @@ | | ... | | [Arguments] | ${node} | ${sub_interface} | | Run keyword and expect error | *No JSON object could be decoded* -| | ... | interfaceCLI.VPP get interface ip addresses +| | ... | VPP get interface ip addresses | | ... | ${node} | ${sub_interface} | ipv4 | Honeycomb sets sub-interface ipv6 address @@ -605,7 +586,7 @@ | | ... | \| 10::10 \| ${64} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} -| | ${if_data}= | interfaceAPI.Get sub interface oper data +| | ${if_data}= | Get sub interface oper data | | ... | ${node} | ${super_if} | ${identifier} | | ${settings}= | Create Dictionary | | ... | ip=${address} | prefix-length=${prefix} @@ -627,7 +608,7 @@ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| | | ... | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix} -| | ${data}= | interfaceCLI.VPP get interface ip addresses +| | ${data}= | VPP get interface ip addresses | | ... | ${node} | ${sub_interface} | ipv6 | | Should be equal | ${data[0]['ip']} | ${address} | | Should be equal | ${data[0]['prefix_length']} | ${prefix} @@ -663,7 +644,7 @@ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} -| | ${if_data}= | interfaceAPI.Get sub interface oper data +| | ${if_data}= | Get sub interface oper data | | ... | ${node} | ${super_if} | ${identifier} | | Run keyword and expect error | *KeyError: 'ipv6'* | | ... | Set Variable | ${if_data['ipv6']['address'][0]['ip']} @@ -683,5 +664,5 @@ | | ... | | [Arguments] | ${node} | ${sub_interface} | | Run keyword and expect error | *No JSON object could be decoded* -| | ... | interfaceCLI.VPP get interface ip addresses +| | ... | VPP get interface ip addresses | | ... | ${node} | ${sub_interface} | ipv6