Fix Netvirt Tests by splitting the single node and three node tests 19/34819/27
authormanimuthazhagan <manimuthazhagan.r@hcl.com>
Fri, 15 Jan 2016 11:42:20 +0000 (17:12 +0530)
committerJamo Luhrsen <jluhrsen@redhat.com>
Thu, 31 Mar 2016 22:16:18 +0000 (15:16 -0700)
* Created a new TestPlan for 3-node tests
* Created a set of tests for 3-node
* Deleted a Older Ovsdb_Net-virt Test cases
* Removed the essentially noop suite (Ovsdb_Netvirt_flow) as this patch
  enables it in cluster mode

Change-Id: I3fd9e2574c8960f3ba3690dceac4d9f122d93494
Signed-off-by: manimuthazhagan <manimuthazhagan.r@hcl.com>
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/suites/ovsdb/Netvirt_Cluster/010_Ovsdb_Netvirt_flow.robot [new file with mode: 0644]
csit/suites/ovsdb/Netvirt_Cluster/030_Ovsdb_Southbound_NetVirt.robot [moved from csit/suites/ovsdb/Ovsdb_Net-virt/020_Ovsdb_Southbound_Net-Virt.robot with 69% similarity]
csit/suites/ovsdb/Ovsdb_Net-virt/010_Ovsdb_Net_virt_flow.robot [deleted file]
csit/testplans/ovsdb-netvirt-clustering.txt [new file with mode: 0644]
csit/testplans/ovsdb-netvirt.txt
csit/variables/Variables.py

diff --git a/csit/suites/ovsdb/Netvirt_Cluster/010_Ovsdb_Netvirt_flow.robot b/csit/suites/ovsdb/Netvirt_Cluster/010_Ovsdb_Netvirt_flow.robot
new file mode 100644 (file)
index 0000000..b17a02a
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for Ovsdb Southbound Cluster
+Suite Setup       Create Controller Sessions
+Suite Teardown    Delete All Sessions
+Library           RequestsLibrary
+Resource          ../../../libraries/ClusterOvsdb.robot
+Resource          ../../../libraries/ClusterKeywords.robot
+Resource          ../../../libraries/MininetKeywords.robot
+Variables         ../../../variables/Variables.py
+Library           ../../../libraries/Common.py
+Resource          ../../../libraries/Utils.robot
+Resource          ../../../libraries/OVSDB.robot
+Resource          ../../../libraries/KarafKeywords.robot
+
+*** Variables ***
+${OVSDB_CONFIG_DIR}    ${CURDIR}/../../../variables/ovsdb
+@{node_list}      ovsdb://uuid/
+${EXT_NET1_ID}    7da709ff-397f-4778-a0e8-994811272fdb
+${EXT_SUBNET1_ID}    00289199-e288-464a-ab2f-837ca67101a7
+${TNT1_ID}        cde2563ead464ffa97963c59e002c0cf
+
+*** Test Cases ***
+Create Original Cluster List
+    [Documentation]    Create original cluster list.
+    ${original_cluster_list}    Create Controller Index List
+    Set Suite Variable    ${original_cluster_list}
+    Log    ${original_cluster_list}
+
+Verify Net-virt Features
+    [Documentation]    Check Net-virt Console related features (odl-ovsdb-openstack)
+    Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_1_IP}
+    Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_2_IP}
+    Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_3_IP}
+
+Check Shards Status Before Fail
+    [Documentation]    Check Status for all shards in Ovsdb application.
+    Check Ovsdb Shards Status    ${original_cluster_list}
+
+Start Mininet Multiple Connections
+    [Documentation]    Start mininet with connection to all cluster instances.
+    ${mininet_conn_id}    Add Multiple Managers to OVS  ${TOOLS_SYSTEM_IP}    ${original_cluster_list}
+    Set Suite Variable    ${mininet_conn_id}
+    Log    ${mininet_conn_id}
+
+Get manager connection
+    [Documentation]    This will verify if the OVS manager is connected
+    [Tags]    OVSDB netvirt
+    Verify OVS Reports Connected
+
+Check netvirt is loaded
+    [Documentation]    Check if the netvirt piece has been loaded into the karaf instance
+    [Tags]    Check netvirt is loaded
+    ${netvirt}=    Create Dictionary    netvirt:1=1
+    Wait Until Keyword Succeeds    6s    1s    Check Item Occurrence At URI In Cluster    ${original_cluster_list}    ${netvirt}    ${OPERATIONAL_NODES_NETVIRT}
+
+Check External Net for Tenant
+    [Documentation]    Check External Net for Tenant
+    [Tags]    OpenStack Call Flow
+    ${resp}=    Create Dictionary    "networks" : [ ]=1
+    Check Item Occurrence At URI In Cluster    ${original_cluster_list}    ${resp}    ${ODLREST}/networks
+
+Create External Net for Tenant
+    [Documentation]    Create External Net for Tenant
+    [Tags]    OpenStack Call Flow
+    ${Data}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/create_ext_net.json
+    ${Data}    Replace String    ${Data}    {netId}    ${EXT_NET1_ID}
+    ${Data}    Replace String    ${Data}    {tntId}    ${TNT1_ID}
+    Log    ${Data}
+    Put And Check At URI In Cluster    ${original_cluster_list}    1    ${ODLREST}/networks    ${Data}
similarity index 69%
rename from csit/suites/ovsdb/Ovsdb_Net-virt/020_Ovsdb_Southbound_Net-Virt.robot
rename to csit/suites/ovsdb/Netvirt_Cluster/030_Ovsdb_Southbound_NetVirt.robot
index b9a15ca431428d866731f2058749c53acef7d70e..489baf96d8ecade9615edb7b87f111309f0186fb 100644 (file)
@@ -10,10 +10,10 @@ Variables         ../../../variables/Variables.py
 Library           ../../../libraries/Common.py
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/OVSDB.robot
+Resource          ../../../libraries/KarafKeywords.robot
 
 *** Variables ***
