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