aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vpp/func/honeycomb/mgmt-cfg-bgp-apihc-apivat-func.robot
blob: da662dbc69437b118a78f6b936e2978b0e47befd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Copyright (c) 2017 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

*** Variables ***
# Interface to run tests on.
| ${interface}= | ${node['interfaces']['port1']['name']}

*** Settings ***
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/honeycomb/honeycomb.robot
| Resource | resources/libraries/robot/honeycomb/interfaces.robot
| Resource | resources/libraries/robot/honeycomb/bgp.robot
| Resource | resources/libraries/robot/honeycomb/routing.robot
| Variables | resources/test_data/honeycomb/bgp.py
| ...
| Suite Setup | Run Keywords
| ... | Enable Honeycomb Feature | ${node} | BGP | AND
| ... | Set Up Honeycomb Functional Test Suite | ${node}
| ...
| Suite Teardown | Run Keywords
| ... | Tear Down Honeycomb Functional Test Suite | ${node} | AND
| ... | Disable Honeycomb Feature | ${node} | BGP
| ...
| Force Tags | HC_FUNC
| ...
| Documentation | *Honeycomb BGP management test suite.*

*** Test Cases ***
| TC01: Honeycomb configures BGP peer - Internal
| | [Documentation] | Check if Honeycomb can configure an internal BGP peer.
| | ...
| | When Honeycomb adds BGP peer
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | Then BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${peer_internal}

| TC03: Honeycomb removes peer configuration
| | [Documentation] | Check if Honeycomb can remove a configured BGP peer.
| | ...
| | Given BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | When Honeycomb removes BGP peer | ${node} | ${address_internal}
| | Then No BGP peers should be configured | ${node}

| TC02: Honeycomb updates existing BGP peer - Internal
| | [Documentation] | Check if Honeycomb can update an existing BGP peer.
| | ...
| | [Teardown] | Honeycomb removes BGP peer | ${node} | ${address_internal}
| | ...
| | Given No BGP peers should be configured | ${node}
| | When Honeycomb adds BGP peer
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | And Honeycomb adds BGP peer
| | ... | ${node} | ${address_internal} | ${peer_internal_update}
| | Then BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${peer_internal_update}

| TC04: Honeycomb configures BGP peer - Application
| | [Documentation] | Check if Honeycomb can configure an application BGP peer.
| | ...
| | [Teardown] | Honeycomb removes BGP peer | ${node} | ${address_application}
| | ...
| | Given No BGP peers should be configured | ${node}
| | When Honeycomb adds BGP peer
| | ... | ${node} | ${address_application} | ${peer_application}
| | Then BGP peer from Honeycomb should be
| | ... | ${node} | ${address_application} | ${peer_application}

| TC05: Honeycomb configures a second BGP peer
| | [Documentation] | Check if Honeycomb can configure more than one BGP peer.
| | ...
| | [Teardown] | Run Keywords
| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal} | AND
| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal2}
| | ...
| | Given No BGP peers should be configured | ${node}
| | When Honeycomb adds BGP peer
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | And Honeycomb adds BGP peer
| | ... | ${node} | ${address_internal2} | ${peer_internal2}
| | Then BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | And BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal2} | ${peer_internal2}

| TC06: Honeycomb configures IPv4 route using BGP
| | [Documentation] | Check if Honeycomb can configure a BGP route under a peer.
| | ...
| | Given Honeycomb adds BGP peer
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | When Honeycomb configures BGP route
| | ... | ${node} | ${address_internal} | ${route_data_ipv4}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | Then BGP Route from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${route_data_ipv4}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4

| TC08: Honeycomb removes IPv4 route configuration
| | [Documentation] | Check if Honeycomb can remove a configured BGP route.
| | ...
| | Given BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | And BGP Route from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${route_data_ipv4}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | When Honeycomb removes BGP route | ${node} | ${address_internal}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | Then No BGP Routes Should be Configured
| | ... | ${node} | ${address_internal} | ipv4

| TC07: Honeycomb updates existing IPv4 route using BGP
| | [Documentation] | Check if Honeycomb can update an existing BGP route.
| | ...
| | [Teardown] | Honeycomb removes BGP route | ${node} | ${address_internal}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | ...
| | Given BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | And No BGP Routes Should be Configured
| | ... | ${node} | ${address_internal} | ipv4
| | When Honeycomb configures BGP route
| | ... | ${node} | ${address_internal} | ${route_data_ipv4}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | And Honeycomb configures BGP route
| | ... | ${node} | ${address_internal} | ${route_data_ipv4_update}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | Then BGP Route from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${route_data_ipv4_update}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4

| TC09: Honeycomb configures a second IPv4 route
| | [Documentation] | Check if Honeycomb can configure more than one BGP route.
| | ...
| | [Teardown] | Run Keywords
| | ... | Honeycomb removes BGP route | ${node} | ${address_internal}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 | AND
| | ... | Honeycomb removes BGP route | ${node} | ${address_internal}
| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4
| | ...
| | Given BGP peer from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${peer_internal}
| | When Honeycomb configures BGP route
| | ... | ${node} | ${address_internal} | ${route_data_ipv4}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | And Honeycomb configures BGP route
| | ... | ${node} | ${address_internal} | ${route_data_ipv4_2}
| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4
| | Then BGP Route from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${route_data_ipv4}
| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4
| | And BGP Route from Honeycomb should be
| | ... | ${node} | ${address_internal} | ${route_data_ipv4_2}
| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4