Test Suite For ITM_Direct_Tunnels 53/68453/16
authorSathwik Boggarapu <b.sathwik@ericsson.com>
Wed, 21 Feb 2018 08:19:07 +0000 (13:49 +0530)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 9 Mar 2018 22:27:05 +0000 (22:27 +0000)
Change-Id: If8f70065d50279fb28a734f21e727e906fae76b7
Signed-off-by: Sathwik Boggarapu <b.sathwik@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 [new file with mode: 0644]
csit/testplans/genius-genius.txt
csit/testplans/genius-tdd-wip.txt
csit/variables/Variables.robot
csit/variables/genius/Modules.py

index b01cd1aaf725ea7a8a92c966d00bd6754ab83906..7131ea3d50e81ae4eeedf5c28bfd700844222b2d 100644 (file)
@@ -10,8 +10,14 @@ Resource          KarafKeywords.robot
 Resource          Utils.robot
 Resource          ../variables/Variables.robot
 Resource          OVSDB.robot
+Resource          ../variables/netvirt/Variables.robot
 
 *** Variables ***
+@{itm_created}    TZA
+${genius_config_dir}    ${CURDIR}/../variables/genius
+${Bridge-1}       BR1
+${Bridge-2}       BR2
+${DEFAULT_MONITORING_INTERVAL}    Tunnel Monitoring Interval (for VXLAN tunnels): 1000
 
 *** Keywords ***
 Genius Suite Setup
@@ -92,7 +98,7 @@ Check Service Status
     \    Should Contain    ${var}    ${service_state}
 
 Create Vteps
-    [Arguments]    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
+    [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-9]\{1,3}\.[0-9]\{1,3}\.[0-9]\{1,3}\.
@@ -101,7 +107,8 @@ Create Vteps
     Set Global Variable    ${subnet}
     ${vlan}=    Set Variable    ${vlan}
     ${gateway-ip}=    Set Variable    ${gateway-ip}
-    ${body}    Set Json    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}    ${subnet}
+    ${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}
@@ -109,7 +116,8 @@ Create Vteps
     should be equal as strings    ${resp.status_code}    204
 
 Set Json
-    [Arguments]    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}    ${subnet}
+    [Arguments]    ${Dpn_id_1}    ${Dpn_id_2}    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
+    ...    ${subnet}
     [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}
@@ -157,3 +165,58 @@ Genius Test Teardown
     OVSDB.Get DumpFlows And Ovsconfig    ${conn_id_1}    BR1
     OVSDB.Get DumpFlows And Ovsconfig    ${conn_id_2}    BR2
     BuiltIn.Run Keyword And Ignore Error    DataModels.Get Model Dump    ${ODL_SYSTEM_IP}    ${data_models}
+
+ITM Direct Tunnels Start Suite
+    [Documentation]    start suite for itm scalability
+    ClusterManagement.ClusterManagement_Setup
+    ClusterManagement.Stop_Members_From_List_Or_All
+    ClusterManagement.Clean_Journals_Data_And_Snapshots_On_List_Or_All
+    Run Command On Remote System And Log    ${ODL_SYSTEM_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
+    Run Command On Remote System And Log    ${ODL_SYSTEM_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}
+    [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}
+
+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}    ${Bridge-1}-eth1
+    ...    ${TOOLS_SYSTEM_IP}    ${Dpn_id_2}    ${Bridge-2}-eth1    ${TOOLS_SYSTEM_2_IP}
+    Check For Elements At URI    ${TUNNEL_TRANSPORTZONE}/transport-zone/${itm_created[0]}    ${Itm-no-vlan}
+
+Check Tunnel Delete On OVS
+    [Arguments]    ${connection-id}    ${tunnel}
+    [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}
+    [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}
index 475856bde8ab107e22384c15e9511e3e02ae18c3..c429c86c02c14cc43f336e3c8e6682a8fe173433 100644 (file)
@@ -342,3 +342,15 @@ Get DumpFlows And Ovsconfig
     Write Commands Until Expected Prompt    sudo ovs-ofctl dump-flows ${bridge} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
     Write Commands Until Expected Prompt    sudo ovs-ofctl dump-groups ${bridge} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
     Write Commands Until Expected Prompt    sudo ovs-ofctl dump-group-stats ${bridge} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
