Add Bridge And Tap Interface in Openstack Ovs 23/41823/2
authorpriya.ramasubbu <priya.ramasubbu@hcl.com>
Thu, 14 Jul 2016 17:40:50 +0000 (23:10 +0530)
committerPriya Ramasubbu <priya.ramasubbu@hcl.com>
Fri, 15 Jul 2016 05:13:21 +0000 (05:13 +0000)
      * verify the added bridge and tap interface from operational datastore

Change-Id: I1a2f23ead77e3cc105d90136969cb06ec74fd0e8
Signed-off-by: priya.ramasubbu <priya.ramasubbu@hcl.com>
csit/libraries/ClusterOvsdb.robot
csit/suites/openstack/clustering/01_l2_tests.robot

index 3edb4c3df5530ff8206c5382e4f289554bc4be6a..2539e1b1627a9526b23422f70c93fd32974916f9 100644 (file)
@@ -35,18 +35,18 @@ Get Ovsdb Entity Owner Status For One Device
     [Return]    ${owner}    ${candidates_list}
 
 Create Sample Bridge Manually And Verify
-    [Arguments]    ${controller_index_list}
+    [Arguments]    ${controller_index_list}    ${SYSTEM_IP}=${TOOLS_SYSTEM_IP}
     [Documentation]    Create bridge br-s1 using OVS command and verify it gets created in all instances in ${controller_index_list}.
-    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-br br-s1
+    Utils.Run Command On Mininet    ${SYSTEM_IP}    sudo ovs-vsctl add-br br-s1
     ${dictionary_operational}=    Create Dictionary    br-s1=5
     ${dictionary_config}=    Create Dictionary    br-s1=0
     Wait Until Keyword Succeeds    5s    1s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_config}    ${CONFIG_TOPO_API}
     Wait Until Keyword Succeeds    5s    1s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_operational}    ${OPERATIONAL_TOPO_API}
 
 Add Sample Port To The Manual Bridge And Verify
-    [Arguments]    ${controller_index_list}
+    [Arguments]    ${controller_index_list}    ${SYSTEM_IP}=${TOOLS_SYSTEM_IP}
     [Documentation]    Add Port vx1 to br-s1 using OVS command and verify it gets added in all instances in ${controller_index_list}.
-    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-port br-s1 vx1 -- set Interface vx1 type=vxlan
+    Utils.Run Command On Mininet    ${SYSTEM_IP}    sudo ovs-vsctl add-port br-s1 vx1 -- set Interface vx1 type=vxlan
     ${dictionary_operational}=    Create Dictionary    vx1=2
     ${dictionary_config}=    Create Dictionary    vx1=0
     Wait Until Keyword Succeeds    5s    1s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_config}    ${CONFIG_TOPO_API}
@@ -60,18 +60,18 @@ Create Sample Tap Device
     Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    ifconfig vport2 up
 
 Add Sample Tap Device To The Manual Bridge And Verify
-    [Arguments]    ${controller_index_list}
+    [Arguments]    ${controller_index_list}    ${SYSTEM_IP}=${TOOLS_SYSTEM_IP}
     [Documentation]    Add Tap Device  vport1 and vport2 to br-s1 using OVS command and verify it gets added in all instances in ${controller_index_list}.
-    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-port br-s1 vport1 -- add-port br-s1 vport2
+    Utils.Run Command On Mininet    ${SYSTEM_IP}    sudo ovs-vsctl add-port br-s1 vport1 -- add-port br-s1 vport2
     ${dictionary_operational}=    Create Dictionary    vport1=2    vport2=2
     ${dictionary_config}=    Create Dictionary    vport1=0    vport2=0
     Wait Until Keyword Succeeds    5s    1s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_config}    ${CONFIG_TOPO_API}
     Wait Until Keyword Succeeds    5s    1s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_operational}    ${OPERATIONAL_TOPO_API}
 
 Delete Sample Bridge Manually And Verify
-    [Arguments]    ${controller_index_list}
+    [Arguments]    ${controller_index_list}    ${SYSTEM_IP}=${TOOLS_SYSTEM_IP}
     [Documentation]    Delete bridge br-s1 using OVS command and verify it gets applied in all instances in ${controller_index_list}.
-    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-br br-s1
+    Utils.Run Command On Mininet    ${SYSTEM_IP}    sudo ovs-vsctl del-br br-s1
     ${dictionary}=    Create Dictionary    br-s1=0
     Wait Until Keyword Succeeds    5s    1s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}
 
index 13705935923701098badf03972b2bbc5fe902e1d..ebe6b6a3c67272f3abe070dc984dbe2cf0766bc0 100644 (file)
@@ -10,6 +10,7 @@ Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/OpenStackOperations.robot
 Resource          ../../../libraries/DevstackUtils.robot
 Resource          ../../../libraries/OVSDB.robot
