Update Honeycomb interface IPv4 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'].values()[0]['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/honeycomb.robot
35 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
36 | Suite Setup | Run keywords | Setup all DUTs before test | AND
37 | ... | Setup Honeycomb service on DUTs | ${node}
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 | | [Tags] | honeycomb_sanity
47 | | Given Interface state is | ${node} | ${interface} | down
48 | | When Honeycomb sets interface state | ${node} | ${interface} | up
49 | | Then Interface state from Honeycomb should be
50 | | ... | ${node} | ${interface} | up
51 | | And Interface state from VAT should be | ${node} | ${interface} | up
52 | | When Honeycomb sets interface state | ${node} | ${interface} | down
53 | | Then Interface state from Honeycomb should be
54 | | ... | ${node} | ${interface} | down
55 | | And Interface state from VAT should be | ${node} | ${interface} | down
56
57 | Honeycomb modifies interface configuration - ipv4
58 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4.
59 | | [Tags] | honeycomb_sanity
60 | | When Honeycomb sets interface ipv4 configuration
61 | | ... | ${node} | ${interface} | @{ipv4_address_mask} | @{ipv4_neighbor}
62 | | ... | ${ipv4_settings}
63 | | Then IPv4 config from Honeycomb should be
64 | | ... | ${node} | ${interface} | @{ipv4_address_mask} | @{ipv4_neighbor}
65 | | ... | ${ipv4_settings}
66 | | And IPv4 config from VAT should be
67 | | ... | ${node} | ${interface} | @{ipv4_address_mask}
68 | | When Honeycomb sets interface ipv4 address with prefix
69 | | ... | ${node} | ${interface} | @{ipv4_address_prefix}
70 | | Then IPv4 config from Honeycomb should be
71 | | ... | ${node} | ${interface} | @{ipv4_address_prefix} | @{ipv4_neighbor}
72 | | ... | ${ipv4_settings}
73 | | And IPv4 config from VAT should be
74 | | ... | ${node} | ${interface} | @{ipv4_address_prefix}
75
76 | Honeycomb modifies interface configuration - ipv6
77 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
78 | | [Tags] | honeycomb_sanity
79 | | When Honeycomb sets interface ipv6 configuration
80 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
81 | | ... | ${ipv6_settings}
82 | | Then IPv6 config from Honeycomb should be
83 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
84 | | ... | ${ipv6_settings}
85 | | And IPv6 config from VAT should be
86 | | ... | ${node} | ${interface} | @{ipv6_address}
87
88 | Honeycomb modifies interface configuration - ethernet,routing
89 | | [Documentation] | Check if Honeycomb API can configure interface ethernet\
90 | | ... | and routing settings.
91 | | [Tags] | honeycomb_sanity
92 | | When Honeycomb sets interface ethernet and routing configuration
93 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
94 | | Then Interface ethernet and routing configuration from Honeycomb should be
95 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
96 | | And Interface ethernet and routing configuration from VAT should be
97 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}
98
99 | Honeycomb modifies interface configuration - VxLAN
100 | | [Documentation] | Check if Honeycomb API can configure interface VxLAN \
101 | | ... | settings.
102 | | [Tags] | honeycomb_sanity
103 | | When Honeycomb sets interface VxLAN configuration
104 | | ... | ${node} | ${interface} | &{vxlan_settings}
105 | | Then VxLAN configuration from Honeycomb should be
106 | | ... | ${node} | ${interface} | &{vxlan_settings}
107 | | And VxLAN configuration from VAT should be
108 | | ... | ${node} | ${interface} | &{vxlan_settings}