7d0f5af66524b9ba9639ffb88582c3979c7973d3
[csit.git] / tests / func / honeycomb / mgmt-cfg-vxlan-apihc-apivat-func.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 | ...
36 | Force Tags | HC_FUNC
37 | ...
38 | Suite Teardown | Run Keyword If Any Tests Failed
39 | ... | Restart Honeycomb and VPP | ${node}
40 | ...
41 | Documentation | *Honeycomb VxLAN management test suite.*
42
43 *** Test Cases ***
44 | TC01: Honeycomb configures VxLAN tunnel
45 | | [Documentation] | Check if Honeycomb API can configure VxLAN settings.
46 | | ...
47 | | Given VxLAN Operational Data From Honeycomb Should Be empty
48 | | ... | ${node} | ${vx_interface}
49 | | And VxLAN Operational Data From VAT Should Be empty | ${node}
50 | | When Honeycomb sets interface VxLAN configuration
51 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
52 | | Then VxLAN Operational Data From Honeycomb Should Be
53 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
54 | | And VxLAN Operational Data From VAT Should Be
55 | | ... | ${node} | ${vxlan_settings}
56 | | ${vxlan_index}= | Get interface index from oper data
57 | | ... | ${node} | ${vx_interface}
58 | | Set Suite Variable | ${vxlan_index}
59
60 | TC02: Honeycomb disables VxLAN tunnel
61 | | [Documentation] | Check if Honeycomb API can reset VxLAN configuration.
62 | | ...
63 | | Given VxLAN Operational Data From Honeycomb Should Be
64 | | ... | ${node} | ${vx_interface} | ${vxlan_settings}
65 | | And Honeycomb should not show disabled interface in oper data
66 | | ... | ${node} | ${vxlan_index}
67 | | And VxLAN Operational Data From VAT Should Be
68 | | ... | ${node} | ${vxlan_settings}
69 | | When Honeycomb removes VxLAN tunnel settings | ${node} | ${vx_interface}
70 | | Then VxLAN Operational Data From Honeycomb Should Be empty
71 | | ... | ${node} | ${vx_interface}
72 | | And Honeycomb should show disabled interface in oper data
73 | | ... | ${node} | ${vxlan_index}
74 | | And VxLAN Operational Data From VAT Should Be empty | ${node}
75
76 | TC03: Honeycomb can configure VXLAN tunnel after one has been disabled
77 | | [Documentation] | Check if Honeycomb API can configure VxLAN settings again\
78 | | ... | after previous settings have been removed.
79 | | ...
80 | | [Teardown] | Honeycomb removes VxLAN tunnel settings
81 | | ... | ${node} | ${vx_interface}
82 | | ...
83 | | Given VxLAN Operational Data From Honeycomb Should Be empty
84 | | ... | ${node} | ${vx_interface}
85 | | And Honeycomb should show disabled interface in oper data
86 | | ... | ${node} | ${vxlan_index}
87 | | And VxLAN Operational Data From VAT Should Be empty | ${node}
88 | | When Honeycomb sets interface VxLAN configuration
89 | | ... | ${node} | ${vx_interface} | ${vxlan_settings2}
90 | | Then VxLAN Operational Data From Honeycomb Should Be
91 | | ... | ${node} | ${vx_interface} | ${vxlan_settings2}
92 | | And Honeycomb should not show disabled interface in oper data
93 | | ... | ${node} | ${vxlan_index}
94 | | And VxLAN Operational Data From VAT Should Be
95 | | ... | ${node} | ${vxlan_settings2}
96
97 | TC04: Honeycomb does not set VxLAN configuration on another interface type
98 | | [Documentation] | Check if Honeycomb API prevents setting VxLAN\
99 | | ... | on incorrect interface.
100 | | ...
101 | | Given VxLAN Operational Data From Honeycomb Should Be empty
102 | | ... | ${node} | ${interface}
103 | | And VxLAN Operational Data From VAT Should Be empty | ${node}
104 | | When Honeycomb fails setting VxLan on different interface type
105 | | ... | ${node} | ${interface} | ${vxlan_settings2}
106 | | Then VxLAN Operational Data From Honeycomb Should Be empty
107 | | ... | ${node} | ${interface}
108 | | And VxLAN Operational Data From VAT Should Be empty
109 | | ... | ${node}
110
111 | TC05: Honeycomb does not set invalid VxLAN configuration
112 | | [Documentation] | Check if Honeycomb API prevents setting incorrect VxLAN\
113 | | ... | settings.
114 | | ...
115 | | Given VxLAN Operational Data From Honeycomb Should Be empty
116 | | ... | ${node} | ${vx_interface}
117 | | And VxLAN Operational Data From VAT Should Be empty | ${node}
118 | | When Honeycomb fails setting invalid VxLAN configuration
119 | | ... | ${node} | ${vx_interface} | ${vxlan_invalid}
120 | | Then VxLAN Operational Data From Honeycomb Should Be empty
121 | | ... | ${node} | ${vx_interface}
122
123 | TC06: Honeycomb configures VxLAN tunnel with ipv6
124 | | [Documentation] | Check if Honeycomb API can configure VxLAN with\
125 | | ... | ipv6 settings.
126 | | ...
127 | | [Teardown] | Honeycomb removes VxLAN tunnel settings
128 | | ... | ${node} | ${vx_interface}
129 | | ...
130 | | Given VxLAN Operational Data From Honeycomb Should Be empty
131 | | ... | ${node} | ${vx_interface}
132 | | And VxLAN Operational Data From VAT Should Be empty | ${node}
133 | | When Honeycomb sets interface VxLAN configuration
134 | | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6}
135 | | Then VxLAN Operational Data From Honeycomb Should Be
136 | | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6_long}
137 | | And VxLAN Operational Data From VAT Should Be
138 | | ... | ${node} | ${vxlan_settings_ipv6}