+Resource          ../../../libraries/ClusterOvsdb.robot
 Library           ../../../libraries/Common.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/ClusterKeywords.robot
@@ -28,6 +29,10 @@ Resource          ../../../libraries/ClusterKeywords.robot
 @{SUBNETS_RANGE}    70.0.0.0/24    80.0.0.0/24
 
 *** Test Cases ***
+Create All Controller Sessions
+    [Documentation]    Create sessions for all three contorllers.
+    ClusterKeywords.Create Controller Sessions
+
 Create Cluster List
     [Documentation]    Create original cluster list.
     ${original_cluster_list}    ClusterKeywords.Create Controller Index List
@@ -55,13 +60,37 @@ Create Subnets For l2_net_2
     [Documentation]    Create Sub Nets for the Networks with neutron request.
     Create SubNet    l2_net_2    l2_sub_net_2    @{SUBNETS_RANGE}[1]
 
+Create Bridge Manually and Verify Before Fail
+    [Documentation]    Create bridge with OVS command and verify it gets applied from all instances.
+    ClusterOvsdb.Create Sample Bridge Manually And Verify    ${original_cluster_list}    ${OS_CONTROL_NODE_IP}
+
+Add Tap Device Manually and Verify Before Fail
+    [Documentation]    Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
+    ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify    ${original_cluster_list}    ${OS_CONTROL_NODE_IP}
+
+Delete the Bridge Manually and Verify Before Fail
+    [Documentation]    Delete bridge with OVS command and verify it gets deleted from all instances.
+    ClusterOvsdb.Delete Sample Bridge Manually And Verify    ${original_cluster_list}    ${OS_CONTROL_NODE_IP}
+
 Take Down ODL1
     [Documentation]    Kill the karaf in First Controller
     ClusterKeywords.Kill Multiple Controllers    1
     ${new_cluster_list}    ClusterKeywords.Create Controller Index List
-    Remove Values From List    ${new_cluster_list}    1
+    Remove From List    ${new_cluster_list}    0
     Set Suite Variable    ${new_cluster_list}
 
+Create Bridge Manually and Verify After Fail
+    [Documentation]    Create bridge with OVS command and verify it gets applied from all instances.
+    ClusterOvsdb.Create Sample Bridge Manually And Verify    ${new_cluster_list}    ${OS_CONTROL_NODE_IP}
+
+Add Tap Device Manually and Verify After Fail
+    [Documentation]    Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
+    ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify    ${new_cluster_list}    ${OS_CONTROL_NODE_IP}
+
+Delete the Bridge Manually and Verify After Fail
+    [Documentation]    Delete bridge with OVS command and verify it gets deleted from all instances.
+    ClusterOvsdb.Delete Sample Bridge Manually And Verify    ${new_cluster_list}    ${OS_CONTROL_NODE_IP}
+
 Create Vm Instances For l2_net_1
     [Documentation]    Create Vm instances using flavor and image names for a network.
     Log    ${devstack_conn_id}
@@ -74,11 +103,23 @@ Bring Up ODL1
     ${new_cluster_list}    ClusterKeywords.Create Controller Index List
     Set Suite Variable    ${new_cluster_list}
 
+Create Bridge Manually and Verify After Recover
+    [Documentation]    Create bridge with OVS command and verify it gets applied from all instances.
+    ClusterOvsdb.Create Sample Bridge Manually And Verify    ${original_cluster_list}    ${OS_CONTROL_NODE_IP}
+
+Add Tap Device Manually and Verify After Recover
+    [Documentation]    Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
+    ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify    ${original_cluster_list}    ${OS_CONTROL_NODE_IP}
+
+Delete the Bridge Manually and Verify After Recover
+    [Documentation]    Delete bridge with OVS command and verify it gets deleted from all instances.
+    ClusterOvsdb.Delete Sample Bridge Manually And Verify    ${original_cluster_list}    ${OS_CONTROL_NODE_IP}
+
 Take Down ODL2
     [Documentation]    Kill the karaf in Second Controller
     ClusterKeywords.Kill Multiple Controllers    2
     ${new_cluster_list}    ClusterKeywords.Create Controller Index List
-    Remove Values From List    ${new_cluster_list}    2
+    Remove From List    ${new_cluster_list}    1
     Set Suite Variable    ${new_cluster_list}
 
 Create Vm Instances For l2_net_2
@@ -120,7 +161,7 @@ Take Down ODL3
     [Documentation]    Kill the karaf in Third Controller
     ClusterKeywords.Kill Multiple Controllers    3
     ${new_cluster_list}    ClusterKeywords.Create Controller Index List
-    Remove Values From List    ${new_cluster_list}    3
+    Remove From List    ${new_cluster_list}    2
     Set Suite Variable    ${new_cluster_list}
 
 Connectivity Tests From Vm Instance1 In l2_net_1