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 Library ${CURDIR}/../../../libraries/HsfJson/hsf_json.py
35 Variables ${CURDIR}/../../../variables/Variables.py
36 Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM}
37 Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
38 Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
39 Resource ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
40 Resource ${CURDIR}/../../../libraries/FailFast.robot
41 Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
42 Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
43 Resource ${CURDIR}/../../../libraries/SetupUtils.robot
44 Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
45 Resource ${CURDIR}/../../../libraries/Utils.robot
46 Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
49 ${BGP_VARIABLES_FOLDER} ${CURDIR}/../../../variables/bgpuser/
51 ${BGP_PEER_LOG_LEVEL} debug
52 ${CONTROLLER_LOG_LEVEL} INFO
53 ${CONTROLLER_BGP_LOG_LEVEL} DEFAULT
54 ${BGP_PEER1_IP} 127.0.0.1
55 ${BGP_PEER2_IP} 127.0.0.2
56 ${BGP_PEER1_FIRST_PREFIX_IP} 8.1.0.0
57 ${BGP_PEER2_FIRST_PREFIX_IP} 8.2.0.0
59 ${BGP_PEER1_PREFIX_LEN} ${PREFIX_LEN}
60 ${BGP_PEER2_PREFIX_LEN} ${PREFIX_LEN}
62 ${BGP_PEER1_PREFIX_COUNT} ${PREFIX_COUNT}
63 ${BGP_PEER2_PREFIX_COUNT} ${PREFIX_COUNT}
64 ${BGP_PEER1_LOG_FILE} bgp_peer1.log
65 ${BGP_PEER2_LOG_FILE} bgp_peer2.log
66 ${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}
67 ${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}
68 ${BGP_PEER1_OPTIONS} &>${BGP_PEER1_LOG_FILE}
69 ${BGP_PEER2_OPTIONS} &>${BGP_PEER2_LOG_FILE}
70 ${DEFAULT_LOG_CHECK_TIMEOUT} 20s
71 ${DEFAULT_LOG_CHECK_PERIOD} 1s
72 ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} 10s
73 ${DEFAULT_TOPOLOGY_CHECK_PERIOD} 1s
76 TC1_Configure_Two_iBGP_Route_Reflector_Client_Peers
77 [Documentation] Configure two iBGP peers as routing reflector clients.
79 ${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'}
80 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
81 ${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'}
82 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
83 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
84 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
86 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
87 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
91 [Documentation] Connect BGP peer
93 SSHLibrary.Switch Connection bgp_peer1_console
94 Start_Console_Tool ${BGP_PEER1_COMMAND} ${BGP_PEER1_OPTIONS}
95 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}"}
98 [Documentation] Connect BGP peer
100 SSHLibrary.Switch Connection bgp_peer2_console
101 Start_Console_Tool ${BGP_PEER2_COMMAND} ${BGP_PEER2_OPTIONS}
102 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}"}
104 TC1_BGP_Peer1_Check_Log_For_Introduced_Prefixes
105 [Documentation] Check incomming updates for new routes
107 SSHLibrary.Switch Connection bgp_peer1_console
108 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}
109 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} nlri_prefix_received: ${BGP_PEER2_FIRST_PREFIX_IP}/${BGP_PEER2_PREFIX_LEN} 1
110 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} withdrawn_prefix_received: 0
111 [Teardown] Report_Failure_Due_To_Bug 4819
113 TC1_BGP_Peer2_Check_Log_For_Introduced_Prefixes
114 [Documentation] Check incomming updates for new routes
116 SSHLibrary.Switch Connection bgp_peer2_console
117 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}
118 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} nlri_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
119 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: 0
120 [Teardown] Report_Failure_Due_To_Bug 4819
122 TC1_Disconnect_BGP_Peer1
123 [Documentation] Stop BGP peer & store logs
125 SSHLibrary.Switch Connection bgp_peer1_console
127 Store_File_To_Workspace ${BGP_PEER1_LOG_FILE} tc1_${BGP_PEER1_LOG_FILE}
129 TC1_BGP_Peer2_Check_Log_For_Withdrawn_Prefixes
130 [Documentation] Check incomming updates for withdrawn routes
132 SSHLibrary.Switch Connection bgp_peer2_console
133 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}
134 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
135 [Teardown] Report_Failure_Due_To_Bug 4819
137 TC1_Disconnect_BGP_Peer2
138 [Documentation] Stop BGP peer & store logs
140 SSHLibrary.Switch Connection bgp_peer2_console
142 Store_File_To_Workspace ${BGP_PEER2_LOG_FILE} tc1_${BGP_PEER2_LOG_FILE}
144 TC_1_Check_for_Empty_IPv4_Topology
145 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Does_Not_Contain prefix
147 TC1_Delete_BGP_Peers_Configuration
148 [Documentation] Delete all previously configured BGP peers.
150 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
151 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
152 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
153 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
155 TC2_Configure_One_iBGP_Route_Reflector_Client_And_One_iBGP_Non_Client
156 [Documentation] Configure iBGP peers: 1st one as RR client, 2nd one as RR non-client.
158 ${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'}
159 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
160 ${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'}
161 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
162 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
163 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
164 BuiltIn.Log ${result}
165 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
166 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
167 BuiltIn.Log ${result}
169 TC2_Connect_BGP_Peer1
170 [Documentation] Connect BGP peer
172 SSHLibrary.Switch Connection bgp_peer1_console
173 Start_Console_Tool ${BGP_PEER1_COMMAND} ${BGP_PEER1_OPTIONS}
174 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}"}
176 TC2_Connect_BGP_Peer2
177 [Documentation] Connect BGP peer
179 SSHLibrary.Switch Connection bgp_peer2_console
180 Start_Console_Tool ${BGP_PEER2_COMMAND} ${BGP_PEER2_OPTIONS}
181 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}"}
183 TC2_BGP_Peer1_Check_Log_For_Introduced_Prefixes
184 [Documentation] Check incomming updates for new routes
186 SSHLibrary.Switch Connection bgp_peer1_console
187 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}
188 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} nlri_prefix_received: ${BGP_PEER2_FIRST_PREFIX_IP}/${BGP_PEER2_PREFIX_LEN} 1
189 Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} withdrawn_prefix_received: 0
191 TC2_BGP_Peer2_Check_Log_For_Introduced_Prefixes
192 [Documentation] Check incomming updates for new routes
194 SSHLibrary.Switch Connection bgp_peer2_console
195 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}
196 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} nlri_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
197 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: 0
198 [Teardown] Report_Failure_Due_To_Bug 4791
200 TC2_Disconnect_BGP_Peer1
201 [Documentation] Stop BGP peer & store logs
203 SSHLibrary.Switch Connection bgp_peer1_console
205 Store_File_To_Workspace ${BGP_PEER1_LOG_FILE} tc2_${BGP_PEER1_LOG_FILE}
207 TC2_BGP_Peer2_Check_Log_For_Withdrawn_Prefixes
208 [Documentation] Check incomming updates for withdrawn routes
210 SSHLibrary.Switch Connection bgp_peer2_console
211 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}
212 Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} withdrawn_prefix_received: ${BGP_PEER1_FIRST_PREFIX_IP}/${BGP_PEER1_PREFIX_LEN} 1
214 TC2_Disconnect_BGP_Peer2
215 [Documentation] Stop BGP peer & store logs
217 SSHLibrary.Switch Connection bgp_peer2_console
219 Store_File_To_Workspace ${BGP_PEER2_LOG_FILE} tc2_${BGP_PEER2_LOG_FILE}
221 TC_2_Check_for_Empty_IPv4_Topology
222 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Does_Not_Contain prefix
224 TC2_Delete_BGP_Peers_Configuration
225 [Documentation] Delete all previously configured BGP peers.
227 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
228 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
229 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
230 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
232 TC3_Configure_Two_iBGP_Non_Client_Peers
233 [Documentation] Configure iBGP peers: 1st one as RR client, 2nd one as RR non-client.
235 ${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'}
236 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
237 ${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'}
238 ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
239 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
240 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
241 BuiltIn.Log ${result}
242 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
243 ${result}= ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
244 BuiltIn.Log ${result}
246 TC3_Connect_BGP_Peer1
247 [Documentation] Connect BGP peer
249 SSHLibrary.Switch Connection bgp_peer1_console
250 Start_Console_Tool ${BGP_PEER1_COMMAND} ${BGP_PEER1_OPTIONS}
251 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}"}
253 TC3_Connect_BGP_Peer2
254 [Documentation] Connect BGP peer
256 SSHLibrary.Switch Connection bgp_peer2_console
257 Start_Console_Tool ${BGP_PEER2_COMMAND} ${BGP_PEER2_OPTIONS}
258 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}"}
260 TC3_BGP_Peer1_Check_Log_For_No_Updates
261 [Documentation] Check for no updates received by iBGP peer No. 1
263 SSHLibrary.Switch Connection bgp_peer1_console
264 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
266 TC3_Disconnect_BGP_Peer1
267 [Documentation] Stop BGP peer & store logs
269 SSHLibrary.Switch Connection bgp_peer1_console
271 Store_File_To_Workspace ${BGP_PEER1_LOG_FILE} tc3_${BGP_PEER1_LOG_FILE}
273 TC3_BGP_Peer2_Check_Log_For_No_Updates
274 [Documentation] Consequent check for no updates received by iBGP peer No. 2
276 SSHLibrary.Switch Connection bgp_peer2_console
277 ${log_check_timeout}= DateTime.Convert_Time ${DEFAULT_LOG_CHECK_TIMEOUT} result_format=number
278 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
280 TC3_Disconnect_BGP_Peer2
281 [Documentation] Stop BGP peer & store logs
283 SSHLibrary.Switch Connection bgp_peer2_console
285 Store_File_To_Workspace ${BGP_PEER2_LOG_FILE} tc3_${BGP_PEER2_LOG_FILE}
287 TC_3_Check_for_Empty_IPv4_Topology
288 BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT} ${DEFAULT_TOPOLOGY_CHECK_PERIOD} Check_Example_IPv4_Topology_Does_Not_Contain prefix
290 TC3_Delete_BGP_Peers_Configuration
291 [Documentation] Delete all previously configured BGP peers.
293 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer1'}
294 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
295 ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer2'}
296 ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER}${/}ibgp_peers ${template_as_string}
300 [Documentation] SSH-login to mininet machine, create HTTP session,
301 ... prepare directories for responses, put Python tool to mininet machine, setup imported resources.
302 # TODO: Choose keywords used by more than one test suite to be placed in a common place.
303 SetupUtils.Setup_Utils_For_Setup_And_Teardown
304 SSHLibrary.Set_Default_Configuration prompt=${ODL_SYSTEM_PROMPT}
305 SSHLibrary.Open_Connection ${ODL_SYSTEM_IP} alias=bgp_peer1_console
306 Utils.Flexible_Controller_Login
307 SSHLibrary.Open_Connection ${ODL_SYSTEM_IP} alias=bgp_peer2_console
308 Utils.Flexible_Controller_Login
309 SSHKeywords.Require_Python
310 SSHKeywords.Assure_Library_Ipaddr target_dir=.
311 SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py
312 RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH}
313 ConfigViaRestconf.Setup_Config_Via_Restconf
314 KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL}
315 KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep
316 KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol
319 [Documentation] Create and Log the diff between expected and actual responses, make sure Python tool was killed.
320 ... Tear down imported Resources.
321 KillPythonTool.Search_And_Kill_Remote_Python 'play\.py'
322 ConfigViaRestconf.Teardown_Config_Via_Restconf
323 RequestsLibrary.Delete_All_Sessions
324 SSHLibrary.Close_All_Connections
326 Check_Example_IPv4_Topology_Content
327 [Arguments] ${string_to_check}=${EMPTY}
328 [Documentation] Check the example-ipv4-topology content for string
329 ${response}= RequestsLibrary.Get Request operational topology/example-ipv4-topology
330 BuiltIn.Log ${response.status_code}
331 BuiltIn.Log ${response.text}
332 BuiltIn.Should_Contain ${response.text} ${string_to_check}
334 Check_Example_IPv4_Topology_Does_Not_Contain
335 [Arguments] ${string_to_check}
336 [Documentation] Check the example-ipv4-topology does not contain the string
337 ${response}= RequestsLibrary.Get Request operational topology/example-ipv4-topology
338 BuiltIn.Log ${response.status_code}
339 BuiltIn.Log ${response.text}
340 BuiltIn.Should_Not_Contain ${response.text} ${string_to_check}