CSIT-405: Honeycomb test update and cleanup
[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}= | enabled=${True} | forwarding=${True} | 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 # TODO: Remove "continue on failure" once VPP bugs (VPP-132, VPP-333) are fixed.
46 | Honeycomb configures and reads interface state
47 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
48 | | ... | VPP interfaces.
49 | | Given Interface State Is | ${node} | ${interface} | down
50 | | When Honeycomb sets interface state | ${node} | ${interface} | up
51 | | Then Interface state from Honeycomb should be
52 | | ... | ${node} | ${interface} | up
53 | | And Interface state from VAT should be | ${node} | ${interface} | up
54 | | When Honeycomb sets interface state | ${node} | ${interface} | down
55 | | Then Interface state from Honeycomb should be
56 | | ... | ${node} | ${interface} | down
57 | | And Interface state from VAT should be | ${node} | ${interface} | down
58
59 | Honeycomb modifies interface configuration - ipv4 (netmask)
60 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
61 | | ... | with address and netmask provided.
62 | | When Honeycomb sets interface ipv4 address | ${node} | ${interface}
63 | | ... | ${ipv4_address} | ${ipv4_mask} | ${ipv4_settings}
64 | | And Honeycomb adds interface ipv4 neighbor
65 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
66 | | Run Keyword And Continue On Failure
67 | | ... | Then IPv4 config from Honeycomb should be
68 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
69 | | ... | @{ipv4_neighbor} | ${ipv4_settings}
70 | | Run Keyword And Continue On Failure
71 | | ... | And IPv4 config from VAT should be
72 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
73
74 | Honeycomb removes ipv4 address from interface
75 | | [Documentation] | Check if Honeycomb API can remove configured ipv4\
76 | | ... | addresses from interface.
77 | | Run Keyword And Continue On Failure
78 | | ... | Given IPv4 config from Honeycomb should be
79 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
80 | | ... | @{ipv4_neighbor} | ${ipv4_settings}
81 | | Run Keyword And Continue On Failure
82 | | ... | And IPv4 config from VAT should be
83 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
84 | | When Honeycomb removes interface ipv4 addresses | ${node} | ${interface}
85 | | Then IPv4 address from Honeycomb should be empty | ${node} | ${interface}
86 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
87
88 | Honeycomb modifies interface configuration - ipv4 (prefix)
89 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
90 | | ... | with address and prefix provided.
91 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
92 | | ... | ${interface}
93 | | When Honeycomb sets interface ipv4 address with prefix
94 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
95 | | ... | ${ipv4_settings}
96 | | And Honeycomb adds interface ipv4 neighbor
97 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
98 | | Run Keyword And Continue On Failure
99 | | ... | Then IPv4 config from Honeycomb should be
100 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
101 | | ... | @{ipv4_neighbor}
102 | | ... | ${ipv4_settings}
103 | | Run Keyword And Continue On Failure
104 | | ... | And IPv4 config from VAT should be
105 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
106
107 | Honeycomb modifies interface configuration - ipv6
108 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
109 | | When Honeycomb sets interface ipv6 configuration
110 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
111 | | ... | ${ipv6_settings}
112 | | Run Keyword And Continue On Failure
113 | | ... | Then IPv6 config from Honeycomb should be
114 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
115 | | ... | ${ipv6_settings}
116 | | Run Keyword And Continue On Failure
117 | | ... | And IPv6 config 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 | | When Honeycomb sets interface ethernet and routing configuration
124 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
125 | | Then Interface ethernet and routing configuration from Honeycomb should be
126 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
127 | | And Interface ethernet and routing configuration from VAT should be
128 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}