Genius CSIT - Add AutoTunnels Suite 83/77783/38
authorsrajappa <srajappa@outlook.com>
Wed, 14 Nov 2018 12:30:19 +0000 (18:00 +0530)
committerVenkatrangan Govindarajan <venkatrangang@hcl.com>
Wed, 19 Dec 2018 11:56:51 +0000 (11:56 +0000)
This change is to remove CLI based deletion of vteps and
add REST calls for all recent changes of auto tunnel.
Removed All openstack related commands and
added CLI based verification of tunnel state in ITM_Vtep_Auto_Tunnel

Test spec link for auto-tunnel:
https://docs.opendaylight.org/projects/genius/en/latest/specs/itm-tunnel-auto-config.html

ITM_Vtep_Auto_Tunnel suit contains below test scenario
verify default transport zone after enabling local ip in compute
verify tunnel status after renaming external id to TZA in compute
verify tunnel status under default transport zone after removing TZA

Change-Id: Idadf7038d6b412b358e822b57590b8319ecfbe56
Signed-off-by: srajappa <srajappa@outlook.com>
csit/libraries/OvsManager.robot
csit/suites/genius/Configure_ITM.robot
csit/suites/genius/ITM_Direct_Tunnels.robot
csit/suites/genius/ITM_Vtep_Auto_Tunnel.robot
csit/testplans/genius-genius.txt
csit/testplans/genius-verify.txt

index 2ee870ac6f6086c47fe138af7c2f1d6de78638ac..7f08b3358e958c445a7006884f7b9385daf0397b 100644 (file)
@@ -240,14 +240,14 @@ Get Packet Count In Table For IP
     ${count} =    Collections.Get From List    ${packetcount_list}    0
     [Return]    ${count}
 
-Check Ovs Version Is Higher Than
+Verify Ovs Version Greater Than Or Equal To
     [Arguments]    ${ovs_version}    @{nodes}
     [Documentation]    Get ovs version and verify greater than required version
     : FOR    ${ip}    IN    @{nodes}
     \    ${output} =    Utils.Run Command On Remote System    ${ip}    ${SHOW_OVS_VERSION}
     \    ${version} =    String.Get Regexp Matches    ${output}    \[0-9].\[0-9]
     \    ${result} =    BuiltIn.Convert To Number    ${version[0]}
-    \    BuiltIn.Should Be True    ${result} > ${ovs_version}
+    \    BuiltIn.Should Be True    ${result} >= ${ovs_version}
 
 Get OVS Local Ip
     [Arguments]    ${ip}
index 4237c40a87a57f3a399c5f0cb8e4d16e3556f683..916ea088002624008f2a9d85aba0e41cb3748034 100644 (file)
@@ -72,23 +72,15 @@ 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_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}
-    KarafKeywords.Issue Command On Karaf Console    tep:commit
+    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]}/
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
-    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
+    ${resp}    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
+    BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_1}    ${tunnel-1}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_2}    ${tunnel-2}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm:not-hosted-transport-zones/
-    ${respjson}    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
-    Log    ${respjson}
-    BuiltIn.Should Not Contain    ${resp.content}    ${itm_created[0]}
 
 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.
@@ -128,15 +120,11 @@ Delete and Verify VTEP IPv6 -No Vlan
     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]}/
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
-    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
+    ${resp}    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
+    BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_1}    ${tunnel-1}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_2}    ${tunnel-2}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm:not-hosted-transport-zones/
-    ${respjson}    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
-    Log    ${respjson}
-    BuiltIn.Should Not Contain    ${resp.content}    ${itm_created[0]}
 
 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.
@@ -188,22 +176,16 @@ 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_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}
-    KarafKeywords.Issue Command On Karaf Console    tep:commit
+    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]}/
+    Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
+    ${resp}    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
+    BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
     Wait Until Keyword Succeeds    40    10    Genius.Check ITM Tunnel State    ${tunnel-1}    ${tunnel-2}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_1}    ${tunnel-1}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_2}    ${tunnel-2}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm:not-hosted-transport-zones/
-    ${respjson}    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
-    Log    ${respjson}
-    BuiltIn.Should Not Contain    ${resp.content}    ${itm_created[0]}
 
 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.