-@{FLOW_TABLE_LIST}    actions=goto_table:20    actions=CONTROLLER:65535    actions=goto_table:30    actions=goto_table:40    actions=goto_table:50    actions=goto_table:60    actions=goto_table:70
-...               actions=goto_table:80    actions=goto_table:90    actions=goto_table:100    actions=goto_table:110    actions=drop
+@{FLOW_TABLE_LIST}    actions=goto_table:20    actions=CONTROLLER:65535    actions=goto_table:30    actions=goto_table:40    actions=goto_table:50    actions=goto_table:60    actions=goto_table:70    actions=goto_table:80    actions=goto_table:90    actions=goto_table:100    actions=goto_table:110    actions=drop
 
 *** Test Cases ***
 Create Original Cluster List
@@ -22,16 +22,32 @@ Create Original Cluster List
     Set Suite Variable    ${original_cluster_list}
     Log    ${original_cluster_list}
 
+Verify Net-virt Features
+    [Documentation]    Installing Net-virt Console related features (odl-ovsdb-openstack)
+    Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_1_IP}
+    Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_2_IP}
+    Verify Feature Is Installed    odl-ovsdb-openstack    ${ODL_SYSTEM_3_IP}
+
 Check Shards Status Before Fail
     [Documentation]    Check Status for all shards in Ovsdb application.
     Check Ovsdb Shards Status    ${original_cluster_list}
 
 Start Mininet Multiple Connections
     [Documentation]    Start mininet with connection to all cluster instances.
-    ${mininet_conn_id}    Add Multiple Managers to OVS    ${TOOLS_SYSTEM_IP}    ${original_cluster_list}
+    ${mininet_conn_id}    Add Multiple Managers to OVS  ${TOOLS_SYSTEM_IP}    ${original_cluster_list}
     Set Suite Variable    ${mininet_conn_id}
     Log    ${mininet_conn_id}
 
+Get manager connection
+    [Documentation]    This will verify if the OVS manager is connected
+    [Tags]    OVSDB netvirt
+    Verify OVS Reports Connected
+
+Check Operational topology
+    [Documentation]    Check Operational topology
+    ${dictionary}=    Create Dictionary    ovsdb://uuid/=5
+    Wait Until Keyword Succeeds    20s    2s    Check Item Occurrence At URI In Cluster    ${original_cluster_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}
+
 Get bridge setup
     [Documentation]    This request is verifying that the br-int bridge has been created
     [Tags]    OVSDB netvirt
@@ -53,10 +69,11 @@ Get interface setup
     Log    ${output}
     Should Contain    ${output}    Interface br-int
 
