Update Honeycomb tests
[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}= | 192.168.0.2
20 | ${ipv4_address2}= | 192.168.0.3
21 | ${ipv4_mask}= | 255.255.255.0
22 | ${ipv4_prefix}= | ${24}
23 | @{ipv4_neighbor}= | 192.168.0.4 | 08:00:27:c0:5d:37
24 | &{ipv4_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000}
25 | @{ipv6_address}= | 10::10 | ${64}
26 | @{ipv6_neighbor}= | 10::11 | 08:00:27:c0:5d:37
27 | &{ipv6_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000}
28 | ... | dup-addr-detect-transmits=${5}
29 | &{ethernet}= | mtu=${9000}
30 | &{routing}= | vrf-id=${27}
31 | &{vxlan_settings}= | src=10.0.1.20 | dst=10.0.3.20 | vni=${1000}
32 | ... | encap-vrf-id=${1000}
33
34 *** Settings ***
35 | Resource | resources/libraries/robot/default.robot
36 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
37 | Force Tags | honeycomb_sanity
38 | Documentation | *Honeycomb interface management test suite.*
39 | ...
40 | ... | Test suite uses the first interface of the first DUT node.
41
42 *** Test Cases ***
43 | Honeycomb configures and reads interface state
44 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
45 | | ... | VPP interfaces.
46 | | Given Interface state is | ${node} | ${interface} | down
47 | | When Honeycomb sets interface state | ${node} | ${interface} | up
48 | | Then Interface state from Honeycomb should be
49 | | ... | ${node} | ${interface} | up
50 | | And Interface state from VAT should be | ${node} | ${interface} | up
51 | | When Honeycomb sets interface state | ${node} | ${interface} | down
52 | | Then Interface state from Honeycomb should be
53 | | ... | ${node} | ${interface} | down
54 | | And Interface state from VAT should be | ${node} | ${interface} | down
55
56 | Honeycomb modifies interface configuration - ipv4 (netmask)
57 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
58 | | ... | with address and netmask provided.
59 | | When Honeycomb sets interface ipv4 address | ${node} | ${interface}
60 | | ... | ${ipv4_address} | ${ipv4_mask} | ${ipv4_settings}
61 | | And Honeycomb adds interface ipv4 neighbor
62 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
63 | | Then IPv4 config from Honeycomb should be
64 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
65 | | ... | @{ipv4_neighbor} | ${ipv4_settings}
66 | | And IPv4 config from VAT should be
67 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
68
69 | Honeycomb removes ipv4 address from interface
70 | | [Documentation] | Check if Honeycomb API can remove configured ipv4\
71 | | ... | addresses from interface.
72 | | Given IPv4 config from Honeycomb should be
73 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
74 | | ... | @{ipv4_neighbor} | ${ipv4_settings}
75 | | And IPv4 config from VAT should be
76 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
77 | | When Honeycomb removes interface ipv4 addresses | ${node} | ${interface}
78 | | Then IPv4 address from Honeycomb should be empty | ${node} |${interface}
79 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
80
81 | Honeycomb modifies interface configuration - ipv4 (prefix)
82 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
83 | | ... | with address and prefix provided.
84 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
85 | | ... | ${interface}
86 | | When Honeycomb sets interface ipv4 address with prefix
87 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
88 | | ... | ${ipv4_settings}
89 | | And Honeycomb adds interface ipv4 neighbor
90 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
91 | | Then IPv4 config from Honeycomb should be
92 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
93 | | ... | @{ipv4_neighbor}
94 | | ... | ${ipv4_settings}
95 | | And IPv4 config from VAT should be
96 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
97
98 | Honeycomb modifies interface configuration - ipv6
99 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
100 | | When Honeycomb sets interface ipv6 configuration
101 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
102 | | ... | ${ipv6_settings}
103 | | Then IPv6 config from Honeycomb should be
104 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
105 | | ... | ${ipv6_settings}
106 | | And IPv6 config from VAT should be
107 | | ... | ${node} | ${interface} | @{ipv6_address}
108
109 | Honeycomb modifies interface configuration - ethernet,routing
110 | | [Documentation] | Check if Honeycomb API can configure interface ethernet\
111 | | ... | and routing settings.
112 | | When Honeycomb sets interface ethernet and routing configuration
113 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
114 | | Then Interface ethernet and routing configuration from Honeycomb should be
115 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
116 | | And Interface ethernet and routing configuration from VAT should be
117 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}