@@ -258,22 +240,16 @@ 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_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}
-    KarafKeywords.Issue Command On Karaf Console    tep:commit
+    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]}/
+    Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
+    ${resp}    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
+    BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
     Wait Until Keyword Succeeds    40    10    Genius.Check ITM Tunnel State    ${tunnel-1}    ${tunnel-2}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_1}    ${tunnel-1}
     Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_2}    ${tunnel-2}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm:not-hosted-transport-zones/
-    ${respjson}    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
-    Log    ${respjson}
-    BuiltIn.Should Not Contain    ${resp.content}    ${itm_created[0]}
 
 *** Keywords ***
 Create Vteps IPv6
index 6e14385576481168a454233041dfbbc5dfada51a..e7eed43acdd4e907c9bbb1d1b5ee4cdbbd9da5c4 100644 (file)
@@ -92,23 +92,15 @@ 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_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}
-    KarafKeywords.Issue Command On Karaf Console    tep:commit
+    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]}/
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm-state:tunnels_state/
-    Should Not Contain    ${resp}    ${tunnel-1}    ${tunnel-2}
+    Remove All Elements At URI And Verify    ${CONFIG_API}/itm:transport-zones/transport-zone/${itm_created[0]}/
+    ${resp}    Utils.Get Data From URI    session    ${CONFIG_API}/itm:transport-zones/
+    BuiltIn.Should Not Contain    ${resp}    ${itm_created[0]}
     ${Ovs-del-1}    Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_1}    ${tunnel-1}
     ${Ovs-del-2}    Wait Until Keyword Succeeds    40    10    Genius.Check Tunnel Delete On OVS    ${conn_id_2}    ${tunnel-2}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/itm:not-hosted-transport-zones/
-    ${respjson}    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
-    Log    ${respjson}
-    BuiltIn.Should Not Contain    ${resp.content}    ${itm_created[0]}
 
 *** Keywords ***
 Get_Tunnel
index 1b707370d923b8123e91e76e519935d66ef14c3c..d88abb993802b917a36a8a7b6fa1623f8e81b637 100644 (file)
 *** Settings ***
 Documentation     Test suite to validate ITM VTEP auto-configuration functionality in openstack integrated environment.
-Suite Setup       BuiltIn.Run Keywords    OpenStackOperations.OpenStack Suite Setup
-...               AND    OvsManager.Check Ovs Version Is Higher Than    ${OVS_VERSION}    @{COMPUTE-NODE-LIST}
-Suite Teardown    SSHLibrary.Close All Connections
+Suite Setup       BuiltIn.Run Keywords    Genius.Genius Suite Setup
+...               AND    OvsManager.Verify Ovs Version Greater Than Or Equal To    ${OVS_VERSION}    @{COMPUTE-NODE-LIST}
+Suite Teardown    Genius.Genius Suite Teardown
+Test Setup        Genius Test Setup
+Test Teardown     Genius Test Teardown    ${data_models}
 Library           OperatingSystem
 Library           RequestsLibrary
-Library           String
 Library           SSHLibrary
+Library           String
+Resource          ../../libraries/Genius.robot
 Resource          ../../libraries/KarafKeywords.robot
-Resource          ../../libraries/OpenStackOperations.robot
 Resource          ../../libraries/OVSDB.robot
 Resource          ../../libraries/OvsManager.robot
 Resource          ../../libraries/Utils.robot
 Resource          ../../libraries/VpnOperations.robot
 Resource          ../../variables/netvirt/Variables.robot
 Resource          ../../variables/Variables.robot
+Variables         ../../variables/genius/Modules.py
 
 *** Variables ***
 ${CHANGE_TRANSPORT_ZONE}    sudo ovs-vsctl set O . external_ids:transport-zone
-${CHANGE_LOCAL_IP}    sudo ovs-vsctl set O . other_config:local_ip
-${DATA_FILE}      ${GENIUS_VAR_DIR}/Itm_Auto_Tunnel_Create.json
+${SET_LOCAL_IP}    sudo ovs-vsctl set O . other_config:local_ip=
+${TZA_JSON}       ${GENIUS_VAR_DIR}/Itm_Auto_Tunnel_Create.json
 ${DEFAULT_TRANSPORT_ZONE}    default-transport-zone
 ${DELETE_TRANSPORT_ZONE}    sudo ovs-vsctl remove O . external_ids transport-zone
 ${GET_EXTERNAL_IDS}    sudo ovsdb-client dump -f list Open_vSwitch | grep external_ids
 ${GET_NETWORK_TOPOLOGY_URL}    ${OPERATIONAL_API}/network-topology:network-topology/topology/ovsdb:1/