+
 Get the bridge flows
     [Documentation]    This request fetch the OF13 flow tables to verify the flows are correctly added
     [Tags]    OVSDB netvirt
     ${output}    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-ofctl -O Openflow13 dump-flows br-int
     Log    ${output}
     : FOR    ${flows}    IN    @{FLOW_TABLE_LIST}
-    \    Should Contain    ${output}    ${flows}
+    \    Should Contain    ${output}    ${flows}
\ No newline at end of file
diff --git a/csit/suites/ovsdb/Ovsdb_Net-virt/010_Ovsdb_Net_virt_flow.robot b/csit/suites/ovsdb/Ovsdb_Net-virt/010_Ovsdb_Net_virt_flow.robot
deleted file mode 100644 (file)
index b6801f3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-*** Settings ***
-Documentation     Test suite for Ovsdb Southbound Cluster
-Suite Setup       Create Controller Sessions
-Suite Teardown    Delete All Sessions
-Library           RequestsLibrary
-Resource          ../../../libraries/ClusterOvsdb.robot
-Resource          ../../../libraries/ClusterKeywords.robot
-Resource          ../../../libraries/MininetKeywords.robot
-Variables         ../../../variables/Variables.py
-Library           ../../../libraries/Common.py
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/OVSDB.robot
-
-*** Variables ***
-${OVSDB_CONFIG_DIR}    ${CURDIR}/../../../variables/ovsdb
-@{node_list}      ovsdb://uuid/
-@{netvirt}        1
-
-*** Test Cases ***
-Create Cluster List
-    [Documentation]    Create original cluster list.
-    ${original_cluster_list}    Create Controller Index List
-    Set Suite Variable    ${original_cluster_list}
-    Log    ${original_cluster_list}
-
-Check Shards Status Before Fail
-    [Documentation]    Check Status for all shards in Ovsdb application.
-    Check Ovsdb Shards Status    ${original_cluster_list}
-
-Start Mininet Multiple Connections
-    [Documentation]    Start mininet with connection to all cluster instances.
-    ${mininet_conn_id}    Add Multiple Managers to OVS    ${TOOLS_SYSTEM_IP}    ${original_cluster_list}
-    Set Suite Variable    ${mininet_conn_id}
-    Log    ${mininet_conn_id}
-
-Check netvirt is loaded
-    [Documentation]    Check if the netvirt piece has been loaded into the karaf instance
-    [Tags]    Check netvirt is loaded
-    Wait Until Keyword Succeeds    4s    4s    Check Item Occurrence At URI In Cluster    ${original_cluster_list}    ${netvirt}    ${OPERATIONAL_NODES_NETVIRT}
diff --git a/csit/testplans/ovsdb-netvirt-clustering.txt b/csit/testplans/ovsdb-netvirt-clustering.txt
new file mode 100644 (file)
index 0000000..3775625
--- /dev/null
@@ -0,0 +1,3 @@
+# Place the suites in run order:
+integration/test/csit/suites/ovsdb/Netvirt_Cluster/030_Ovsdb_Southbound_NetVirt.robot
+integration/test/csit/suites/ovsdb/Netvirt_Cluster/010_Ovsdb_Netvirt_flow.robot
index f0e8272caa2aff75ccd9c72aa8f5e5018c260367..797c8ce490e0f8ce2c193ce27bdae5269a2092c0 100644 (file)
@@ -1,3 +1,2 @@
 # Place the suites in run order:
-integration/test/csit/suites/ovsdb/Openstack_Neutron
-integration/test/csit/suites/ovsdb/Ovsdb_Net-virt/
\ No newline at end of file
+integration/test/csit/suites/ovsdb/Openstack_Neutron
\ No newline at end of file
index 0c385150ac737a2a0d46bafa128e0b909fc0b732..b1cc8483da133ac4567ddb5846190eada42e4c83 100644 (file)
@@ -163,6 +163,9 @@ LFM_RPC_API = "/restconf/operations/odl-mappingservice"
 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
 LFM_SB_RPC_API = "/restconf/operations/odl-lisp-sb"
 
+# Neutron
+NEUTRON_NB_API = '/controller/nb/v2/neutron'
+
 # Other global variables
 # TODO: Move these to more apropriate sections.
 PORT = '8080'