diff options
author | selias <samelias@cisco.com> | 2017-03-10 13:06:19 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2017-03-13 13:35:41 +0000 |
commit | e3171449c75d948461ac24b0df7212e8a2ca45f9 (patch) | |
tree | 38606019796c8530f49d056f2ca9b94af8f0f9ac /resources/libraries/robot | |
parent | 5a6730f9ce36b4d09b121d401209d89288da301b (diff) |
HC Test: add test for vlan sub-interface ipv6 address
Change-Id: I93e0e4caf9b8ed1be824c7f75f348c30e567b75f
Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r-- | resources/libraries/robot/honeycomb/interfaces.robot | 8 | ||||
-rw-r--r-- | resources/libraries/robot/honeycomb/sub_interface.robot | 132 |
2 files changed, 129 insertions, 11 deletions
diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot index cb4f6187e9..a08ce3fceb 100644 --- a/resources/libraries/robot/honeycomb/interfaces.robot +++ b/resources/libraries/robot/honeycomb/interfaces.robot @@ -366,7 +366,7 @@ | | ... | Honeycomb adds interface ipv6 address | | ... | ${node} | ${interface} | ${address} | ${prefix} -| IPv6 address from Honeycomb should be +| IPv6 address from Honeycomb should contain | | [Documentation] | Retrieves interface ipv6 address through Honeycomb\ | | ... | and compares with state supplied in argument. | | ... @@ -378,7 +378,7 @@ | | ... | | ... | *Example:* | | ... -| | ... | \| IPv6 address from Honeycomb should be \| ${nodes['DUT1']} \ +| | ... | \| IPv6 address from Honeycomb should contain \| ${nodes['DUT1']} \ | | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \| | | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} | | ${api_data}= | interfaceAPI.Get interface oper data | ${node} | ${interface} @@ -386,7 +386,7 @@ | | ... | ip=${address} | prefix-length=${prefix} | | Should contain | ${api_data['ietf-ip:ipv6']['address']} | ${settings} -| IPv6 address from VAT should be +| IPv6 address from VAT should contain | | [Documentation] | Retrieves interface ipv6 address through VAT and\ | | ... | compares with state supplied in argument. | | ... @@ -398,7 +398,7 @@ | | ... | | ... | *Example:* | | ... -| | ... | \| IPv6 address from VAT should be \| ${nodes['DUT1']} \ +| | ... | \| IPv6 address from VAT should contain \| ${nodes['DUT1']} \ | | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \| | | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} | | ${vpp_data}= | interfaceCLI.VPP get interface ip addresses diff --git a/resources/libraries/robot/honeycomb/sub_interface.robot b/resources/libraries/robot/honeycomb/sub_interface.robot index 4a9f5c403b..5a42b56d11 100644 --- a/resources/libraries/robot/honeycomb/sub_interface.robot +++ b/resources/libraries/robot/honeycomb/sub_interface.robot @@ -466,8 +466,8 @@ | | ... | \| 192.168.0.2 \| ${24} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} -| | Add ipv4 address to sub_interface -| | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} +| | Add ip address to sub_interface +| | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv4 | Sub-interface ipv4 address from Honeycomb should be | | [Documentation] | Uses Honeycomb API to verify ipv4 address configuration\ @@ -509,10 +509,9 @@ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| | | ... | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix} -| | ${data}= | VPP get interface ip addresses +| | ${data}= | interfaceCLI.VPP get interface ip addresses | | ... | ${node} | ${sub_interface} | ipv4 | | Should be equal | ${data[0]['ip']} | ${address} -#TODO: update based on resolution of bug https://jira.fd.io/browse/VPP-132 | | Should be equal | ${data[0]['prefix_length']} | ${prefix} | Honeycomb removes all sub-interface ipv4 addresses @@ -529,8 +528,8 @@ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| | | ... | | [Arguments] | ${node} | ${super_if} | ${identifier} -| | Remove all ipv4 addresses from sub_interface -| | ... | ${node} | ${super_if} | ${identifier} +| | Remove all ip addresses from sub_interface +| | ... | ${node} | ${super_if} | ${identifier} | ipv4 | Sub-interface ipv4 address from Honeycomb should be empty | | [Documentation] | Uses Honeycomb API to verify that ipv4 address\ @@ -566,4 +565,123 @@ | | ... | | [Arguments] | ${node} | ${sub_interface} | | Run keyword and expect error | *No JSON object could be decoded* -| | ... | VPP get interface ip addresses | ${node} | ${sub_interface} | ipv4 +| | ... | interfaceCLI.VPP get interface ip addresses +| | ... | ${node} | ${sub_interface} | ipv4 + +| Honeycomb sets sub-interface ipv6 address +| | [Documentation] | Uses Honeycomb API to configure an ipv6 address on the\ +| | ... | spcified sub-interface. Replaces any existing ipv6 addresses. +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - super_if - Super-interface. Type: string +| | ... | - identifier - Sub-interface ID. Type: integer or string +| | ... | - address - IPv6 address to set. Type: string +| | ... | - prefix - IPv6 network prefix length to set. Type: integer +| | ... +| | ... | *Example:* +| | ... | \| | Honeycomb sets sub-interface ipv6 address\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ +| | ... | \| 10::10 \| ${64} \| +| | ... +| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} +| | Add ip address to sub_interface +| | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv6 + +| Sub-interface IPv6 address from Honeycomb should contain +| | [Documentation] | Uses Honeycomb API to verify ipv6 address configuration\ +| | ... | on the specified sub-interface. +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - super_if - Super-interface. Type: string +| | ... | - identifier - Sub-interface ID. Type: integer or string +| | ... | - address - IPv6 address to expect. Type: string +| | ... | - prefix - IPv6 network prefix length to expect. Type: integer +| | ... +| | ... | *Example:* +| | ... | \| sub-interface IPv6 address from Honeycomb should contain\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ +| | ... | \| 10::10 \| ${64} \| +| | ... +| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} +| | ${if_data}= | interfaceAPI.Get sub interface oper data +| | ... | ${node} | ${super_if} | ${identifier} +| | ${settings}= | Create Dictionary +| | ... | ip=${address} | prefix-length=${prefix} +| | Should contain | ${if_data['ipv6']['address']} | ${settings} + +| Sub-interface IPv6 address from VAT should contain +| | [Documentation] | Uses VAT to verify ipv6 address configuration\ +| | ... | on the specified sub-interface. +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - sub_interface - Name of an sub-interface on the specified node.\ +| | ... | Type: string +| | ... | - address - IPv6 address to expect. Type: string +| | ... | - prefix - IPv6 network prefix length to expect. Type: integer +| | ... +| | ... | *Example:* +| | ... | \| sub-interface IPv6 address from VAT should contain\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| +| | ... +| | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix} +| | ${data}= | interfaceCLI.VPP get interface ip addresses +| | ... | ${node} | ${sub_interface} | ipv6 +| | Should be equal | ${data[0]['ip']} | ${address} +| | Should be equal | ${data[0]['prefix_length']} | ${prefix} + +| Honeycomb removes all sub-interface ipv6 addresses +| | [Documentation] | Uses Honeycomb API to remove all configured ipv6\ +| | ... | addresses from the sub-interface. +| | ... +| | ... | *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 removes all sub-interface ipv6 addresses\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| +| | ... +| | [Arguments] | ${node} | ${super_if} | ${identifier} +| | Remove all ip addresses from sub_interface +| | ... | ${node} | ${super_if} | ${identifier} | ipv6 + +| Sub-interface ipv6 address from Honeycomb should be empty +| | [Documentation] | Uses Honeycomb API to verify that ipv6 address\ +| | ... | configuration on the specified sub-interface is empty. +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - super_if - Super-interface. Type: string +| | ... | - identifier - Sub-interface ID. Type: integer or string +| | ... +| | ... | *Example:* +| | ... | \| sub-interface ipv6 address from Honeycomb should be empty\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| +| | ... +| | [Arguments] | ${node} | ${super_if} | ${identifier} +| | ${if_data}= | interfaceAPI.Get sub interface oper data +| | ... | ${node} | ${super_if} | ${identifier} +| | Run keyword and expect error | *KeyError: 'ipv6'* +| | ... | Set Variable | ${if_data['ipv6']['address'][0]['ip']} + +| Sub-interface ipv6 address from VAT should be empty +| | [Documentation] | Uses VAT to verify that ipv6 address\ +| | ... | configuration on the specified sub-interface is empty. +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - sub_interface - Name of an sub-interface on the specified node.\ +| | ... | Type: string +| | ... +| | ... | *Example:* +| | ... | \| sub-interface ipv6 address from VAT should be empty\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| +| | ... +| | [Arguments] | ${node} | ${sub_interface} +| | Run keyword and expect error | *No JSON object could be decoded* +| | ... | interfaceCLI.VPP get interface ip addresses +| | ... | ${node} | ${sub_interface} | ipv6 |