-${OVS_VERSION}    2.6
+${OVS_VERSION}    2.5
 ${REMOVE_LOCAL_IP}    sudo ovs-vsctl remove O . other_config local_ip
-${SECURITY_GROUP}    itm_vtep_sg
 ${SHOW_OTHER_CONFIG}    sudo ovsdb-client dump -f list Open_vSwitch | grep other_config
 ${STATUS_CHECK}    DOWN
 ${TRANSPORT_ZONE}    TZA
 ${TRANSPORTZONE_POST_URL}    ${CONFIG_API}/itm:transport-zones
-@{COMPUTE-NODE-LIST}    ${OS_COMPUTE_1_IP}    ${OS_COMPUTE_2_IP}
-@{NET_1_VMS}      itm_vm1_1    itm_vm2_2
-@{NETWORKS}       itm_net1_1    itm_net2_2
-@{PORTS}          itm_port1_1    itm_port2_2
-@{SUBNETS}        itm_subnet1_1    itm_subnet2_2
-@{SUBNET_CIDRS}    10.1.1.0/24    20.1.1.0/24
+@{COMPUTE-NODE-LIST}    ${TOOLS_SYSTEM_1_IP}    ${TOOLS_SYSTEM_2_IP}
 
 *** Test Cases ***
 Verify TEP in controller and transport zone in OVSDB table of compute nodes
-    [Documentation]    Dump OVSDB table in all compute nodes and Verify ovs version, zone name, tunnel and perform ping across DPN VM’s
+    [Documentation]    Set local ip in compute nodes and verify default transport zone tunnels are up in controller
     : FOR    ${ip}    IN    @{COMPUTE-NODE-LIST}
-    \    ${localip} =    OvsManager.Get OVS Local Ip    ${ip}
-    \    ${output} =    Utils.Run Command On Remote System    ${ip}    ${SHOW_OTHER_CONFIG}
-    \    BuiltIn.Should Contain    ${output}    ${localip}
-    ${dpn} =    OVSDB.Get DPID    @{COMPUTE-NODE-LIST}[0]
+    \    ${localip} =    Utils.Run Command On Remote System    ${ip}    ${SET_LOCAL_IP}${ip}
+    ${dpn} =    OVSDB.Get DPID    ${TOOLS_SYSTEM_1_IP}
     ${dpn} =    BuiltIn.Convert To String    ${dpn}
-    Set Suite Variable    ${DPN1}    ${dpn}
-    ${dpn} =    OVSDB.Get DPID    @{COMPUTE-NODE-LIST}[1]
+    BuiltIn.Set Suite Variable    ${DPN1}    ${dpn}
+    ${dpn} =    OVSDB.Get DPID    ${TOOLS_SYSTEM_2_IP}
     ${dpn} =    BuiltIn.Convert To String    ${dpn}
-    Set Suite Variable    ${DPN2}    ${dpn}
-    @{tep_data} =    BuiltIn.Create List    ${DPN1}    ${DPN2}    ${DEFAULT_TRANSPORT_ZONE}
-    ${itm_data} =    Utils.Get Data From URI    session    ${TRANSPORTZONE_POST_URL}
-    : FOR    ${data}    IN    @{tep_data}
-    \    BuiltIn.Should Contain    ${itm_data}    ${data}
-    ${tep_show_output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW_STATE}
-    BuiltIn.Should Not Contain    ${tep_show_output}    ${STATUS_CHECK}
-    BuiltIn.Should Contain    ${tep_show_output}    ${DPN1}
-    BuiltIn.Should Contain    ${tep_show_output}    ${DPN2}
-    OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
-    OpenStackOperations.Create Network    @{NETWORKS}[0]
-    OpenStackOperations.Create SubNet    @{NETWORKS}[0]    @{SUBNETS}[0]    @{SUBNET_CIDRS}[0]
-    OpenStackOperations.Create Port    @{NETWORKS}[0]    @{PORTS}[0]    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Port    @{NETWORKS}[0]    @{PORTS}[1]    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
-    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
-    ${VM1_IP}    ${dhcp1}    ${console} =    BuiltIn.Wait Until Keyword Succeeds    240s    10s    OpenStackOperations.Get VM IP
-    ...    true    @{NET_1_VMS}[0]
-    BuiltIn.Set Suite Variable    ${VM1_IP}
-    ${VM2_IP}    ${dhcp2}    ${console1} =    BuiltIn.Wait Until Keyword Succeeds    240s    10s    OpenStackOperations.Get VM IP
-    ...    true    @{NET_1_VMS}[1]
-    BuiltIn.Set Suite Variable    ${VM2_IP}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    ${VM1_IP}    ping -c ${DEFAULT_PING_COUNT} ${VM2_IP}
-    BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
+    BuiltIn.Set Suite Variable    ${DPN2}    ${dpn}
+    ${ip} =    OvsManager.Get OVS Local Ip    ${TOOLS_SYSTEM_1_IP}
+    BuiltIn.Set Suite Variable    ${LOCAL_IP_COMPUTE1}    ${ip}
+    ${ip} =    OvsManager.Get OVS Local Ip    ${TOOLS_SYSTEM_2_IP}
+    BuiltIn.Set Suite Variable    ${LOCAL_IP_COMPUTE2}    ${ip}
+    BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Genius.Verify Tunnel Status as UP    ${DEFAULT_TRANSPORT_ZONE}
 
 Verify TEPs with transport zone configured from OVS will be added to corresponding transport zone
