Update Honeycomb tests
[csit.git] / tests / suites / honeycomb / 2 - vxlan.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 interfaces to run tests on.
16 | ${node}= | ${nodes['DUT1']}
17 | ${interface}= | ${node['interfaces']['port1']['name']}
18 | ${vx_interface}= | vx_tunnel_test
19 # Configuration which will be set and verified during tests.
20 | &{vxlan_settings}= | src=192.168.0.2 | dst=192.168.0.3 | vni=${88}
21 | ... | encap-vrf-id=${0}
22 | &{vxlan_settings2}= | src=192.168.0.4 | dst=192.168.0.5 | vni=${47}
23 | ... | encap-vrf-id=${0}
24 | &{vxlan_settings_ipv6}= | src=10::10 | dst=10::11 | vni=${88}
25 | ... | encap-vrf-id=${0}
26 | &{vxlan_settings_ipv6_long}= | src=10:0:0:0:0:0:0:10 | dst=10:0:0:0:0:0:0:11
27 | ... | vni=${88} | encap-vrf-id=${0}
28
29 *** Settings ***
30 | Resource | resources/libraries/robot/default.robot
31 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
32 | Resource | resources/libraries/robot/honeycomb/vxlan.robot
33 # import additional VxLAN settings from resource file
34 | Variables | tests/suites/honeycomb/resources/vxlan.py
35 | Force Tags | honeycomb_sanity
36 | Documentation | *Honeycomb VxLAN management test suite.*
37 | ...
38 | ... | Test suite uses the first interface of the first DUT node.
39
40 *** Test Cases ***
41 | Honeycomb configures VxLAN tunnel
42 | | [Documentation] | Check if Honeycomb API can configure VxLAN settings.
43 | | Given VxLAN configuration from Honeycomb should be empty
44 | | ... | ${node} | ${vx_interface}
45 | | And VxLAN configuration from VAT should be empty | ${node}
46 | | When Honeycomb sets interface VxLAN configuration
47 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
48 | | Then VxLAN configuration from Honeycomb should be
49 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
50 | | And VxLAN configuration from VAT should be
51 | | ... | ${node} | ${vxlan_settings}
52
53 | Honeycomb disables VxLAN tunnel
54 | | [Documentation] | Check if Honeycomb API can reset VxLAN configuration.
55 | | Given VxLAN configuration from Honeycomb should be
56 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
57 | | And VxLAN configuration from VAT should be
58 | | ... | ${node} | ${vxlan_settings}
59 | | When Honeycomb removes VxLAN tunnel settings | ${node} | ${vx_interface}
60 | | Then VxLAN configuration from Honeycomb should be empty
61 | | ... | ${node} | ${vx_interface}
62 | | And VxLAN configuration from VAT should be empty | ${node}
63
64 Honeycomb can configure VXLAN tunnel after one has been disabled
65 | | [Documentation] | Check if Honeycomb API can configure VxLAN settings again\
66 | | ... | after previous settings have been removed.
67 | | [Teardown] | Honeycomb removes VxLAN tunnel settings
68 | | ... | ${node} | ${vx_interface}
69 | | Given VxLAN configuration from Honeycomb should be empty
70 | | ... | ${node} | ${vx_interface}
71 | | And VxLAN configuration from VAT should be empty | ${node}
72 | | When Honeycomb sets interface VxLAN configuration
73 | | ... | ${node} | ${vx_interface} | ${vxlan_settings2}
74 | | Then VxLAN configuration from Honeycomb should be
75 | | ... | ${node} | ${vx_interface} | ${vxlan_settings2}
76 | | And VxLAN configuration from VAT should be
77 | | ... | ${node} | ${vxlan_settings2}
78
79 | Honeycomb does not set VxLAN configuration on another interface type
80 | | [Documentation] | Check if Honeycomb API prevents setting VxLAN\
81 | | ... | on incorrect interface.
82 | | Given VxLAN configuration from Honeycomb should be empty
83 | | ... | ${node} | ${interface}
84 | | And VxLAN configuration from VAT should be empty | ${node}
85 | | When Honeycomb fails setting VxLan on different interface type
86 | | ... | ${node} | ${interface} | ${vxlan_settings2}
87 | | Then VxLAN configuration from Honeycomb should be empty
88 | | ... | ${node} | ${interface}
89 | | And VxLAN configuration from VAT should be empty
90 | | ... | ${node}
91
92 | Honeycomb does not set invalid VxLAN configuration
93 | | [Documentation] | Check if Honeycomb API prevents setting incorrect VxLAN\
94 | | ... | settings.
95 | | Given VxLAN configuration from Honeycomb should be empty
96 | | ... | ${node} | ${vx_interface}
97 | | And VxLAN configuration from VAT should be empty | ${node}
98 | | When Honeycomb fails setting invalid VxLAN configuration
99 | | ... | ${node} | ${vx_interface} | ${vxlan_invalid}
100 | | Then VxLAN configuration from Honeycomb should be empty
101 | | ... | ${node} | ${vx_interface}
102
103 | Honeycomb configures VxLAN tunnel with ipv6
104 | | [Documentation] | Check if Honeycomb API can configure VxLAN with\
105 | | ... | ipv6 settings.
106 | | [Teardown] | Honeycomb removes VxLAN tunnel settings
107 | | ... | ${node} | ${vx_interface}
108 | | Given VxLAN configuration from Honeycomb should be empty
109 | | ... | ${node} | ${vx_interface}
110 | | And VxLAN configuration from VAT should be empty | ${node}
111 | | When Honeycomb sets interface VxLAN configuration
112 | | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6}
113 | | Then VxLAN configuration from Honeycomb should be
114 | | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6_long}
115 | | And VxLAN configuration from VAT should be
116 | | ... | ${node} | ${vxlan_settings_ipv6}