CSIT-664: Refactor setups and teardowns
[csit.git] / tests / func / honeycomb / mgmt-cfg-vxlangpe-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 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17
18 # Parameters to be set on existing interface
19 | ${vxlan_gpe_existing_if}= | ${interface}
20 | &{vxlan_gpe_base_wrong_interface_settings}=
21 | ... | name=${vxlan_gpe_existing_if}
22 | ... | type=iana-if-type:ethernetCsmacd
23 | ... | description=for testing purposes
24 | ... | enabled=true
25 | ... | link-up-down-trap-enable=enabled
26 | &{vxlan_gpe_wrong_interface_settings}=
27 | ... | local=192.168.50.77
28 | ... | remote=192.168.50.72
29 | ... | vni=${9}
30 | ... | next-protocol=wrong_ipv4
31 | ... | encap-vrf-id=${0}
32 | ... | decap-vrf-id=${0}
33
34 *** Settings ***
35 | Resource | resources/libraries/robot/default.robot
36 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
37 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
38 | Resource | resources/libraries/robot/honeycomb/vxlan_gpe.robot
39 # Import additional VxLAN GPE settings from resource file
40 | Variables | resources/test_data/honeycomb/vxlan_gpe.py
41 | ...
42 | Documentation | *Honeycomb VxLAN-GPE management test suite.*
43 | ...
44 #| Force Tags | HC_FUNC
45 | ...
46 | Suite Setup | Restart Honeycomb and VPP | ${node}
47
48 *** Test Cases ***
49 | TC01: Honeycomb creates VxLAN GPE tunnel
50 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel.
51 | | ...
52 | | Given interface Operational Data From Honeycomb Should Be empty
53 | | ... | ${node} | ${vxlan_gpe_if1}
54 | | And interface Operational Data From VAT Should Be empty
55 | | ... | ${node} | ${vxlan_gpe_if1}
56 | | When Honeycomb creates VxLAN GPE interface
57 | | ... | ${node} | ${vxlan_gpe_if1}
58 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
59 | | Then VxLAN GPE Operational Data From Honeycomb Should Be
60 | | ... | ${node} | ${vxlan_gpe_if1}
61 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
62 | | And VxLAN GPE Operational Data From VAT Should Be
63 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
64 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
65 | | ... | ${node} | ${vxlan_gpe_if1}
66
67 | TC02: Honeycomb removes VxLAN GPE tunnel
68 | | [Documentation] | Check if Honeycomb API can remove VxLAN GPE tunnel.
69 | | ...
70 | | Given VxLAN GPE Operational Data From Honeycomb Should Be
71 | | ... | ${node} | ${vxlan_gpe_if1}
72 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
73 | | VxLAN GPE Operational Data From VAT Should Be
74 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
75 | | When Honeycomb removes VxLAN GPE interface
76 | | ... | ${node} | ${vxlan_gpe_if1}
77 | | Then VxLAN GPE Operational Data From Honeycomb Should Be empty
78 | | ... | ${node} | ${vxlan_gpe_if1}
79 | | And VxLAN GPE Operational Data From VAT Should Be empty
80 | | ... | ${node}
81
82 | TC03: Honeycomb sets wrong interface type while creating VxLAN GPE tunnel
83 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
84 | | ... | with a wrong interface type set.
85 | | ...
86 | | Given interface Operational Data From Honeycomb Should Be empty
87 | | ... | ${node} | ${vxlan_gpe_if2}
88 | | And interface Operational Data From VAT Should Be empty
89 | | ... | ${node} | ${vxlan_gpe_if2}
90 | | When Honeycomb fails to create VxLAN GPE interface
91 | | ... | ${node} | ${vxlan_gpe_if2}
92 | | ... | ${vxlan_gpe_wrong_type_base_settings} | ${vxlan_gpe_settings}
93 | | Then interface Operational Data From Honeycomb Should Be empty
94 | | ... | ${node} | ${vxlan_gpe_if2}
95 | | And interface Operational Data From VAT Should Be empty
96 | | ... | ${node} | ${vxlan_gpe_if2}
97
98 | TC04: Honeycomb sets wrong protocol while creating VxLAN GPE tunnel
99 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
100 | | ... | with a wrong next-protocol set.
101 | | ...
102 | | Given interface Operational Data From Honeycomb Should Be empty
103 | | ... | ${node} | ${vxlan_gpe_if3}
104 | | And interface Operational Data From VAT Should Be empty
105 | | ... | ${node} | ${vxlan_gpe_if3}
106 | | When Honeycomb fails to create VxLAN GPE interface
107 | | ... | ${node} | ${vxlan_gpe_if3}
108 | | ... | ${vxlan_gpe_wrong_protocol_base_settings}
109 | | ... | ${vxlan_gpe_wrong_protocol_settings}
110 | | Then interface Operational Data From Honeycomb Should Be empty
111 | | ... | ${node} | ${vxlan_gpe_if3}
112 | | And interface Operational Data From VAT Should Be empty
113 | | ... | ${node} | ${vxlan_gpe_if3}
114
115 | TC05: Honeycomb sets VxLAN GPE tunnel on existing interface with wrong type
116 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
117 | | ... | on existing interface with wrong type.
118 | | ...
119 | | Given VxLAN GPE Operational Data From VAT Should Be empty
120 | | ... | ${node}
121 | | When Honeycomb fails to create VxLAN GPE interface
122 | | ... | ${node} | ${vxlan_gpe_existing_if}
123 | | ... | ${vxlan_gpe_base_wrong_interface_settings}
124 | | ... | ${vxlan_gpe_wrong_interface_settings}
125 | | Then VxLAN GPE Operational Data From VAT Should Be empty
126 | | ... | ${node}
127
128 | TC06: Honeycomb creates VxLAN GPE tunnel with ipv6
129 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel\
130 | | ... | with IPv6 addresses.
131 | | ...
132 | | Given VxLAN GPE Operational Data From VAT Should Be empty
133 | | ... | ${node}
134 | | And VxLAN GPE Operational Data From Honeycomb Should Be empty
135 | | ... | ${node} | ${vxlan_gpe_if5}
136 | | When Honeycomb creates VxLAN GPE interface
137 | | ... | ${node} | ${vxlan_gpe_if5}
138 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
139 | | Then VxLAN GPE Operational Data From Honeycomb Should Be
140 | | ... | ${node} | ${vxlan_gpe_if5}
141 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
142 | | And Run Keyword And Continue On Failure
143 | | ... | VxLAN GPE Operational Data From VAT Should Be
144 | | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings}
145 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
146 | | ... | ${node} | ${vxlan_gpe_if5}
147
148 | TC07: Honeycomb creates a second VxLAN GPE tunnel with ipv6
149 | | [Documentation] | Check if Honeycomb API can configure another VxLAN\
150 | | ... | GPE tunnel with IPv6 addresses.
151 | | ...
152 | | Given interface Operational Data From Honeycomb Should Be empty
153 | | ... | ${node} | ${vxlan_gpe_if6}
154 | | And interface Operational Data From VAT Should Be empty
155 | | ... | ${node} | ${vxlan_gpe_if6}
156 | | When Honeycomb creates VxLAN GPE interface
157 | | ... | ${node} | ${vxlan_gpe_if6}
158 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
159 | | Then VxLAN GPE Operational Data From Honeycomb Should Be
160 | | ... | ${node} | ${vxlan_gpe_if6}
161 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
162 | | And VxLAN GPE Operational Data From VAT Should Be
163 | | ... | ${node} | ${vxlan_gpe_if6} | ${vxlan_gpe_ipv6_settings2}
164 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
165 | | ... | ${node} | ${vxlan_gpe_if6}