+
+Start OVS
+    [Arguments]    ${ovs_ip}
+    [Documentation]    start the OVS node.
+    ${output} =    Utils.Run Command On Mininet    ${ovs_ip}    sudo /usr/share/openvswitch/scripts/ovs-ctl start
+    BuiltIn.Log    ${output}
+
+Stop OVS
+    [Arguments]    ${ovs_ip}
+    [Documentation]    Stop the OVS node.
+    ${output} =    Utils.Run Command On Mininet    ${ovs_ip}    sudo /usr/share/openvswitch/scripts/ovs-ctl stop
+    BuiltIn.Log    ${output}
index 610de0f1499eabde2aa0575aa4de52c3f2b1c2f6..8758cac81b30c4f0a21511c9a5e6cc4ad5aee048 100644 (file)
@@ -43,14 +43,12 @@ ${TUNNEL_MONI_PROTO}    tunnel-monitoring-type-bfd
 *** Test Cases ***
 BFD_TC00 Create ITM between DPNs Verify_BFD_Enablement
     [Documentation]    Create ITM between DPNs Verify_BFD_Enablement
-    ${Dpn_id_1}    Get Dpn Ids    ${conn_id_1}
-    ${Dpn_id_2}    Get Dpn Ids    ${conn_id_2}
-    Set Global Variable    ${Dpn_id_1}
-    Set Global Variable    ${Dpn_id_2}
+    ${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
-    Create Vteps    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
-    Wait Until Keyword Succeeds    10s    2s    Verify Tunnel Status as UP
+    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    Verify Tunnel Status as UP
 
 BFD_TC01 Verify by default BFD monitoring is enabled on Controller
     [Documentation]    Verify by default BFD monitoring is enabled on Controller
@@ -149,12 +147,6 @@ Verify Config Ietf Interface Output
     Should Contain    ${respjson}    ${interval}
     Should Contain    ${respjson}    ${proto}
 
-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}
-    Log    ${output}
-    Should Contain    ${output}    ${TUNNEL_MONITOR_ON}
-
 Ovs Tunnel Get
     [Arguments]    ${bridge}
     log    sudo ovs-vsctl list-ports ${bridge}
index 97ae5c570069066c995e56eea84d3f4fa3631a27..7bcda49b3d6ce1e8c1396b1e151842c9e5d7fbb8 100644 (file)
@@ -23,13 +23,11 @@ ${Bridge-2}       BR2
 *** 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}    Get Dpn Ids    ${conn_id_1}
-    ${Dpn_id_2}    Get Dpn Ids    ${conn_id_2}
-    Set Global Variable    ${Dpn_id_1}
-    Set Global Variable    ${Dpn_id_2}
+    ${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
-    Create Vteps    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
+    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
@@ -43,10 +41,10 @@ Create and Verify VTEP -No Vlan
     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}/
     Log    >>>>OVS Validation in Switch 1 for Tunnel Created<<<<<
-    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_1}    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}
+    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}
     Log    >>>>OVS Validation in Switch 2 for Tunnel Created<<<<<
-    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_2}    ${TOOLS_SYSTEM_2_IP}    ${TOOLS_SYSTEM_IP}
+    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}
     Log    >>>> Getting Network Topology Operational <<<<<<
     ${resp}    Wait Until Keyword Succeeds    40    10    Get Network Topology with Tunnel    ${Bridge-1}    ${Bridge-2}
@@ -66,10 +64,10 @@ Create and Verify VTEP -No Vlan
     Should Contain    ${resp.content}    ${Dpn_id_1}    ${tunnel-1}
     Should Contain    ${resp.content}    ${Dpn_id_2}    ${tunnel-2}
     Log    >>>>> Checking Entry in table 0 on OVS 1<<<<<
-    ${check-3}    Wait Until Keyword Succeeds    40    10    Check Table0 Entry for 2 Dpn    ${conn_id_1}    ${Bridge-1}
+    ${check-3}    Wait Until Keyword Succeeds    40    10    Genius.Check Table0 Entry For 2 Dpn    ${conn_id_1}    ${Bridge-1}
     ...    ${port-num-1}
     Log    >>>>> Checking Entry in table 0 on OVS 2<<<<<
