Replace BR1 and BR2 with br-int in Genius-CSIT 64/77764/9
authorKarthika Panneer <r.p.karthika@ericsson.com>
Wed, 14 Nov 2018 07:24:16 +0000 (23:24 -0800)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 16 Nov 2018 05:51:20 +0000 (05:51 +0000)
Change-Id: Id9d6cbbb5013460c5d7572a3a34238005a7213b9
Signed-off-by: Karthika Panneer <r.p.karthika@ericsson.com>
csit/libraries/Genius.robot
csit/libraries/OVSDB.robot
csit/suites/genius/BFD_monitoring.robot
csit/suites/genius/Configure_ITM.robot
csit/suites/genius/ITM_Direct_Tunnels.robot
csit/suites/genius/Interface_manager.robot
csit/variables/genius/Itm_creation_no_vlan.json

index 9b95ec4afa84dcf7a539e76b78a7c6be045ba0bb..40484904973efe5e7bc0393abaaa4a8720ed7f28 100644 (file)
@@ -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
index 60bbfce40653e3d12bb78caa1add557943e25c92..5f51abd9d456a77a87918705d9684bc5d0b1e3d5 100644 (file)
@@ -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
index 85e868d9d5d0b8db27d9d7f87ac531dbca92469e..73c068bed39557f22f8ec348bdcdf368b0ea9d81 100644 (file)
@@ -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}
index 54a8bd4dfe824edeb05b8e4a3b00fab6d23ce9f4..4237c40a87a57f3a399c5f0cb8e4d16e3556f683 100644 (file)
@@ -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
index 07768346ab02b287499bddd7c745c279dde51209..6e14385576481168a454233041dfbbc5dfada51a 100644 (file)
@@ -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}
index 59143688f24a2f5991eb30e447e2ffd418938911..0f0e2d2987a269fdadea338f56cf0bfe855e45d2 100644 (file)
@@ -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}
 
index c41fcc52ebd038e520a83994a2f95f998d7a2351..e2554135327f5495b5e8d9d267ba8d627401f01b 100644 (file)
                         {
                             "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"
                         }
                     ]
                 }