-    [Documentation]    To Verify transport zone teps configured from ovs will be added to respective zone with zone name, tunnel type and TEPs part of teps-not-hosted-in-transport-zone
-    Utils.Get Data From URI    session    ${TRANSPORT_ZONE_ENDPOINT_URL}/${DEFAULT_TRANSPORT_ZONE}
-    Change Transport Zone In Compute    @{COMPUTE-NODE-LIST}[0]    ${TRANSPORT_ZONE}
-    ${get_nohosted_data} =    BuiltIn.Wait Until Keyword Succeeds    1 min    5 sec    Utils.Get Data From URI    session    ${TEP_NOT_HOSTED_ZONE_URL}
+    [Documentation]    To Verify transport zone name change in external id field of ovsdb and check status when moved from tep nohosted zone to TZA
+    Change Transport Zone In Compute    ${TOOLS_SYSTEM_1_IP}    ${TRANSPORT_ZONE}
+    ${get_nohosted_data} =    BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Utils.Get Data From URI    session    ${TEP_NOT_HOSTED_ZONE_URL}
     BuiltIn.Should Contain    ${get_nohosted_data}    ${TRANSPORT_ZONE}
     BuiltIn.Should Contain    ${get_nohosted_data}    ${DPN1}
-    Utils.Post Elements To URI From File    ${TRANSPORTZONE_POST_URL}    ${DATA_FILE}
-    ${get_hosted_data} =    Utils.Get Data From URI    session    ${TRANSPORT_ZONE_ENDPOINT_URL}/${TRANSPORT_ZONE}
-    BuiltIn.Should Contain    ${get_hosted_data}    ${TRANSPORT_ZONE}
-    BuiltIn.Should Contain    ${get_hosted_data}    ${DPN1}
-    Change Transport Zone In Compute    @{COMPUTE-NODE-LIST}[1]    ${TRANSPORT_ZONE}
+    Utils.Post Elements To URI From File    ${TRANSPORTZONE_POST_URL}    ${TZA_JSON}
+    Change Transport Zone In Compute    ${TOOLS_SYSTEM_2_IP}    ${TRANSPORT_ZONE}
     : FOR    ${node}    IN    @{COMPUTE-NODE-LIST}
-    \    ${localip} =    OvsManager.Get OVS Local Ip    ${node}
-    \    ${output} =    Utils.Run Command On Remote System    ${node}    ${SHOW_OTHER_CONFIG}
-    \    BuiltIn.Should Contain    ${output}    ${localip}
     \    ${output} =    Utils.Run Command On Remote System    ${node}    ${GET_EXTERNAL_IDS}
     \    BuiltIn.Should Contain    ${output}    ${TRANSPORT_ZONE}
