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