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