862d2844eabc66f02752a6ea7c32f02ed76b0286
[integration/test.git] / csit / suites / controller / dom_data_broker / restart_odl_with_tell_based_true.robot
1 *** Settings ***
2 Documentation     Set tell-based protocol usage
3 ...
4 ...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
5 ...
6 ...               This program and the accompanying materials are made available under the
7 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
9 ...
10 ...               Suite stops all odl nodes, un-comment usage of tell-based protocol in
11 ...               config file (means make it true) and starts all nodes again.
12 Suite Setup       BuiltIn.Run_Keywords    ClusterManagement.ClusterManagement_Setup    http_timeout=10
13 ...               AND    SetupUtils.Setup_Utils_For_Setup_And_Teardown
14 Suite Teardown    SSHLibrary.Close_All_Connections
15 Library           SSHLibrary
16 Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
17 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
18
19 *** Variables ***
20 ${DATASTORE_CFG}    /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
21 ${SHARD_NAME}     default
22 ${SHARD_TYPE}     config
23
24 *** Test Cases ***
25 Kill_All_Members
26     [Documentation]    Kill every odl node.
27     ClusterManagement.Kill_Members_From_List_Or_All
28
29 Set_Tell_Based_Protocol_Usage
30     [Documentation]    Un-comment the flag usage in config file. Also clean most data except data/log/.
31     ClusterManagement.Check_Bash_Command_On_List_Or_All    sed -ie "s/#use-tell-based-protocol=/use-tell-based-protocol=/g" ${DATASTORE_CFG}
32     ClusterManagement.Check_Bash_Command_On_List_Or_All    cat ${DATASTORE_CFG}
33     ClusterManagement.Clean_Directories_On_List_Or_All    tmp_dir=/tmp
34
35 Start_All_And_Sync
36     [Documentation]    Start each member and wait for sync.
37     ClusterManagement.Start_Members_From_List_Or_All
38     BuiltIn.Wait_Until_Keyword_Succeeds    30s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}
39     ClusterManagement.Run_Bash_Command_On_List_Or_All    ps -ef | grep java