-    ${check-4}    Wait Until Keyword Succeeds    40    10    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-2}
     ...    ${port-num-2}
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/opendaylight-inventory:nodes/
     ${respjson}    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
@@ -80,20 +78,20 @@ Create and Verify VTEP -No Vlan
 Delete and Verify VTEP -No Vlan
     [Documentation]    This Delete testcase , deletes the ITM tunnel created between 2 dpns.
     Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
-    Wait Until Keyword Succeeds    40    10    Verify Data Base after Delete    ${Dpn_id_1}    ${Dpn_id_2}    ${tunnel-1}
-    ...    ${tunnel-2}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
+    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    ${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}
 
 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}    Get Dpn Ids    ${conn_id_1}
-    ${Dpn_id_2}    Get Dpn Ids    ${conn_id_2}
-    Set Global Variable    ${Dpn_id_1}
-    Set Global Variable    ${Dpn_id_2}
+    ${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    ::
     ${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    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
+    Create Vteps IPv6    ${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
@@ -107,10 +105,10 @@ Create and Verify VTEP IPv6 - No Vlan
     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}
     Log    >>>>OVS Validation in Switch 1 for Tunnel Created<<<<<
-    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_1}    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}
+    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}
     Log    >>>>OVS Validation in Switch 2 for Tunnel Created<<<<<
-    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_2}    ${TOOLS_SYSTEM_2_IP}    ${TOOLS_SYSTEM_IP}
+    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}
     Log    >>>> Getting Network Topology Operational <<<<<<
     ${resp}    Wait Until Keyword Succeeds    40    10    Get Network Topology with Tunnel    ${Bridge-1}    ${Bridge-2}
@@ -119,14 +117,18 @@ Create and Verify VTEP IPv6 - No Vlan
 Delete and Verify VTEP IPv6 -No Vlan
     [Documentation]    This Delete testcase , deletes the ITM tunnel created between 2 dpns.
     Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
-    Wait Until Keyword Succeeds    40    10    Verify Data Base after Delete    ${Dpn_id_1}    ${Dpn_id_2}    ${tunnel-1}
-    ...    ${tunnel-2}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
+    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    ${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}
 
 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}
     ${vlan}=    Set Variable    100
     ${gateway-ip}=    Set Variable    0.0.0.0
-    Create Vteps    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
+    Genius.Create Vteps    ${Dpn_id_1}    ${Dpn_id_2}    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
     ${get}    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}
     Log    ${get}
@@ -143,10 +145,10 @@ Create and Verify VTEP-Vlan
     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}/
     Log    >>>>OVS Validation in Switch 1 for Tunnel Created<<<<<
-    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_1}    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}
+    Wait Until Keyword Succeeds    40    10    Genius.Ovs Verification For 2 Dpn    ${conn_id_1}    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}
     ...    ${tunnel-3}    ${tunnel-type}
     Log    >>>>OVS Validation in Switch 2 for Tunnel Created<<<<<
-    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_2}    ${TOOLS_SYSTEM_2_IP}    ${TOOLS_SYSTEM_IP}
+    Wait Until Keyword Succeeds    40    10    Genius.Ovs Verification For 2 Dpn    ${conn_id_2}    ${TOOLS_SYSTEM_2_IP}    ${TOOLS_SYSTEM_IP}
     ...    ${tunnel-4}    ${tunnel-type}
     Log    >>>>> Checking Network opertional Topology <<<<<<
     ${url_2}    set variable    ${OPERATIONAL_API}/network-topology:network-topology/
@@ -165,9 +167,9 @@ Create and Verify VTEP-Vlan
     Should Contain    ${resp.content}    ${Dpn_id_1}    ${tunnel-3}
     Should Contain    ${resp.content}    ${Dpn_id_2}    ${tunnel-4}
     Log    >>>>> Checking Entry in table 0 on OVS 1<<<<<
