X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fhoneycomb%2Finterfaces.robot;h=a187a107ffdbdc6bfafe04843bb38caa7e636871;hp=d27aff41757c7498dff95ae9931e26affdda9a94;hb=fdc6e0fc0c675eb4faa699fef7e1e2ca91df2b03;hpb=c37f394a29165f839c3032e7f9485e35fb3307f2 diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot index d27aff4175..a187a107ff 100644 --- a/resources/libraries/robot/honeycomb/interfaces.robot +++ b/resources/libraries/robot/honeycomb/interfaces.robot @@ -12,7 +12,6 @@ # limitations under the License. *** Settings *** -| Library | resources/libraries/python/honeycomb/HoneycombUtil.py | Library | resources.libraries.python.InterfaceUtil | ... | WITH NAME | interfaceCLI | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords @@ -120,6 +119,24 @@ | | | interfaceAPI.Configure interface ipv4 | | | ... | ${node} | ${interface} | ${key} | ${settings['${key}']} +| Honeycomb sets interface ipv4 address with prefix +| | [Documentation] | Uses Honeycomb API to assign an ipv4 address to the\ +| | ... | specified interface. Any existing addresses will be removed. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... | - interface - name of an interface on the specified node. Type: string +| | ... | - address - IP address to set. Type: string +| | ... | - prefix - length of address network prefix. Type: int +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Honeycomb sets interface ipv4 address with prefix \ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 192.168.0.2 \| 24 \| +| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} +| | interfaceAPI.Add first ipv4 address +| | ... | ${node} | ${interface} | ${address} | ${prefix} + | IPv4 config from Honeycomb should be | | [Documentation] | Retrieves interface ipv4 configuration through Honeycomb\ | | ... | and compares with state supplied in argument. @@ -317,69 +334,3 @@ | | [Arguments] | ${node} | ${interface} | ${mtu} | ${vrf-id} | | ${vat_data}= | InterfaceCLI.VPP get interface data | ${node} | ${interface} | | Should be equal | ${vat_data['mtu']} | ${mtu} -| | Should be equal | ${vat_data['sub_inner_vlan_id']} | ${vrf-id} - -| Honeycomb sets interface VxLAN configuration -| | [Documentation] | Uses Honeycomb API to change VxLAN configuration \ -| | ... | of the specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - vxlan_settings - Configuration data for VxLAN. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb sets interface VxLAN configuration \ -| | ... | \|${node} \| ${interface} \| &{vxlan_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | &{vxlan_settings} -| | :FOR | ${items} | IN | @{vxlan_settings.items()} -| | | interfaceAPI.Configure interface vxlan | ${node} | ${interface} | @{items} - -| VxLAN configuration from Honeycomb should be -| | [Documentation] | Retrieves interface VxLAN configuration through Honeycomb\ -| | ... | and compares with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - vxlan_settings - Configuration data for VxLAN. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| VxLAN configuration from Honeycomb should be \ -| | ... | \| ${node} \| ${interface} \| &{vxlan_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | &{vxlan_settings} -| | ${api_data}= | interfaceAPI.Get interface cfg data | ${node} | ${interface} -| | :FOR | ${items} | IN | @{vxlan_settings.items()} -| | | Should be equal as strings -| | ... | ${api_data['v3po:vxlan']['@{items}[0]']} | ${items[1]} -| | ${api_data}= | interfaceAPI.Get interface oper data | ${node} | ${interface} -| | :FOR | ${items} | IN | @{vxlan_settings.items()} -| | | Should be equal as strings -| | ... | ${api_data['v3po:vxlan']['@{items}[0]']} | ${items[1]} - -| VxLAN configuration from VAT should be -| | [Documentation] | Retrieves interface VxLAN configuration through VAT and\ -| | ... | compares with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - vxlan_settings - Configuration data for VxLAN. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| VxLAN configuration from Honeycomb should be \ -| | ... | \| ${node} \| ${interface} \| &{vxlan_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | &{vxlan_settings} -| | ${vat_data}= | VxLAN Dump | ${node} | ${interface} -| | Should be equal as strings -| | ... | ${vat_data['dst_address']} | ${vxlan_settings['dst']} -| | Should be equal as strings -| | ... | ${vat_data['src_address']} | ${vxlan_settings['src']} -| | Should be equal as strings | ${vat_data['vni']} | ${vxlan_settings['vni']} -| | Should be equal as strings -| | ... | ${vat_data['encap-vrf-id']} | ${vxlan_settings['encap_vrf_id']}