Add suites to restart odl with tell-based protocol 01/55701/15
authorPeter Gubka <pgubka@cisco.com>
Thu, 20 Apr 2017 07:01:35 +0000 (09:01 +0200)
committerPeter Gubka <pgubka@cisco.com>
Fri, 21 Apr 2017 11:56:18 +0000 (13:56 +0200)
Change-Id: I2b78e90d1804db9a70968f71c3ab6dde692ee129
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot [new file with mode: 0644]
csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot [new file with mode: 0644]
csit/testplans/controller-clustering.txt

diff --git a/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot b/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot
new file mode 100644 (file)
index 0000000..b6cc2f1
--- /dev/null
@@ -0,0 +1,34 @@
+*** Settings ***
+Documentation     Unset tell-based protocol usage
+...
+...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...
+...               This program and the accompanying materials are made available under the
+...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...
+...               Suite stops all odl nodes, outcomment usage of tell-based protocol in
+...               config file (means make it false by default) and starts all nodes again.
+Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
+Suite Teardown    SSHLibrary.Close_All_Connections
+Library           SSHLibrary
+Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+
+*** Variables ***
+${DATASTORE_CFG}    /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
+
+*** Test Cases ***
+Kill_All_Members
+    [Documentation]    Kill every odl node.
+    ClusterManagement.Kill_Members_From_List_Or_All
+
+Unset_Tell_Based_Protocol_Usage
+    [Documentation]    Comment out the flag usage in config file.
+    ClusterManagement.Run_Bash_Command_On_List_Or_All    sed -ie "s/use-tell-based-protocol=/#use-tell-based-protocol=/g" ${DATASTORE_CFG}
+    ClusterManagement.Run_Bash_Command_On_List_Or_All    cat ${DATASTORE_CFG}
+
+Start_All_And_Sync
+    [Documentation]    Start each member and wait for sync.
+    ClusterManagement.Start_Members_From_List_Or_All
+    ClusterManagement.Run_Bash_Command_On_List_Or_All    ps -ef | grep java
diff --git a/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot b/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot
new file mode 100644 (file)
index 0000000..cd85b24
--- /dev/null
@@ -0,0 +1,34 @@
+*** Settings ***
+Documentation     Set tell-based protocol usage
+...
+...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...
+...               This program and the accompanying materials are made available under the
+...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
+...               and is available at http://www.eclipse.org/legal/epl-v10.html
+...
+...               Suite stops all odl nodes, uncomment usage of tell-based protocol in
+...               config file and starts all nodes again.
+Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
+Suite Teardown    SSHLibrary.Close_All_Connections
+Library           SSHLibrary
+Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+
+*** Variables ***
+${DATASTORE_CFG}    /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
+
+*** Test Cases ***
+Kill_All_Members
+    [Documentation]    Kill every odl node.
+    ClusterManagement.Kill_Members_From_List_Or_All
+
+Set_Tell_Based_Protocol_Usage
+    [Documentation]    Uncomment the flag usage line in config file
+    ClusterManagement.Run_Bash_Command_On_List_Or_All    sed -ie "s/#use-tell-based-protocol=/use-tell-based-protocol=/g" ${DATASTORE_CFG}
+    ClusterManagement.Run_Bash_Command_On_List_Or_All    cat ${DATASTORE_CFG}
+
+Start_All_And_Sync
+    [Documentation]    Start each member and wait for sync.
+    ClusterManagement.Start_Members_From_List_Or_All
+    ClusterManagement.Run_Bash_Command_On_List_Or_All    ps -ef | grep java
index 6edf4e19b8a8a64c539dad460e8a4f2fb87ed34d..562c1913d8a1002fda4c388fcc5373bc327a1df4 100644 (file)
@@ -17,4 +17,6 @@ integration/test/csit/suites/controller/dom_rpc_broker/rpc_provider_precedence.r
 integration/test/csit/suites/controller/dom_rpc_broker/rpc_provider_partition_and_heal.robot
 integration/test/csit/suites/controller/dom_rpc_broker/action_provider_precedence.robot
 integration/test/csit/suites/controller/dom_rpc_broker/action_provider_partition_and_heal.robot
+integration/test/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot
+integration/test/csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot
 integration/test/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot