X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fhoneycomb%2Finterfaces.robot;h=027b7d74a3f299867b1456d63357bbf917da4125;hp=706da54d64b6abb8255d21665dd8ef830b61b65e;hb=0d782a5690c7e28a329952fb93afde84ddd97078;hpb=6bfae6634aa26c2e88dddf49d91245d880b0222b diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot index 706da54d64..027b7d74a3 100644 --- a/resources/libraries/robot/honeycomb/interfaces.robot +++ b/resources/libraries/robot/honeycomb/interfaces.robot @@ -18,23 +18,6 @@ | ... | WITH NAME | InterfaceAPI *** Keywords *** -| Interface state is -| | [Documentation] | Uses VPP binary API to ensure that the interface under\ -| | ... | test is in the specified admin state. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - state - state to set on interface. Type:string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface state is \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \ -| | ... | \| up \| -| | [Arguments] | ${node} | ${interface} | ${state} -| | interfaceCLI.Set interface state | ${node} | ${interface} | ${state} -| | ... | if_type=name - | Honeycomb sets interface state | | [Documentation] | Uses Honeycomb API to change the admin state\ | | ... | of the specified interface. @@ -237,7 +220,7 @@ | IPv4 neighbor from Honeycomb should be | | [Documentation] | Retrieves ipv4 neighbor list through Honeycomb\ -| | and compares with neighbor list supplied in argument. +| | ... | and compares with neighbor list supplied in argument. | | ... | | ... | *Arguments:* | | ... | - node - information about a DUT node. Type: dictionary @@ -271,7 +254,7 @@ | | ... | \| Honeycomb clears all interface ipv4 neighbors \| ${nodes['DUT1']} \ | | ... | \| GigabitEthernet0/8/0 \| | | [Arguments] | ${node} | ${interface} -| | interfaceAPI.clear all ipv4 neighbors | ${node} | ${interface} +| | interfaceAPI.Remove all ipv4 neighbors | ${node} | ${interface} | Honeycomb sets interface ipv6 address | | [Documentation] | Uses Honeycomb API to change ipv6 address\ @@ -333,67 +316,58 @@ | | Should be equal | ${vpp_data[0]['ip']} | ${address} | | Should be equal | ${vpp_data[0]['prefix-length']} | ${prefix} -| Honeycomb sets interface ethernet and routing configuration -| | [Documentation] | Uses Honeycomb API to change interface configuration. +| Honeycomb sets interface ethernet configuration +| | [Documentation] | Uses Honeycomb API to change interface ethernet\ +| | ... | configuration. | | ... | | ... | *Arguments:* | | ... | - node - information about a DUT node. Type: dictionary | | ... | - interface - name of an interface on the specified node. Type: string | | ... | - ethernet - interface ethernet settings. Type: dictionary -| | ... | - routing - interface routing settings. Type: dictionary | | ... | | ... | *Example:* | | ... | | ... | \| Honeycomb sets interface ethernet and routing configuration \ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${{'mtu': 1500}} \ -| | ... | \| ${{'vrf-if': 2}} \| -| | [Arguments] | ${node} | ${interface} | ${ethernet} | ${routing} +| | [Arguments] | ${node} | ${interface} | ${ethernet} | | :FOR | ${key} | IN | @{ethernet.keys()} | | | interfaceAPI.Configure interface ethernet | | | ... | ${node} | ${interface} | ${key} | ${ethernet['${key}']} -| | :FOR | ${key} | IN | @{routing.keys()} -| | | interfaceAPI.Configure interface routing -| | | ... | ${node} | ${interface} | ${key} | ${routing['${key}']} -| Interface ethernet and routing configuration from Honeycomb should be -| | [Documentation] | Retrieves interface routing and ethernet configuration\ +| Interface ethernet configuration from Honeycomb should be +| | [Documentation] | Retrieves interface ethernet configuration\ | | ... | through Honeycomb and compares with settings supplied in arguments. | | ... | | ... | *Arguments:* | | ... | - node - information about a DUT node. Type: dictionary | | ... | - interface - name of an interface on the specified node. Type: string | | ... | - ethernet - interface ethernet settings. Type: dictionary -| | ... | - routing - interface routing settings. Type: dictionary | | ... | | ... | *Example:* | | ... | | ... | \| Interface ethernet and routing configuration from Honeycomb \ | | ... | should be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \ -| | ... | \| ${{'mtu': 1500}} \| ${{'vrf-id': 2}} \| -| | [Arguments] | ${node} | ${interface} | ${ethernet} | ${routing} +| | ... | \| ${{'mtu': 1500}} \| +| | [Arguments] | ${node} | ${interface} | ${ethernet} | | ${api_data}= | interfaceAPI.Get interface oper data | ${node} | ${interface} | | :FOR | ${key} | IN | @{ethernet.keys()} | | | Should be equal | | | ... | ${api_data['v3po:ethernet']['${key}']} | ${ethernet['${key}']} -| | :FOR | ${key} | IN | @{routing.keys()} -| | | Should be equal | ${api_data['${key}']} | ${routing['${key}']} -| Interface ethernet and routing configuration from VAT should be -| | [Documentation] | Retrieves interface routing and ethernet configuration\ +| Interface ethernet configuration from VAT should be +| | [Documentation] | Retrieves interface ethernet configuration\ | | ... | through VAT and compares with settings supplied in arguments. | | ... | | ... | *Arguments:* | | ... | - node - information about a DUT node. Type: dictionary | | ... | - interface - name of an interface on the specified node. Type: string | | ... | - mtu - value of maximum transmission unit expected. Type: integer -| | ... | - vrf-id - ID number of a VPN expected on interface. Type: integer | | ... | | ... | *Example:* | | ... | | ... | \| Interface ethernet and routing configuration from VAT \ -| | ... | should be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1500} \ -| | ... | \| ${2} \| -| | [Arguments] | ${node} | ${interface} | ${mtu} | ${vrf-id} +| | ... | should be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1500} \| +| | [Arguments] | ${node} | ${interface} | ${mtu} | | ${vat_data}= | InterfaceCLI.VPP get interface data | ${node} | ${interface} | | Should be equal | ${vat_data['mtu']} | ${mtu} @@ -452,3 +426,50 @@ | | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1 | | Should be equal as strings | | ... | ${api_data['if-index']} | ${sw_if_index} + +| Get Interface index from oper data +| | [Documentation] | Retrieves interface operational data and returns\ +| | ... | if-index of the specified interface. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... | - interface - name of the interface. Type: string +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Get Interface index from oper data \| ${nodes['DUT1']} \| local0 \| +| | [Arguments] | ${node} | ${interface} +| | ${data}= | interfaceAPI.Get interface oper data | ${node} | ${interface} +| | Return from keyword | ${data['if-index']} + +| Honeycomb should show disabled interface in oper data +| | [Documentation] | Retrieves list of disabled interfaces\ +| | ... | and verifies that there is at least one. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... | - index - index of the interface to be checked. Type: string +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Honeycomb should show disabled interface in oper data \ +| | ... | \|${nodes['DUT1']} \| ${vx_interface} \| +| | [Arguments] | ${node} | ${index} +| | interfaceAPI.check disabled interface | ${node} | ${index} + +| Honeycomb should not show disabled interface in oper data +| | [Documentation] | Retrieves list of disabled interfaces\ +| | ... | and expects to fail with a 404 - not found. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... | - index - index of the interface to be checked. Type: string +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Honeycomb should not show disabled interface in oper data \ +| | ... | \|${nodes['DUT1']} \| ${vx_interface} \| +| | [Arguments] | ${node} | ${index} +| | Run keyword and expect error | * +| | ... | Honeycomb should show disabled interface in oper data +| | ... | ${node} | ${index}