HC Tests: move honeycomb tests out of vpp directory
[csit.git] / tests / honeycomb / func / mgmt-cfg-l2bd-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 | @{interfaces}= | ${node['interfaces']['port1']['name']}
17 | ... | ${node['interfaces']['port3']['name']}
18 # Configuration which will be set and verified during tests.
19 | ${bd1_name}= | bd-01
20 | ${bd2_name}= | bd-02
21 | &{bd_settings}= | flood=${True} | forward=${True} | learn=${True}
22 | ... | unknown-unicast-flood=${True} | arp-termination=${True}
23 | &{if_settings}= | split_horizon_group=${1} | bvi=${False}
24 | &{if_settings2}= | split_horizon_group=${2} | bvi=${True}
25
26 *** Settings ***
27 | Resource | resources/libraries/robot/shared/default.robot
28 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
29 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
30 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
31 | ...
32 | Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
33 | ...
34 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
35 | ...
36 | Force Tags | HC_FUNC
37 | ...
38 | Documentation | *Honeycomb bridge domain management test suite.*
39
40 *** Test Cases ***
41 | TC01: Honeycomb sets up l2 bridge domain
42 | | [Documentation] | Check if Honeycomb can create bridge domains on VPP node.
43 | | ...
44 | | When Honeycomb creates first l2 bridge domain
45 | | ... | ${node} | ${bd1_name} | ${bd_settings}
46 | | Then Bridge domain Operational Data From Honeycomb Should Be
47 | | ... | ${node} | ${bd1_name} | ${bd_settings}
48 | | And Bridge domain Operational Data From VAT Should Be
49 | | ... | ${node} | ${0} | ${bd_settings}
50
51 | TC02: Honeycomb manages multiple bridge domains on node
52 | | [Documentation] | Check if Honeycomb can manage multiple bridge domains on\
53 | | ... | a single node.
54 | | ...
55 | | Given Bridge domain Operational Data From Honeycomb Should Be
56 | | ... | ${node} | ${bd1_name} | ${bd_settings}
57 | | When Honeycomb creates l2 bridge domain
58 | | ... | ${node} | ${bd2_name} | ${bd_settings}
59 | | Then Bridge domain Operational Data From Honeycomb Should Be
60 | | ... | ${node} | ${bd1_name} | ${bd_settings}
61 | | And Bridge domain Operational Data From Honeycomb Should Be
62 | | ... | ${node} | ${bd2_name} | ${bd_settings}
63 | | And Bridge domain Operational Data From VAT Should Be
64 | | ... | ${node} | ${0} | ${bd_settings}
65 | | And Bridge domain Operational Data From VAT Should Be
66 | | ... | ${node} | ${1} | ${bd_settings}
67
68 | TC03: Honeycomb removes bridge domains
69 | | [Documentation] | Check if Honeycomb can remove bridge domains from a VPP\
70 | | ... | node.
71 | | ...
72 | | Given Bridge domain Operational Data From Honeycomb Should Be
73 | | ... | ${node} | ${bd1_name} | ${bd_settings}
74 | | When Honeycomb removes all bridge domains | ${node}
75 | | Then Honeycomb should show no bridge domains | ${node}
76 | | And VAT should show no bridge domains | ${node}
77
78 | TC04: Honeycomb assigns interfaces to bridge domain
79 | | [Documentation] | Check if Honeycomb can assign VPP interfaces to an\
80 | | ... | existing bridge domain.
81 | | ...
82 | | Given Honeycomb creates first l2 bridge domain
83 | | ... | ${node} | ${bd1_name} | ${bd_settings}
84 | | When Honeycomb adds interfaces to bridge domain
85 | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings}
86 | | Then Bridge domain Operational Data From Honeycomb Should Be
87 | | ... | ${node} | ${bd1_name} | ${bd_settings}
88 | | And Bridge domain Operational Data From VAT Should Be
89 | | ... | ${node} | ${0} | ${bd_settings}
90 | | And Honeycomb should show interfaces assigned to bridge domain
91 | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings}
92 | | And VAT should show interfaces assigned to bridge domain
93 | | ... | ${node} | ${0} | @{interfaces} | ${if_settings}
94
95 | TC05: Honeycomb cannot remove bridge domain with an interface assigned
96 | | [Documentation] | Check if Honeycomb can remove a bridge domain that has an\
97 | | ... | interface assigned to it. Expect to fail with code 500.
98 | | ...
99 | | Given Bridge domain Operational Data From Honeycomb Should Be
100 | | ... | ${node} | ${bd1_name} | ${bd_settings}
101 | | And Bridge domain Operational Data From VAT Should Be
102 | | ... | ${node} | ${0} | ${bd_settings}
103 | | And Honeycomb should show interfaces assigned to bridge domain
104 | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings}
105 | | And VAT should show interfaces assigned to bridge domain
106 | | ... | ${node} | ${0} | @{interfaces} | ${if_settings}
107 | | When Run keyword and expect error | HoneycombError* Status code: 500.
108 | | ... | Honeycomb removes all bridge domains | ${node}
109 | | Then Bridge domain Operational Data From Honeycomb Should Be
110 | | ... | ${node} | ${bd1_name} | ${bd_settings}
111 | | And Bridge domain Operational Data From VAT Should Be
112 | | ... | ${node} | ${0} | ${bd_settings}
113 | | And Honeycomb should show interfaces assigned to bridge domain
114 | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings}
115 | | And VAT should show interfaces assigned to bridge domain
116 | | ... | ${node} | ${0} | @{interfaces} | ${if_settings}