Rename Honeycomb test suites
[csit.git] / tests / suites / 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 | Force Tags | honeycomb_sanity
37 | Documentation | *Honeycomb interface management test suite.*
38 | ...
39 | ... | Test suite uses the first interface of the first DUT node.
40
41 *** Test Cases ***
42 | Honeycomb configures and reads interface state
43 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
44 | | ... | VPP interfaces.
45 | | Given Interface state is | ${node} | ${interface} | down
46 | | When Honeycomb sets interface state | ${node} | ${interface} | up
47 | | Then Interface state from Honeycomb should be
48 | | ... | ${node} | ${interface} | up
49 | | And Interface state from VAT should be | ${node} | ${interface} | up
50 | | When Honeycomb sets interface state | ${node} | ${interface} | down
51 | | Then Interface state from Honeycomb should be
52 | | ... | ${node} | ${interface} | down
53 | | And Interface state from VAT should be | ${node} | ${interface} | down
54
55 | Honeycomb modifies interface configuration - ipv4 (netmask)
56 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
57 | | ... | with address and netmask provided.
58 | | When Honeycomb sets interface ipv4 address | ${node} | ${interface}
59 | | ... | ${ipv4_address} | ${ipv4_mask} | ${ipv4_settings}
60 | | And Honeycomb adds interface ipv4 neighbor
61 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
62 | | Then IPv4 config from Honeycomb should be
63 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
64 | | ... | @{ipv4_neighbor} | ${ipv4_settings}
65 | | And IPv4 config from VAT should be
66 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
67
68 | Honeycomb removes ipv4 address from interface
69 | | [Documentation] | Check if Honeycomb API can remove configured ipv4\
70 | | ... | addresses from interface.
71 | | Given IPv4 config from Honeycomb should be
72 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
73 | | ... | @{ipv4_neighbor} | ${ipv4_settings}
74 | | And IPv4 config from VAT should be
75 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
76 | | When Honeycomb removes interface ipv4 addresses | ${node} | ${interface}
77 | | Then IPv4 address from Honeycomb should be empty | ${node} |${interface}
78 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
79
80 | Honeycomb modifies interface configuration - ipv4 (prefix)
81 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
82 | | ... | with address and prefix provided.
83 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
84 | | ... | ${interface}
85 | | When Honeycomb sets interface ipv4 address with prefix
86 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
87 | | ... | ${ipv4_settings}
88 | | And Honeycomb adds interface ipv4 neighbor
89 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
90 | | Then IPv4 config from Honeycomb should be
91 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
92 | | ... | @{ipv4_neighbor}
93 | | ... | ${ipv4_settings}
94 | | And IPv4 config from VAT should be
95 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
96
97 | Honeycomb modifies interface configuration - ipv6
98 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
99 | | When Honeycomb sets interface ipv6 configuration
100 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
101 | | ... | ${ipv6_settings}
102 | | Then IPv6 config from Honeycomb should be
103 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
104 | | ... | ${ipv6_settings}
105 | | And IPv6 config from VAT should be
106 | | ... | ${node} | ${interface} | @{ipv6_address}
107
108 | Honeycomb modifies interface configuration - ethernet,routing
109 | | [Documentation] | Check if Honeycomb API can configure interface ethernet\
110 | | ... | and routing settings.
111 | | When Honeycomb sets interface ethernet and routing configuration
112 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
113 | | Then Interface ethernet and routing configuration from Honeycomb should be
114 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
115 | | And Interface ethernet and routing configuration from VAT should be
116 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}