Update Robot Framework format - step 1
[integration/test.git] / csit / libraries / Genius.robot
1 *** Settings ***
2 Documentation       This suite is a common keywords file for genius project.
3
4 Library             Collections
5 Library             OperatingSystem
6 Library             RequestsLibrary
7 Library             SSHLibrary
8 Library             string
9 Resource            ClusterManagement.robot
10 Resource            CompareStream.robot
11 Resource            DataModels.robot
12 Resource            KarafKeywords.robot
13 Resource            ODLTools.robot
14 Resource            OVSDB.robot
15 Resource            ToolsSystem.robot
16 Resource            Utils.robot
17 Resource            VpnOperations.robot
18 Resource            ../variables/Variables.robot
19 Resource            ../variables/netvirt/Variables.robot
20
21
22 *** Variables ***
23 @{itm_created}                      TZA
24 ${genius_config_dir}                ${CURDIR}/../variables/genius
25 ${Bridge}                           ${INTEGRATION_BRIDGE}
26 ${DEFAULT_MONITORING_INTERVAL}      Tunnel Monitoring Interval (for VXLAN tunnels): 1000
27 @{GENIUS_DIAG_SERVICES}             OPENFLOW    IFM    ITM    DATASTORE    OVSDB
28 ${gateway_ip}                       0.0.0.0
29 ${port_name}                        br-int-eth1
30 ${VLAN}                             100
31 ${NO_VLAN}                          0
32 ${DEFAULT_TRANSPORT_ZONE}           default-transport-zone
33 ${SET_LOCAL_IP}                     sudo ovs-vsctl set O . other_config:local_ip=
34 ${REMOVE_LOCAL_IP}                  sudo ovs-vsctl remove O . other_config local_ip
35 ${odl_stream_check }                ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[neon]
36
37
38 *** Keywords ***
39 Genius Suite Setup
40     [Documentation]    Create Rest Session to http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
41     Genius.Start Suite
42     RequestsLibrary.Create Session
43     ...    session
44     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
45     ...    auth=${AUTH}
46     ...    headers=${HEADERS}
47     ...    timeout=5
48
49 Genius Suite Teardown
50     [Documentation]    Delete all sessions
51     RequestsLibrary.Delete All Sessions
52     Genius.Stop Suite
53
54 Start Suite
55     [Documentation]    Initial setup for Genius test suites
56     Run_Keyword_If_At_Least_Oxygen
57     ...    Wait Until Keyword Succeeds
58     ...    60
59     ...    2
60     ...    ClusterManagement.Check Status Of Services Is OPERATIONAL
61     ...    @{GENIUS_DIAG_SERVICES}
62     KarafKeywords.Setup_Karaf_Keywords
63     ToolsSystem.Get Tools System Nodes Data
64     ${karaf_debug_enabled} =    BuiltIn.Get_Variable_Value    ${KARAF_DEBUG}    ${False}
65     IF    ${karaf_debug_enabled}
66         KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set DEBUG org.opendaylight.genius
67     END
68     Genius.Set Switch Configuration
69     ${check} =    BuiltIn.Wait Until Keyword Succeeds
70     ...    30
71     ...    10
72     ...    Check Port Status Is ESTABLISHED
73     ...    ${ODL_OF_PORT_6653}
74     ...    @{TOOLS_SYSTEM_ALL_IPS}
75     ${check} =    BuiltIn.Wait Until Keyword Succeeds
76     ...    30
77     ...    10
78     ...    Check Port Status Is ESTABLISHED
79     ...    ${OVSDBPORT}
80     ...    @{TOOLS_SYSTEM_ALL_IPS}
81     Genius.Build Dpn List
82     @{SWITCH_DATA} =    Collections.Combine Lists    ${DPN_ID_LIST}    ${TOOLS_SYSTEM_ALL_IPS}
83     BuiltIn.Set Suite Variable    @{SWITCH_DATA}
84     ${substr} =    Should Match Regexp    ${TOOLS_SYSTEM_1_IP}    [0-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
85     ${SUBNET} =    Catenate    ${substr}0
86     BuiltIn.Set Suite Variable    ${SUBNET}
87
88 Stop Suite
89     [Documentation]    stops all connections and deletes all the bridges available on OVS
90     FOR    ${tool_system_index}    IN RANGE    ${NUM_TOOLS_SYSTEM}
91         SSHLibrary.Switch Connection    ${TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
92         SSHLibrary.Execute Command    sudo ovs-vsctl del-br ${Bridge}
93         SSHLibrary.Execute Command    sudo ovs-vsctl del-manager
94         SSHLibrary.Write    exit
95         SSHLibrary.Close Connection
96     END
97
98 Check Port Status Is ESTABLISHED
99     [Documentation]    This keyword will check whether ports are established or not on OVS
100     [Arguments]    ${port}    @{tools_ips}
101     FOR    ${tools_ip}    IN    @{tools_ips}
102         ${check_establishment} =    Utils.Run Command On Remote System And Log
103         ...    ${tools_ip}
104         ...    netstat -anp | grep ${port}
105         BuiltIn.Should Contain    ${check_establishment}    ESTABLISHED
106     END
107     RETURN    ${check_establishment}
108
109 Create Vteps
110     [Documentation]    This keyword creates VTEPs between OVS
111     [Arguments]    ${vlan_id}    ${gateway_ip}
112     ${body} =    Genius.Set Json    ${vlan_id}    ${gateway_ip}    ${SUBNET}    @{TOOLS_SYSTEM_ALL_IPS}
113     ${resp} =    RequestsLibrary.Put Request
114     ...    session
115     ...    ${CONFIG_API}/itm:transport-zones/transport-zone/TZA
116     ...    data=${body}
117     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
118
119 Set Json
120     [Documentation]    Sets Json with the values passed for it.
121     [Arguments]    ${vlan}    ${gateway_ip}    ${subnet}    @{tools_ips}
122     IF    ${odl_stream_check }
123         ${body} =    OperatingSystem.Get File    ${genius_config_dir}/Itm_creation_no_vlan_below_sodium.json
124     ELSE
125         ${body} =    OperatingSystem.Get File    ${genius_config_dir}/Itm_creation_no_vlan_sodium_and_above.json
126     END
127     IF    ${odl_stream_check }
128         ${body} =    String.Replace String    ${body}    1.1.1.1    ${subnet}
129     ELSE
130         ${body} =    BuiltIn.Set Variable    ${body}
131     END
132     IF    ${odl_stream_check }
133         ${body} =    String.Replace String    ${body}    "vlan-id": 0    "vlan-id": ${vlan}
134     ELSE
135         ${body} =    BuiltIn.Set Variable    ${body}
136     END
137     IF    ${odl_stream_check }
138         ${body} =    String.Replace String    ${body}    "gateway-ip": "0.0.0.0"    "gateway-ip": "${gateway_ip}"
139     ELSE
140         ${body} =    BuiltIn.Set Variable    ${body}
141     END
142     FOR    ${tool_system_index}    IN RANGE    ${NUM_TOOLS_SYSTEM}
143         ${body} =    String.Replace String
144         ...    ${body}
145         ...    "dpn-id": 10${tool_system_index}
146         ...    "dpn-id": ${DPN_ID_LIST[${tool_system_index}]}
147         ${body} =    String.Replace String
148         ...    ${body}
149         ...    "ip-address": "${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}"
150         ...    "ip-address": "${tools_ips}[${tool_system_index}]"
151     END
152     BuiltIn.Log    ${body}
153     RETURN    ${body}    # returns complete json that has been updated
154
155 Build Dpn List
156     [Documentation]    This keyword builds the list of DPN ids after configuring OVS bridges on each of the TOOLS_SYSTEM_IPs.
157     @{DPN_ID_LIST} =    BuiltIn.Create List
158     FOR    ${tools_ip}    IN    @{TOOLS_SYSTEM_ALL_IPS}
159         ${output} =    Utils.Run Command On Remote System And Log
160         ...    ${tools_ip}
161         ...    sudo ovs-ofctl show -O Openflow13 ${Bridge} | head -1 | awk -F "dpid:" '{ print $2 }'
162         ${dpn_id} =    Utils.Run Command On Remote System And Log    ${tools_ip}    echo \$\(\(16\#${output}\)\)
163         Collections.Append To List    ${DPN_ID_LIST}    ${dpn_id}
164     END
165     BuiltIn.Set Suite Variable    @{DPN_ID_LIST}
166
167 BFD Suite Teardown
168     [Documentation]    Run at end of BFD suite
169     Genius.Delete All Vteps
170     Genius.Stop Suite
171
172 Delete All Vteps
173     [Documentation]    This will delete vtep.
174     ${resp} =    RequestsLibrary.Delete Request    session    ${CONFIG_API}/itm:transport-zones/
175     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
176     BuiltIn.Wait Until Keyword Succeeds    30    5    Genius.Verify Tunnel Delete on DS    tun
177
178 Genius Test Setup
179     [Documentation]    Genius test case setup
180     BuiltIn.Run Keyword And Ignore Error    KarafKeywords.Log_Testcase_Start_To_Controller_Karaf
181
182 Genius Test Teardown
183     [Arguments]    ${data_models}    ${test_name}=${SUITE_NAME}.${TEST_NAME}    ${fail}=${FAIL_ON_EXCEPTIONS}
184     FOR    ${tool_system_index}    IN RANGE    ${NUM_TOOLS_SYSTEM}
185         OVSDB.Get DumpFlows And Ovsconfig    ${TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]    ${Bridge}
186     END
187     BuiltIn.Run Keyword And Ignore Error    DataModels.Get Model Dump    ${ODL_SYSTEM_IP}    ${data_models}
188     KarafKeywords.Fail If Exceptions Found During Test    ${test_name}    fail=${fail}
189     ODLTools.Get All    test_name=${test_name}
190
191 Genius Suite Debugs
192     [Arguments]    ${data_models}
193     Genius.Genius Test Teardown    ${data_models}    test_name=${SUITE_NAME}    fail=False
194
195 ITM Direct Tunnels Start Suite
196     [Documentation]    start suite for itm scalability
197     ClusterManagement.ClusterManagement_Setup
198     ClusterManagement.Stop_Members_From_List_Or_All
199     FOR    ${controller_index}    IN RANGE    ${NUM_ODL_SYSTEM}
200         Utils.Run Command On Remote System And Log
201         ...    ${ODL_SYSTEM_${controller_index+1}_IP}
202         ...    sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
203     END
204     ClusterManagement.Start_Members_From_List_Or_All
205     Genius.Genius Suite Setup
206
207 ITM Direct Tunnels Stop Suite
208     [Documentation]    Stop suite for ITM Direct Tunnels.
209     FOR    ${controller_index}    IN RANGE    ${NUM_ODL_SYSTEM}
210         Utils.Run Command On Remote System And Log
211         ...    ${ODL_SYSTEM_${controller_index+1}_IP}
212         ...    sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
213     END
214     Genius.Genius Suite Teardown
215
216 Ovs Interface Verification
217     [Documentation]    Checks whether the created Interface is seen on OVS or not.
218     FOR    ${tools_ip}    IN    @{TOOLS_SYSTEM_ALL_IPS}
219         Genius.Ovs Verification For Each Dpn    ${tools_ip}    ${TOOLS_SYSTEM_ALL_IPS}
220     END
221
222 Get ITM
223     [Documentation]    It returns the created ITM Transport zone with the passed values during the creation is done.
224     [Arguments]    ${itm_created[0]}    ${switch_data}=${SWITCH_DATA}
225     Collections.Append To List    ${switch_data}    ${itm_created[0]}
226     Utils.Check For Elements At URI    ${TUNNEL_TRANSPORTZONE}/transport-zone/${itm_created[0]}    ${switch_data}
227
228 Check Tunnel Delete On OVS
229     [Documentation]    Verifies the Tunnel is deleted from OVS.
230     [Arguments]    ${tunnel_list}
231     FOR    ${tools_ip}    IN    @{TOOLS_SYSTEM_ALL_IPS}
232         ${output} =    Utils.Run Command On Remote System    ${tools_ip}    sudo ovs-vsctl show
233         Genius.Verify Deleted Tunnels on OVS    ${tunnel_list}    ${output}
234     END
235
236 Check Table0 Entry In a Dpn
237     [Documentation]    Checks the Table 0 entry in the OVS when flows are dumped.
238     [Arguments]    ${tools_ip}    ${bridgename}    ${port_numbers}
239     ${check} =    Utils.Run Command On Remote System And Log
240     ...    ${tools_ip}
241     ...    sudo ovs-ofctl -OOpenFlow13 dump-flows ${bridgename}
242     ${num_ports} =    BuiltIn.Get Length    ${port_numbers}
243     FOR    ${port_index}    IN RANGE    ${num_ports}
244         BuiltIn.Should Contain    ${check}    in_port=${port_numbers}[${port_index}]
245     END
246
247 Verify Tunnel Status As Up
248     [Documentation]    Verify that the number of tunnels are UP
249     [Arguments]    ${no_of_switches}=${NUM_TOOLS_SYSTEM}
250     ${no_of_tunnels} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW_STATE}
251     ${lines_of_state_up} =    String.Get Lines Containing String    ${no_of_tunnels}    ${STATE_UP}
252     ${actual_tunnel_count} =    String.Get Line Count    ${lines_of_state_up}
253     ${expected_tunnel_count} =    BuiltIn.Evaluate    ${no_of_switches}*(${no_of_switches}-1)
254     BuiltIn.Should Be Equal As Strings    ${actual_tunnel_count}    ${expected_tunnel_count}
255
256 Verify Tunnel Status
257     [Documentation]    Verifies if all tunnels in the input, has the expected status(UP/DOWN/UNKNOWN)
258     [Arguments]    ${tunnel_status}    ${tunnel_names}
259     ${tep_result} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW_STATE}
260     ${number_of_tunnels} =    BuiltIn.Get Length    ${tunnel_names}
261     FOR    ${each_tunnel}    IN RANGE    ${number_of_tunnels}
262         ${tunnel} =    Collections.Get From List    ${tunnel_names}    ${each_tunnel}
263         ${tep_output} =    String.Get Lines Containing String    ${tep_result}    ${tunnel}
264         BuiltIn.Should Contain    ${tep_output}    ${tunnel_status}
265     END
266
267 Get Tunnels On OVS
268     [Documentation]    Retrieves the list of tunnel ports present on OVS
269     [Arguments]    ${connection_id}
270     SSHLibrary.Switch Connection    ${connection_id}
271     ${ovs_result} =    Utils.Write Commands Until Expected Prompt
272     ...    sudo ovs-vsctl show
273     ...    ${DEFAULT_LINUX_PROMPT_STRICT}
274     @{tunnel_names} =    BuiltIn.Create List
275     ${tunnels} =    String.Get Lines Matching Regexp    ${ovs_result}    Interface "tun.*"    True
276     @{tunnels_list} =    String.Split To Lines    ${tunnels}
277     FOR    ${tun}    IN    @{tunnels_list}
278         ${tun_list} =    Get Regexp Matches    ${tun}    tun.*\\w
279         Collections.Append To List    ${tunnel_names}    @{tun_list}
280     END
281     ${items_in_list} =    BuiltIn.Get Length    ${tunnel_names}
282     RETURN    @{tunnel_names}
283
284 Get Tunnel
285     [Documentation]    This keyword returns tunnel interface name between source DPN and destination DPN.
286     ...    Statements are executed depending on whether it is itm tunnel state(default) or dpn tep state.
287     [Arguments]    ${src}    ${dst}    ${type}    ${config_api_type}=${EMPTY}
288     IF    '${config_api_type}' == '${EMPTY}'
289         ${resp} =    RequestsLibrary.Get Request
290         ...    session
291         ...    ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${src}/${dst}/${type}/
292     ELSE
293         ${resp} =    RequestsLibrary.Get Request
294         ...    session
295         ...    ${CONFIG_API}/itm-state:dpn-teps-state/dpns-teps/${src}/remote-dpns/${dst}/
296     END
297     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    ${RESP_CODE}
298     BuiltIn.Log    ${resp.text}
299     ${respjson} =    RequestsLibrary.To Json    ${resp.text}    pretty_print=True
300     ${json} =    Utils.Json Parse From String    ${resp.text}
301     BuiltIn.Should Contain    ${resp.text}    ${dst}
302     IF    '${config_api_type}' == '${EMPTY}'
303         BuiltIn.Should Contain    ${resp.text}    ${src}
304     END
305     IF    "tunnel-interface-names" in "${json}"
306         ${tunnel_interface_name} =    Genius.Get Tunnel Interface Name
307         ...    ${json["internal-tunnel"][0]}
308         ...    tunnel-interface-names
309     ELSE
310         ${tunnel_interface_name} =    Set Variable    ${None}
311     END
312     IF    '${config_api_type}' != '${EMPTY}'
313         ${tunnel_name_output}    ${tunnel_name} =    BuiltIn.Should Match Regexp
314         ...    ${resp.text}
315         ...    "tunnel-name":"(tun[\\w\\d]+)"
316     ELSE
317         ${tunnel_name_output}    ${tunnel_name} =    Set Variable    ${None}    ${None}
318     END
319     ${tunnel} =    BuiltIn.Set Variable If
320     ...    '${config_api_type}' == '${EMPTY}'
321     ...    ${tunnel_interface_name}
322     ...    ${tunnel_name}
323     RETURN    ${tunnel}
324
325 Get Tunnel Interface Name
326     [Documentation]    This keyword extracts tunnel interface name from json given as input.
327     [Arguments]    ${json}    ${expected_tunnel_interface_name}
328     ${tunnels} =    Collections.Get From Dictionary    ${json}    ${expected_tunnel_interface_name}
329     RETURN    ${tunnels[0]}
330
331 Verify Tunnel Delete on DS
332     [Documentation]    This keyword confirms that specified tunnel is not present by giving command from karaf console.
333     [Arguments]    ${tunnel}
334     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW_STATE}
335     BuiltIn.Should Not Contain    ${output}    ${tunnel}
336
337 SRM Start Suite
338     [Documentation]    Start suite for service recovery.
339     Genius Suite Setup
340     Genius.Create Vteps    ${NO_VLAN}    ${gateway_ip}
341     BuiltIn.Wait Until Keyword Succeeds    60s    5s    Genius.Verify Tunnel Status As Up
342     Genius.Genius Suite Debugs    ${data_models}
343
344 SRM Stop Suite
345     [Documentation]    Stop suite for service recovery.
346     Genius.Delete All Vteps
347     Genius.Genius Suite Debugs    ${data_models}
348     Genius.Genius Suite Teardown
349
350 Verify Tunnel Monitoring Status
351     [Arguments]    ${tunnel_monitor_status}
352     ${output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
353     BuiltIn.Should Contain    ${output}    ${tunnel_monitor_status}
354
355 Set Switch Configuration
356     [Documentation]    This keyword will set manager,controller,tap port,bridge on each OVS
357     FOR    ${tool_system_index}    IN RANGE    ${NUM_TOOLS_SYSTEM}
358         SSHLibrary.Switch Connection    ${TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
359         SSHLibrary.Login With Public Key    ${TOOLS_SYSTEM_USER}    ${USER_HOME}/.ssh/${SSH_KEY}    any
360         SSHLibrary.Execute Command    sudo ovs-vsctl add-br ${Bridge}
361         SSHLibrary.Execute Command    sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
362         SSHLibrary.Execute Command    sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT_6653}
363         SSHLibrary.Execute Command    sudo ifconfig ${Bridge} up
364         SSHLibrary.Execute Command
365         ...    sudo ovs-vsctl add-port ${Bridge} tap${tool_system_index}ed70586-6c -- set Interface tap${tool_system_index}ed70586-6c type=tap
366         SSHLibrary.Execute Command    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT}
367         SSHLibrary.Execute Command    sudo ovs-vsctl show
368     END
369
370 Ovs Verification For Each Dpn
371     [Documentation]    This keyword will verify whether local and remote ip are present on the tunnels available on OVS
372     [Arguments]    ${tools_system_ip}    ${tools_ips}
373     ${ovs_output} =    Utils.Run Command On Remote System And Log    ${tools_system_ip}    sudo ovs-vsctl show
374     @{updated_tools_ip_list} =    BuiltIn.Create List    @{tools_ips}
375     Collections.Remove Values From List    ${updated_tools_ip_list}    ${tools_system_ip}
376     BuiltIn.Log Many    @{updated_tools_ip_list}
377     ${num_tool_ips} =    BuiltIn.Get Length    ${updated_tools_ip_list}
378     FOR    ${num}    IN RANGE    ${num_tool_ips}
379         ${tools_ip} =    Collections.Get From List    ${updated_tools_ip_list}    ${num}
380         BuiltIn.Should Contain    ${ovs_output}    ${tools_ip}
381     END
382
383 Get Tunnels List
384     [Documentation]    The keyword fetches the list of operational tunnels from ODL
385     ${no_of_tunnels} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW_STATE}
386     ${tunnels} =    String.Get Regexp Matches    ${no_of_tunnels}    tun[\\w\\d]+
387     BuiltIn.Log    ${tunnels}
388     RETURN    ${tunnels}
389
390 Verify Table0 Entry After fetching Port Number
391     [Documentation]    This keyword will get the port number and checks the table0 entry for each dpn
392     FOR    ${tools_ip}    IN    @{TOOLS_SYSTEM_ALL_IPS}
393         ${check} =    Utils.Run Command On Remote System And Log
394         ...    ${tools_ip}
395         ...    sudo ovs-ofctl -O OpenFlow13 show ${Bridge}
396         ${port_numbers} =    String.Get Regexp Matches    ${check}    (\\d+).tun.*    1
397         Genius.Check Table0 Entry In a Dpn    ${tools_ip}    ${Bridge}    ${port_numbers}
398     END
399
400 Verify Deleted Tunnels On OVS
401     [Documentation]    This will verify whether tunnel is deleted.
402     [Arguments]    ${tunnel_list}    ${resp_data}
403     BuiltIn.Log    ${resp_data}
404     FOR    ${tunnel}    IN    @{tunnel_list}
405         BuiltIn.Should Not Contain    ${resp_data}    ${tunnel}
406     END
407
408 Verify Response Code Of Dpn End Point Config API
409     [Documentation]    This keyword will verify response code from itm-state: dpn endpoints config api for each dpn
410     [Arguments]    ${dpn_list}=${DPN_ID_LIST}
411     FOR    ${dpn}    IN    @{dpn_list}
412         BuiltIn.Wait Until Keyword Succeeds
413         ...    40
414         ...    5
415         ...    Utils.Get Data From URI
416         ...    session
417         ...    ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
418     END
419
420 Get Tunnel Between DPNs
421     [Documentation]    This keyword will Get All the Tunnels available on DPN's
422     [Arguments]    ${tunnel_type}    ${config_api_type}    ${src_dpn_id}    @{dst_dpn_ids}
423     FOR    ${dst_dpn_id}    IN    @{dst_dpn_ids}
424         ${tunnel} =    BuiltIn.Wait Until Keyword Succeeds    30    10    Genius.Get Tunnel    ${src_dpn_id}
425         ...    ${dst_dpn_id}    ${tunnel_type}    ${config_api_type}
426     END
427
428 Update Dpn id List And Get Tunnels
429     [Documentation]    Update the exisisting dpn id list to form different combination of dpn ids such that tunnel formation between all dpns is verified.
430     [Arguments]    ${tunnel_type}    ${config_api_type}=${EMPTY}    ${dpn_ids}=${DPN_ID_LIST}
431     FOR    ${dpn_id}    IN    @{dpn_ids}
432         @{dpn_ids_updated} =    BuiltIn.Create List    @{dpn_ids}
433         Collections.Remove Values From List    ${dpn_ids_updated}    ${dpn_id}
434         BuiltIn.Log Many    ${dpn_ids_updated}
435         Genius.Get Tunnel Between DPNs    ${tunnel_type}    ${config_api_type}    ${dpn_id}    @{dpn_ids_updated}
436     END