CSIT-457: Address Honeycomb test failures
[csit.git] / tests / func / honeycomb / 010_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 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 # Configuration which will be set and verified during tests.
18 | ${ipv4_address}= | 192.168.0.2
19 | ${ipv4_address2}= | 192.168.0.3
20 | ${ipv4_mask}= | 255.255.255.0
21 | ${ipv4_prefix}= | ${24}
22 | @{ipv4_neighbor}= | 192.168.0.4 | 08:00:27:c0:5d:37
23 | &{ipv4_settings}= | mtu=${9000}
24 | @{ipv6_address}= | 10::10 | ${64}
25 | @{ipv6_neighbor}= | 10::11 | 08:00:27:c0:5d:37
26 | &{ipv6_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000}
27 | ... | dup-addr-detect-transmits=${5}
28 | &{ethernet}= | mtu=${9000}
29 | &{routing}= | vrf-id=${27}
30 | &{vxlan_settings}= | src=10.0.1.20 | dst=10.0.3.20 | vni=${1000}
31 | ... | encap-vrf-id=${1000}
32
33 *** Settings ***
34 | Resource | resources/libraries/robot/default.robot
35 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
36 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
37 | Force Tags | honeycomb_sanity
38 | Suite Teardown | Run Keyword If Any Tests Failed
39 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
40 | Documentation | *Honeycomb interface management test suite.*
41 | ...
42 | ... | Test suite uses the first interface of the first DUT node.
43
44 *** Test Cases ***
45 | Honeycomb configures and reads interface state
46 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
47 | | ... | VPP interfaces.
48 | | Given Interface state from Honeycomb should be
49 | | ... | ${node} | ${interface} | down
50 | | And Interface state from VAT should be | ${node} | ${interface} | down
51 | | When Honeycomb sets interface state | ${node} | ${interface} | up
52 | | Then Interface state from Honeycomb should be
53 | | ... | ${node} | ${interface} | up
54 | | And Interface state from VAT should be | ${node} | ${interface} | up
55 | | When Honeycomb sets interface state | ${node} | ${interface} | down
56 | | Then Interface state from Honeycomb should be
57 | | ... | ${node} | ${interface} | down
58 | | And Interface state from VAT should be | ${node} | ${interface} | down
59
60 | Honeycomb modifies interface IPv4 address with netmask
61 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
62 | | ... | with address and netmask provided.
63 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
64 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
65 | | When Honeycomb sets interface ipv4 address | ${node} | ${interface}
66 | | ... | ${ipv4_address} | ${ipv4_mask}
67 | | Then IPv4 address from Honeycomb should be
68 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
69 | | And IPv4 address from VAT should be
70 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_mask}
71
72 | Honeycomb removes IPv4 address from interface
73 | | [Documentation] | Check if Honeycomb API can remove configured ipv4\
74 | | ... | addresses from interface.
75 | | Given IPv4 address from Honeycomb should be
76 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
77 | | And IPv4 address from VAT should be
78 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_mask}
79 | | When Honeycomb removes interface ipv4 addresses | ${node} | ${interface}
80 | | Then IPv4 address from Honeycomb should be empty | ${node} | ${interface}
81 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
82
83 | Honeycomb modifies interface IPv4 address with prefix
84 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
85 | | ... | with address and prefix provided.
86 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
87 | | ... | ${interface}
88 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
89 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
90 | | When Honeycomb sets interface ipv4 address with prefix
91 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
92 | | Then IPv4 address from Honeycomb should be
93 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
94 | | And IPv4 address from VAT should be
95 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_mask}
96
97 | Honeycomb modifies IPv4 neighbor table
98 | | [Documentation] | Check if Honeycomb API can add and remove ARP entries.
99 # Feature not implemented
100 | | [Tags] | EXPECTED_FAILING
101 | | [Teardown] | Honeycomb clears all interface ipv4 neighbors
102 | | ... | ${node} | ${interface}
103 | | When Honeycomb adds interface ipv4 neighbor
104 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
105 | | Then IPv4 neighbor from Honeycomb should be
106 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
107 # VAT dump not available
108
109 | Honeycomb modifies interface configuration - IPv6
110 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
111 # Feature not implemented
112 | | [Tags] | EXPECTED_FAILING
113 | | When Honeycomb sets interface ipv6 address
114 | | ... | ${node} | ${interface} | @{ipv6_address}
115 | | Then IPv6 address from Honeycomb should be
116 | | ... | ${node} | ${interface} | @{ipv6_address}
117 | | And IPv6 address from VAT should be
118 | | ... | ${node} | ${interface} | @{ipv6_address}
119
120 | Honeycomb modifies interface configuration - ethernet,routing
121 | | [Documentation] | Check if Honeycomb API can configure interface ethernet\
122 | | ... | and routing settings.
123 # Feature not implemented
124 | | [Tags] | EXPECTED_FAILING
125 | | When Honeycomb sets interface ethernet and routing configuration
126 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
127 | | Then Interface ethernet and routing configuration from Honeycomb should be
128 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
129 | | And Interface ethernet and routing configuration from VAT should be
130 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}