From 64e8760c84e84ab220453f607690d523ad9adfea Mon Sep 17 00:00:00 2001 From: Karthika Panneer Date: Tue, 13 Nov 2018 23:24:16 -0800 Subject: [PATCH] Replace BR1 and BR2 with br-int in Genius-CSIT Change-Id: Id9d6cbbb5013460c5d7572a3a34238005a7213b9 Signed-off-by: Karthika Panneer --- csit/libraries/Genius.robot | 44 +++++++-------- csit/libraries/OVSDB.robot | 2 +- csit/suites/genius/BFD_monitoring.robot | 10 ++-- csit/suites/genius/Configure_ITM.robot | 55 +++++++++---------- csit/suites/genius/ITM_Direct_Tunnels.robot | 13 ++--- csit/suites/genius/Interface_manager.robot | 14 ++--- .../genius/Itm_creation_no_vlan.json | 4 +- 7 files changed, 65 insertions(+), 77 deletions(-) diff --git a/csit/libraries/Genius.robot b/csit/libraries/Genius.robot index 9b95ec4afa..4048490497 100644 --- a/csit/libraries/Genius.robot +++ b/csit/libraries/Genius.robot @@ -19,13 +19,12 @@ Resource ../variables/netvirt/Variables.robot *** Variables *** @{itm_created} TZA ${genius_config_dir} ${CURDIR}/../variables/genius -${Bridge-1} BR1 -${Bridge-2} BR2 +${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 -@{PORT} BR1-eth1 BR2-eth1 +${port_name} br-int-eth1 *** Keywords *** Genius Suite Setup @@ -50,11 +49,11 @@ Start Suite 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 BR1 - Execute Command sudo ovs-vsctl set bridge BR1 protocols=OpenFlow13 - Execute Command sudo ovs-vsctl set-controller BR1 tcp:${ODL_SYSTEM_IP}:6633 - Execute Command sudo ifconfig BR1 up - Execute Command sudo ovs-vsctl add-port BR1 tap8ed70586-6c -- set Interface tap8ed70586-6c type=tap + 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}:6633 + 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} @@ -67,10 +66,10 @@ Start Suite 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 BR2 - Execute Command sudo ovs-vsctl set bridge BR2 protocols=OpenFlow13 - Execute Command sudo ovs-vsctl set-controller BR2 tcp:${ODL_SYSTEM_IP}:6633 - Execute Command sudo ifconfig BR2 up + 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}:6633 + 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} @@ -79,13 +78,13 @@ Stop Suite Log Stop the tests Switch Connection ${conn_id_1} Log ${conn_id_1} - Execute Command sudo ovs-vsctl del-br BR1 + 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 BR2 + Execute Command sudo ovs-vsctl del-br ${Bridge} Execute Command sudo ovs-vsctl del-manager Write exit close connection @@ -134,10 +133,7 @@ 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} - ${cmd} set Variable sudo ovs-vsctl show | grep Bridge | awk -F "\\"" '{print $2}' - ${Bridgename1} Execute command ${cmd} - log ${Bridgename1} - ${output1} Execute command sudo ovs-ofctl show -O Openflow13 ${Bridgename1} | head -1 | awk -F "dpid:" '{ print $2 }' + ${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}\)\) @@ -153,8 +149,8 @@ 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}[0] ${vlan} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]} - ${cmd2} = BuiltIn.Set Variable tep:delete ${dpn_id_2} @{PORT}[1] ${vlan} ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]} + ${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} @@ -176,8 +172,8 @@ Genius Test 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} BR1 - OVSDB.Get DumpFlows And Ovsconfig ${conn_id_2} BR2 + OVSDB.Get DumpFlows And Ovsconfig ${conn_id_1} ${Bridge} + OVSDB.Get DumpFlows And Ovsconfig ${conn_id_2} ${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} @@ -219,8 +215,8 @@ Get ITM ... ${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} ${Bridge-1}-eth1 - ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${Bridge-2}-eth1 ${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 ${TUNNEL_TRANSPORTZONE}/transport-zone/${itm_created[0]} ${Itm-no-vlan} Check Tunnel Delete On OVS diff --git a/csit/libraries/OVSDB.robot b/csit/libraries/OVSDB.robot index 60bbfce406..5f51abd9d4 100644 --- a/csit/libraries/OVSDB.robot +++ b/csit/libraries/OVSDB.robot @@ -378,7 +378,7 @@ Get Bridge Data [Documentation] This keyword returns first bridge name and UUID from list of bridges. ${result} = SSHLibrary.Execute Command sudo ovs-vsctl show ${uuid} = String.Get Line ${result} 0 - ${line} ${bridge_name} Builtin.Should Match Regexp ${result} Bridge "(\\w+)" + ${line} ${bridge_name} Builtin.Should Match Regexp ${result} Bridge ([\\w-]+) [Return] ${uuid} ${bridge_name} Delete OVS Controller diff --git a/csit/suites/genius/BFD_monitoring.robot b/csit/suites/genius/BFD_monitoring.robot index 85e868d9d5..73c068bed3 100644 --- a/csit/suites/genius/BFD_monitoring.robot +++ b/csit/suites/genius/BFD_monitoring.robot @@ -22,8 +22,6 @@ Resource ../../variables/Variables.robot *** Variables *** @{itm_created} TZA ${genius_config_dir} ${CURDIR}/../../variables/genius -${Bridge-1} BR1 -${Bridge-2} BR2 ${TEP_SHOW} tep:show ${TEP_SHOW_STATE} tep:show-state ${TUNNEL_MONITOR_ON} Tunnel Monitoring (for VXLAN tunnels): On @@ -86,17 +84,17 @@ BFD_TC06 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 BR1 + Execute Command sudo ovs-vsctl del-controller ${Bridge} SSHLibrary.Switch Connection ${conn_id_2} - Execute Command sudo ovs-vsctl del-controller BR2 + Execute Command sudo ovs-vsctl del-controller ${Bridge} Issue Command On Karaf Console ${TEP_SHOW} Issue Command On Karaf Console ${TEP_SHOW_STATE} 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 BR1 tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT} + 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 BR2 tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT} + 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} diff --git a/csit/suites/genius/Configure_ITM.robot b/csit/suites/genius/Configure_ITM.robot index 54a8bd4dfe..4237c40a87 100644 --- a/csit/suites/genius/Configure_ITM.robot +++ b/csit/suites/genius/Configure_ITM.robot @@ -20,9 +20,6 @@ Resource ../../variables/Variables.robot *** Variables *** @{itm_created} TZA ${genius_config_dir} ${CURDIR}/../../variables/genius -${Bridge-1} BR1 -${Bridge-2} BR2 -@{PORT} BR1-eth1 BR2-eth1 @{VLAN} 0 100 101 *** Test Cases *** @@ -46,8 +43,8 @@ Create and Verify VTEP -No Vlan ... ${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-1} ${Bridge-2} - ... ${tunnel-1} ${tunnel-2} ${OPERATIONAL_TOPO_API} + ${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 @@ -60,8 +57,8 @@ Create and Verify VTEP -No Vlan 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-1} ${port-num-1} - Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge-2} ${port-num-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} @@ -75,8 +72,8 @@ Delete and Verify VTEP -No Vlan ${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} - ${cmd} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] @{VLAN}[0] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]} - ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] @{VLAN}[0] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]} + ${cmd} Set Variable tep:delete ${Dpn_id_1} ${port_name} @{VLAN}[0] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]} + ${cmd2} Set Variable tep:delete ${Dpn_id_2} ${port_name} @{VLAN}[0] ${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} @@ -115,8 +112,8 @@ Create and Verify VTEP IPv6 - No Vlan ... ${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-1} ${Bridge-2} - ... ${tunnel-1} ${tunnel-2} ${OPERATIONAL_TOPO_API} + ${resp} Wait Until Keyword Succeeds 40 10 Get Network Topology with Tunnel ${Bridge} ${tunnel-1} + ... ${tunnel-2} ${OPERATIONAL_TOPO_API} Delete and Verify VTEP IPv6 -No Vlan [Documentation] This Delete testcase , deletes the ITM tunnel created between 2 dpns. @@ -127,8 +124,8 @@ Delete and Verify VTEP IPv6 -No Vlan ${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}[0] - 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}[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} ${output} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW} BuiltIn.Should Not Contain ${output} ${itm_created[0]} BuiltIn.Run Keyword And Ignore Error Remove All Elements At URI And Verify ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/ @@ -163,8 +160,8 @@ Create and Verify VTEP-Vlan 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-1} ${Bridge-2} ${tunnel-1} - ... ${tunnel-2} ${url_2} + 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 @@ -176,8 +173,8 @@ Create and Verify VTEP-Vlan 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-1} ${port-num-1} - Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge-2} ${port-num-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} @@ -191,8 +188,8 @@ Delete and Verify VTEP -Vlan ${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} - ${cmd1} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] @{VLAN}[1] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]} - ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] @{VLAN}[1] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]} + ${cmd1} Set Variable tep:delete ${Dpn_id_1} ${port_name} @{VLAN}[1] ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]} + ${cmd2} Set Variable tep:delete ${Dpn_id_2} ${port_name} @{VLAN}[1] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]} KarafKeywords.Issue Command On Karaf Console ${cmd1} KarafKeywords.Issue Command On Karaf Console tep:commit KarafKeywords.Issue Command On Karaf Console ${cmd2} @@ -232,8 +229,8 @@ Create VTEP - Vlan and Gateway ... ${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-1} ${Bridge-2} - ... ${tunnel-1} ${tunnel-2} ${OPERATIONAL_TOPO_API} + ${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} @@ -246,8 +243,8 @@ Create VTEP - Vlan and Gateway 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-1} ${port-num-1} - Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge-2} ${port-num-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} @@ -261,8 +258,8 @@ Delete VTEP -Vlan and gateway ${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} - ${cmd1} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] @{VLAN}[2] ${TOOLS_SYSTEM_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]} - ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] @{VLAN}[2] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]} + ${cmd1} Set Variable tep:delete ${Dpn_id_1} ${port_name} @{VLAN}[2] ${TOOLS_SYSTEM_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]} + ${cmd2} Set Variable tep:delete ${Dpn_id_2} ${port_name} @{VLAN}[2] ${TOOLS_SYSTEM_2_IP} ${subnet}/24 ${GATEWAY_IP} ${itm_created[0]} KarafKeywords.Issue Command On Karaf Console ${cmd1} KarafKeywords.Issue Command On Karaf Console tep:commit KarafKeywords.Issue Command On Karaf Console ${cmd2} @@ -324,14 +321,14 @@ Get ITM ... ${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} ${Bridge-1}-eth1 - ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${Bridge-2}-eth1 ${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} Get Network Topology with Tunnel - [Arguments] ${Bridge-1} ${Bridge-2} ${tunnel-1} ${tunnel-2} ${url} + [Arguments] ${Bridge} ${tunnel-1} ${tunnel-2} ${url} [Documentation] Returns the Network topology with Tunnel info in it. - @{bridges} Create List ${Bridge-1} ${Bridge-2} ${tunnel-1} ${tunnel-2} + @{bridges} Create List ${Bridge} ${tunnel-1} ${tunnel-2} Check For Elements At URI ${url} ${bridges} Get Network Topology without Tunnel diff --git a/csit/suites/genius/ITM_Direct_Tunnels.robot b/csit/suites/genius/ITM_Direct_Tunnels.robot index 07768346ab..6e14385576 100644 --- a/csit/suites/genius/ITM_Direct_Tunnels.robot +++ b/csit/suites/genius/ITM_Direct_Tunnels.robot @@ -22,7 +22,6 @@ Resource ../../variables/Variables.robot Resource ../../libraries/OVSDB.robot *** Variables *** -@{PORT} BR1-eth1 BR2-eth1 ${VLAN} 0 *** Test Cases *** @@ -49,11 +48,11 @@ Create and Verify VTEP 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-1} ${tunnel-1} - ${Port_num2} Get Port Number ${conn_id_2} ${Bridge-2} ${tunnel-2} - ${check-3} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_1} ${Bridge-1} + ${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-2} + ${check-4} Wait Until Keyword Succeeds 40 10 Genius.Check Table0 Entry For 2 Dpn ${conn_id_2} ${Bridge} ... ${Port_num2} Verify VTEP After Restarting OVS @@ -93,8 +92,8 @@ Delete and Verify VTEP ${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} - ${cmd1} Set Variable tep:delete ${Dpn_id_1} @{PORT}[0] ${VLAN} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]} - ${cmd2} Set Variable tep:delete ${Dpn_id_2} @{PORT}[1] ${VLAN} ${TOOLS_SYSTEM_2_IP} ${subnet}/24 null ${itm_created[0]} + ${cmd1} Set Variable tep:delete ${Dpn_id_1} ${port_name} ${VLAN} ${TOOLS_SYSTEM_IP} ${subnet}/24 null ${itm_created[0]} + ${cmd2} 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 ${cmd1} KarafKeywords.Issue Command On Karaf Console tep:commit KarafKeywords.Issue Command On Karaf Console ${cmd2} diff --git a/csit/suites/genius/Interface_manager.robot b/csit/suites/genius/Interface_manager.robot index 59143688f2..0f0e2d2987 100644 --- a/csit/suites/genius/Interface_manager.robot +++ b/csit/suites/genius/Interface_manager.robot @@ -17,7 +17,6 @@ Resource ../../variables/Variables.robot *** Variables *** ${genius_config_dir} ${CURDIR}/../../variables/genius -${bridgename} BR1 ${interface_name} l2vlan-trunk ${trunk_json} l2vlan.json ${trunk_member_json} l2vlan_member.json @@ -29,7 +28,7 @@ Create l2vlan transparent interface @{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} ${bridgename} + Wait Until Keyword Succeeds 40 10 table0 entry ${conn_id_1} ${Bridge} Delete l2vlan transparent interface [Documentation] This testcase deletes the l2vlan transparent interface created between 2 dpns. @@ -43,7 +42,7 @@ Create l2vlan trunk interface @{l2vlan} create list l2vlan-trunk l2vlan trunk tap8ed70586-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} ${bridgename} + Wait Until Keyword Succeeds 30 10 table0 entry ${conn_id_1} ${Bridge} Create l2vlan Trunk member interface [Documentation] This testcase creates a l2vlan Trunk member interface for the l2vlan trunk interface created in 1st testcase. @@ -56,7 +55,7 @@ Create l2vlan Trunk member interface ... 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} ${bridgename} + Wait Until Keyword Succeeds 40 10 ovs check for member interface creation ${conn_id_1} ${Bridge} Bind service on Interface [Documentation] This testcase binds service to the interface created . @@ -72,7 +71,7 @@ Bind service on Interface @{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 ${bridgename} + ${command} Set Variable sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge} Wait Until Keyword Succeeds 40 10 table entry ${command} unbind service on interface @@ -119,8 +118,7 @@ table entry no table0 entry [Documentation] After Deleting trunk interface, checking for absence of table 0 in the flow dumps switch connection ${conn_id_1} - ${bridgename} Set Variable BR1 - ${ovs-check} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${bridgename} + ${ovs-check} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge} log ${ovs-check} should not contain ${ovs-check} table=0 should not contain ${ovs-check} goto_table:17 @@ -129,7 +127,7 @@ 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 ${bridgename} + ${ovs-check1} execute command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridge} Log ${ovs-check1} should not contain ${ovs-check1} goto_table:${table-id} diff --git a/csit/variables/genius/Itm_creation_no_vlan.json b/csit/variables/genius/Itm_creation_no_vlan.json index c41fcc52eb..e255413532 100644 --- a/csit/variables/genius/Itm_creation_no_vlan.json +++ b/csit/variables/genius/Itm_creation_no_vlan.json @@ -10,12 +10,12 @@ { "dpn-id": 101, "ip-address": "2.2.2.2", - "portname": "BR1-eth1" + "portname": "br-int-eth1" }, { "dpn-id": 102, "ip-address": "3.3.3.3", - "portname": "BR2-eth1" + "portname": "br-int-eth1" } ] } -- 2.36.6