Add Honeycomb TAP interface test
[csit.git] / tests / suites / honeycomb / 1 - interface_management.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Variables ***
15 # Node and interface to run tests on.
16 | ${node}= | ${nodes['DUT1']}
17 | ${interface}= | ${node['interfaces']['port1']['name']}
18 # Configuration which will be set and verified during tests.
19 | @{ipv4_address_mask}= | 192.168.0.2 | 255.255.255.0
20 | @{ipv4_address_prefix}= | 192.168.0.3 | ${16}
21 | @{ipv4_neighbor}= | 192.168.0.4 | 08:00:27:c0:5d:37
22 | &{ipv4_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000}
23 | @{ipv6_address}= | 10::10 | ${64}
24 | @{ipv6_neighbor}= | 10::11 | 08:00:27:c0:5d:37
25 | &{ipv6_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000}
26 | ... | dup-addr-detect-transmits=${5}
27 | &{ethernet}= | mtu=${9000}
28 | &{routing}= | vrf-id=${27}
29 | &{vxlan_settings}= | src=10.0.1.20 | dst=10.0.3.20 | vni=${1000}
30 | ... | encap-vrf-id=${1000}
31
32 *** Settings ***
33 | Resource | resources/libraries/robot/default.robot
34 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
35 | Documentation | *Honeycomb interface management test suite.*
36 | ...
37 | ... | Test suite uses the first interface of the first DUT node.
38
39 *** Test Cases ***
40 | Honeycomb configures and reads interface state
41 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
42 | | ... | VPP interfaces.
43 | | [Tags] | honeycomb_sanity
44 | | Given Interface state is | ${node} | ${interface} | down
45 | | When Honeycomb sets interface state | ${node} | ${interface} | up
46 | | Then Interface state from Honeycomb should be
47 | | ... | ${node} | ${interface} | up
48 | | And Interface state from VAT should be | ${node} | ${interface} | up
49 | | When Honeycomb sets interface state | ${node} | ${interface} | down
50 | | Then Interface state from Honeycomb should be
51 | | ... | ${node} | ${interface} | down
52 | | And Interface state from VAT should be | ${node} | ${interface} | down
53
54 | Honeycomb modifies interface configuration - ipv4
55 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4.
56 | | [Tags] | honeycomb_sanity
57 | | When Honeycomb sets interface ipv4 configuration
58 | | ... | ${node} | ${interface} | @{ipv4_address_mask} | @{ipv4_neighbor}
59 | | ... | ${ipv4_settings}
60 | | Then IPv4 config from Honeycomb should be
61 | | ... | ${node} | ${interface} | @{ipv4_address_mask} | @{ipv4_neighbor}
62 | | ... | ${ipv4_settings}
63 | | And IPv4 config from VAT should be
64 | | ... | ${node} | ${interface} | @{ipv4_address_mask}
65 | | When Honeycomb sets interface ipv4 address with prefix
66 | | ... | ${node} | ${interface} | @{ipv4_address_prefix}
67 | | Then IPv4 config from Honeycomb should be
68 | | ... | ${node} | ${interface} | @{ipv4_address_prefix} | @{ipv4_neighbor}
69 | | ... | ${ipv4_settings}
70 | | And IPv4 config from VAT should be
71 | | ... | ${node} | ${interface} | @{ipv4_address_prefix}
72
73 | Honeycomb modifies interface configuration - ipv6
74 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
75 | | [Tags] | honeycomb_sanity
76 | | When Honeycomb sets interface ipv6 configuration
77 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
78 | | ... | ${ipv6_settings}
79 | | Then IPv6 config from Honeycomb should be
80 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
81 | | ... | ${ipv6_settings}
82 | | And IPv6 config from VAT should be
83 | | ... | ${node} | ${interface} | @{ipv6_address}
84
85 | Honeycomb modifies interface configuration - ethernet,routing
86 | | [Documentation] | Check if Honeycomb API can configure interface ethernet\
87 | | ... | and routing settings.
88 | | [Tags] | honeycomb_sanity
89 | | When Honeycomb sets interface ethernet and routing configuration
90 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
91 | | Then Interface ethernet and routing configuration from Honeycomb should be
92 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
93 | | And Interface ethernet and routing configuration from VAT should be
94 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}