2 Documentation Basic tests for iBGP peers.
4 ... Copyright (c) 2015-2016 Cisco Systems, Inc. and others. All rights reserved.
6 ... This program and the accompanying materials are made available under the
7 ... terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ... and is available at http://www.eclipse.org/legal/epl-v10.html
10 ... Test suite performs basic iBGP functional test cases for
11 ... BGP peers in different roles (iBGP, iBGP RR-client):
13 ... Test Case 1: Two iBGP RR-client peers introduce prefixes
14 ... Expected result: controller forwards updates towards both peers
16 ... Test Case 2: Two iBGP peers: one RR client and one non-client introduces prefixes
17 ... Expected result: controller forwards updates towards both peers
19 ... Test Case 3: Two iBGP RR non-client peers introduce prefixes
20 ... Expected result: controller does not forward any update towards peers
22 ... For polices see: https://wiki.opendaylight.org/view/BGP_LS_PCEP:BGP
25 ... Bug 4791 - BGPSessionImpl: Failed to send message Update logged even all UPDATE mesages received by iBGP peer
26 ... Bug 4819 - No routes advertised to one of newly configured iBGP RR-client peer
27 Suite Setup Setup_Everything
28 Suite Teardown Teardown_Everything
29 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
30 Test Teardown FailFast.Start_Failing_Fast_If_This_Failed
31 Library OperatingSystem
32 Library RequestsLibrary
34 Variables ${CURDIR}/../../../variables/Variables.py
35 Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM}
36 Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
37 Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
38 Resource ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
39 Resource ${CURDIR}/../../../libraries/FailFast.robot
40 Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
41 Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
42 Resource ${CURDIR}/../../../libraries/SetupUtils.robot
43 Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
44 Resource ${CURDIR}/../../../libraries/Utils.robot
45 Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
48 ${BGP_VARIABLES_FOLDER} ${CURDIR}/../../../variables/bgpuser/
50 ${BGP_PEER_LOG_LEVEL} debug
51 ${CONTROLLER_LOG_LEVEL} INFO
52 ${CONTROLLER_BGP_LOG_LEVEL} DEFAULT
53 ${BGP_PEER1_IP} 127.0.0.1
54 ${BGP_PEER2_IP} 127.0.0.2
55 ${BGP_PEER1_FIRST_PREFIX_IP} 8.1.0.0
56 ${BGP_PEER2_FIRST_PREFIX_IP} 8.2.0.0
58 ${BGP_PEER1_PREFIX_LEN} ${PREFIX_LEN}
59 ${BGP_PEER2_PREFIX_LEN} ${PREFIX_LEN}
61 ${BGP_PEER1_PREFIX_COUNT} ${PREFIX_COUNT}
62 ${BGP_PEER2_PREFIX_COUNT} ${PREFIX_COUNT}
63 ${BGP_PEER1_LOG_FILE} bgp_peer1.log
64 ${BGP_PEER2_LOG_FILE} bgp_peer2.log
65 ${BGP_PEER1_COMMAND} python play.py --firstprefix ${BGP_PEER1_FIRST_PREFIX_IP} --prefixlen ${BGP_PEER1_PREFIX_LEN} --amount ${BGP_PEER1_PREFIX_COUNT} --myip=${BGP_PEER1_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${BGP_PEER1_LOG_FILE}
66 ${BGP_PEER2_COMMAND} python play.py --firstprefix ${BGP_PEER2_FIRST_PREFIX_IP} --prefixlen ${BGP_PEER2_PREFIX_LEN} --amount ${BGP_PEER2_PREFIX_COUNT} --myip=${BGP_PEER2_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${BGP_PEER2_LOG_FILE}
67 ${BGP_PEER1_OPTIONS} &>${BGP_PEER1_LOG_FILE}
68 ${BGP_PEER2_OPTIONS} &>${BGP_PEER2_LOG_FILE}
69 ${DEFAULT_LOG_CHECK_TIMEOUT} 20s
70 ${DEFAULT_LOG_CHECK_PERIOD} 1s
71 ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} 10s
72 ${DEFAULT_TOPOLOGY_CHECK_PERIOD} 1s
75 TC1_Configure_Two_iBGP_Route_Reflector_Client_Peers
76 [Documentation] Configure two iBGP peers as routing reflector clients.
78 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1', 'IP': '${BGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'rr-client', 'INITIATE': 'false'}
79 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
80 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2', 'IP': '${BGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'rr-client', 'INITIATE': 'false'}
81 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
82 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
83 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
85 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
86 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
90 [Documentation] Connect BGP peer
92 SSHLibrary.Switch Connection bgp_peer1_console
93 Start_Console_Tool ${BGP_PEER1_COMMAND} ${BGP_PEER1_OPTIONS}
94 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Content {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
97 [Documentation] Connect BGP peer
99 SSHLibrary.Switch Connection bgp_peer2_console
100 Start_Console_Tool ${BGP_PEER2_COMMAND} ${BGP_PEER2_OPTIONS}
101 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Content {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
103 TC1_BGP_Peer1_Check_Log_For_Introduced_Prefixes
104 [Documentation] Check incomming updates for new routes
106 SSHLibrary.Switch Connection bgp_peer1_console
107 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} nlri_prefix_received: ${BGP_PEER2_PREFIX_COUNT}
108 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} nlri_prefix_received: ${BGP_PEER2_FIRST_PREFIX_IP}/${BGP_PEER2_PREFIX_LEN} 1
109 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} withdrawn_prefix_received: 0
110 [Teardown] Report_Failure_Due_To_Bug 4819
112 TC1_BGP_Peer2_Check_Log_For_Introduced_Prefixes
113 [Documentation] Check incomming updates for new routes
115 SSHLibrary.Switch Connection bgp_peer2_console
116 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} nlri_prefix_received: ${BGP_PEER1_PREFIX_COUNT}
117 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} nlri_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
118 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: 0
119 [Teardown] Report_Failure_Due_To_Bug 4819
121 TC1_Disconnect_BGP_Peer1
122 [Documentation] Stop BGP peer & store logs
124 SSHLibrary.Switch Connection bgp_peer1_console
126 Store_File_To_Workspace ${BGP_PEER1_LOG_FILE} tc1_${BGP_PEER1_LOG_FILE}
128 TC1_BGP_Peer2_Check_Log_For_Withdrawn_Prefixes
129 [Documentation] Check incomming updates for withdrawn routes
131 SSHLibrary.Switch Connection bgp_peer2_console
132 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: ${BGP_PEER1_PREFIX_COUNT}
133 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
134 [Teardown] Report_Failure_Due_To_Bug 4819
136 TC1_Disconnect_BGP_Peer2
137 [Documentation] Stop BGP peer & store logs
139 SSHLibrary.Switch Connection bgp_peer2_console
141 Store_File_To_Workspace ${BGP_PEER2_LOG_FILE} tc1_${BGP_PEER2_LOG_FILE}
143 TC_1_Check_for_Empty_IPv4_Topology
144 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Does_Not_Contain prefix
146 TC1_Delete_BGP_Peers_Configuration
147 [Documentation] Delete all previously configured BGP peers.
149 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
150 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
151 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
152 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
154 TC2_Configure_One_iBGP_Route_Reflector_Client_And_One_iBGP_Non_Client
155 [Documentation] Configure iBGP peers: 1st one as RR client, 2nd one as RR non-client.
157 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1', 'IP': '${BGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'rr-client', 'INITIATE': 'false'}
158 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
159 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2', 'IP': '${BGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'}
160 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
161 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
162 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
163 BuiltIn.Log ${result}
164 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
165 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
166 BuiltIn.Log ${result}
168 TC2_Connect_BGP_Peer1
169 [Documentation] Connect BGP peer
171 SSHLibrary.Switch Connection bgp_peer1_console
172 Start_Console_Tool ${BGP_PEER1_COMMAND} ${BGP_PEER1_OPTIONS}
173 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Content {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
175 TC2_Connect_BGP_Peer2
176 [Documentation] Connect BGP peer
178 SSHLibrary.Switch Connection bgp_peer2_console
179 Start_Console_Tool ${BGP_PEER2_COMMAND} ${BGP_PEER2_OPTIONS}
180 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Content {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
182 TC2_BGP_Peer1_Check_Log_For_Introduced_Prefixes
183 [Documentation] Check incomming updates for new routes
185 SSHLibrary.Switch Connection bgp_peer1_console
186 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} nlri_prefix_received: ${BGP_PEER2_PREFIX_COUNT}
187 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} nlri_prefix_received: ${BGP_PEER2_FIRST_PREFIX_IP}/${BGP_PEER2_PREFIX_LEN} 1
188 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} withdrawn_prefix_received: 0
190 TC2_BGP_Peer2_Check_Log_For_Introduced_Prefixes
191 [Documentation] Check incomming updates for new routes
193 SSHLibrary.Switch Connection bgp_peer2_console
194 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} nlri_prefix_received: ${BGP_PEER1_PREFIX_COUNT}
195 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} nlri_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
196 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: 0
197 [Teardown] Report_Failure_Due_To_Bug 4791
199 TC2_Disconnect_BGP_Peer1
200 [Documentation] Stop BGP peer & store logs
202 SSHLibrary.Switch Connection bgp_peer1_console
204 Store_File_To_Workspace ${BGP_PEER1_LOG_FILE} tc2_${BGP_PEER1_LOG_FILE}
206 TC2_BGP_Peer2_Check_Log_For_Withdrawn_Prefixes
207 [Documentation] Check incomming updates for withdrawn routes
209 SSHLibrary.Switch Connection bgp_peer2_console
210 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: ${BGP_PEER1_PREFIX_COUNT}
211 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
213 TC2_Disconnect_BGP_Peer2
214 [Documentation] Stop BGP peer & store logs
216 SSHLibrary.Switch Connection bgp_peer2_console
218 Store_File_To_Workspace ${BGP_PEER2_LOG_FILE} tc2_${BGP_PEER2_LOG_FILE}
220 TC_2_Check_for_Empty_IPv4_Topology
221 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Does_Not_Contain prefix
223 TC2_Delete_BGP_Peers_Configuration
224 [Documentation] Delete all previously configured BGP peers.
226 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
227 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
228 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
229 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
231 TC3_Configure_Two_iBGP_Non_Client_Peers
232 [Documentation] Configure iBGP peers: 1st one as RR client, 2nd one as RR non-client.
234 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1', 'IP': '${BGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'}
235 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
236 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2', 'IP': '${BGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'}
237 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
238 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
239 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
240 BuiltIn.Log ${result}
241 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
242 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
243 BuiltIn.Log ${result}
245 TC3_Connect_BGP_Peer1
246 [Documentation] Connect BGP peer
248 SSHLibrary.Switch Connection bgp_peer1_console
249 Start_Console_Tool ${BGP_PEER1_COMMAND} ${BGP_PEER1_OPTIONS}
250 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Content {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
252 TC3_Connect_BGP_Peer2
253 [Documentation] Connect BGP peer
255 SSHLibrary.Switch Connection bgp_peer2_console
256 Start_Console_Tool ${BGP_PEER2_COMMAND} ${BGP_PEER2_OPTIONS}
257 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Content {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
259 TC3_BGP_Peer1_Check_Log_For_No_Updates
260 [Documentation] Check for no updates received by iBGP peer No. 1
262 SSHLibrary.Switch Connection bgp_peer1_console
263 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} total_received_update_message_counter: 0 2
265 TC3_Disconnect_BGP_Peer1
266 [Documentation] Stop BGP peer & store logs
268 SSHLibrary.Switch Connection bgp_peer1_console
270 Store_File_To_Workspace ${BGP_PEER1_LOG_FILE} tc3_${BGP_PEER1_LOG_FILE}
272 TC3_BGP_Peer2_Check_Log_For_No_Updates
273 [Documentation] Consequent check for no updates received by iBGP peer No. 2
275 SSHLibrary.Switch Connection bgp_peer2_console
276 ${log_check_timeout}= DateTime.Convert_Time ${DEFAULT_LOG_CHECK_TIMEOUT} result_format=number
277 BuiltIn.Wait_Until_Keyword_Succeeds ${log_check_timeout*2} ${DEFAULT_LOG_CHECK_PERIOD} Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} total_received_update_message_counter: 0 4
279 TC3_Disconnect_BGP_Peer2
280 [Documentation] Stop BGP peer & store logs
282 SSHLibrary.Switch Connection bgp_peer2_console
284 Store_File_To_Workspace ${BGP_PEER2_LOG_FILE} tc3_${BGP_PEER2_LOG_FILE}
286 TC_3_Check_for_Empty_IPv4_Topology
287 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Does_Not_Contain prefix
289 TC3_Delete_BGP_Peers_Configuration
290 [Documentation] Delete all previously configured BGP peers.
292 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
293 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
294 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
295 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
299 [Documentation] SSH-login to mininet machine, create HTTP session,
300 ... prepare directories for responses, put Python tool to mininet machine, setup imported resources.
301 # TODO: Choose keywords used by more than one test suite to be placed in a common place.
302 SetupUtils.Setup_Utils_For_Setup_And_Teardown
303 SSHLibrary.Set_Default_Configuration prompt=${ODL_SYSTEM_PROMPT}
304 SSHLibrary.Open_Connection ${ODL_SYSTEM_IP} alias=bgp_peer1_console
305 Utils.Flexible_Controller_Login
306 SSHLibrary.Open_Connection ${ODL_SYSTEM_IP} alias=bgp_peer2_console
307 Utils.Flexible_Controller_Login
308 SSHKeywords.Require_Python
309 SSHKeywords.Assure_Library_Ipaddr target_dir=.
310 SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py
311 RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH}
312 ConfigViaRestconf.Setup_Config_Via_Restconf
313 KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL}
314 KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep
315 KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol
318 [Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed.
319 ... Tear down imported Resources.
320 KillPythonTool.Search_And_Kill_Remote_Python 'play\.py'
321 ConfigViaRestconf.Teardown_Config_Via_Restconf
322 RequestsLibrary.Delete_All_Sessions
323 SSHLibrary.Close_All_Connections
325 Check_Example_IPv4_Topology_Content
326 [Arguments] ${string_to_check}=${EMPTY}
327 [Documentation] Check the example-ipv4-topology content for string
328 ${response}= RequestsLibrary.Get Request operational topology/example-ipv4-topology
329 BuiltIn.Log ${response.status_code}
330 BuiltIn.Log ${response.text}
331 BuiltIn.Should_Contain ${response.text} ${string_to_check}
333 Check_Example_IPv4_Topology_Does_Not_Contain
334 [Arguments] ${string_to_check}
335 [Documentation] Check the example-ipv4-topology does not contain the string
336 ${response}= RequestsLibrary.Get Request operational topology/example-ipv4-topology
337 BuiltIn.Log ${response.status_code}
338 BuiltIn.Log ${response.text}
339 BuiltIn.Should_Not_Contain ${response.text} ${string_to_check}