Add Tap Device to the bridge in OVS 95/41195/3
authorpriya.ramasubbu <priya.ramasubbu@hcl.com>
Fri, 1 Jul 2016 12:41:30 +0000 (18:11 +0530)
committerLuis Gomez <ecelgp@gmail.com>
Fri, 8 Jul 2016 18:19:27 +0000 (18:19 +0000)
     * verify the added tap interface from operational datastore

Change-Id: I93dca2e827aa40cbc17560604a42f867c693b2f4
Signed-off-by: priya.ramasubbu <priya.ramasubbu@hcl.com>
csit/libraries/ClusterOvsdb.robot
csit/suites/ovsdb/Southbound_Cluster/010__Ovsdb_Southbound_Cluster.robot

index 6601b0868b6431e6588a17eab11ee1980798d9f4..3edb4c3df5530ff8206c5382e4f289554bc4be6a 100644 (file)
@@ -41,7 +41,7 @@ Create Sample Bridge Manually And Verify
     ${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    10s    2s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_operational}    ${OPERATIONAL_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}
@@ -52,6 +52,22 @@ Add Sample Port To The Manual Bridge And Verify
     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}
 
+Create Sample Tap Device
+    [Documentation]    Create Tap Device  vport1 and vport2 to add to the bridge br-s1 using OVS command.
+    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    ip tuntap add mode tap vport1
+    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    ip tuntap add mode tap vport2
+    Utils.Run Command On Mininet    ${TOOLS_SYSTEM_IP}    ifconfig vport1 up
+    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}
+    [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
+    ${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}
     [Documentation]    Delete bridge br-s1 using OVS command and verify it gets applied in all instances in ${controller_index_list}.
@@ -75,7 +91,7 @@ Create Sample Bridge And Verify
     ${dictionary}=    Create Dictionary    ${TOOLS_SYSTEM_IP1}=1    ${OVSDBPORT}=4    ${BRIDGE}=1
     Wait Until Keyword Succeeds    20s    1s    ClusterKeywords.Put And Check At URI In Cluster    ${controller_index_list}    ${controller_index}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE}
     ...    ${body}
-    Wait Until Keyword Succeeds    5s    1s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
+    Wait Until Keyword Succeeds    20s    2s    ClusterKeywords.Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
 
 Create Sample Port And Verify
     [Arguments]    ${controller_index_list}    ${controller_index}
index a5a1804aa12d8b4a098f23b105a84d30fa9e2c62..424a0bd4ac9fa37b01ea3291cdbb9af993ad7a73 100644 (file)
@@ -38,6 +38,14 @@ Add Port Manually and Verify Before Fail
     [Documentation]    Add port with OVS command and verify it gets applied from all instances.
     ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify    ${original_cluster_list}
 
+Create Tap Device Before Fail
+    [Documentation]    Create tap devices to add to the bridge in ovs
+    ClusterOvsdb.Create Sample Tap Device
+
+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}
+
 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}
@@ -94,6 +102,14 @@ Add Port Manually and Verify After Fail
     [Documentation]    Add port with OVS command and verify it gets applied from all instances.
     ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify    ${new_cluster_list}
 
+Create Tap Device After Fail
+    [Documentation]    Create tap devices to add to the bridge in ovs
+    ClusterOvsdb.Create Sample Tap Device
+
+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}
+
 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}
@@ -135,6 +151,14 @@ Add Port Manually and Verify After Recover
     [Documentation]    Add port with OVS command and verify it gets applied from all instances.
     ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify    ${original_cluster_list}
 
+Create Tap Device After Recover
+    [Documentation]    Create tap devices to add to the bridge in ovs
+    ClusterOvsdb.Create Sample Tap Device
+
+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}
+
 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}