-    ${ip} =    OvsManager.Get OVS Local Ip    @{COMPUTE-NODE-LIST}[0]
-    Set Suite Variable    ${IP1}    ${ip}
-    ${ip} =    OvsManager.Get OVS Local Ip    @{COMPUTE-NODE-LIST}[1]
-    Set Suite Variable    ${IP2}    ${ip}
-    @{tep_data} =    BuiltIn.Create List    ${DPN1}    ${DPN2}    ${TRANSPORT_ZONE}    ${IP1}    ${IP2}
-    ${config_data} =    Utils.Get Data From URI    session    ${TRANSPORT_ZONE_ENDPOINT_URL}/${TRANSPORT_ZONE}
-    : FOR    ${data}    IN    @{tep_data}
-    \    BuiltIn.Should Contain    ${config_data}    ${data}
+    ${get_hosted_data} =    BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Utils.Get Data From URI    session    ${TRANSPORT_ZONE_ENDPOINT_URL}/${TRANSPORT_ZONE}
+    BuiltIn.Should Contain    ${get_hosted_data}    ${TRANSPORT_ZONE}
+    BuiltIn.Should Contain    ${get_hosted_data}    ${DPN1}
+    BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Genius.Verify Tunnel Status as UP    ${TRANSPORT_ZONE}
 
 Verify other-config-key and transport zone value in controller operational datastore
     [Documentation]    validate local_ip and transport-zone value from controller datastore and Verify value of external-id-key with transport_zone in Controller operational datastore
     ${controller-data} =    Utils.Get Data From URI    session    ${GET_NETWORK_TOPOLOGY_URL}
-    BuiltIn.Should Contain    ${controller-data}    "other-config-value":"${IP1}"
-    BuiltIn.Should Contain    ${controller-data}    "other-config-value":"${IP2}"
+    BuiltIn.Should Contain    ${controller-data}    "other-config-value":"${LOCAL_IP_COMPUTE1}"
+    BuiltIn.Should Contain    ${controller-data}    "other-config-value":"${LOCAL_IP_COMPUTE2}"
     BuiltIn.Should Contain    ${controller-data}    "external-id-value":"${TRANSPORT_ZONE}"
 
 Delete transport zone on OVS and check ovsdb update to controller
-    [Documentation]    To verify transport zone moves to tepsNotHostedInTransportZone after deleting in compute and transport zone configuration from Compute added to default-transport-zone
+    [Documentation]    To verify transport zone moves to default zone after deleting zone name in compute nodes
     : FOR    ${node}    IN    @{COMPUTE-NODE-LIST}
     \    Utils.Run Command On Remote System    ${node}    ${DELETE_TRANSPORT_ZONE}
     ${tep_show_output} =    KarafKeywords.Issue Command On Karaf Console    ${TEP_SHOW}
     BuiltIn.Should Contain    ${tep_show_output}    ${DEFAULT_TRANSPORT_ZONE}
+    BuiltIn.Wait Until Keyword Succeeds    3x    10 sec    Genius.Verify Tunnel Status as UP    ${DEFAULT_TRANSPORT_ZONE}
     VpnOperations.ITM Delete Tunnel    ${TRANSPORT_ZONE}
-    @{tep_data} =    BuiltIn.Create List    ${DPN1}    ${DPN2}    ${IP1}    ${IP2}
-    ${default_zone_data} =    Utils.Get Data From URI    session    ${TRANSPORT_ZONE_ENDPOINT_URL}/${DEFAULT_TRANSPORT_ZONE}
-    BuiltIn.Should Not Contain    ${default_zone_data}    ${TRANSPORT_ZONE}
-    : FOR    ${data}    IN    @{tep_data}
-    \    BuiltIn.Should Contain    ${default_zone_data}    ${data}
-    ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    ${VM1_IP}    ping -c ${DEFAULT_PING_COUNT} ${VM2_IP}
-    BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
 
 *** Keywords ***
 Change Transport Zone In Compute
index 67fecc0648d929772e47e7d480141e4485bcda38..c6635a56f791ff000b0749854d0f9cf12066df0b 100644 (file)
@@ -5,3 +5,4 @@ integration/test/csit/suites/genius/Configure_ITM.robot
 integration/test/csit/suites/genius/BFD_monitoring.robot
 integration/test/csit/suites/genius/Service_Recovery.robot
 integration/test/csit/suites/genius/ITM_Direct_Tunnels.robot
+integration/test/csit/suites/genius/ITM_Vtep_Auto_Tunnel.robot
index 67fecc0648d929772e47e7d480141e4485bcda38..c6635a56f791ff000b0749854d0f9cf12066df0b 100644 (file)
@@ -5,3 +5,4 @@ integration/test/csit/suites/genius/Configure_ITM.robot
 integration/test/csit/suites/genius/BFD_monitoring.robot
 integration/test/csit/suites/genius/Service_Recovery.robot
 integration/test/csit/suites/genius/ITM_Direct_Tunnels.robot
+integration/test/csit/suites/genius/ITM_Vtep_Auto_Tunnel.robot