From 637ffff1dba994ef2fd6fd056e02b4cada478709 Mon Sep 17 00:00:00 2001 From: "priya.ramasubbu" Date: Fri, 1 Jul 2016 18:11:30 +0530 Subject: [PATCH] Add Tap Device to the bridge in OVS * verify the added tap interface from operational datastore Change-Id: I93dca2e827aa40cbc17560604a42f867c693b2f4 Signed-off-by: priya.ramasubbu --- csit/libraries/ClusterOvsdb.robot | 20 ++++++++++++++-- .../010__Ovsdb_Southbound_Cluster.robot | 24 +++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/csit/libraries/ClusterOvsdb.robot b/csit/libraries/ClusterOvsdb.robot index 6601b0868b..3edb4c3df5 100644 --- a/csit/libraries/ClusterOvsdb.robot +++ b/csit/libraries/ClusterOvsdb.robot @@ -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} diff --git a/csit/suites/ovsdb/Southbound_Cluster/010__Ovsdb_Southbound_Cluster.robot b/csit/suites/ovsdb/Southbound_Cluster/010__Ovsdb_Southbound_Cluster.robot index a5a1804aa1..424a0bd4ac 100644 --- a/csit/suites/ovsdb/Southbound_Cluster/010__Ovsdb_Southbound_Cluster.robot +++ b/csit/suites/ovsdb/Southbound_Cluster/010__Ovsdb_Southbound_Cluster.robot @@ -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} -- 2.36.6