-    Wait Until Keyword Succeeds    40    10    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_1}    ${Bridge-1}    ${port-num-1}
     Log    >>>>> Checking Entry in table 0 on OVS \ 2<<<<<
-    Wait Until Keyword Succeeds    40    10    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_2}    ${Bridge-2}    ${port-num-2}
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/opendaylight-inventory:nodes/
     ${respjson}    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
     Log    ${respjson}
@@ -177,17 +179,21 @@ Create and Verify VTEP-Vlan
 Delete and Verify VTEP -Vlan
     [Documentation]    This Delete testcase , deletes the ITM tunnel created between 2 dpns.
     Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
-    Wait Until Keyword Succeeds    40    10    Verify Data Base after Delete    ${Dpn_id_1}    ${Dpn_id_2}    ${tunnel-3}
-    ...    ${tunnel-4}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
+    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    ${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}
 
 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}
     ${vlan}=    Set Variable    101
     ${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
     Log    ${subnet}
-    Create Vteps    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
+    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
@@ -203,10 +209,10 @@ Create VTEP - Vlan and Gateway
     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}/
     Log    >>>>OVS Validation in Switch 1 for Tunnel Created<<<<<
-    ${check-1}    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_1}    ${TOOLS_SYSTEM_IP}
+    ${check-1}    Wait Until Keyword Succeeds    40    10    Genius.Ovs Verification For 2 Dpn    ${conn_id_1}    ${TOOLS_SYSTEM_IP}
     ...    ${TOOLS_SYSTEM_2_IP}    ${tunnel-5}    ${tunnel-type}
     Log    ${check-1}
-    ${check-2}    Wait Until Keyword Succeeds    40    10    Ovs Verification 2 Dpn    ${conn_id_2}    ${TOOLS_SYSTEM_2_IP}
+    ${check-2}    Wait Until Keyword Succeeds    40    10    Genius.Ovs Verification For 2 Dpn    ${conn_id_2}    ${TOOLS_SYSTEM_2_IP}
     ...    ${TOOLS_SYSTEM_IP}    ${tunnel-6}    ${tunnel-type}
     Log    ${check-2}
     ${resp}    Wait Until Keyword Succeeds    40    10    Get Network Topology with Tunnel    ${Bridge-1}    ${Bridge-2}
@@ -223,10 +229,10 @@ Create VTEP - Vlan and Gateway
     Log    ${respjson}
     Should Contain    ${resp.content}    ${Dpn_id_1}    ${tunnel-5}
     Should Contain    ${resp.content}    ${Dpn_id_2}    ${tunnel-6}
-    ${check-3}    Wait Until Keyword Succeeds    40    10    Check Table0 Entry for 2 Dpn    ${conn_id_1}    ${Bridge-1}
+    ${check-3}    Wait Until Keyword Succeeds    40    10    Genius.Check Table0 Entry For 2 Dpn    ${conn_id_1}    ${Bridge-1}
     ...    ${port-num-1}
     Log    ${check-3}
-    ${check-4}    Wait Until Keyword Succeeds    40    10    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-2}
     ...    ${port-num-2}
     Log    ${check-4}
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/opendaylight-inventory:nodes/
@@ -238,25 +244,14 @@ Create VTEP - Vlan and Gateway
 Delete VTEP -Vlan and gateway
     [Documentation]    This testcase deletes the ITM tunnel created between 2 dpns.
     Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
-    Wait Until Keyword Succeeds    40    10    Verify Data Base after Delete    ${Dpn_id_1}    ${Dpn_id_2}    ${tunnel-5}
-    ...    ${tunnel-6}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
+    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    ${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}
 
 *** Keywords ***
-Create Vteps
-    [Arguments]    ${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-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}    set json    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}    ${subnet}
-    Post Log Check    ${CONFIG_API}/itm:transport-zones/    ${body}    204
-
 Create Vteps IPv6
-    [Arguments]    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}
+    [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}:
@@ -265,22 +260,10 @@ Create Vteps IPv6
     Set Global Variable    ${subnet}
     ${vlan}=    Set Variable    ${vlan}
     ${gateway-ip}=    Set Variable    ${gateway-ip}
