CSIT-536 HC Test: support testing with ODL client
[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 | Documentation | *Honeycomb VxLAN-GPE management test suite.*
42 | Force Tags | honeycomb_sanity | honeycomb_odl
43 | Suite Setup
44 | ... | Restart Honeycomb and VPP | ${node}
45
46 *** Test Cases ***
47 | TC01: Honeycomb creates VxLAN GPE tunnel
48 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel.
49 | | ...
50 | | Given interface configuration from Honeycomb should be empty
51 | | ... | ${node} | ${vxlan_gpe_if1}
52 | | And interface configuration from VAT should be empty
53 | | ... | ${node} | ${vxlan_gpe_if1}
54 | | When Honeycomb creates VxLAN GPE interface
55 | | ... | ${node} | ${vxlan_gpe_if1}
56 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
57 | | Then VxLAN GPE configuration from Honeycomb should be
58 | | ... | ${node} | ${vxlan_gpe_if1}
59 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
60 | | And VxLAN GPE configuration from VAT should be
61 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
62 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
63 | | ... | ${node} | ${vxlan_gpe_if1}
64
65 | TC02: Honeycomb removes VxLAN GPE tunnel
66 | | [Documentation] | Check if Honeycomb API can remove VxLAN GPE tunnel.
67 | | ...
68 | | Given VxLAN GPE configuration from Honeycomb should be
69 | | ... | ${node} | ${vxlan_gpe_if1}
70 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
71 | | VxLAN GPE configuration from VAT should be
72 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
73 | | When Honeycomb removes VxLAN GPE interface
74 | | ... | ${node} | ${vxlan_gpe_if1}
75 | | Then VxLAN GPE configuration from Honeycomb should be empty
76 | | ... | ${node} | ${vxlan_gpe_if1}
77 | | And VxLAN GPE configuration from VAT should be empty
78 | | ... | ${node}
79
80 | TC03: Honeycomb sets wrong interface type while creating VxLAN GPE tunnel
81 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
82 | | ... | with a wrong interface type set.
83 | | ...
84 | | Given interface configuration from Honeycomb should be empty
85 | | ... | ${node} | ${vxlan_gpe_if2}
86 | | And interface configuration from VAT should be empty
87 | | ... | ${node} | ${vxlan_gpe_if2}
88 | | When Honeycomb fails to create VxLAN GPE interface
89 | | ... | ${node} | ${vxlan_gpe_if2}
90 | | ... | ${vxlan_gpe_wrong_type_base_settings} | ${vxlan_gpe_settings}
91 | | Then interface configuration from Honeycomb should be empty
92 | | ... | ${node} | ${vxlan_gpe_if2}
93 | | And interface configuration from VAT should be empty
94 | | ... | ${node} | ${vxlan_gpe_if2}
95
96 | TC04: Honeycomb sets wrong protocol while creating VxLAN GPE tunnel
97 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
98 | | ... | with a wrong next-protocol set.
99 | | ...
100 | | Given interface configuration from Honeycomb should be empty
101 | | ... | ${node} | ${vxlan_gpe_if3}
102 | | And interface configuration from VAT should be empty
103 | | ... | ${node} | ${vxlan_gpe_if3}
104 | | When Honeycomb fails to create VxLAN GPE interface
105 | | ... | ${node} | ${vxlan_gpe_if3}
106 | | ... | ${vxlan_gpe_wrong_protocol_base_settings}
107 | | ... | ${vxlan_gpe_wrong_protocol_settings}
108 | | Then interface configuration from Honeycomb should be empty
109 | | ... | ${node} | ${vxlan_gpe_if3}
110 | | And interface configuration from VAT should be empty
111 | | ... | ${node} | ${vxlan_gpe_if3}
112
113 | TC05: Honeycomb sets VxLAN GPE tunnel on existing interface with wrong type
114 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
115 | | ... | on existing interface with wrong type.
116 | | ...
117 | | Given VxLAN GPE configuration from VAT should be empty
118 | | ... | ${node}
119 | | When Honeycomb fails to create VxLAN GPE interface
120 | | ... | ${node} | ${vxlan_gpe_existing_if}
121 | | ... | ${vxlan_gpe_base_wrong_interface_settings}
122 | | ... | ${vxlan_gpe_wrong_interface_settings}
123 | | Then VxLAN GPE configuration from VAT should be empty
124 | | ... | ${node}
125
126 | TC06: Honeycomb creates VxLAN GPE tunnel with ipv6
127 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel\
128 | | ... | with IPv6 addresses.
129 | | ...
130 | | Given VxLAN GPE configuration from VAT should be empty
131 | | ... | ${node}
132 | | And VxLAN GPE configuration from Honeycomb should be empty
133 | | ... | ${node} | ${vxlan_gpe_if5}
134 | | When Honeycomb creates VxLAN GPE interface
135 | | ... | ${node} | ${vxlan_gpe_if5}
136 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
137 | | Then VxLAN GPE configuration from Honeycomb should be
138 | | ... | ${node} | ${vxlan_gpe_if5}
139 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
140 | | And Run Keyword And Continue On Failure
141 | | ... | VxLAN GPE configuration from VAT should be
142 | | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings}
143 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
144 | | ... | ${node} | ${vxlan_gpe_if5}
145
146 | TC07: Honeycomb creates a second VxLAN GPE tunnel with ipv6
147 | | [Documentation] | Check if Honeycomb API can configure another VxLAN\
148 | | ... | GPE tunnel with IPv6 addresses.
149 | | ...
150 | | Given interface configuration from Honeycomb should be empty
151 | | ... | ${node} | ${vxlan_gpe_if6}
152 | | And interface configuration from VAT should be empty
153 | | ... | ${node} | ${vxlan_gpe_if6}
154 | | When Honeycomb creates VxLAN GPE interface
155 | | ... | ${node} | ${vxlan_gpe_if6}
156 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
157 | | Then VxLAN GPE configuration from Honeycomb should be
158 | | ... | ${node} | ${vxlan_gpe_if6}
159 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
160 | | And VxLAN GPE configuration from VAT should be
161 | | ... | ${node} | ${vxlan_gpe_if6} | ${vxlan_gpe_ipv6_settings2}
162 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
163 | | ... | ${node} | ${vxlan_gpe_if6}