BuiltIn.Wait Until Keyword Succeeds 40s 2s Coe.Check Node Status Is Ready
Coe.Label Nodes
BuiltIn.Wait Until Keyword Succeeds 60 2 ClusterManagement.Check Status Of Services Is OPERATIONAL @{COE_DIAG_SERVICES}
- BuiltIn.Wait Until Keyword Succeeds 85 2 Genius.Verify Tunnel Status as UP default-transport-zone
+ BuiltIn.Wait Until Keyword Succeeds 85 2 Genius.Verify Tunnel Status As Up
Set Connection ids and Bridge
[Documentation] Sets the connection ids for all the nodes and get the bridge from configuration file .
Documentation This suite is a common keywords file for genius project.
Library Collections
Library OperatingSystem
-Library re
Library RequestsLibrary
Library SSHLibrary
Library string
Resource ClusterManagement.robot
+Resource CompareStream.robot
Resource DataModels.robot
Resource KarafKeywords.robot
Resource ODLTools.robot
Resource OVSDB.robot
+Resource ToolsSystem.robot
Resource Utils.robot
Resource VpnOperations.robot
Resource ../variables/Variables.robot
${Bridge} ${INTEGRATION_BRIDGE}
${DEFAULT_MONITORING_INTERVAL} Tunnel Monitoring Interval (for VXLAN tunnels): 1000
@{GENIUS_DIAG_SERVICES} OPENFLOW IFM ITM DATASTORE OVSDB
-${vlan} 0
-${gateway-ip} 0.0.0.0
+${gateway_ip} 0.0.0.0
${port_name} br-int-eth1
+${VLAN} 100
+${NO_VLAN} 0
*** Keywords ***
Genius Suite Setup
Start Suite
[Documentation] Initial setup for Genius test suites
Run_Keyword_If_At_Least_Oxygen Wait Until Keyword Succeeds 60 2 ClusterManagement.Check Status Of Services Is OPERATIONAL @{GENIUS_DIAG_SERVICES}
- Log Start the tests
- ${conn_id_1}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
- Set Global Variable ${conn_id_1}
KarafKeywords.Setup_Karaf_Keywords
+ ToolsSystem.Get Tools System Nodes Data
${karaf_debug_enabled} BuiltIn.Get_Variable_Value ${KARAF_DEBUG} ${False}
BuiltIn.run_keyword_if ${karaf_debug_enabled} KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set DEBUG org.opendaylight.genius
- BuiltIn.Run Keyword And Ignore Error KarafKeywords.Log_Test_Suite_Start_To_Controller_Karaf
- Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- Log ${conn_id_1}
- Execute Command sudo ovs-vsctl add-br ${Bridge}
- Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
- Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT_6653}
- Execute Command sudo ifconfig ${Bridge} up
- Execute Command sudo ovs-vsctl add-port ${Bridge} tap8ed70586-6c -- set Interface tap8ed70586-6c type=tap
- Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
- ${output_1} Execute Command sudo ovs-vsctl show
- Log ${output_1}
- ${check} Wait Until Keyword Succeeds 30 10 check establishment ${conn_id_1} ${ODL_OF_PORT_6653}
- log ${check}
- ${check_2} Wait Until Keyword Succeeds 30 10 check establishment ${conn_id_1} 6640
- log ${check_2}
- Log >>>>>Switch 2 configuration <<<<<
- ${conn_id_2}= Open Connection ${TOOLS_SYSTEM_2_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
- Set Global Variable ${conn_id_2}
- Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- Log ${conn_id_2}
- Execute Command sudo ovs-vsctl add-br ${Bridge}
- Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
- Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT_6653}
- Execute Command sudo ifconfig ${Bridge} up
- Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
- ${output_2} Execute Command sudo ovs-vsctl show
- Log ${output_2}
+ Genius.Set Switch Configuration
+ ${check} = Wait Until Keyword Succeeds 30 10 Check Port Status Is ESTABLISHED ${ODL_OF_PORT_6653} @{TOOLS_SYSTEM_ALL_IPS}
+ ${check} = Wait Until Keyword Succeeds 30 10 Check Port Status Is ESTABLISHED ${OVSDBPORT} @{TOOLS_SYSTEM_ALL_IPS}
+ Genius.Build Dpn List
+ @{SWITCH_DATA} = Collections.Combine Lists ${DPN_ID_LIST} ${TOOLS_SYSTEM_ALL_IPS}
+ BuiltIn.Set Suite Variable @{SWITCH_DATA}
+ ${substr} Should Match Regexp ${TOOLS_SYSTEM_1_IP} [0-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
+ ${SUBNET} = Catenate ${substr}0
+ BuiltIn.Set Suite Variable ${SUBNET}
Stop Suite
- Log Stop the tests
- Switch Connection ${conn_id_1}
- Log ${conn_id_1}
- Execute Command sudo ovs-vsctl del-br ${Bridge}
- Execute Command sudo ovs-vsctl del-manager
- Write exit
- close connection
- Switch Connection ${conn_id_2}
- Log ${conn_id_2}
- Execute Command sudo ovs-vsctl del-br ${Bridge}
- Execute Command sudo ovs-vsctl del-manager
- Write exit
- close connection
-
-check establishment
- [Arguments] ${conn_id} ${port}
- Switch Connection ${conn_id}
- ${check_establishment} Execute Command netstat -anp | grep ${port}
- Should contain ${check_establishment} ESTABLISHED
+ [Documentation] stops all connections and deletes all the bridges available on OVS
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
+ \ Execute Command sudo ovs-vsctl del-br ${Bridge}
+ \ Execute Command sudo ovs-vsctl del-manager
+ \ Write exit
+ \ Close Connection
+
+Check Port Status Is ESTABLISHED
+ [Arguments] ${port} @{tools_ips}
+ [Documentation] This keyword will check whether ports are established or not on OVS
+ : FOR ${tools_ip} IN @{tools_ips}
+ \ ${check_establishment} = Utils.Run Command On Remote System And Log ${tools_ip} netstat -anp | grep ${port}
+ \ BuiltIn.Should Contain ${check_establishment} ESTABLISHED
[Return] ${check_establishment}
Create Vteps
- [Arguments] ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${vlan} ${gateway-ip}
- [Documentation] This keyword creates VTEPs between ${TOOLS_SYSTEM_IP} and ${TOOLS_SYSTEM_2_IP}
+ [Arguments] ${vlan_id} ${gateway_ip}
+ [Documentation] This keyword creates VTEPs between OVS
${body} OperatingSystem.Get File ${genius_config_dir}/Itm_creation_no_vlan.json
- ${substr} Should Match Regexp ${TOOLS_SYSTEM_IP} [0-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
- ${subnet} Catenate ${substr}0
- Log ${subnet}
- Set Global Variable ${subnet}
- ${vlan}= Set Variable ${vlan}
- ${gateway-ip}= Set Variable ${gateway-ip}
- ${body} Genius.Set Json ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${vlan}
- ... ${gateway-ip} ${subnet}
- ${vtep_body} Set Variable ${body}
- Set Global Variable ${vtep_body}
- ${resp} RequestsLibrary.Post Request session ${CONFIG_API}/itm:transport-zones/ data=${body}
- Log ${resp.status_code}
- should be equal as strings ${resp.status_code} 204
+ ${body} = Genius.Set Json ${vlan_id} ${gateway_ip} ${SUBNET} @{TOOLS_SYSTEM_ALL_IPS}
+ ${resp} = RequestsLibrary.Put Request session ${CONFIG_API}/itm:transport-zones/transport-zone/TZA data=${body}
+ BuiltIn.Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
Set Json
- [Arguments] ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${vlan} ${gateway-ip}
- ... ${subnet}
+ [Arguments] ${vlan} ${gateway_ip} ${subnet} @{tools_ips}
[Documentation] Sets Json with the values passed for it.
${body} OperatingSystem.Get File ${genius_config_dir}/Itm_creation_no_vlan.json
- ${body} replace string ${body} 1.1.1.1 ${subnet}
- ${body} replace string ${body} "dpn-id": 101 "dpn-id": ${Dpn_id_1}
- ${body} replace string ${body} "dpn-id": 102 "dpn-id": ${Dpn_id_2}
- ${body} replace string ${body} "ip-address": "2.2.2.2" "ip-address": "${TOOLS_SYSTEM_IP}"
- ${body} replace string ${body} "ip-address": "3.3.3.3" "ip-address": "${TOOLS_SYSTEM_2_IP}"
- ${body} replace string ${body} "vlan-id": 0 "vlan-id": ${vlan}
- ${body} replace string ${body} "gateway-ip": "0.0.0.0" "gateway-ip": "${gateway-ip}"
+ ${body} Replace String ${body} 1.1.1.1 ${subnet}
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ ${body} Replace String ${body} "dpn-id": 10${tool_system_index} "dpn-id": ${DPN_ID_LIST[${tool_system_index}]}
+ \ ${body} Replace String ${body} "ip-address": "${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}" "ip-address": "@{tools_ips}[${tool_system_index}]"
+ ${body} Replace String ${body} "vlan-id": 0 "vlan-id": ${vlan}
+ ${body} Replace String ${body} "gateway-ip": "0.0.0.0" "gateway-ip": "${gateway_ip}"
Log ${body}
[Return] ${body} # returns complete json that has been updated
-Get Dpn Ids
- [Arguments] ${connection_id}
- [Documentation] This keyword gets the DPN id of the switch after configuring bridges on it.It returns the captured DPN id.
- Switch connection ${connection_id}
- ${output1} Execute command sudo ovs-ofctl show -O Openflow13 ${Bridge} | head -1 | awk -F "dpid:" '{ print $2 }'
- log ${output1}
- # "echo \$\(\(16\#${output1}\)\) command below converts ovs dpnid (i.e., output1) from hexadecimal to decimal."
- ${Dpn_id} Execute command echo \$\(\(16\#${output1}\)\)
- log ${Dpn_id}
- [Return] ${Dpn_id}
+Build Dpn List
+ [Documentation] This keyword builds the list of DPN ids after configuring OVS bridges on each of the TOOLS_SYSTEM_IPs.
+ @{DPN_ID_LIST} BuiltIn.Create List
+ : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ ${output} Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl show -O Openflow13 ${Bridge} | head -1 | awk -F "dpid:" '{ print $2 }'
+ \ ${dpn_id} Utils.Run Command On Remote System And Log ${tools_ip} echo \$\(\(16\#${output}\)\)
+ \ Collections.Append To List ${DPN_ID_LIST} ${dpn_id}
+ BuiltIn.Set Suite Variable @{DPN_ID_LIST}
BFD Suite Teardown
[Documentation] Run at end of BFD suite
Delete All Vteps
[Documentation] This will delete vtep.
- ${dpn_id_1} = Genius.Get Dpn Ids ${conn_id_1}
- ${dpn_id_2} = Genius.Get Dpn Ids ${conn_id_2}
- ${cmd} = BuiltIn.Set Variable tep:delete ${dpn_id_1} ${port_name} ${vlan} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]}
- ${cmd2} = BuiltIn.Set Variable tep:delete ${dpn_id_2} ${port_name} ${vlan} ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]}
- KarafKeywords.Issue Command On Karaf Console ${cmd}
- KarafKeywords.Issue Command On Karaf Console tep:commit
- KarafKeywords.Issue Command On Karaf Console ${cmd2}
- KarafKeywords.Issue Command On Karaf Console tep:commit
- ${resp} = RequestsLibrary.Delete Request session ${CONFIG_API}/itm:transport-zones/ data=${vtep_body}
- Log "Before disconnecting CSS with controller"
- ${output} = Issue Command On Karaf Console ${TEP_SHOW}
- BuiltIn.Should Not Contain ${output} ${itm_created[0]}
- BuiltIn.Wait Until Keyword Succeeds 30 5 Verify All Tunnel Delete on DS
- BuiltIn.Run Keyword And Ignore Error Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
- ${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_API}/itm:not-hosted-transport-zones/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- BuiltIn.Log ${respjson}
- BuiltIn.Should Not Contain ${resp.content} ${itm_created[0]}
+ ${resp} = RequestsLibrary.Delete Request session ${CONFIG_API}/itm:transport-zones/
+ BuiltIn.Should Be Equal As Strings ${resp.status_code} 200
+ BuiltIn.Wait Until Keyword Succeeds 30 5 Verify Tunnel Delete on DS tun
Genius Test Setup
[Documentation] Genius test case setup
Genius Test Teardown
[Arguments] ${data_models} ${test_name}=${SUITE_NAME}.${TEST_NAME} ${fail}=${FAIL_ON_EXCEPTIONS}
- OVSDB.Get DumpFlows And Ovsconfig ${conn_id_1} ${Bridge}
- OVSDB.Get DumpFlows And Ovsconfig ${conn_id_2} ${Bridge}
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ OVSDB.Get DumpFlows And Ovsconfig @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] ${Bridge}
BuiltIn.Run Keyword And Ignore Error DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${data_models}
KarafKeywords.Fail If Exceptions Found During Test ${test_name} fail=${fail}
- ODLTools.Get All node_ip=${ODL_SYSTEM_IP} test_name=${test_name}
+ ODLTools.Get All test_name=${test_name}
Genius Suite Debugs
[Arguments] ${data_models}
[Documentation] start suite for itm scalability
ClusterManagement.ClusterManagement_Setup
ClusterManagement.Stop_Members_From_List_Or_All
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
+ : FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
+ \ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
ClusterManagement.Start_Members_From_List_Or_All
Genius Suite Setup
ITM Direct Tunnels Stop Suite
- : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
+ [Documentation] Stop suite for ITM Direct Tunnels.
+ : FOR ${controller_index} IN RANGE ${NUM_ODL_SYSTEM}
+ \ Run Command On Remote System And Log ${ODL_SYSTEM_${controller_index+1}_IP} sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
Genius Suite Teardown
-Verify Tunnel Monitoring is on
- [Documentation] This keyword will get tep:show output and verify tunnel monitoring status
- ${output}= Issue Command On Karaf Console ${TEP_SHOW}
- Should Contain ${output} ${TUNNEL_MONITOR_ON}
-
-Ovs Verification For 2 Dpn
- [Arguments] ${connection_id} ${local} ${remote-1} ${tunnel} ${tunnel-type}
+Ovs Interface Verification
[Documentation] Checks whether the created Interface is seen on OVS or not.
- Switch Connection ${connection_id}
- ${check} Execute Command sudo ovs-vsctl show
- Log ${check}
- Should Contain ${check} local_ip="${local}" remote_ip="${remote-1}" ${tunnel} ${tunnel-type}
- [Return] ${check}
+ : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ Ovs Verification For Each Dpn ${tools_ip} ${TOOLS_SYSTEM_ALL_IPS}
Get ITM
- [Arguments] ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2}
- ... ${TOOLS_SYSTEM_2_IP}
+ [Arguments] ${itm_created[0]} ${subnet} ${vlan}
[Documentation] It returns the created ITM Transport zone with the passed values during the creation is done.
- Log ${itm_created[0]},${subnet}, ${vlan}, ${Dpn_id_1},${TOOLS_SYSTEM_IP}, ${Dpn_id_2}, ${TOOLS_SYSTEM_2_IP}
- @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${port_name}
- ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${port_name} ${TOOLS_SYSTEM_2_IP}
+ @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan}
+ @{Itm-no-vlan} Collections.Combine Lists ${Itm-no-vlan} ${SWITCH_DATA}
Check For Elements At URI ${TUNNEL_TRANSPORTZONE}/transport-zone/${itm_created[0]} ${Itm-no-vlan}
Check Tunnel Delete On OVS
- [Arguments] ${connection-id} ${tunnel}
+ [Arguments] ${tunnel_list}
[Documentation] Verifies the Tunnel is deleted from OVS.
- Switch Connection ${connection-id}
- ${return} = Execute Command sudo ovs-vsctl show
- log ${return}
- Should Not Contain ${return} ${tunnel}
- [Return] ${return}
-
-Check Table0 Entry For 2 Dpn
- [Arguments] ${connection_id} ${Bridgename} ${port-num1}
+ : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ ${output} = Utils.Run Command On Remote System ${tools_ip} sudo ovs-vsctl show
+ \ Genius.Verify Deleted Tunnels on OVS ${tunnel_list} ${output}
+
+Check Table0 Entry In a Dpn
+ [Arguments] ${tools_ip} ${bridgename} ${port_numbers}
[Documentation] Checks the Table 0 entry in the OVS when flows are dumped.
- Switch Connection ${connection_id}
- Log ${connection_id}
- ${check} Execute Command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridgename}
- Log ${check}
- Should Contain ${check} in_port=${port-num1}
- [Return] ${check}
-
-Check ITM Tunnel State
- [Arguments] ${tunnel1} ${tunnel2}
- [Documentation] Verifies the Tunnel is deleted from datastore
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/itm-state:tunnels_state/
- Should Not Contain ${resp.content} ${tunnel1} ${tunnel2}
-
-Verify Tunnel Status as UP
- [Arguments] ${Transport_zone}
+ ${check} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -OOpenFlow13 dump-flows ${bridgename}
+ ${num_ports} = BuiltIn.Get Length ${port_numbers}
+ : FOR ${port_index} IN RANGE ${num_ports}
+ \ BuiltIn.Should Contain ${check} in_port=@{port_numbers}[${port_index}]
+
+Verify Tunnel Status As Up
+ [Arguments] ${no_of_switches}=${NUM_TOOLS_SYSTEM}
[Documentation] Verify that the number of tunnels are UP
- ${No_of_Teps} Issue_Command_On_Karaf_Console ${TEP_SHOW}
- ${Lines_of_TZA} Get Lines Containing String ${No_of_Teps} ${Transport_zone}
- ${Expected_Node_Count} Get Line Count ${Lines_of_TZA}
- ${no_of_tunnels} Issue_Command_On_Karaf_Console ${TEP_SHOW_STATE}
- ${lines_of_VXLAN} Get Lines Containing String ${no_of_tunnels} VXLAN
- Should Contain ${no_of_tunnels} ${STATE_UP}
- Should Not Contain ${no_of_tunnels} ${STATE_DOWN}
- Should Not Contain ${no_of_tunnels} ${STATE_UNKNOWN}
- ${Actual_Tunnel_Count} Get Line Count ${lines_of_VXLAN}
- ${Expected_Tunnel_Count} Set Variable ${Expected_Node_Count*${Expected_Node_Count - 1}}
- Should Be Equal As Strings ${Actual_Tunnel_Count} ${Expected_Tunnel_Count}
+ ${no_of_tunnels} = Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ ${lines_of_state_up} = String.Get Lines Containing String ${no_of_tunnels} ${STATE_UP}
+ ${actual_tunnel_count} = String.Get Line Count ${lines_of_state_up}
+ ${expected_tunnel_count} = BuiltIn.Evaluate ${no_of_switches}*(${no_of_switches}-1)
+ Should Be Equal As Strings ${actual_tunnel_count} ${expected_tunnel_count}
Verify Tunnel Status
- [Arguments] ${tunnel_names} ${tunnel_status}
+ [Arguments] ${tunnel_status} ${tunnel_names}
[Documentation] Verifies if all tunnels in the input, has the expected status(UP/DOWN/UNKNOWN)
- ${tep_result} = KarafKeywords.Issue_Command_On_Karaf_Console ${TEP_SHOW_STATE}
- : FOR ${tunnel} IN @{tunnel_names}
+ ${tep_result} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ ${number_of_tunnels} = BuiltIn.Get Length ${tunnel_names}
+ : FOR ${each_tunnel} IN RANGE ${number_of_tunnels}
+ \ ${tunnel} = Collections.Get From List ${tunnel_names} ${each_tunnel}
\ ${tep_output} = String.Get Lines Containing String ${tep_result} ${tunnel}
\ BuiltIn.Should Contain ${tep_output} ${tunnel_status}
[Documentation] Retrieves the list of tunnel ports present on OVS
SSHLibrary.Switch Connection ${connection_id}
${ovs_result} = Utils.Write Commands Until Expected Prompt sudo ovs-vsctl show ${DEFAULT_LINUX_PROMPT_STRICT}
- ${tunnel_names} BuiltIn.Create List
+ @{tunnel_names} = BuiltIn.Create List
${tunnels} = String.Get Lines Matching Regexp ${ovs_result} Interface "tun.*" True
@{tunnels_list} = String.Split To Lines ${tunnels}
: FOR ${tun} IN @{tunnels_list}
- \ ${tun_list} BuiltIn.Should Match Regexp @{tunnels_list} tun.*\\w
- \ Collections.Append To List ${tunnel_names} ${tun_list}
+ \ ${tun_list} Get Regexp Matches ${tun} tun.*\\w
+ \ Collections.Append To List ${tunnel_names} @{tun_list}
${items_in_list} = BuiltIn.Get Length ${tunnel_names}
- [Return] ${Tunnel_Names}
+ [Return] @{tunnel_names}
Get Tunnel
- [Arguments] ${src} ${dst} ${type}
+ [Arguments] ${src} ${dst} ${type} ${config_api_type}=${EMPTY}
[Documentation] This keyword returns tunnel interface name between source DPN and destination DPN.
- ${resp} = RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${src}/${dst}/${type}/
+ ... Statements are executed depending on whether it is itm tunnel state(default) or dpn tep state.
+ ${resp} = BuiltIn.Run Keyword If '${config_api_type}' == '${EMPTY}' RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${src}/${dst}/${type}/
+ ... ELSE RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:dpn-teps-state/dpns-teps/${src}/remote-dpns/${dst}/
BuiltIn.Should Be Equal As Strings ${resp.status_code} ${RESP_CODE}
- BuiltIn.Should Contain ${resp.content} ${src}
- BuiltIn.Should Contain ${resp.content} ${dst}
+ BuiltIn.Log ${resp.content}
+ ${respjson} = RequestsLibrary.To Json ${resp.content} pretty_print=True
${json} = Utils.Json Parse From String ${resp.content}
- ${tunnel} = BuiltIn.Run Keyword If "tunnel-interface-names" in "${json}" Get Tunnel Interface Name ${json["internal-tunnel"][0]} tunnel-interface-names
+ BuiltIn.Should Contain ${resp.content} ${dst}
+ BuiltIn.Run Keyword If '${config_api_type}' == '${EMPTY}' BuiltIn.Should Contain ${resp.content} ${src}
+ ${tunnel_interface_name} = BuiltIn.Run Keyword If "tunnel-interface-names" in "${json}" Genius.Get Tunnel Interface Name ${json["internal-tunnel"][0]} tunnel-interface-names
+ ${tunnel_name_output} ${tunnel_name} = BuiltIn.Run Keyword Unless '${config_api_type}' == '${EMPTY}' BuiltIn.Should Match Regexp ${resp.content} "tunnel-name":"(tun[\\w\\d]+)"
+ ${tunnel} = BuiltIn.Set Variable If '${config_api_type}' == '${EMPTY}' ${tunnel_interface_name} ${tunnel_name}
[Return] ${tunnel}
Get Tunnel Interface Name
${tunnels} = Collections.Get From Dictionary ${json} ${expected_tunnel_interface_name}
[Return] ${tunnels[0]}
-Verify All Tunnel Delete on DS
- [Documentation] This keyword confirms that tunnels are not present by giving command from karaf console.
- Verify Tunnel Delete on DS tun
-
Verify Tunnel Delete on DS
[Arguments] ${tunnel}
[Documentation] This keyword confirms that specified tunnel is not present by giving command from karaf console.
SRM Start Suite
[Documentation] Start suite for service recovery.
Genius Suite Setup
- ${dpn_Id_1} = Genius.Get Dpn Ids ${conn_id_1}
- ${dpn_Id_2} = Genius.Get Dpn Ids ${conn_id_2}
- Genius.Create Vteps ${dpn_Id_1} ${dpn_Id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${vlan} ${gateway-ip}
- ${tunnel} = BuiltIn.Wait Until Keyword Succeeds 40 20 Genius.Get Tunnel ${dpn_Id_1} ${dpn_Id_2}
- ... odl-interface:tunnel-type-vxlan
- BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status as UP TZA
+ Genius.Create Vteps ${NO_VLAN} ${gateway_ip}
+ BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status As Up
Genius Suite Debugs ${data_models}
SRM Stop Suite
[Arguments] ${tunnel_monitor_status}
${output}= Issue Command On Karaf Console ${TEP_SHOW}
Should Contain ${output} ${tunnel_monitor_status}
+
+Set Switch Configuration
+ [Documentation] This keyword will set manager,controller,tap port,bridge on each OVS
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
+ \ SSHLibrary.Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ \ SSHLibrary.Execute Command sudo ovs-vsctl add-br ${Bridge}
+ \ SSHLibrary.Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
+ \ SSHLibrary.Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT_6653}
+ \ SSHLibrary.Execute Command sudo ifconfig ${Bridge} up
+ \ SSHLibrary.Execute Command sudo ovs-vsctl add-port ${Bridge} tap${tool_system_index}ed70586-6c -- set Interface tap${tool_system_index}ed70586-6c type=tap
+ \ SSHLibrary.Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT}
+ \ SSHLibrary.Execute Command sudo ovs-vsctl show
+
+Ovs Verification For Each Dpn
+ [Arguments] ${tools_system_ip} ${tools_ips}
+ [Documentation] This keyword will verify whether local and remote ip are present on the tunnels available on OVS
+ ${ovs_output} = Utils.Run Command On Remote System And Log ${tools_system_ip} sudo ovs-vsctl show
+ @{updated_tools_ip_list} = BuiltIn.Create List @{tools_ips}
+ Collections.Remove Values From List ${updated_tools_ip_list} ${tools_system_ip}
+ BuiltIn.Log Many @{updated_tools_ip_list}
+ ${num_tool_ips} BuiltIn.Get Length ${updated_tools_ip_list}
+ : FOR ${num} IN RANGE ${num_tool_ips}
+ \ ${tools_ip} = Collections.Get From List ${updated_tools_ip_list} ${num}
+ \ BuiltIn.Should Contain ${ovs_output} ${tools_ip}
+
+Get Tunnels List
+ [Documentation] The keyword fetches the list of operational tunnels from ODL
+ ${no_of_tunnels} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ ${tunnels} = String.Get Regexp Matches ${no_of_tunnels} tun[\\w\\d]+
+ BuiltIn.Log ${tunnels}
+ [Return] ${tunnels}
+
+Verify Table0 Entry After fetching Port Number
+ [Documentation] This keyword will get the port number and checks the table0 entry for each dpn
+ : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ ${check} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -O OpenFlow13 show ${Bridge}
+ \ ${port_numbers} = String.Get Regexp Matches ${check} (\\d+).tun.* 1
+ \ Genius.Check Table0 Entry In a Dpn ${tools_ip} ${Bridge} ${port_numbers}
+
+Verify Deleted Tunnels On OVS
+ [Arguments] ${tunnel_list} ${resp_data}
+ [Documentation] This will verify whether tunnel is deleted.
+ BuiltIn.Log ${resp_data}
+ : FOR ${tunnel} IN @{tunnel_list}
+ \ BuiltIn.Should Not Contain ${resp_data} ${tunnel}
+
+Verify Response Code Of Dpn End Point Config API
+ [Documentation] This keyword will verify response code from itm-state: dpn endpoints config api for each dpn
+ : FOR ${dpn} IN @{DPN_ID_LIST}
+ \ BuiltIn.Wait Until Keyword Succeeds 40 5 Utils.Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
+
+Get Tunnel Between DPNs
+ [Arguments] ${tunnel_type} ${config_api_type} ${dpn_id_index} @{DPN_ID_UPDATED_LIST}
+ [Documentation] This keyword will Get All the Tunnels available on DPN's
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM} -1
+ \ ${tunnel} BuiltIn.Wait Until Keyword Succeeds 30 10 Genius.Get Tunnel ${DPN_ID_LIST[${dpn_id_index}]}
+ \ ... ${DPN_ID_UPDATED_LIST[${tool_system_index}]} ${tunnel_type} ${config_api_type}
+ ${dpn_id_index} = BuiltIn.Evaluate ${dpn_id_index}+1
+ [Return] ${dpn_id_index}
+
+Update Dpn id List And Get Tunnels
+ [Arguments] ${tunnel_type} ${config_api_type}=${EMPTY}
+ [Documentation] Update the exisisting dpn id list to form different combination of dpn ids such that tunnel formation between all dpns is verified.
+ ${dpn_id_index_1} = BuiltIn.Set Variable 0
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ ${dpn_id_index_2} = BuiltIn.Set Variable ${dpn_id_index_1}
+ \ @{DPN_ID_UPDATED_LIST} = BuiltIn.Create List @{DPN_ID_LIST}
+ \ Collections.Remove Values From List ${DPN_ID_UPDATED_LIST} ${DPN_ID_LIST[${tool_system_index}]}
+ \ BuiltIn.Log Many ${DPN_ID_UPDATED_LIST}
+ \ ${dpn_id_index_1} = Get Tunnel Between DPNs ${tunnel_type} ${config_api_type} ${dpn_id_index_2} @{DPN_ID_UPDATED_LIST}
Library String
Library RequestsLibrary
Library Collections
-Library re
Library SSHLibrary
-Variables ../../variables/genius/Modules.py
Resource ../../libraries/DataModels.robot
Resource ../../libraries/Genius.robot
Resource ../../libraries/KarafKeywords.robot
Resource ../../libraries/OVSDB.robot
+Resource ../../libraries/ToolsSystem.robot
Resource ../../libraries/Utils.robot
Resource ../../libraries/VpnOperations.robot
+Resource ../../variables/netvirt/Variables.robot
Resource ../../variables/Variables.robot
Resource ../../libraries/CompareStream.robot
+Variables ../../variables/genius/Modules.py
*** Variables ***
-@{itm_created} TZA
-${genius_config_dir} ${CURDIR}/../../variables/genius
-${TEP_SHOW} tep:show
-${TEP_SHOW_STATE} tep:show-state
${TUNNEL_MONITOR_ON} Tunnel Monitoring (for VXLAN tunnels): On
${DEFAULT_MONITORING_INTERVAL} Tunnel Monitoring Interval (for VXLAN tunnels): 1000
${TUNNEL_MONITOR_OFF} Tunnel Monitoring (for VXLAN tunnels): Off
*** Test Cases ***
BFD_TC00 Create ITM between DPNs
[Documentation] Create ITM between DPNs
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${vlan}= Set Variable 0
- ${gateway-ip}= Set Variable 0.0.0.0
- Genius.Create Vteps ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${vlan} ${gateway-ip}
- Wait Until Keyword Succeeds 30s 5s Genius.Verify Tunnel Status as UP TZA
+ Genius.Create Vteps ${NO_VLAN} ${gateway_ip}
+ Wait Until Keyword Succeeds 30s 5s Genius.Verify Tunnel Status As Up
BFD_TC01 Verify default BFD monitoring status on Controller
[Documentation] Verify the default value of BFD monitoring \ on the Controller
BFD_TC04 Verify that in controller tunnel status is up when ITM tunnel interface is brought up.
[Documentation] Verify that in controller tunnel status is up when ITM tunnel interface is brought up.
- Wait Until Keyword Succeeds 10s 2s Verify Tunnel Monitoring Is On
- Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status as UP TZA
+ Wait Until Keyword Succeeds 10s 2s Verify Tunnel Monitoring Status ${TUNNEL_MONITOR_ON}
+ Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status As Up
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_TRUE} ${INTERFACE_DS_MONI_INT_1000} ${TUNNEL_MONI_PROTO}
BFD_TC05 Verify BFD tunnel monitoring interval can be changed.
[Documentation] Verify BFD tunnel monitoring interval can be changed.
${oper_int} RequestsLibrary.Put Request session ${CONFIG_API}/itm-config:tunnel-monitor-interval/ data=${INTERVAL_5000}
${Bfd_updated_value}= Create List 5000
- Wait Until Keyword Succeeds 30s 10s Check For Elements At Uri ${OPERATIONAL_API}/itm-config:tunnel-monitor-interval/ ${Bfd_updated_value}
- Wait Until Keyword Succeeds 30s 10s Check For Elements At Uri ${CONFIG_API}/itm-config:tunnel-monitor-interval/ ${Bfd_updated_value}
+ Wait Until Keyword Succeeds 30s 10s Check For Elements At URI ${OPERATIONAL_API}/itm-config:tunnel-monitor-interval/ ${Bfd_updated_value}
+ Wait Until Keyword Succeeds 30s 10s Check For Elements At URI ${CONFIG_API}/itm-config:tunnel-monitor-interval/ ${Bfd_updated_value}
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_TRUE} ${INTERFACE_DS_MONI_INT_5000} ${TUNNEL_MONI_PROTO}
- ${tun_name} Wait Until Keyword Succeeds 20 5 Ovs Tunnel Get ${TOOLS_SYSTEM_1_IP}
- Wait Until Keyword Succeeds 20s 5 OVSDB.Verify Ovs-vsctl Output list interface ${tun_name} 5000 ovs_system=${TOOLS_SYSTEM_1_IP}
- ${tun_name} Wait Until Keyword Succeeds 20 5 Ovs Tunnel Get ${TOOLS_SYSTEM_2_IP}
- Wait Until Keyword Succeeds 20s 5 OVSDB.Verify Ovs-vsctl Output list interface ${tun_name} 5000 ovs_system=${TOOLS_SYSTEM_2_IP}
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ ${tun_names} Genius.Get Tunnels On OVS ${TOOLS_SYSTEM_ALL_CONN_IDS[${tool_system_index}]}
+ \ Verify ovs-vsctl Output For Each Tunnel ${tun_names} ${tool_system_index}
BFD_TC06 Verify that the tunnel state goes to UNKNOWN when DPN is disconnected
[Documentation] Verify that the tunnel state goes to UNKNOWN when DPN is disconnected
- Issue Command On Karaf Console ${TEP_SHOW}
- Issue Command On Karaf Console ${TEP_SHOW_STATE}
- SSHLibrary.Switch Connection ${conn_id_1}
- Execute Command sudo ovs-vsctl del-controller ${Bridge}
- SSHLibrary.Switch Connection ${conn_id_2}
- Execute Command sudo ovs-vsctl del-controller ${Bridge}
- Issue Command On Karaf Console ${TEP_SHOW}
- Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ ToolsSystem.Run Command On All Tools Systems sudo ovs-vsctl del-controller ${Bridge}
Wait Until Keyword Succeeds 10s 1s Verify Tunnel Status as UNKNOWN
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_TRUE} ${INTERFACE_DS_MONI_INT_5000} ${TUNNEL_MONI_PROTO}
- SSHLibrary.Switch Connection ${conn_id_1}
- Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
- SSHLibrary.Switch Connection ${conn_id_2}
- Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
- Log "After connecting CSS with controller"
- Issue Command On Karaf Console ${TEP_SHOW}
- Issue Command On Karaf Console ${TEP_SHOW_STATE}
- Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status as UP TZA
+ ToolsSystem.Run Command On All Tools Systems sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}
+ Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status As Up
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_TRUE} ${INTERFACE_DS_MONI_INT_5000} ${TUNNEL_MONI_PROTO}
BFD_TC07 Set BFD monitoring To Default Value
*** Keywords ***
Verify Config Ietf Interface Output
[Arguments] ${state} ${interval} ${proto}
+ [Documentation] This keyword will get request from config ietf interface and verifies state, interval and proto are present
${int_resp} RequestsLibrary.Get Request session ${CONFIG_API}/ietf-interfaces:interfaces/
${respjson} RequestsLibrary.To Json ${int_resp.content} pretty_print=True
- Log ${respjson}
Should Contain ${respjson} ${state}
Should Contain ${respjson} ${interval}
Should Contain ${respjson} ${proto}
Verify Tunnel Monitoring Params
[Arguments] ${flag}
+ [Documentation] This keyword will verify the tunnel monitoring is true or false
@{checklist} create list ${flag}
Check For Elements At URI ${OPERATIONAL_API}/itm-config:tunnel-monitor-params/ ${checklist}
Wait Until Keyword Succeeds 10s 2s Verify Tunnel Monitoring Params ${TUNNEL_MONI_PARAMS_TRUE}
Wait Until Keyword Succeeds 10s 2s Verify Tunnel Monitoring Status ${TUNNEL_MONITOR_ON}
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_TRUE} ${interface_ds_moni_int} ${TUNNEL_MONI_PROTO}
- Wait Until Keyword Succeeds 20 2 Genius.Verify Tunnel Status as UP TZA
+ Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status As Up
Disable BFD And Verify
[Documentation] Disable BFD Monitoring And Verify On Controller.
Wait Until Keyword Succeeds 10s 2s Verify Tunnel Monitoring Params ${TUNNEL_MONI_PARAMS_FALSE}
Wait Until Keyword Succeeds 10s 2s Verify Tunnel Monitoring Status ${TUNNEL_MONITOR_OFF}
Wait Until Keyword Succeeds 10s 2s Verify Config Ietf Interface Output ${INTERFACE_DS_MONI_FALSE} ${INTERFACE_DS_MONI_INT_5000} ${TUNNEL_MONI_PROTO}
- Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status as UP TZA
+ Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status As Up
+
+Verify ovs-vsctl Output For Each Tunnel
+ [Arguments] ${tun_names} ${tool_system_index}
+ ${no of tunnels} = BuiltIn.Get Length ${tun_names}
+ : FOR ${each_tun} IN RANGE ${no of tunnels}
+ \ ${tun} Collections.Get From List ${tun_names} ${each_tun}
+ \ BuiltIn.Wait Until Keyword Succeeds 20 5 OVSDB.Verify Ovs-vsctl Output list interface ${tun} 5000
+ \ ... ovs_system=@{TOOLS_SYSTEM_ALL_IPS}[${tool_system_index}]
Library OperatingSystem
Library RequestsLibrary
Library String
-Library re
-Variables ../../variables/genius/Modules.py
Resource ../../libraries/DataModels.robot
Resource ../../libraries/Genius.robot
Resource ../../libraries/KarafKeywords.robot
+Resource ../../libraries/ToolsSystem.robot
Resource ../../libraries/Utils.robot
Resource ../../variables/netvirt/Variables.robot
Resource ../../variables/Variables.robot
+Variables ../../variables/genius/Modules.py
*** Variables ***
-@{itm_created} TZA
-${genius_config_dir} ${CURDIR}/../../variables/genius
-@{VLAN} 0 100 101
+${gateway_regex_IPV4} [0-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
+${gateway_regex_IPV6} [0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:
*** Test Cases ***
Create and Verify VTEP -No Vlan
[Documentation] This testcase creates a Internal Transport Manager - ITM tunnel between 2 DPNs without VLAN and Gateway configured in Json.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${gateway-ip}= Set Variable 0.0.0.0
- Genius.Create Vteps ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} @{VLAN}[0] ${gateway-ip}
- Wait Until Keyword Succeeds 40 10 Get ITM ${itm_created[0]} ${subnet} @{VLAN}[0]
- ... ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${TOOLS_SYSTEM_2_IP}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Wait Until Keyword Succeeds 40 20 Get Tunnel ${Dpn_id_1} ${Dpn_id_2}
- ... ${type}
- ${tunnel-2} Wait Until Keyword Succeeds 40 20 Get Tunnel ${Dpn_id_2} ${Dpn_id_1}
- ... ${type}
- ${tunnel-type}= Set Variable type: vxlan
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_1}/
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_2}/
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_1} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
- ... ${tunnel-1} ${tunnel-type}
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
- ... ${tunnel-2} ${tunnel-type}
- ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1}
- ... ${tunnel-2} ${OPERATIONAL_TOPO_API}
- ${return} Validate interface state ${tunnel-1} ${Dpn_id_1} ${tunnel-2} ${Dpn_id_2}
- log ${return}
- ${lower-layer-if-1} Get from List ${return} 0
- ${port-num-1} Get From List ${return} 1
- ${lower-layer-if-2} Get from List ${return} 2
- ${port-num-2} Get From List ${return} 3
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
- Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge} ${port-num-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge} ${port-num-2}
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/opendaylight-inventory:nodes/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
+ Genius.Create Vteps ${NO_VLAN} ${gateway_ip}
+ Wait Until Keyword Succeeds 40 10 Genius.Get ITM ${itm_created[0]} ${SUBNET} ${NO_VLAN}
+ ${type} = Set Variable odl-interface:tunnel-type-vxlan
+ Genius.Update Dpn id list and get tunnels ${type}
+ Genius.Verify Response Code Of Dpn Endpointconfig API
+ Wait Until Keyword Succeeds 40 10 Genius.Ovs Interface Verification
+ Wait Until Keyword Succeeds 60 5 Genius.Verify Tunnel Status As Up
+ Verify Network Topology
+ Verify Ietf Interface State
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Table0 Entry After fetching Port Number
+ ${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
+ ${respjson} = RequestsLibrary.To Json ${resp.content} pretty_print=True
Log ${respjson}
Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} ${lower-layer-if-1} ${lower-layer-if-2}
Delete and Verify VTEP -No Vlan
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
- ${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_1}/${port_name}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_2}/${port_name}
+ ${tunnel_list} = Genius.Get Tunnels List
+ : FOR ${dpn_id} IN @{DPN_ID_LIST}
+ \ Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
${output} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
${resp} Utils.Get Data From URI session ${CONFIG_API}/itm:transport-zones/
BuiltIn.Should Not Contain ${resp} ${itm_created[0]}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_1} ${tunnel-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_2} ${tunnel-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Deleted Tunnels On OVS ${tunnel_list} ${resp}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${tunnel_list}
Create and Verify VTEP IPv6 - No Vlan
[Documentation] This testcase creates a Internal Transport Manager - ITM tunnel between 2 DPNs without VLAN and Gateway configured in Json.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${gateway-ip}= Set Variable ::
- ${TOOLS_SYSTEM_IP} Set Variable fd96:2a25:4ad3:3c7d:0:0:0:1000
- ${TOOLS_SYSTEM_2_IP} Set Variable fd96:2a25:4ad3:3c7d:0:0:0:2000
- Create Vteps IPv6 ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} @{VLAN}[0] ${gateway-ip}
- Wait Until Keyword Succeeds 40 10 Get ITM ${itm_created[0]} ${subnet} @{VLAN}[0]
- ... ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${TOOLS_SYSTEM_2_IP}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Wait Until Keyword Succeeds 40 10 Get Tunnel ${Dpn_id_1} ${Dpn_id_2}
- ... ${type}
- ${tunnel-2} Wait Until Keyword Succeeds 40 10 Get Tunnel ${Dpn_id_2} ${Dpn_id_1}
- ... ${type}
- ${tunnel-type}= Set Variable type: vxlan
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_1}/ headers=${ACCEPT_XML}
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_2}/ headers=${ACCEPT_XML}
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_1} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
- ... ${tunnel-1} ${tunnel-type}
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
- ... ${tunnel-2} ${tunnel-type}
- ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1}
- ... ${tunnel-2} ${OPERATIONAL_TOPO_API}
+ ${gateway_ip} = BuiltIn.Set Variable ::
+ Build Tools System IPV6 List
+ Create Vteps IPv6 ${NO_VLAN} ${gateway_ip} ${TOOLS_SYSTEM_IPV6_LIST}
+ Wait Until Keyword Succeeds 40 10 Get ITM IPV6 ${itm_created[0]} ${SUBNET_IPV6} ${NO_VLAN}
+ ${type} = Set Variable odl-interface:tunnel-type-vxlan
+ Genius.Update Dpn id list and get tunnels ${type}
+ : FOR ${dpn} IN @{DPN_ID_LIST}
+ \ Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
+ \ ... headers=${ACCEPT_XML}
+ BuiltIn.Wait Until Keyword Succeeds 40 10 OVS Verification Between IPV6
+ @{all_tunnels} = BuiltIn.Create List
+ : FOR ${conn_id} IN @{TOOLS_SYSTEM_ALL_CONN_IDS}
+ \ ${tun_names} = Genius.Get Tunnels On OVS ${conn_id}
+ \ Collections.Append To List ${all_tunnels} @{tun_names}
+ @{network_topology_list} BuiltIn.Create List @{all_tunnels}
+ @{network_topology_list} Collections.Append To List ${network_topology_list} ${Bridge}
+ ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${OPERATIONAL_TOPO_API} ${network_topology_list}
Delete and Verify VTEP IPv6 -No Vlan
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${ipv6_1} Set Variable fd96:2a25:4ad3:3c7d:0:0:0:1000
- ${ipv6_2} Set Variable fd96:2a25:4ad3:3c7d:0:0:0:2000
- ${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
- ${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_1}/${port_name}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_2}/${port_name}
- ${output} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
+ ${type} = BuiltIn.Set Variable odl-interface:tunnel-type-vxlan
+ ${tunnel_list} = Genius.Get Tunnels List
+ : FOR ${dpn} IN @{DPN_ID_LIST}
+ \ Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET_IPV6}%2F16/vteps/${dpn}/${port_name}
+ ${output} = Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
- ${resp} Utils.Get Data From URI session ${CONFIG_API}/itm:transport-zones/
+ BuiltIn.Run Keyword And Ignore Error Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
+ ${resp} = Utils.Get Data From URI session ${CONFIG_API}/itm:transport-zones/
BuiltIn.Should Not Contain ${resp} ${itm_created[0]}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_1} ${tunnel-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_2} ${tunnel-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Deleted Tunnels On OVS ${tunnel_list} ${resp}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${tunnel_list}
Create and Verify VTEP-Vlan
- [Documentation] This testcase creates a Internal Transport Manager - ITM tunnel between 2 DPNs with VLAN and \ without Gateway configured in Json.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${gateway-ip}= Set Variable 0.0.0.0
- Genius.Create Vteps ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} @{VLAN}[1] ${gateway-ip}
- ${get} Wait Until Keyword Succeeds 40 10 Get ITM ${itm_created[0]} ${subnet}
- ... @{VLAN}[1] ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${TOOLS_SYSTEM_2_IP}
- Log ${get}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Wait Until Keyword Succeeds 40 10 Get Tunnel ${Dpn_id_1} ${Dpn_id_2}
- ... ${type}
- ${tunnel-2} Wait Until Keyword Succeeds 40 10 Get Tunnel ${Dpn_id_2} ${Dpn_id_1}
- ... ${type}
- ${tunnel-type}= Set Variable type: vxlan
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_1}/
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_2}/
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_1} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
- ... ${tunnel-1} ${tunnel-type}
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
- ... ${tunnel-2} ${tunnel-type}
- ${url_2} Set Variable ${OPERATIONAL_API}/network-topology:network-topology/
- Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1} ${tunnel-2}
- ... ${url_2}
- ${return} Validate interface state ${tunnel-1} ${Dpn_id_1} ${tunnel-2} ${Dpn_id_2}
- log ${return}
- ${lower-layer-if-1} Get from List ${return} 0
- ${port-num-1} Get From List ${return} 1
- ${lower-layer-if-2} Get from List ${return} 2
- ${port-num-2} Get From List ${return} 3
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
- Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge} ${port-num-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge} ${port-num-2}
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/opendaylight-inventory:nodes/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} ${lower-layer-if-2} ${lower-layer-if-1}
+ [Documentation] This testcase creates a Internal Transport Manager - ITM tunnel between 2 DPNs with VLAN and without Gateway configured in Json.
+ Genius.Create Vteps ${VLAN} ${gateway_ip}
+ Wait Until Keyword Succeeds 40 10 Genius.Get ITM ${itm_created[0]} ${SUBNET} ${VLAN}
+ ${type} = Set Variable odl-interface:tunnel-type-vxlan
+ Genius.Update Dpn id list and get tunnels ${type}
+ Genius.Verify Response Code Of Dpn Endpointconfig API
+ Wait Until Keyword Succeeds 40 10 Genius.Ovs Interface Verification
+ Verify Network Topology
+ Verify Ietf Interface State
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Table0 Entry After fetching Port Number
Delete and Verify VTEP -Vlan
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
- ${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_1}/${port_name}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_2}/${port_name}
+ ${type} = Set Variable odl-interface:tunnel-type-vxlan
+ ${tunnel_list} = Genius.Get Tunnels List
+ : FOR ${dpn_id} IN @{DPN_ID_LIST}
+ \ Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
${output} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
${resp} Utils.Get Data From URI session ${CONFIG_API}/itm:transport-zones/
BuiltIn.Should Not Contain ${resp} ${itm_created[0]}
- Wait Until Keyword Succeeds 40 10 Genius.Check ITM Tunnel State ${tunnel-1} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_1} ${tunnel-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_2} ${tunnel-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Deleted Tunnels On OVS ${tunnel_list} ${resp}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${tunnel_list}
Create VTEP - Vlan and Gateway
[Documentation] This testcase creates a Internal Transport Manager - ITM tunnel between 2 DPNs with VLAN and Gateway configured in Json.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${substr} Should Match Regexp ${TOOLS_SYSTEM_IP} [0-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
- ${subnet} Catenate ${substr}0
- ${gateway-ip} Catenate ${substr}1
- Set Suite Variable ${GATEWAY_IP} ${gateway-ip}
- Log ${subnet}
- Genius.Create Vteps ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} @{VLAN}[2] ${gateway-ip}
- Wait Until Keyword Succeeds 40 10 Get ITM ${itm_created[0]} ${subnet} @{VLAN}[2]
- ... ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${TOOLS_SYSTEM_2_IP}
+ ${substr} = BuiltIn.Should Match Regexp ${TOOLS_SYSTEM_IP} ${gateway_regex_IPV4}
+ ${gateway_ip} = BuiltIn.Catenate ${substr}1
+ Genius.Create Vteps ${VLAN} ${gateway_ip}
+ Wait Until Keyword Succeeds 40 10 Genius.Get ITM ${itm_created[0]} ${SUBNET} ${VLAN}
${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Wait Until Keyword Succeeds 40 10 Get Tunnel ${Dpn_id_1} ${Dpn_id_2}
- ... ${type}
- ${tunnel-2} Wait Until Keyword Succeeds 40 10 Get Tunnel ${Dpn_id_2} ${Dpn_id_1}
- ... ${type}
- ${tunnel-type}= Set Variable type: vxlan
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_1}/
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_2}/
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_1} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
- ... ${tunnel-1} ${tunnel-type}
- Wait Until Keyword Succeeds 40 10 Genius.Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
- ... ${tunnel-2} ${tunnel-type}
- ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1}
- ... ${tunnel-2} ${OPERATIONAL_TOPO_API}
- Log ${resp}
- ${return} Validate interface state ${tunnel-1} ${Dpn_id_1} ${tunnel-2} ${Dpn_id_2}
- log ${return}
- ${lower-layer-if-1} Get from List ${return} 0
- ${port-num-1} Get From List ${return} 1
- ${lower-layer-if-2} Get from List ${return} 2
- ${port-num-2} Get From List ${return} 3
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
- Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge} ${port-num-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge} ${port-num-2}
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/opendaylight-inventory:nodes/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} ${lower-layer-if-2} ${lower-layer-if-1}
+ Genius.Update Dpn id list and get tunnels ${type}
+ ${tunnel-type}= BuiltIn.Set Variable type: vxlan
+ Genius.Verify Response Code Of Dpn Endpointconfig API
+ Wait Until Keyword Succeeds 40 10 Genius.Ovs Interface Verification
+ Wait Until Keyword Succeeds 60 5 Genius.Verify Tunnel Status As Up
+ Verify Network Topology
+ Verify Ietf Interface State
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Table0 Entry After fetching Port Number
Delete VTEP -Vlan and gateway
[Documentation] This testcase deletes the ITM tunnel created between 2 dpns.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2} ${type}
- ${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1} ${type}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_1}/${port_name}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_2}/${port_name}
+ ${type} = Set Variable odl-interface:tunnel-type-vxlan
+ ${tunnel_list} = Genius.Get Tunnels List
+ : FOR ${dpn_id} IN @{DPN_ID_LIST}
+ \ Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
${output} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
${resp} Utils.Get Data From URI session ${CONFIG_API}/itm:transport-zones/
BuiltIn.Should Not Contain ${resp} ${itm_created[0]}
- Wait Until Keyword Succeeds 40 10 Genius.Check ITM Tunnel State ${tunnel-1} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_1} ${tunnel-1}
- Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_2} ${tunnel-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Deleted Tunnels On OVS ${tunnel_list} ${resp}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${tunnel_list}
*** Keywords ***
Create Vteps IPv6
- [Arguments] ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${vlan} ${gateway-ip}
- [Documentation] This keyword creates VTEPs between ${TOOLS_SYSTEM_IP} and ${TOOLS_SYSTEM_2_IP}
- ${body} OperatingSystem.Get File ${genius_config_dir}/Itm_creation_no_vlan.json
- ${substr} Should Match Regexp ${TOOLS_SYSTEM_IP} [0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:[0-9a-fA-F]{1,4}:
- ${subnet} Catenate ${substr}0
- Log ${subnet}
- Set Global Variable ${subnet}
- ${gateway-ip}= Set Variable ${gateway-ip}
- ${body} Genius.Set Json ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${vlan}
- ... ${gateway-ip} ${subnet}
- Post Log Check ${CONFIG_API}/itm:transport-zones/ ${body} 204
-
-Get Tunnel
- [Arguments] ${src} ${dst} ${type}
- [Documentation] This Keyword Gets the Tunnel /Interface name which has been created between 2 DPNS by passing source , destination DPN Ids along with the type of tunnel which is configured.
- ${resp} RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${src}/${dst}/${type}/
- log ${resp.content}
- Log ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${src}/${dst}/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} ${src} ${dst}
- ${json}= evaluate json.loads('''${resp.content}''') json
- log to console \nOriginal JSON:\n${json}
- ${return} Run Keyword And Return Status Should contain ${resp.content} tunnel-interface-names
- log ${return}
- ${ret} Run Keyword If '${return}'=='True' Check Interface Name ${json["internal-tunnel"][0]} tunnel-interface-names
- [Return] ${ret}
-
-Validate interface state
- [Arguments] ${tunnel-1} ${dpid-1} ${tunnel-2} ${dpid-2}
- [Documentation] Validates the created Interface Tunnel by checking its Operational status as UP/DOWN from the dump.
- Log ${tunnel-1},${dpid-1},${tunnel-2},${dpid-2}
- ${data1-2} Wait Until Keyword Succeeds 40 10 Check Interface Status ${tunnel-1} ${dpid-1}
- ${data2-1} Wait Until Keyword Succeeds 40 10 Check Interface Status ${tunnel-2} ${dpid-2}
- @{data} combine lists ${data1-2} ${data2-1}
- log ${data}
- [Return] ${data}
-
-Get ITM
- [Arguments] ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2}
- ... ${TOOLS_SYSTEM_2_IP}
- [Documentation] It returns the created ITM Transport zone with the passed values during the creation is done.
- Log ${itm_created[0]},${subnet}, ${vlan}, ${Dpn_id_1},${TOOLS_SYSTEM_IP}, ${Dpn_id_2}, ${TOOLS_SYSTEM_2_IP}
- @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${port_name}
- ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${port_name} ${TOOLS_SYSTEM_2_IP}
- Check For Elements At URI ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]} ${Itm-no-vlan}
+ [Arguments] ${vlan} ${gateway_ip} ${tools_ips}
+ [Documentation] This keyword creates VTEPs between IPV6 ip's
+ ${body} = OperatingSystem.Get File ${genius_config_dir}/Itm_creation_no_vlan.json
+ ${substr} = Should Match Regexp @{tools_ips}[0] ${gateway_regex_IPV6}
+ ${SUBNET_IPV6} = Catenate ${substr}0
+ Set Suite Variable ${SUBNET_IPV6}
+ ${body} = Genius.Set Json ${vlan} ${gateway_ip} ${SUBNET_IPV6} @{TOOLS_SYSTEM_IPV6_LIST}
+ Utils.Post Log Check ${CONFIG_API}/itm:transport-zones/ ${body} 204
Get Network Topology with Tunnel
- [Arguments] ${Bridge} ${tunnel-1} ${tunnel-2} ${url}
+ [Arguments] ${url} ${network_topology_list}
[Documentation] Returns the Network topology with Tunnel info in it.
- @{bridges} Create List ${Bridge} ${tunnel-1} ${tunnel-2}
- Check For Elements At URI ${url} ${bridges}
-
-Get Network Topology without Tunnel
- [Arguments] ${url} ${tunnel-1} ${tunnel-2}
- [Documentation] Returns the Network Topology after Deleting of ITM transport zone is done , which wont be having any TUNNEL info in it.
- @{tunnels} create list ${tunnel-1} ${tunnel-2}
- Check For Elements Not At URI ${url} ${tunnels}
+ Check For Elements At URI ${url} ${network_topology_list}
-Validate interface state Delete
- [Arguments] ${tunnel}
- [Documentation] Check for the Tunnel / Interface absence in OPERATIONAL data base of IETF interface after ITM transport zone is deleted.
- Log ${tunnel}
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/interface/${tunnel}/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Be Equal As Strings ${resp.status_code} 404
- Should not contain ${resp.content} ${tunnel}
-
-check-Tunnel-delete-on-ovs
- [Arguments] ${connection-id} ${tunnel}
- [Documentation] Verifies the Tunnel is deleted from OVS
- Log ${tunnel}
- Switch Connection ${connection-id}
- Log ${connection-id}
- ${return} Execute Command sudo ovs-vsctl show
- Log ${return}
- Should Not Contain ${return} ${tunnel}
- [Return] ${return}
-
-Check Interface Status
- [Arguments] ${tunnel} ${dpid}
- [Documentation] Verifies the operational state of the interface .
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/interface/${tunnel}/
- Log ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/interface/${tunnel}/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Log ${respjson}
- Should Be Equal As Strings ${resp.status_code} 200
- Should not contain ${resp.content} down
- Should Contain ${resp.content} ${tunnel} up up
- ${result-1} re.sub <.*?> , ${resp.content}
- Log ${result-1}
- ${lower_layer_if} Should Match Regexp ${result-1} openflow:${dpid}:[0-9]+
- log ${lower_layer_if}
- @{resp_array} Split String ${lower_layer_if} :
- ${port-num} Get From List ${resp_array} 2
- Log ${port-num}
- [Return] ${lower_layer_if} ${port-num}
-
-Verify Data Base after Delete
- [Arguments] ${Dpn_id_1} ${Dpn_id_2} ${tunnel-1} ${tunnel-2}
- [Documentation] Verifies the config database after the Tunnel deletion is done.
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- No Content From URI session ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${Dpn_id_1}/${Dpn_id_2}/${type}/
- No Content From URI session ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${Dpn_id_2}/${Dpn_id_1}/${type}/
- No Content From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_1}/
- No Content From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_2}/
- ${resp_7} RequestsLibrary.Get Request session ${CONFIG_API}/ietf-interfaces:interfaces/
- Run Keyword if '${resp_7.content}'=='404' Response is 404
- Run Keyword if '${resp_7.content}'=='200' Response is 200
- ${resp_8} Wait Until Keyword Succeeds 40 10 Get Network Topology without Tunnel ${CONFIG_TOPO_API} ${tunnel-1}
- ... ${tunnel-2}
- Log ${resp_8}
- Wait Until Keyword Succeeds 40 10 check-Tunnel-delete-on-ovs ${conn_id_1} ${tunnel-1}
- Wait Until Keyword Succeeds 40 10 check-Tunnel-delete-on-ovs ${conn_id_2} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Get Network Topology without Tunnel ${OPERATIONAL_TOPO_API} ${tunnel-1} ${tunnel-2}
- Wait Until Keyword Succeeds 40 10 Validate interface state Delete ${tunnel-1}
- Wait Until Keyword Succeeds 40 10 Validate interface state Delete ${tunnel-2}
+Get ITM IPV6
+ [Arguments] ${itm_created[0]} ${subnet} ${vlan}
+ [Documentation] It returns the created ITM Transport zone with the passed values during the creation is done.
+ @{Itm-no-vlan} = BuiltIn.Create List ${itm_created[0]} ${subnet} ${vlan} ${Bridge}
+ @{Itm-no-vlan} = Collections.Combine Lists ${Itm-no-vlan} ${TOOLS_SYSTEM_IPV6_LIST} ${DPN_ID_LIST}
+ BuiltIn.Log Many @{Itm-no-vlan}
+ Check For Elements At URI ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]} ${Itm-no-vlan}
-Check Interface Name
- [Arguments] ${json} ${expected_tunnel_interface_name}
- [Documentation] This keyword Checks the Tunnel interface name is tunnel-interface-names in the output or not .
- ${Tunnels} Collections.Get From Dictionary ${json} ${expected_tunnel_interface_name}
- Log ${Tunnels}
- [Return] ${Tunnels[0]}
+OVS Verification Between IPV6
+ [Documentation] This keyword will verify tunnels available on ovs
+ : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ Genius.Ovs Verification For Each Dpn ${tools_ip} ${TOOLS_SYSTEM_IPV6_LIST}
+
+Verify Network Topology
+ [Documentation] This keyword will verify whether all tunnels and bridges are populated in network topology
+ ${all_tunnels} Genius.Get Tunnels List
+ @{network_topology_list} BuiltIn.Create List
+ @{network_topology_list} Collections.Append To List ${network_topology_list} ${Bridge}
+ @{network_topology_list} Collections.Combine Lists ${network_topology_list} ${all_tunnels}
+ ${resp} BuiltIn.Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${OPERATIONAL_TOPO_API} ${network_topology_list}
+
+Verify Ietf Interface State
+ Check For Elements At URI ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/ ${DPN_ID_LIST} session True
+ ${all_tunnels} Genius.Get Tunnels List
+ Check For Elements At URI ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/ ${all_tunnels} session True
+
+Build Tools System IPV6 List
+ [Documentation] Create a list of tools system ips with IPV6.
+ @{TOOLS_SYSTEM_IPV6_LIST} = BuiltIn.Create List
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ Collections.Append To List ${TOOLS_SYSTEM_IPV6_LIST} fd96:2a25:4ad3:3c7d:0:0:${tool_system_index}:1000
+ BuiltIn.Set Suite Variable @{TOOLS_SYSTEM_IPV6_LIST}
Suite Teardown ITM Direct Tunnels Stop Suite
Test Setup Genius Test Setup
Test Teardown Genius Test Teardown ${data_models}
+Library Collections
Library OperatingSystem
-Library String
Library RequestsLibrary
-Variables ../../variables/genius/Modules.py
-Resource ../../libraries/DataModels.robot
-Library Collections
-Resource ../../libraries/Utils.robot
-Library re
-Resource ../../libraries/VpnOperations.robot
+Library String
Resource ../../libraries/ClusterManagement.robot
-Resource ../../libraries/KarafKeywords.robot
-Resource ../../libraries/Utils.robot
+Resource ../../libraries/DataModels.robot
Resource ../../libraries/Genius.robot
+Resource ../../libraries/KarafKeywords.robot
Resource ../../variables/netvirt/Variables.robot
-Resource ../../variables/Variables.robot
Resource ../../libraries/OVSDB.robot
+Resource ../../libraries/ToolsSystem.robot
+Resource ../../libraries/Utils.robot
+Resource ../../libraries/VpnOperations.robot
+Resource ../../variables/Variables.robot
+Variables ../../variables/genius/Modules.py
*** Variables ***
-${VLAN} 0
*** Test Cases ***
Create and Verify VTEP
[Documentation] This testcase creates a Internal Transport Manager - ITM tunnel between 2 DPNs
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${gateway-ip}= Set Variable 0.0.0.0
- Genius.Create Vteps ${Dpn_id_1} ${Dpn_id_2} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} ${VLAN} ${gateway-ip}
- Wait Until Keyword Succeeds 40 10 Get ITM ${itm_created[0]} ${subnet} ${VLAN}
- ... ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${TOOLS_SYSTEM_2_IP}
- ${type} Set Variable odl-interface:tunnel-type-vxlan
- ${tunnel-1} Wait Until Keyword Succeeds 40 20 Get_Tunnel ${Dpn_id_1} ${Dpn_id_2}
- ${tunnel-2} Wait Until Keyword Succeeds 40 20 Get_Tunnel ${Dpn_id_2} ${Dpn_id_1}
- ${tunnel-type}= Set Variable type: vxlan
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_1}/
- Wait Until Keyword Succeeds 40 5 Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${Dpn_id_2}/
- Wait Until Keyword Succeeds 40 10 Ovs Verification For 2 Dpn ${conn_id_1} ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
- ... ${tunnel-1} ${tunnel-type}
- Wait Until Keyword Succeeds 40 10 Ovs Verification For 2 Dpn ${conn_id_2} ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
- ... ${tunnel-2} ${tunnel-type}
- ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/itm-state:tunnels_state/
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
+ Genius.Create Vteps ${NO_VLAN} ${gateway_ip}
+ Wait Until Keyword Succeeds 40 10 Genius.Get ITM ${itm_created[0]} ${SUBNET} ${NO_VLAN}
+ ${type} = BuiltIn.Set Variable odl-interface:tunnel-type-vxlan
+ Genius.Update Dpn id list and get tunnels ${type} dpn-teps-state
+ Genius.Verify Response Code Of Dpn Endpointconfig API
+ Wait Until Keyword Succeeds 40 10 Genius.Ovs Interface Verification
+ ${resp} = RequestsLibrary.Get Request session ${OPERATIONAL_API}/itm-state:tunnels_state/
Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} ${Dpn_id_1} ${tunnel-1}
- Should Contain ${resp.content} ${Dpn_id_2} ${tunnel-2}
- ${Port_num1} Get Port Number ${conn_id_1} ${Bridge} ${tunnel-1}
- ${Port_num2} Get Port Number ${conn_id_2} ${Bridge} ${tunnel-2}
- ${check-3} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge}
- ... ${Port_num1}
- ${check-4} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge}
- ... ${Port_num2}
+ Wait Until Keyword Succeeds 60 5 Genius.Verify Tunnel Status As Up
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Table0 Entry After fetching Port Number
Verify VTEP After Restarting OVS
[Documentation] Verify Testcase, Verifying tunnel state by restarting OVS
- Wait Until Keyword Succeeds 20 2 Genius.Verify Tunnel Status as UP TZA
+ Wait Until Keyword Succeeds 20 2 Genius.Verify Tunnel Status As Up
OVSDB.Restart OVSDB ${TOOLS_SYSTEM_IP}
- Wait Until Keyword Succeeds 20 2 Genius.Verify Tunnel Status as UP TZA
Verify VTEP After Restarting Controller
[Documentation] Verify Testcase, Verifying tunnel state by restarting CONTROLLER
- Genius.Verify Tunnel Status as UP TZA
+ BuiltIn.Wait Until Keyword Succeeds 30 3 Genius.Verify Tunnel Status As Up
ClusterManagement.Stop_Members_From_List_Or_All
ClusterManagement.Start_Members_From_List_Or_All
Wait Until Keyword Succeeds 60 3 ClusterManagement.Check Status Of Services Is OPERATIONAL @{GENIUS_DIAG_SERVICES}
- Wait Until Keyword Succeeds 30 3 Genius.Verify Tunnel Status as UP TZA
+ Wait Until Keyword Succeeds 30 3 Genius.Verify Tunnel Status As Up
Verify Tunnels By Enabling/Disabling BFD
[Documentation] Verify tunnel creation by enabling and disabling BFD one after another with respect to the branch in such a way default value is retained at last.
Delete and Verify VTEP
[Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns.
- ${Dpn_id_1} Genius.Get Dpn Ids ${conn_id_1}
- ${Dpn_id_2} Genius.Get Dpn Ids ${conn_id_2}
- ${tunnel-1} Get_Tunnel ${Dpn_id_1} ${Dpn_id_2}
- ${tunnel-2} Get_Tunnel ${Dpn_id_2} ${Dpn_id_1}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_1}/${port_name}
- Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${subnet}%2F24/vteps/${Dpn_id_2}/${port_name}
+ ${tunnel_list} Genius.Get Tunnels List
+ : FOR ${dpn_id} IN @{DPN_ID_LIST}
+ \ Utils.Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/subnets/${SUBNET}%2F16/vteps/${dpn_id}/${port_name}
${output} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Not Contain ${output} ${itm_created[0]}
Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
${resp} Utils.Get Data From URI session ${CONFIG_API}/itm:transport-zones/
BuiltIn.Should Not Contain ${resp} ${itm_created[0]}
- ${Ovs-del-1} Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_1} ${tunnel-1}
- ${Ovs-del-2} Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${conn_id_2} ${tunnel-2}
+ Wait Until Keyword Succeeds 40 10 Genius.Verify Deleted Tunnels On OVS ${tunnel_list} ${resp}
+ Wait Until Keyword Succeeds 40 10 Genius.Check Tunnel Delete On OVS ${tunnel_list}
*** Keywords ***
-Get_Tunnel
- [Arguments] ${src} ${dst}
- [Documentation] This Keyword Gets the Tunnel Interface name which has been created between 2 DPNS by passing source , destination DPN Ids along with the type of tunnel which is configured.
- ${resp} RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:dpn-teps-state/dpns-teps/${src}/remote-dpns/${dst}/
- log ${resp.content}
- ${respjson} RequestsLibrary.To Json ${resp.content} pretty_print=True
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} ${dst}
- ${json}= evaluate json.loads('''${resp.content}''') json
- ${return} Run Keyword And Return Status Should contain ${resp.content} tunnel-name
- log ${return}
- ${ret} Run Keyword If '${return}'=='True' Check_Interface_Name ${json["remote-dpns"][0]} tunnel-name
- [Return] ${ret}
-
-Check_Interface_Name
- [Arguments] ${json} ${expected_tunnel_interface_name}
- [Documentation] This keyword Checks the Tunnel interface name is tunnel-interface-names in the output or not .
- ${Tunnels} Collections.Get From Dictionary ${json} ${expected_tunnel_interface_name}
- Log ${Tunnels}
- [Return] ${Tunnels}
-
Enable_Tunnel_Monitoring
[Documentation] In this we will enable tunnel monitoring by tep:enable command running in karaf console
- ${output} Issue_Command_On_Karaf_Console tep:enable-tunnel-monitor true
+ Issue_Command_On_Karaf_Console tep:enable-tunnel-monitor true
Verify Tunnel State After OVS Restart
[Arguments] ${TOOLS_SYSTEM_IP}
OVSDB.Stop OVS ${TOOLS_SYSTEM_IP}
Wait Until Keyword Succeeds 2min 20 sec Verify Tunnel Down
OVSDB.Start OVS ${TOOLS_SYSTEM_IP}
- Wait Until Keyword Succeeds 2min 20 sec Genius.Verify Tunnel Status as UP TZA
+ Wait Until Keyword Succeeds 2min 20 sec Genius.Verify Tunnel Status As Up
Verify Tunnel Down
[Documentation] In this we will check whether tunnel is in down or not
- ${output}= KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ ${output}= KarafKeywords.Issue_Command_On_Karaf_Console ${TEP_SHOW_STATE}
Should Contain ${output} DOWN
-Get Port Number
- [Arguments] ${connection_id} ${Bridgename} ${tunnel}
- [Documentation] In this we get Port Number to check table0 entry for 2 Dpn
- Switch Connection ${connection_id}
- ${check-1} Execute Command sudo ovs-ofctl -O OpenFlow13 show ${Bridgename}
- Log ${check-1}
- ${lines} Get Lines Containing String ${check-1} ${tunnel}
- Log ${lines}
- ${port} Get Regexp Matches ${lines} \\d+
- ${port_num} Get From List ${port} 0
- Should Contain ${check-1} ${port_num}
- [Return] ${port_num}
-
Disable_Tunnel_Monitoring
[Documentation] In this we will disable tunnel monitoring by tep:enable command running in karaf console
- ${output} Issue_Command_On_Karaf_Console tep:enable-tunnel-monitor false
+ Issue_Command_On_Karaf_Console tep:enable-tunnel-monitor false
Verify Tunnels By Enabling BFD
[Documentation] Verify tunnel creation by enabling BFD monitoring.
- ${result} Run Keyword And Return Status Verify Tunnel Monitoring is on
+ ${result} Run Keyword And Return Status Genius.Verify Tunnel Monitoring Status ${TUNNEL_MONITOR_ON}
Run Keyword If '${result}' == 'False' Enable_Tunnel_monitoring
- Verify Tunnel State After OVS Restart ${TOOLS_SYSTEM_IP}
- Verify Tunnel State After OVS Restart ${TOOLS_SYSTEM_2_IP}
+ : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ Verify Tunnel State After OVS Restart ${tools_ip}
Verify Tunnels By Disabling BFD
[Documentation] Verify tunnel creation by disabling BFD monitoring.
- ${result} = Run Keyword And Return Status Verify Tunnel Monitoring is on
+ ${result} = Run Keyword And Return Status Genius.Verify Tunnel Monitoring Status ${TUNNEL_MONITOR_ON}
Run Keyword If '${result}' == 'True' Disable_Tunnel_Monitoring
- ${tunnels_on_OVS} = Genius.Get Tunnels On OVS ${conn_id_1}
+ ${tunnels_on_OVS} = Genius.Get Tunnels On OVS ${TOOLS_SYSTEM_ALL_CONN_IDS[0]}
OVSDB.Stop OVS ${TOOLS_SYSTEM_IP}
- Genius.Verify Tunnel Status ${tunnels_on_OVS} UNKNOWN
+ Genius.Verify Tunnel Status UNKNOWN ${tunnels_on_OVS}
OVSDB.Start OVS ${TOOLS_SYSTEM_IP}
- Wait Until Keyword Succeeds 20 2 Genius.Verify Tunnel Status as UP TZA
+ Wait Until Keyword Succeeds 10s 1s Genius.Verify Tunnel Status As Up
*** Settings ***
Documentation Test suite to validate ITM VTEP auto-configuration functionality in openstack integrated environment.
Suite Setup BuiltIn.Run Keywords Genius.Genius Suite Setup
-... AND OvsManager.Verify Ovs Version Greater Than Or Equal To ${OVS_VERSION} @{COMPUTE-NODE-LIST}
+... AND OvsManager.Verify Ovs Version Greater Than Or Equal To ${OVS_VERSION} @{TOOLS_SYSTEM_ALL_IPS}
Suite Teardown Genius.Genius Suite Teardown
Test Setup Genius Test Setup
Test Teardown Genius Test Teardown ${data_models}
${STATUS_CHECK} DOWN
${TRANSPORT_ZONE} TZA
${TRANSPORTZONE_POST_URL} ${CONFIG_API}/itm:transport-zones
-@{COMPUTE-NODE-LIST} ${TOOLS_SYSTEM_1_IP} ${TOOLS_SYSTEM_2_IP}
*** Test Cases ***
Verify TEP in controller and transport zone in OVSDB table of compute nodes
[Documentation] Set local ip in compute nodes and verify default transport zone tunnels are up in controller
- : FOR ${ip} IN @{COMPUTE-NODE-LIST}
+ @{LOCAL_IPS} = BuiltIn.Create List
+ : FOR ${ip} IN @{TOOLS_SYSTEM_ALL_IPS}
\ ${localip} = Utils.Run Command On Remote System ${ip} ${SET_LOCAL_IP}${ip}
- ${dpn} = OVSDB.Get DPID ${TOOLS_SYSTEM_1_IP}
- ${dpn} = BuiltIn.Convert To String ${dpn}
- BuiltIn.Set Suite Variable ${DPN1} ${dpn}
- ${dpn} = OVSDB.Get DPID ${TOOLS_SYSTEM_2_IP}
- ${dpn} = BuiltIn.Convert To String ${dpn}
- BuiltIn.Set Suite Variable ${DPN2} ${dpn}
- ${ip} = OvsManager.Get OVS Local Ip ${TOOLS_SYSTEM_1_IP}
- BuiltIn.Set Suite Variable ${LOCAL_IP_COMPUTE1} ${ip}
- ${ip} = OvsManager.Get OVS Local Ip ${TOOLS_SYSTEM_2_IP}
- BuiltIn.Set Suite Variable ${LOCAL_IP_COMPUTE2} ${ip}
- BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as UP ${DEFAULT_TRANSPORT_ZONE}
+ : FOR ${node_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ ${ip} = OvsManager.Get OVS Local Ip ${node_ip}
+ \ Collections.Append To List ${LOCAL_IPS} ${ip}
+ BuiltIn.Set Suite Variable @{LOCAL_IPS}
+ BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as Up
Verify TEPs with transport zone configured from OVS will be added to corresponding transport zone
[Documentation] To Verify transport zone name change in external id field of ovsdb and check status when moved from tep nohosted zone to TZA
Change Transport Zone In Compute ${TOOLS_SYSTEM_1_IP} ${TRANSPORT_ZONE}
${get_nohosted_data} = BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Utils.Get Data From URI session ${TEP_NOT_HOSTED_ZONE_URL}
BuiltIn.Should Contain ${get_nohosted_data} ${TRANSPORT_ZONE}
- BuiltIn.Should Contain ${get_nohosted_data} ${DPN1}
+ BuiltIn.Should Contain ${get_nohosted_data} @{DPN_ID_LIST}[0]
Utils.Post Elements To URI From File ${TRANSPORTZONE_POST_URL} ${TZA_JSON}
- Change Transport Zone In Compute ${TOOLS_SYSTEM_2_IP} ${TRANSPORT_ZONE}
- : FOR ${node} IN @{COMPUTE-NODE-LIST}
+ : FOR ${node_number} IN RANGE 2 ${NUM_TOOLS_SYSTEM}+1
+ \ Change Transport Zone In Compute ${TOOLS_SYSTEM_${node_number}_IP} ${TRANSPORT_ZONE}
+ : FOR ${node} IN @{TOOLS_SYSTEM_ALL_IPS}
\ ${output} = Utils.Run Command On Remote System ${node} ${GET_EXTERNAL_IDS}
\ BuiltIn.Should Contain ${output} ${TRANSPORT_ZONE}
${get_hosted_data} = BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Utils.Get Data From URI session ${TRANSPORT_ZONE_ENDPOINT_URL}/${TRANSPORT_ZONE}
BuiltIn.Should Contain ${get_hosted_data} ${TRANSPORT_ZONE}
- BuiltIn.Should Contain ${get_hosted_data} ${DPN1}
- BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as UP ${TRANSPORT_ZONE}
+ BuiltIn.Should Contain ${get_hosted_data} @{DPN_ID_LIST}[0]
+ BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as Up
Verify other-config-key and transport zone value in controller operational datastore
[Documentation] validate local_ip and transport-zone value from controller datastore and Verify value of external-id-key with transport_zone in Controller operational datastore
${controller-data} = Utils.Get Data From URI session ${GET_NETWORK_TOPOLOGY_URL}
- BuiltIn.Should Contain ${controller-data} "other-config-value":"${LOCAL_IP_COMPUTE1}"
- BuiltIn.Should Contain ${controller-data} "other-config-value":"${LOCAL_IP_COMPUTE2}"
+ : FOR ${node_ip} IN @{LOCAL_IPS}
+ \ BuiltIn.Should Contain ${controller-data} "other-config-value":"${node_ip}"
BuiltIn.Should Contain ${controller-data} "external-id-value":"${TRANSPORT_ZONE}"
Delete transport zone on OVS and check ovsdb update to controller
[Documentation] To verify transport zone moves to default zone after deleting zone name in compute nodes
- : FOR ${node} IN @{COMPUTE-NODE-LIST}
+ : FOR ${node} IN @{TOOLS_SYSTEM_ALL_IPS}
\ Utils.Run Command On Remote System ${node} ${DELETE_TRANSPORT_ZONE}
${tep_show_output} = KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW}
BuiltIn.Should Contain ${tep_show_output} ${DEFAULT_TRANSPORT_ZONE}
- BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as UP ${DEFAULT_TRANSPORT_ZONE}
+ BuiltIn.Wait Until Keyword Succeeds 3x 10 sec Genius.Verify Tunnel Status as Up
VpnOperations.ITM Delete Tunnel ${TRANSPORT_ZONE}
*** Keywords ***
Suite Teardown Genius Suite Teardown
Test Setup Genius Test Setup
Test Teardown Genius Test Teardown ${data_models}
+Library Collections
Library OperatingSystem
-Library String
Library RequestsLibrary
-Library Collections
-Library re
-Variables ../../variables/genius/Modules.py
+Library String
Resource ../../libraries/DataModels.robot
Resource ../../libraries/Genius.robot
Resource ../../libraries/Utils.robot
Resource ../../variables/Variables.robot
+Variables ../../variables/genius/Modules.py
*** Variables ***
-${genius_config_dir} ${CURDIR}/../../variables/genius
${interface_name} l2vlan-trunk
${trunk_json} l2vlan.json
${trunk_member_json} l2vlan_member.json
@{l2vlan} create list l2vlan-trunk l2vlan transparent l2vlan true
Check For Elements At URI ${CONFIG_API}/ietf-interfaces:interfaces/ ${l2vlan}
Wait Until Keyword Succeeds 50 5 get operational interface ${interface_name}
- Wait Until Keyword Succeeds 40 10 table0 entry ${conn_id_1} ${Bridge}
+ Wait Until Keyword Succeeds 40 10 table0 entry ${TOOLS_SYSTEM_1_IP}
Delete l2vlan transparent interface
[Documentation] This testcase deletes the l2vlan transparent interface created between 2 dpns.
Create l2vlan trunk interface
[Documentation] This testcase creates a l2vlan trunk interface between 2 DPNs.
Create Interface ${trunk_json} trunk
- @{l2vlan} create list l2vlan-trunk l2vlan trunk tap8ed70586-6c true
+ @{l2vlan} create list l2vlan-trunk l2vlan trunk tap0ed70586-6c true
Check For Elements At URI ${CONFIG_API}/ietf-interfaces:interfaces/ ${l2vlan}
Wait Until Keyword Succeeds 50 5 get operational interface ${interface_name}
- Wait Until Keyword Succeeds 30 10 table0 entry ${conn_id_1} ${Bridge}
+ Wait Until Keyword Succeeds 30 10 table0 entry ${TOOLS_SYSTEM_1_IP}
Create l2vlan Trunk member interface
[Documentation] This testcase creates a l2vlan Trunk member interface for the l2vlan trunk interface created in 1st testcase.
${body} OperatingSystem.Get File ${genius_config_dir}/l2vlan_member.json
${post_resp} RequestsLibrary.Post Request session ${CONFIG_API}/ietf-interfaces:interfaces/ data=${body}
- Log ${post_resp.content}
- Log ${post_resp.status_code}
Should Be Equal As Strings ${post_resp.status_code} 204
@{l2vlan} create list l2vlan-trunk1 l2vlan trunk-member 1000 l2vlan-trunk
... true
Check For Elements At URI ${CONFIG_API}/ietf-interfaces:interfaces/ ${l2vlan}
Wait Until Keyword Succeeds 10 5 get operational interface ${l2vlan[0]}
- Wait Until Keyword Succeeds 40 10 ovs check for member interface creation ${conn_id_1} ${Bridge}
+ Wait Until Keyword Succeeds 40 10 ovs check for member interface creation ${TOOLS_SYSTEM_1_IP}
Bind service on Interface
[Documentation] This testcase binds service to the interface created .
${body} OperatingSystem.Get File ${genius_config_dir}/bind_service.json
- ${body} replace string ${body} service1 VPN
- ${body} replace string ${body} service2 elan
+ ${body} Replace string ${body} service1 VPN
+ ${body} Replace string ${body} service2 elan
log ${body}
${service_mode} Set Variable interface-service-bindings:service-mode-ingress
${post_resp} RequestsLibrary.Post Request session ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/ data=${body}
- log ${post_resp.content}
- log ${post_resp.status_code}
Should Be Equal As Strings ${post_resp.status_code} 204
@{bind_array} create list 2 3 VPN elan 50
... 21
Check For Elements At URI ${CONFIG_API}/interface-service-bindings:service-bindings/services-info/${interface_name}/${service_mode}/ ${bind_array}
- ${command} Set Variable sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
- Wait Until Keyword Succeeds 40 10 table entry ${command}
+ Wait Until Keyword Succeeds 40 10 table entry
unbind service on interface
[Documentation] This testcase Unbinds the service which is binded by the 3rd testcase.
${get_oper_resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/ietf-interfaces:interfaces-state/interface/${interface_name}/
${respjson} RequestsLibrary.To Json ${get_oper_resp.content} pretty_print=True
log ${respjson}
- log ${get_oper_resp.status_code}
Should Be Equal As Strings ${get_oper_resp.status_code} 200
Should not contain ${get_oper_resp.content} down
Should Contain ${get_oper_resp.content} up up
table entry
- [Arguments] ${command}
[Documentation] Checks for tables entry wrt the service the Interface is binded.
- switch connection ${conn_id_1}
- ${result} execute command ${command}
- log ${result}
+ ${result} = Utils.Run Command On Remote System ${TOOLS_SYSTEM_1_IP} sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
should contain ${result} table=17
should contain ${result} goto_table:21
should contain ${result} goto_table:50
no table0 entry
[Documentation] After Deleting trunk interface, checking for absence of table 0 in the flow dumps
- switch connection ${conn_id_1}
- ${ovs-check} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
- log ${ovs-check}
+ ${ovs-check} = Utils.Run Command On Remote System ${TOOLS_SYSTEM_1_IP} sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
should not contain ${ovs-check} table=0
should not contain ${ovs-check} goto_table:17
no goto_table entry
[Arguments] ${table-id}
[Documentation] Checks for absence of no goto_table after unbinding the service on the interface.
- switch connection ${conn_id_1}
- ${ovs-check1} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
- Log ${ovs-check1}
- should not contain ${ovs-check1} goto_table:${table-id}
+ ${ovs-check1} = Utils.Run Command On Remote System ${TOOLS_SYSTEM_1_IP} sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
+ Should not contain ${ovs-check1} goto_table:${table-id}
table0 entry
- [Arguments] ${connection-id} ${bridgename}
+ [Arguments] ${tools_ip}
[Documentation] After Creating the trunk interface , checking for table 0 entry exist in the flow dumps
- switch connection ${connection-id}
- log switch connection
- ${ovs-check} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${bridgename}
- log sudo ovs-ofctl -O OpenFlow13 dump-flows ${bridgename}
- log ${ovs-check}
- should contain ${ovs-check} table=0
+ ${ovs-check} = Utils.Run Command On Remote System ${tools_ip} sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
+ Should Contain ${ovs-check} table=0
ovs check for member interface creation
- [Arguments] ${connection-id} ${bridgename}
+ [Arguments] ${tools_ip}
[Documentation] This keyword verifies the member interface created on OVS by checking the table0 ,vlan and action=pop_vlan entries
- switch connection ${connection-id}
- ${ovs-check} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${bridgename}
- log ${ovs-check}
+ ${ovs-check} = Utils.Run Command On Remote System ${tools_ip} sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge}
should contain ${ovs-check} table=0
should contain ${ovs-check} dl_vlan=1000
should contain ${ovs-check} actions=pop_vlan
[Arguments] ${json_file} ${interface_mode}
[Documentation] Creates an trunk/transparent interface based on input provided to the json body
${body} OperatingSystem.Get File ${genius_config_dir}/${json_file}
- log ${genius_config_dir}/${json_file}
${body} replace string ${body} "l2vlan-mode":"trunk" "l2vlan-mode":"${interface_mode}"
- log "l2vlan-mode":"${interface_mode}"
- log ${body}
${post_resp} RequestsLibrary.Post Request session ${CONFIG_API}/ietf-interfaces:interfaces/ data=${body}
- Log ${post_resp.content}
- Log ${post_resp.status_code}
Should Be Equal As Strings ${post_resp.status_code} 204
Suite Teardown Genius.SRM Stop Suite
Test Setup Genius Test Setup
Test Teardown Genius Test Teardown ${data_models}
-Library re
Resource ../../libraries/DataModels.robot
Resource ../../libraries/Genius.robot
Resource ../../libraries/OVSDB.robot
[Documentation] This test case recovers the tunnels using transportzone name.
Delete Tunnel on OVS
KarafKeywords.Issue Command On Karaf Console srm:recover INSTANCE ITM-TZ TZA
- BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status as UP TZA
+ BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status As Up
ITM TEP Recovery
[Documentation] This test case recovers the tunnels using transportzone name and tunnel's ip address.
Delete Tunnel on OVS
- KarafKeywords.Issue Command On Karaf Console srm:recover INSTANCE ITM-TEP TZA:${TOOLS_SYSTEM_IP}
- BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status as UP TZA
+ KarafKeywords.Issue Command On Karaf Console srm:recover INSTANCE ITM-TEP TZA:${TOOLS_SYSTEM_1_IP}
+ BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status As Up
ITM Service Recovery
[Documentation] This test case recovers ITM Service.
- ${tunnel} = Get Tunnel name
+ ${tunnel} = BuiltIn.Wait Until Keyword Succeeds 40 20 Genius.Get Tunnel ${DPN_ID_LIST[0]} ${DPN_ID_LIST[1]}
+ ... odl-interface:tunnel-type-vxlan
Utils.Remove All Elements At URI And Verify ${CONFIG_API}/ietf-interfaces:interfaces/interface/${tunnel}
BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Delete on DS ${tunnel}
KarafKeywords.Issue Command On Karaf Console srm:recover SERVICE ITM
- BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status as UP TZA
+ BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status As Up
IFM Instance Recovery
[Documentation] This test case recovers tunnel interface instance using interface name.
- ${tunnel} = Get Tunnel name
+ ${tunnel} = BuiltIn.Wait Until Keyword Succeeds 40 20 Genius.Get Tunnel ${DPN_ID_LIST[0]} ${DPN_ID_LIST[1]}
+ ... odl-interface:tunnel-type-vxlan
Delete Tunnel on OVS
KarafKeywords.Issue Command On Karaf Console srm:recover INSTANCE IFM-IFACE ${tunnel}
- BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status as UP TZA
+ BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status As Up
IFM Service Recovery
[Documentation] This test case recovers IFM Service.
- ${tunnel} = Get Tunnel name
- SSHLibrary.Switch Connection ${conn_id_1}
+ ${tunnel} = BuiltIn.Wait Until Keyword Succeeds 40 20 Genius.Get Tunnel ${DPN_ID_LIST[0]} ${DPN_ID_LIST[1]}
+ ... odl-interface:tunnel-type-vxlan
+ SSHLibrary.Switch Connection ${TOOLS_SYSTEM_ALL_CONN_IDS[0]}
${uuid} ${bridge} = OVSDB.Get Bridge Data
${resp} = RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}uuid%2F${uuid}%2Fbridge%2F${bridge}
BuiltIn.Should Be Equal As Strings ${resp.status_code} ${RESP_CODE}
BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Delete on DS ${tunnel}
KarafKeywords.Issue Command On Karaf Console srm:recover SERVICE IFM
- BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status as UP TZA
+ BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Status As Up
*** Keywords ***
Delete Tunnel on OVS
[Documentation] Deletes a tunnel interface on switch and verify deletion on OVS.
- ${dpn_Id_1} = Genius.Get Dpn Ids ${conn_id_1}
- ${dpn_Id_2} = Genius.Get Dpn Ids ${conn_id_2}
- ${tunnel} = Wait Until Keyword Succeeds 40 20 Genius.Get Tunnel ${dpn_Id_1} ${dpn_Id_2}
+ ${tunnel} = BuiltIn.Wait Until Keyword Succeeds 40 20 Genius.Get Tunnel ${DPN_ID_LIST[0]} ${DPN_ID_LIST[1]}
... odl-interface:tunnel-type-vxlan
- SSHLibrary.Switch Connection ${conn_id_1}
- SSHLibrary.Execute Command sudo ovs-vsctl del-port ${tunnel}
+ Utils.Run Command On Remote System ${TOOLS_SYSTEM_1_IP} sudo ovs-vsctl del-port ${tunnel}
BuiltIn.Wait Until Keyword Succeeds 60s 5s Genius.Verify Tunnel Delete on DS ${tunnel}
-
-Get Tunnel name
- [Documentation] This keyword returns tunnel interface name.
- ${dpn_id_1}= Genius.Get Dpn Ids ${conn_id_1}
- ${dpn_id_2}= Genius.Get Dpn Ids ${conn_id_2}
- ${tunnel}= BuiltIn.Wait Until Keyword Succeeds 40 20 Genius.Get Tunnel ${dpn_id_1} ${dpn_id_2}
- ... odl-interface:tunnel-type-vxlan
- [Return] ${tunnel}
"subnets": [
{
"gateway-ip": "0.0.0.0",
- "prefix": "1.1.1.1/24",
+ "prefix": "1.1.1.1/16",
"vlan-id": 0,
"vteps": [
{
- "dpn-id": 101,
+ "dpn-id": 100,
"ip-address": "2.2.2.2",
"portname": "br-int-eth1"
},
{
- "dpn-id": 102,
+ "dpn-id": 101,
"ip-address": "3.3.3.3",
"portname": "br-int-eth1"
+ },
+ {
+ "dpn-id": 102,
+ "ip-address": "4.4.4.4",
+ "portname": "br-int-eth1"
}
]
}
"name": "l2vlan-trunk",
"type": "iana-if-type:l2vlan",
"l2vlan-mode":"trunk",
- "odl-interface:parent-interface": "tap8ed70586-6c",
+ "odl-interface:parent-interface": "tap0ed70586-6c",
"enabled": "true"
}
]