-    ${body}    set json    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}    ${subnet}
+    ${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 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 }'
-    log    ${output1}
-    ${Dpn_id}    Execute command    echo \$\(\(16\#${output1}\)\)
-    log    ${Dpn_id}
-    [Return]    ${Dpn_id}
-
 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.
@@ -308,27 +291,6 @@ Validate interface state
     log    ${data}
     [Return]    ${data}
 
-Check Table0 Entry for 2 Dpn
-    [Arguments]    ${connection_id}    ${Bridgename}    ${port-num1}
-    [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}
-
-Ovs Verification 2 Dpn
-    [Arguments]    ${connection_id}    ${local}    ${remote-1}    ${tunnel}    ${tunnel-type}
-    [Documentation]    Checks whether the created Interface is seen on OVS or not.
-    Switch Connection    ${connection_id}
-    Log    ${connection_id}
-    ${check}    Execute Command    sudo ovs-vsctl show
-    Log    ${check}
-    Should Contain    ${check}    local_ip="${local}"    remote_ip="${remote-1}"    ${tunnel}
-    Should Contain    ${check}    ${tunnel-type}
-    [Return]    ${check}
-
 Get ITM
     [Arguments]    ${itm_created[0]}    ${subnet}    ${vlan}    ${Dpn_id_1}    ${TOOLS_SYSTEM_IP}    ${Dpn_id_2}
     ...    ${TOOLS_SYSTEM_2_IP}
@@ -360,20 +322,6 @@ Validate interface state Delete
     Should Be Equal As Strings    ${resp.status_code}    404
     Should not contain    ${resp.content}    ${tunnel}
 
-set json
-    [Arguments]    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_2_IP}    ${vlan}    ${gateway-ip}    ${subnet}
-    [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}"
-    Log    ${body}
-    [Return]    ${body}    # returns complete json that has been updated
-
 check-Tunnel-delete-on-ovs
     [Arguments]    ${connection-id}    ${tunnel}
     [Documentation]    Verifies the Tunnel is deleted from OVS
diff --git a/csit/suites/genius/ITM_Direct_Tunnels.robot b/csit/suites/genius/ITM_Direct_Tunnels.robot
new file mode 100644 (file)
index 0000000..4d5ec86
--- /dev/null
@@ -0,0 +1,125 @@
+*** Settings ***
+Documentation     This test suite is to by-pass interface manager and create/delete the tunnels between the switches directly inorder for ITM to scale and build mesh among more number of switches.
+Suite Setup       ITM Direct Tunnels Start Suite
+Suite Teardown    ITM Direct Tunnels Stop Suite
+Test Teardown     Get Model Dump    ${ODL_SYSTEM_IP}    ${data_models}
+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
+Resource          ../../libraries/ClusterManagement.robot
+Resource          ../../libraries/KarafKeywords.robot
+Resource          ../../libraries/Utils.robot
+Resource          ../../libraries/Genius.robot
+Resource          ../../variables/Variables.robot
+Resource          ../../libraries/OVSDB.robot
+
+*** Variables ***
+
+*** 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}
+    ${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    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
+    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}
+    ${check-4}    Wait Until Keyword Succeeds    40    10    Genius.Check Table0 Entry For 2 Dpn    ${conn_id_2}    ${Bridge-2}
+    ...    ${Port_num2}
+
+Verify Tunnels By Enabling BFD
+    [Documentation]    This test case will check the tunnel exists by bringing up/down a switch and check tunnels exist by enabling BFD
+    ${result}    Run Keyword And Return Status    Verify Tunnel Monitoring is on
+    Run Keyword If    '${result}' == 'False'    Enable_Tunnel_monitoring
+    Verify Tunnel State    ${TOOLS_SYSTEM_1_IP}
+    Verify Tunnel State    ${TOOLS_SYSTEM_2_IP}
+
+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]}/
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
+    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    ${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}
+
+*** 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
+
+Verify Tunnel State
+    [Arguments]    ${TOOLS_SYSTEM_IP}
+    [Documentation]    In this we will Verify Tunnel State by Stopping/Starting Switch
+    OVSDB.Stop OVSDB    ${TOOLS_SYSTEM_IP}
+    Wait Until Keyword Succeeds    2min    20 sec    Verify Tunnel Down
+    OVSDB.Start OVSDB    ${TOOLS_SYSTEM_IP}
+    Wait Until Keyword Succeeds    2min    20 sec    Verify Tunnel Status as UP
+
+Verify Tunnel Down
+    [Documentation]    In this we will check whether tunnel is in down or not
+    ${output}=    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}
index 62f3a0878e954e82836e6f612a24e23a374b87e0..3054043287aefdf59aedb1a71c3d3a34a3510ad6 100644 (file)
@@ -3,4 +3,3 @@ integration/test/csit/suites/genius/Interface_manager.robot
 integration/test/csit/suites/genius/ID_manager.robot
 integration/test/csit/suites/genius/Configure_ITM.robot
 integration/test/csit/suites/genius/BFD_monitoring.robot
-
index 2d1183fa3809851ec3c1085894d28fcd5934c3f9..ca4fc70f21418e83149676fc03264db7c9cb67fb 100644 (file)
@@ -4,4 +4,4 @@
 #
 # Place the suites in run order:
 integration/test/csit/suites/genius/dummy.robot
-
+integration/test/csit/suites/genius/ITM_Direct_Tunnels.robot
index d2b722a70397a665df7ae53ca51908f0dffaf635..25eb7007c55361c3aba6346a8eb46ef4c26efebb 100644 (file)
@@ -83,6 +83,7 @@ ${GBP_REGEP_API}    /restconf/operations/endpoint:register-endpoint    # FIXME:
 ${GBP_TENANTS_API}    /restconf/config/policy:tenants    # FIXME: Move to a separate GroupBasedPolicy-related Resource and add description.
 ${GBP_TUNNELS_API}    /restconf/config/opendaylight-inventory:nodes    # FIXME: Move to a separate GroupBasedPolicy-related Resource and add description.
 ${GBP_UNREGEP_API}    /restconf/operations/endpoint:unregister-endpoint    # FIXME: Move to a separate GroupBasedPolicy-related Resource and add description.
+${GENIUS_IFM_CONFIG_FLAG}    ${KARAF_HOME}/etc/opendaylight/datastore/initial/config/genius-ifm-config.xml
 ${GET_CONFIGURATION_URI}    /restconf/operational/configuration:configurationRecord/    # FIXME: Move to a separate Centinel-related Resource and add description.
 ${GET_DASHBOARDRECORD}    /restconf/operational/dashboardrule:dashboardRecord/    # FIXME: Move to a separate Centinel-related Resource and add description.
 ${GET_INTENTS_URI}    /retconf/config/intent:intents    # FIXME: Move to a separate Nemo-related Resource and add description.
index be97f049f2209a39164d5bed466a3e92223cbb22..8f04bec177dd7f0e556a23517ad05b67f36e60db 100644 (file)
@@ -6,11 +6,13 @@ data_models = [
     'config/itm-config:tunnel-monitor-interval',
     'config/itm-config:tunnel-monitor-params',
     'config/itm-state:dpn-endpoints',
+    'config/itm-state:dpn-teps-state',
     'config/itm-state:external-tunnel-list',
     'config/itm-state:tunnel-list',
     'config/network-topology:network-topology/topology/ovsdb:1',
     'config/odl-interface-meta:bridge-interface-info',
     'config/odl-interface-meta:interface-child-info',
+    'config/odl-itm-meta:bridge-tunnel-info',
     'config/opendaylight-inventory:nodes',
     'operational/ietf-interfaces:interfaces-state',
     'operational/interface-service-bindings:bound-services-state-list',
@@ -22,6 +24,9 @@ data_models = [
     'operational/odl-interface-meta:bridge-ref-info',
     'operational/odl-interface-meta:dpn-to-interface-list',
     'operational/odl-interface-meta:if-indexes-interface-map',
+    'operational/odl-itm-meta:dpn-to-interface-list',
+    'operational/odl-itm-meta:if-indexes-tunnel-map',
+    'operational/odl-itm-meta:ovs-bridge-ref-info',
     'operational/opendaylight-inventory:nodes',
 ]