Update Robot Framework format - step 5 35/102335/8
authorSangwook Ha <sangwook.ha@verizon.com>
Fri, 9 Sep 2022 23:57:57 +0000 (16:57 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Fri, 7 Oct 2022 02:12:05 +0000 (19:12 -0700)
Robotidy has stricter formatting rules for line width, alignment,
section ordering & spacing, etc.

Update the format of Robot Framework files in the following directory
with Robotidy:

- csit/suites/controller

JIRA: INTTEST-132
Change-Id: I91e3d42d4f234dc6e4204f30b8b846ea72850a15
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
49 files changed:
csit/suites/controller/Clustering_Datastore/buycar_failover.robot
csit/suites/controller/Clustering_Datastore/buycar_failover_isolation.robot
csit/suites/controller/Clustering_Datastore/car_failover_crud.robot
csit/suites/controller/Clustering_Datastore/car_failover_crud_isolation.robot
csit/suites/controller/Clustering_Datastore/car_outage_corners.robot
csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot
csit/suites/controller/Clustering_Datastore/carpeople_crud.robot
csit/suites/controller/Clustering_Datastore/cluster_ready.robot
csit/suites/controller/Clustering_Datastore/entity_isolate.robot
csit/suites/controller/Clustering_Longevity/010__longevity.robot
csit/suites/controller/Clustering_Longevity/__init__.robot
csit/suites/controller/NETCONF/010__netconf_inventory.robot
csit/suites/controller/OneNode_Datastore/010_crud_mdsal_perf.robot
csit/suites/controller/OneNode_Datastore/carpeople_library_test.robot
csit/suites/controller/ThreeNodes_Datastore/010_crud_mdsal_perf.robot
csit/suites/controller/ThreeNodes_Datastore/puts_during_isolation.robot
csit/suites/controller/akka_upgrade/1node.robot
csit/suites/controller/benchmark/dsbenchmark.robot
csit/suites/controller/cluster_singleton/chasing_the_leader.robot
csit/suites/controller/cluster_singleton/chasing_the_leader_longevity.robot
csit/suites/controller/cluster_singleton/master_stability.robot
csit/suites/controller/cluster_singleton/partition_and_heal.robot
csit/suites/controller/cluster_singleton/partition_and_heal_longevity.robot
csit/suites/controller/dom_data_broker/clean_leader_shutdown.robot
csit/suites/controller/dom_data_broker/clean_leader_shutdown_prefbasedshard.robot
csit/suites/controller/dom_data_broker/client_isolation.robot
csit/suites/controller/dom_data_broker/client_isolation_prefbasedshard.robot
csit/suites/controller/dom_data_broker/ddb-sanity-module-based.robot
csit/suites/controller/dom_data_broker/ddb-sanity-prefix-based.robot
csit/suites/controller/dom_data_broker/explicit_leader_movement.robot
csit/suites/controller/dom_data_broker/explicit_leader_movement_longevity.robot
csit/suites/controller/dom_data_broker/explicit_leader_movement_prefbasedshard.robot
csit/suites/controller/dom_data_broker/leader_isolation.robot
csit/suites/controller/dom_data_broker/leader_isolation_prefbasedshard.robot
csit/suites/controller/dom_data_broker/listener_stability.robot
csit/suites/controller/dom_data_broker/listener_stability_prefbasedshard.robot
csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_false.robot
csit/suites/controller/dom_data_broker/restart_odl_with_tell_based_true.robot
csit/suites/controller/dom_notification_broker/noloss_rate_1node.robot
csit/suites/controller/dom_notification_broker/noloss_rate_longevity_1node.robot
csit/suites/controller/dom_rpc_broker/action_provider_partition_and_heal.robot
csit/suites/controller/dom_rpc_broker/action_provider_precedence.robot
csit/suites/controller/dom_rpc_broker/rpc_provider_partition_and_heal.robot
csit/suites/controller/dom_rpc_broker/rpc_provider_partition_and_heal_longevity.robot
csit/suites/controller/dom_rpc_broker/rpc_provider_precedence.robot
csit/suites/controller/dom_rpc_broker/rpc_provider_precedence_longevity.robot
csit/suites/controller/singleton_service/global_rpc_freeze.robot
csit/suites/controller/singleton_service/global_rpc_isolate.robot
csit/suites/controller/singleton_service/global_rpc_kill.robot

index da6983664cf5dd47a6de2832eb14b20cee780e10..e1dd81e7390a7d19064b8a57c5cd9be110f95302 100644 (file)
@@ -1,41 +1,55 @@
 *** Settings ***
-Documentation     This test focuses on testing buy-car RPC over 3 Leader reboots.
+Documentation       This test focuses on testing buy-car RPC over 3 Leader reboots.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
 ...
-...               All purchases are against the same node, which is the first one to get rebooted.
+...                 All purchases are against the same node, which is the first one to get rebooted.
 ...
-...               All data is deleted at the end of the suite.
-...               This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup       Setup
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+...                 All data is deleted at the end of the suite.
+...                 This suite expects car, people and car-people modules to have separate Shards.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CARPEOPLE_ITEMS}    ${100}
-${MEMBER_START_TIMEOUT}    300s
-@{SHARD_NAME_LIST}    car    people    car-people
-${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
+${CARPEOPLE_ITEMS}          ${100}
+${MEMBER_START_TIMEOUT}     300s
+@{SHARD_NAME_LIST}          car    people    car-people
+${VAR_DIR}                  ${CURDIR}/../../../variables/carpeople/crud
+
 
 *** Test Cases ***
 Add_Cars_To_Leader_And_Verify
     [Documentation]    Add all needed cars to car Leader, verify on each member.
     ${car_items} =    BuiltIn.Evaluate    ${CARPEOPLE_ITEMS} * 4
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${car_items}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    iterations=${car_items}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}
-        ...    verify=True    iterations=${car_items}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${car_items}
     END
 
 Add_People_To_First_Follower_And_Verify
@@ -43,54 +57,104 @@ Add_People_To_First_Follower_And_Verify
     ${people_items} =    BuiltIn.Evaluate    ${CARPEOPLE_ITEMS} * 4
     CarPeople.Add_Several_People    session=${people_first_follower_session}    iterations=${people_items}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/people    session=${session}
-        ...    verify=True    iterations=${people_items}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${people_items}
     END
 
 Buy_Cars_On_Leader_And_Verify
     [Documentation]    Buy some cars on the leader member.
     ${iter_start} =    BuiltIn.Evaluate    0 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_leader_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_leader_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    1 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Buy_Cars_On_Follower_And_Verify
     [Documentation]    Buy some cars on the first follower member.
     ${iter_start} =    BuiltIn.Evaluate    1 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_first_follower_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_first_follower_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    2 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Reboot_People_Leader
     [Documentation]    Previous people Leader is rebooted. We should never stop the people first follower, this is where people are registered.
     ClusterManagement.Stop_Single_Member    ${people_leader_index}    confirm=True
-    ClusterManagement.Start_Single_Member    ${people_leader_index}    wait_for_sync=True    timeout=${MEMBER_START_TIMEOUT}
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config
+    ClusterManagement.Start_Single_Member
+    ...    ${people_leader_index}
+    ...    wait_for_sync=True
+    ...    timeout=${MEMBER_START_TIMEOUT}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_NAME_LIST}
+    ...    shard_type=config
 
 Buy_Cars_On_Leader_After_Reboot_And_Verify
     [Documentation]    Buy some cars on the leader member.
     ${iter_start} =    BuiltIn.Evaluate    2 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_leader_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_leader_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    3 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Buy_Cars_On_Follower_After_Reboot_And_Verify
     [Documentation]    Buy some cars on the first follower member.
     ${iter_start} =    BuiltIn.Evaluate    3 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_first_follower_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_first_follower_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    4 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Delete_All_CarPeople
@@ -105,6 +169,7 @@ Delete_All_Cars
     [Documentation]    DELETE cars container. No verification beyond http status.
     TemplatedRequests.Delete_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}
 
+
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize shard leaders, compute item distribution.
index 1c873ba8f76a57d53e4ddf734ffb484ece319590..d1ba7f1d5f6b62dd0000276261bbd931f7ea0439 100644 (file)
@@ -1,41 +1,55 @@
 *** Settings ***
-Documentation     This test focuses on testing buy-car RPC over the Leader isolation.
+Documentation       This test focuses on testing buy-car RPC over the Leader isolation.
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
 ...
-...               All purchases are against the same node, which is the first one to get isolated.
+...                 All purchases are against the same node, which is the first one to get isolated.
 ...
-...               All data is deleted at the end of the suite.
-...               This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup       Setup
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+...                 All data is deleted at the end of the suite.
+...                 This suite expects car, people and car-people modules to have separate Shards.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CARPEOPLE_ITEMS}    ${100}
-${MEMBER_START_TIMEOUT}    300s
-@{SHARD_NAME_LIST}    car    people    car-people
-${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
+${CARPEOPLE_ITEMS}          ${100}
+${MEMBER_START_TIMEOUT}     300s
+@{SHARD_NAME_LIST}          car    people    car-people
+${VAR_DIR}                  ${CURDIR}/../../../variables/carpeople/crud
+
 
 *** Test Cases ***
 Add_Cars_To_Leader_And_Verify
     [Documentation]    Add all needed cars to car Leader, verify on each member.
     ${car_items} =    BuiltIn.Evaluate    ${CARPEOPLE_ITEMS} * 4
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${car_items}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    iterations=${car_items}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}
-        ...    verify=True    iterations=${car_items}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${car_items}
     END
 
 Add_People_To_First_Follower_And_Verify
@@ -43,56 +57,110 @@ Add_People_To_First_Follower_And_Verify
     ${people_items} =    BuiltIn.Evaluate    ${CARPEOPLE_ITEMS} * 4
     CarPeople.Add_Several_People    session=${people_first_follower_session}    iterations=${people_items}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/people    session=${session}
-        ...    verify=True    iterations=${people_items}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${people_items}
     END
 
 Buy_Cars_On_Leader_And_Verify
     [Documentation]    Buy some cars on the leader member.
     ${iter_start} =    BuiltIn.Evaluate    0 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_leader_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_leader_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    1 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Buy_Cars_On_Follower_And_Verify
     [Documentation]    Buy some cars on the first follower member.
     ${iter_start} =    BuiltIn.Evaluate    1 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_first_follower_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_first_follower_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    2 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Isolate_and_Rejoin_People_Leader
     [Documentation]    Previous people Leader is isolated. We should never stop the people first follower, this is where people are registered.
     ClusterManagement.Isolate_Member_From_List_Or_All    ${people_leader_index}
-    BuiltIn.Wait_Until_Keyword_Succeeds    10x    2s    ClusterManagement.Verify_Shard_Leader_Elected    people    config    ${True}
-    ...    ${people_leader_index}    ${people_follower_indices}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    10x
+    ...    2s
+    ...    ClusterManagement.Verify_Shard_Leader_Elected
+    ...    people
+    ...    config
+    ...    ${True}
+    ...    ${people_leader_index}
+    ...    ${people_follower_indices}
     ClusterManagement.Rejoin_Member_From_List_Or_All    ${people_leader_index}
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_NAME_LIST}
+    ...    shard_type=config
 
 Buy_Cars_On_Leader_After_Rejoin_And_Verify
     [Documentation]    Buy some cars on the leader member.
     ${iter_start} =    BuiltIn.Evaluate    2 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_leader_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_leader_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    3 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Buy_Cars_On_Follower_After_Rejoin_And_Verify
     [Documentation]    Buy some cars on the first follower member.
     ${iter_start} =    BuiltIn.Evaluate    3 * ${CARPEOPLE_ITEMS} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_first_follower_session}    iterations=${CARPEOPLE_ITEMS}    iter_start=${iter_start}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_first_follower_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
+    ...    iter_start=${iter_start}
     ${total_iterations} =    BuiltIn.Evaluate    4 * ${CARPEOPLE_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}
-        ...    verify=True    iterations=${total_iterations}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${total_iterations}
     END
 
 Delete_All_CarPeople
@@ -107,6 +175,7 @@ Delete_All_Cars
     [Documentation]    DELETE cars container. No verification beyond http status.
     TemplatedRequests.Delete_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}
 
+
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize shard leaders, compute item distribution.
index 08ec6f1550ec87ed14445e967acf658a5525c1d2..49c6d79f09f15c2797d186a47060c2e65b3aadef 100644 (file)
@@ -1,47 +1,63 @@
 *** Settings ***
-Documentation     Suite mixing basic operations with restart of car Leader.
+Documentation       Suite mixing basic operations with restart of car Leader.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
 ...
-...               This test stops the current leader of the "car" shard and then executes CRD
-...               operations on the new leader and a new follower. The stopped member is brought back.
-...               This suite uses 3 different car sets, same size but different starting ID.
+...                 This test stops the current leader of the "car" shard and then executes CRD
+...                 operations on the new leader and a new follower. The stopped member is brought back.
+...                 This suite uses 3 different car sets, same size but different starting ID.
 ...
-...               Other models and shards (people, car-people) are not accessed by this suite.
+...                 Other models and shards (people, car-people) are not accessed by this suite.
 ...
-...               All data is deleted at the end of the suite.
-...               This suite expects car module to have a separate Shard.
-Suite Setup       Setup
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+...                 All data is deleted at the end of the suite.
+...                 This suite expects car module to have a separate Shard.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CAR_ITEMS}      30
-${FOLLOWER_2NODE_START_I}    300
-${LEADER_2NODE_START_I}    200
-${MEMBER_START_TIMEOUT}    300s
-${ORIGINAL_START_I}    100
-@{SHARD_NAME_LIST}    car
-${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
+${CAR_ITEMS}                    30
+${FOLLOWER_2NODE_START_I}       300
+${LEADER_2NODE_START_I}         200
+${MEMBER_START_TIMEOUT}         300s
+${ORIGINAL_START_I}             100
+@{SHARD_NAME_LIST}              car
+${VAR_DIR}                      ${CURDIR}/../../../variables/carpeople/crud
+
 
 *** Test Cases ***
 Add_Original_Cars_On_Old_Leader_And_Verify
     [Documentation]    Add initial cars on car Leader.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${ORIGINAL_START_I}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}
-        ...    verify=True    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${ORIGINAL_START_I}
     END
 
 Stop_Original_Car_Leader
@@ -50,16 +66,30 @@ Stop_Original_Car_Leader
 
 Wait_For_New_Leader
     [Documentation]    Wait until new car Leader is elected.
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    Set_Variables_For_Less_Nodes    member_index_list=${car_follower_indices}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    Set_Variables_For_Less_Nodes
+    ...    member_index_list=${car_follower_indices}
 
 See_Original_Cars_On_New_Leader
     [Documentation]    GET cars from new Leader, should be the initial ones.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${ORIGINAL_START_I}
 
 See_Original_Cars_On_New_Followers
     [Documentation]    The same check on other existing member(s).
     FOR    ${session}    IN    @{new_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${ORIGINAL_START_I}
     END
 
 Delete_Original_Cars_On_New_Leader
@@ -68,16 +98,30 @@ Delete_Original_Cars_On_New_Leader
 
 Add_Leader_Cars_On_New_Leader
     [Documentation]    Add cars on the new Leader.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    iterations=${CAR_ITEMS}    iter_start=${LEADER_2NODE_START_I}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${LEADER_2NODE_START_I}
 
 See_Leader_Cars_On_New_Leader
     [Documentation]    GET cars from new Leader, should be the new ones.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${LEADER_2NODE_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${LEADER_2NODE_START_I}
 
 See_Leader_Cars_On_New_Followers
     [Documentation]    The same check on other existing members.
     FOR    ${session}    IN    @{new_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${LEADER_2NODE_START_I}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${LEADER_2NODE_START_I}
     END
 
 Delete_Leader_Cars_On_New_First_Follower
@@ -86,31 +130,59 @@ Delete_Leader_Cars_On_New_First_Follower
 
 Add_Follower_Cars_On_New_First_Follower
     [Documentation]    Add cars on the new first Follower.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_first_follower_session}    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_first_follower_session}
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${FOLLOWER_2NODE_START_I}
 
 See_Folower_Cars_On_New_Leader
     [Documentation]    Get cars from the new Leader, should be the ones added on follower.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${FOLLOWER_2NODE_START_I}
 
 See_Follower_Cars_On_New_Followers
     [Documentation]    The same check on other existing members.
     FOR    ${session}    IN    @{new_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${FOLLOWER_2NODE_START_I}
     END
 
 Start_Old_Car_Leader
     [Documentation]    Start the stopped member without deleting the persisted data.
-    ClusterManagement.Start_Single_Member    ${car_leader_index}    wait_for_sync=True    timeout=${MEMBER_START_TIMEOUT}
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config
+    ClusterManagement.Start_Single_Member
+    ...    ${car_leader_index}
+    ...    wait_for_sync=True
+    ...    timeout=${MEMBER_START_TIMEOUT}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_NAME_LIST}
+    ...    shard_type=config
 
 See_Folower_Cars_On_Old_Leader
     [Documentation]    GET cars from the restarted member, should be the ones added on follower.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${FOLLOWER_2NODE_START_I}
 
 Delete_Follower_Cars_On_New_Leader
     [Documentation]    Delete cars on the last Leader.
     TemplatedRequests.Delete_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}
 
+
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize car shard leader and followers.
@@ -118,9 +190,12 @@ Setup
     CarPeople.Set_Variables_For_Shard    shard_name=car
 
 Set_Variables_For_Less_Nodes
-    [Arguments]    ${member_index_list}
     [Documentation]    Get current leader and followers for car shard, set additional suite variables.
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=car    shard_type=config    member_index_list=${member_index_list}
+    [Arguments]    ${member_index_list}
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=car
+    ...    shard_type=config
+    ...    member_index_list=${member_index_list}
     ${leader_session} =    ClusterManagement.Resolve_Http_Session_For_Member    member_index=${leader}
     BuiltIn.Set_Suite_Variable    \${new_leader_session}    ${leader_session}
     ${sessions} =    BuiltIn.Create_List
index 297312f316d812af143eee662c215bc3846c3569..f3f9706c105067e4a88a79574232c450ded3244c 100644 (file)
@@ -1,49 +1,65 @@
 *** Settings ***
-Documentation     Suite mixing basic operations with isolation of car Leader.
+Documentation       Suite mixing basic operations with isolation of car Leader.
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
 ...
-...               This test isolates the current leader of the "car" shard and then executes CRD
-...               operations on the new leader and a new follower. The isolated member is brought back.
-...               This suite uses 3 different car sets, same size but different starting ID.
+...                 This test isolates the current leader of the "car" shard and then executes CRD
+...                 operations on the new leader and a new follower. The isolated member is brought back.
+...                 This suite uses 3 different car sets, same size but different starting ID.
 ...
-...               Other models and shards (people, car-people) are not accessed by this suite.
+...                 Other models and shards (people, car-people) are not accessed by this suite.
 ...
-...               All data is deleted at the end of the suite.
-...               This suite expects car module to have a separate Shard.
-Suite Setup       Setup
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+...                 All data is deleted at the end of the suite.
+...                 This suite expects car module to have a separate Shard.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CAR_ITEMS}      30
-${FOLLOWER_2NODE_START_I}    300
-${LEADER_2NODE_START_I}    200
-${MEMBER_START_TIMEOUT}    300s
-${ORIGINAL_START_I}    100
-${SHARD_TYPE}     config
-${SHARD_NAME}     car
-@{SHARD_NAME_LIST}    ${SHARD_NAME}
-${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
+${CAR_ITEMS}                    30
+${FOLLOWER_2NODE_START_I}       300
+${LEADER_2NODE_START_I}         200
+${MEMBER_START_TIMEOUT}         300s
+${ORIGINAL_START_I}             100
+${SHARD_TYPE}                   config
+${SHARD_NAME}                   car
+@{SHARD_NAME_LIST}              ${SHARD_NAME}
+${VAR_DIR}                      ${CURDIR}/../../../variables/carpeople/crud
+
 
 *** Test Cases ***
 Add_Original_Cars_On_Old_Leader_And_Verify
     [Documentation]    Add initial cars on car Leader.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${ORIGINAL_START_I}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}
-        ...    verify=True    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${ORIGINAL_START_I}
     END
 
 Isolate_Original_Car_Leader
@@ -52,18 +68,38 @@ Isolate_Original_Car_Leader
 
 Wait_For_New_Leader
     [Documentation]    Wait until new car Leader is elected.
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Shard_Leader_Elected    ${SHARD_NAME}    ${SHARD_TYPE}    ${True}
-    ...    ${car_leader_index}    member_index_list=${car_follower_indices}
-    CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes    member_index_list=${car_follower_indices}    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Shard_Leader_Elected
+    ...    ${SHARD_NAME}
+    ...    ${SHARD_TYPE}
+    ...    ${True}
+    ...    ${car_leader_index}
+    ...    member_index_list=${car_follower_indices}
+    CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes
+    ...    member_index_list=${car_follower_indices}
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
 
 See_Original_Cars_On_New_Leader
     [Documentation]    GET cars from new Leader, should be the initial ones.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${ORIGINAL_START_I}
 
 See_Original_Cars_On_New_Followers
     [Documentation]    The same check on other existing member(s).
     FOR    ${session}    IN    @{new_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${ORIGINAL_START_I}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${ORIGINAL_START_I}
     END
 
 Delete_Original_Cars_On_New_Leader
@@ -72,16 +108,30 @@ Delete_Original_Cars_On_New_Leader
 
 Add_Leader_Cars_On_New_Leader
     [Documentation]    Add cars on the new Leader.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    iterations=${CAR_ITEMS}    iter_start=${LEADER_2NODE_START_I}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${LEADER_2NODE_START_I}
 
 See_Leader_Cars_On_New_Leader
     [Documentation]    GET cars from new Leader, should be the new ones.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${LEADER_2NODE_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${LEADER_2NODE_START_I}
 
 See_Leader_Cars_On_New_Followers
     [Documentation]    The same check on other existing members.
     FOR    ${session}    IN    @{new_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${LEADER_2NODE_START_I}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${LEADER_2NODE_START_I}
     END
 
 Delete_Leader_Cars_On_New_First_Follower
@@ -90,31 +140,56 @@ Delete_Leader_Cars_On_New_First_Follower
 
 Add_Follower_Cars_On_New_First_Follower
     [Documentation]    Add cars on the new first Follower.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_first_follower_session}    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_first_follower_session}
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${FOLLOWER_2NODE_START_I}
 
 See_Folower_Cars_On_New_Leader
     [Documentation]    Get cars from the new Leader, should be the ones added on follower.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${new_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${FOLLOWER_2NODE_START_I}
 
 See_Follower_Cars_On_New_Followers
     [Documentation]    The same check on other existing members.
     FOR    ${session}    IN    @{new_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${FOLLOWER_2NODE_START_I}
     END
 
 Rejoin_Old_Car_Leader
     [Documentation]    Rejoin the isolated member without deleting the persisted data.
     ClusterManagement.Rejoin_Member_From_List_Or_All    ${car_leader_index}
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_NAME_LIST}
+    ...    shard_type=config
 
 See_Folower_Cars_On_Old_Leader
     [Documentation]    GET cars from the restarted member, should be the ones added on follower.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${FOLLOWER_2NODE_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${FOLLOWER_2NODE_START_I}
 
 Delete_Follower_Cars_On_New_Leader
     [Documentation]    Delete cars on the last Leader.
     TemplatedRequests.Delete_Templated    folder=${VAR_DIR}/cars    session=${new_leader_session}
 
+
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize car shard leader and followers.
index ef184f5f09b5777d947254b45345f783d04de651..b837eedfd83123710c43cc061d532faaf0f52113 100644 (file)
@@ -1,43 +1,48 @@
 *** Settings ***
-Documentation     Cluster suite for testing minimal and sum-minimal member population behavior.
+Documentation       Cluster suite for testing minimal and sum-minimal member population behavior.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
 ...
-...               This test stops majority of the followers and verifies car addition is not possible,
-...               then resumes single follower (first from original list) and checks that addition works.
-...               Then remaining members are brought up.
-...               Leader member is always up and assumed to remain Leading during the whole suite run.
+...                 This test stops majority of the followers and verifies car addition is not possible,
+...                 then resumes single follower (first from original list) and checks that addition works.
+...                 Then remaining members are brought up.
+...                 Leader member is always up and assumed to remain Leading during the whole suite run.
 ...
-...               TODO: Use initial data to check more operations.
-...               TODO: Perhaps merge with car_failover_crud suite.
+...                 TODO: Use initial data to check more operations.
+...                 TODO: Perhaps merge with car_failover_crud suite.
 ...
-...               Other modules and Shards (people, car-people) are not accessed by this suite.
+...                 Other modules and Shards (people, car-people) are not accessed by this suite.
 ...
-...               All data is deleted at the end of the suite.
-...               This suite expects car module to have a separate Shard.
-Suite Setup       Setup
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+...                 All data is deleted at the end of the suite.
+...                 This suite expects car module to have a separate Shard.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CAR_ITEMS}      50
-${MINORITY_START_I}    300
-${MAJORITY_START_I}    200
-${MEMBER_START_TIMEOUT}    300s
-@{SHARD_NAME_LIST}    car
-${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
-${CLUSTER_DIR}    ${CURDIR}/../../../variables/clustering
+${CAR_ITEMS}                50
+${MINORITY_START_I}         300
+${MAJORITY_START_I}         200
+${MEMBER_START_TIMEOUT}     300s
+@{SHARD_NAME_LIST}          car
+${VAR_DIR}                  ${CURDIR}/../../../variables/carpeople/crud
+${CLUSTER_DIR}              ${CURDIR}/../../../variables/clustering
+
 
 *** Test Cases ***
 Stop_Majority_Of_The_Followers
@@ -45,15 +50,24 @@ Stop_Majority_Of_The_Followers
     ...    Mark most of stopped members as explicitly down, to allow the surviving leader make progress.
     ClusterManagement.Stop_Members_From_List_Or_All    member_index_list=${list_of_stopping}    confirm=True
     FOR    ${index}    IN    @{list_of_reviving}
-        ${data}    OperatingSystem.Get File    ${CLUSTER_DIR}/member_down.json
+        ${data}    OperatingSystem.Get File    ${CLUSTER_DIR}/member_down.json
         ${member_ip} =    Collections.Get_From_Dictionary    ${ClusterManagement__index_to_ip_mapping}    ${index}
-        ${data}    String.Replace String    ${data}    {member_ip}    ${member_ip}
-        TemplatedRequests.Post_To_Uri    uri=jolokia    data=${data}    content_type=${HEADERS}    accept=${ACCEPT_EMPTY}    session=${car_leader_session}
+        ${data} =    String.Replace String    ${data}    {member_ip}    ${member_ip}
+        TemplatedRequests.Post_To_Uri
+        ...    uri=jolokia
+        ...    data=${data}
+        ...    content_type=${HEADERS}
+        ...    accept=${ACCEPT_EMPTY}
+        ...    session=${car_leader_session}
     END
 
 Attempt_To_Add_Cars_To_Leader
     [Documentation]    Adding cars should fail, as majority of Followers are down.
-    ${status}    ${message} =    BuiltIn.Run_Keyword_And_Ignore_Error    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${CAR_ITEMS}
+    ${status}    ${message} =    BuiltIn.Run_Keyword_And_Ignore_Error
+    ...    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    iterations=${CAR_ITEMS}
     ...    iter_start=${MINORITY_START_I}
     # TODO: Is there a specific status and mesage to require in this scenario?
     # Previously it was 500, now the restconf call simply times out.
@@ -62,32 +76,64 @@ Attempt_To_Add_Cars_To_Leader
 
 Start_Tipping_Follower
     [Documentation]    Start one Follower member without persisted data.
-    ClusterManagement.Start_Members_From_List_Or_All    member_index_list=${list_of_tipping}    wait_for_sync=True    timeout=${MEMBER_START_TIMEOUT}
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config    member_index_list=${list_of_majority}
+    ClusterManagement.Start_Members_From_List_Or_All
+    ...    member_index_list=${list_of_tipping}
+    ...    wait_for_sync=True
+    ...    timeout=${MEMBER_START_TIMEOUT}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_NAME_LIST}
+    ...    shard_type=config
+    ...    member_index_list=${list_of_majority}
 
 Add_Cars_On_Tipping_Follower
     [Documentation]    Add cars on the tipping Follower.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_first_follower_session}    iterations=${CAR_ITEMS}    iter_start=${MAJORITY_START_I}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_first_follower_session}
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${MAJORITY_START_I}
 
 See_Cars_On_Existing_Members
     [Documentation]    On each up member: GET cars, should match the ones added on tipping Follower.
     FOR    ${session}    IN    @{list_of_majority}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${MAJORITY_START_I}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
+        ...    iter_start=${MAJORITY_START_I}
     END
 
 Start_Other_Followers
     [Documentation]    Start other followers without persisted data.
-    ClusterManagement.Start_Members_From_List_Or_All    member_index_list=${list_of_reviving}    wait_for_sync=True    timeout=${MEMBER_START_TIMEOUT}
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_NAME_LIST}    shard_type=config
+    ClusterManagement.Start_Members_From_List_Or_All
+    ...    member_index_list=${list_of_reviving}
+    ...    wait_for_sync=True
+    ...    timeout=${MEMBER_START_TIMEOUT}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_NAME_LIST}
+    ...    shard_type=config
 
 See_Cars_On_New_Follower_Leader
     [Documentation]    GET cars from a new follower to see that the current state was replicated.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_last_follower_session}    verify=True    iterations=${CAR_ITEMS}    iter_start=${MAJORITY_START_I}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_last_follower_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
+    ...    iter_start=${MAJORITY_START_I}
 
 Delete_Cars_On_Leader
     [Documentation]    Delete cars on Leader.
     TemplatedRequests.Delete_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}
 
+
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize shard leaders, pre-compute member lists.
@@ -108,7 +154,10 @@ Set_Additional_Variables
     BuiltIn.Set_Suite_Variable    \${list_of_majority}    ${majority_list}
     ${tipping_list} =    Collections.Get_Slice_From_List    ${majority_follower_list}    0    1
     BuiltIn.Set_Suite_Variable    \${list_of_tipping}    ${tipping_list}
-    ${revive_list} =    Collections.Get_Slice_From_List    ${car_follower_indices}    ${half_followers}    ${number_followers}
+    ${revive_list} =    Collections.Get_Slice_From_List
+    ...    ${car_follower_indices}
+    ...    ${half_followers}
+    ...    ${number_followers}
     BuiltIn.Set_Suite_Variable    \${list_of_reviving}    ${revive_list}
     ${stop_list} =    Collections.Combine_Lists    ${tipping_list}    ${revive_list}
     BuiltIn.Set_Suite_Variable    \${list_of_stopping}    ${stop_list}
index 9a80b5b03709d40e61a2372e143d21c121b80029..39575870d03fd3e4d03749f0c5875129aa27d39b 100644 (file)
@@ -1,39 +1,53 @@
 *** Settings ***
-Documentation     This test restarts all controllers to verify recovery of car data from persistence.
+Documentation       This test restarts all controllers to verify recovery of car data from persistence.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
 ...
-...               Other models and shards (people, car-people) are not accessed by this suite.
+...                 Other models and shards (people, car-people) are not accessed by this suite.
 ...
-...               All data is deleted at the end of the suite.
-...               This suite expects car module to have a separate Shard.
-Suite Setup       Setup
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+...                 All data is deleted at the end of the suite.
+...                 This suite expects car module to have a separate Shard.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CAR_ITEMS}      50
-${MEMBER_START_TIMEOUT}    300s
-${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
+${CAR_ITEMS}                50
+${MEMBER_START_TIMEOUT}     300s
+${VAR_DIR}                  ${CURDIR}/../../../variables/carpeople/crud
+
 
 *** Test Cases ***
 Add_Cars_On_Leader_And_Verify
     [Documentation]    Single big PUT to datastore to add cars to car Leader.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${CAR_ITEMS}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    iterations=${CAR_ITEMS}
     FOR    ${session}    IN    @{ClusterManagement__session_list}
-        BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}
-        ...    verify=True    iterations=${CAR_ITEMS}
+        BuiltIn.Wait_Until_Keyword_Succeeds
+        ...    10s
+        ...    2s
+        ...    TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
     END
 
 Stop_All_Members
@@ -50,18 +64,27 @@ Memorize_Leader_And_Followers
 
 See_Cars_On_Leader
     [Documentation]    GET cars from Leader, should match the PUT data.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    verify=True    iterations=${CAR_ITEMS}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    verify=True
+    ...    iterations=${CAR_ITEMS}
 
 See_Cars_On_Followers
     [Documentation]    The same check on other members.
     FOR    ${session}    IN    @{car_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CAR_ITEMS}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CAR_ITEMS}
     END
 
 Delete_Cars_On_Leader
     [Documentation]    Delete cars on the new Leader.
     TemplatedRequests.Delete_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}
 
+
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize car shard leader and followers.
index d29d9564dad1001090423b88a86091baefad2ad2..2ee9cc7795f9b59c8ec1a72627d93dbd1cad8bdc 100644 (file)
@@ -1,49 +1,65 @@
 *** Settings ***
-Documentation     Suite for performing basic car/people CRUD operations on leaders and followers.
+Documentation       Suite for performing basic car/people CRUD operations on leaders and followers.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
 ...
-...               More precisely, Update operation is not executed, but some operations
-...               are using specific RPCs which goes beyond "basic CRUD".
+...                 More precisely, Update operation is not executed, but some operations
+...                 are using specific RPCs which goes beyond "basic CRUD".
 ...
-...               Cars are added by one big PUT to datastore on car Leader.
-...               People are added in a loop with add-person RPC on a people Follower.
-...               Cars are bought by chunks on each member, by loop with buy-car RPC.
+...                 Cars are added by one big PUT to datastore on car Leader.
+...                 People are added in a loop with add-person RPC on a people Follower.
+...                 Cars are bought by chunks on each member, by loop with buy-car RPC.
 ...
-...               All data is deleted at the end of the suite.
-...               This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup       Setup
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+...                 All data is deleted at the end of the suite.
+...                 This suite expects car, people and car-people modules to have separate Shards.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CARPEOPLE_ITEMS}    ${30}
-${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
+${CARPEOPLE_ITEMS}      ${30}
+${VAR_DIR}              ${CURDIR}/../../../variables/carpeople/crud
+
 
 *** Test Cases ***
 Add_Cars_To_Leader
     [Documentation]    Add ${CARPEOPLE_ITEMS} cars to car Leader by one big PUT.
-    TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${CARPEOPLE_ITEMS}
+    TemplatedRequests.Put_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    iterations=${CARPEOPLE_ITEMS}
 
 See_Added_Cars_On_Leader
     [Documentation]    GET response from Leader should match the PUT data.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    verify=True    iterations=${CARPEOPLE_ITEMS}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/cars
+    ...    session=${car_leader_session}
+    ...    verify=True
+    ...    iterations=${CARPEOPLE_ITEMS}
 
 See_Added_Cars_On_Followers
     [Documentation]    The same check on other members.
     FOR    ${session}    IN    @{car_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}    verify=True    iterations=${CARPEOPLE_ITEMS}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/cars
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CARPEOPLE_ITEMS}
     END
 
 Add_People_To_First_Follower
@@ -52,19 +68,30 @@ Add_People_To_First_Follower
 
 See_Added_People_On_Leader
     [Documentation]    GET response from Leader should match the added people.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/people    session=${people_leader_session}    verify=True    iterations=${CARPEOPLE_ITEMS}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/people
+    ...    session=${people_leader_session}
+    ...    verify=True
+    ...    iterations=${CARPEOPLE_ITEMS}
 
 See_Added_People_On_Followers
     [Documentation]    The same check on other members.
     FOR    ${session}    IN    @{people_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/people    session=${session}    verify=True    iterations=${CARPEOPLE_ITEMS}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CARPEOPLE_ITEMS}
     END
 
 Buy_Cars_On_Leader
     [Documentation]    Buy some cars on car-people Leader, loop of buy-car, ending segment of IDs.
     # Cars are numbered, leader gets chunk at the end, as that is few keypresses shorter.
     ${start_id} =    BuiltIn.Evaluate    (${NUM_ODL_SYSTEM} - 1) * ${items_per_follower} + 1
-    CarPeople.Buy_Several_Cars    session=${car-people_leader_session}    iterations=${items_per_leader}    iter_start=${start_id}
+    CarPeople.Buy_Several_Cars
+    ...    session=${car-people_leader_session}
+    ...    iterations=${items_per_leader}
+    ...    iter_start=${start_id}
 
 Buy_Cars_On_Followers
     [Documentation]    On each Follower buy corresponding ID segment of cars in buy-car loop.
@@ -76,12 +103,20 @@ Buy_Cars_On_Followers
 
 See_Added_CarPeople_On_Leader
     [Documentation]    GET car-person mappings from Leader to see all entries.
-    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${car-people_leader_session}    verify=True    iterations=${CARPEOPLE_ITEMS}
+    TemplatedRequests.Get_As_Json_Templated
+    ...    folder=${VAR_DIR}/car-people
+    ...    session=${car-people_leader_session}
+    ...    verify=True
+    ...    iterations=${CARPEOPLE_ITEMS}
 
 See_Added_CarPeople_On_Followers
     [Documentation]    The same check on other members.
     FOR    ${session}    IN    @{car-people_follower_sessions}
-        TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/car-people    session=${session}    verify=True    iterations=${CARPEOPLE_ITEMS}
+        TemplatedRequests.Get_As_Json_Templated
+        ...    folder=${VAR_DIR}/car-people
+        ...    session=${session}
+        ...    verify=True
+        ...    iterations=${CARPEOPLE_ITEMS}
     END
 
 Delete_All_CarPeople_On_Leader
@@ -96,6 +131,7 @@ Delete_All_Cars_On_Leader
     [Documentation]    DELETE cars container. No verification beyond http status.
     TemplatedRequests.Delete_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}
 
+
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize shard leaders, compute item distribution.
index 8ba25f69d9fe72c00a705c4eda1be6596f2a8eab..94accf9bf75a57dadbbe68bf5a75dea7cded7b96 100644 (file)
@@ -1,31 +1,37 @@
 *** Settings ***
-Documentation     This test waits until cluster appears to be ready.
+Documentation       This test waits until cluster appears to be ready.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
 ...
-...               Intended use is at a start of testplan, so that suites can assume cluster works.
+...                 Intended use is at a start of testplan, so that suites can assume cluster works.
 ...
-...               This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 This suite expects car, people and car-people modules to have separate Shards.
+
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-${CLUSTER_BOOTUP_SYNC_TIMEOUT}    180s
-@{SHARD_NAME_LIST}    car    people    car-people
+${CLUSTER_BOOTUP_SYNC_TIMEOUT}      180s
+@{SHARD_NAME_LIST}                  car    people    car-people
+
 
 *** Test Cases ***
 Wait_For_Sync_And_Shards
     [Documentation]    Repeatedly check for cluster sync status and Shard Leaders, fail when timeout is exceeded.
     BuiltIn.Wait_Until_Keyword_Succeeds    ${CLUSTER_BOOTUP_SYNC_TIMEOUT}    10s    Check_Sync_And_Shards
 
+
 *** Keywords ***
 Check_Sync_And_Shards
     ClusterManagement.Check_Cluster_Is_In_Sync
index c76c025a9c460a68fddfd3c36192eb55b306b2f7..b282e9cedc76ea94a17ecb3a1868405f3c245d71 100644 (file)
@@ -1,26 +1,41 @@
 *** Settings ***
-Documentation     Suite for performing member isolation and rejoin, we do with entity-ownership leader.
-Suite Setup       Setup
-Suite Teardown    Teardown
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      clustering    carpeople    critical
-Library           Collections
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables         ${CURDIR}/../../../variables/Variables.py
+Documentation       Suite for performing member isolation and rejoin, we do with entity-ownership leader.
+
+Library             Collections
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables           ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup         Setup
+Suite Teardown      Teardown
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        clustering    carpeople    critical
+
 
 *** Variables ***
-@{SHARD_OPER_LIST}    car    people    car-people    inventory    topology    default    toaster
-...               entity-ownership
-@{SHARD_CONF_LIST}    car    people    car-people    inventory    topology    default    toaster
+@{SHARD_OPER_LIST}      car    people    car-people    inventory    topology    default    toaster
+...                     entity-ownership
+@{SHARD_CONF_LIST}      car    people    car-people    inventory    topology    default    toaster
+
 
 *** Test Cases ***
 Check All Shards Before Isolate
     [Documentation]    Check all shards in controller.
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_OPER_LIST}    shard_type=operational
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_CONF_LIST}    shard_type=config
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_OPER_LIST}
+    ...    shard_type=operational
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_CONF_LIST}
+    ...    shard_type=config
 
 Isolate Entity Leader
     [Documentation]    Isolate the entity-ownership Leader to cause a new leader to get elected.
@@ -28,8 +43,20 @@ Isolate Entity Leader
 
 Check All Shards After Isolate
     [Documentation]    Check all shards in controller.
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_OPER_LIST}    shard_type=operational    member_index_list=${entity-ownership_follower_indices}
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_CONF_LIST}    shard_type=config    member_index_list=${entity-ownership_follower_indices}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_OPER_LIST}
+    ...    shard_type=operational
+    ...    member_index_list=${entity-ownership_follower_indices}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_CONF_LIST}
+    ...    shard_type=config
+    ...    member_index_list=${entity-ownership_follower_indices}
 
 Rejoin Entity Leader
     [Documentation]    Rejoin the entity-ownership Leader.
@@ -37,8 +64,19 @@ Rejoin Entity Leader
 
 Check All Shards After Rejoin
     [Documentation]    Check all shards in controller.
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_OPER_LIST}    shard_type=operational
-    BuiltIn.Wait_Until_Keyword_Succeeds    30s    2s    ClusterManagement.Verify_Leader_Exists_For_Each_Shard    shard_name_list=${SHARD_CONF_LIST}    shard_type=config
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_OPER_LIST}
+    ...    shard_type=operational
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    30s
+    ...    2s
+    ...    ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+    ...    shard_name_list=${SHARD_CONF_LIST}
+    ...    shard_type=config
+
 
 *** Keywords ***
 Setup
index 59aac1c510fcee9b57fa9cfc9718aa8503fd2103..4632a7a6f5dc79bd68da80140f6d694e453d2468 100644 (file)
@@ -1,8 +1,8 @@
 *** Settings ***
-Documentation     Test suite for Longevity test of cluster datastore
-Library           ../../../../libraries/CrudLibrary.py
+Documentation       Test suite for Longevity test of cluster datastore
+
+Library             ../../../../libraries/CrudLibrary.py
 
-*** Variables ***
 
 *** Test Cases ***
 Run Tests in Loop for Specified Time
index ddcdf6cf0cef8237ce7e2b964b7ead7fef616af1..c7eee4534b1baa6abef04b140b4bffb98b89f959 100644 (file)
@@ -1,11 +1,13 @@
 *** Settings ***
-Documentation     Test suite for Longevity test of cluster datastore
-Suite Setup       Start Suite
-Suite Teardown    Stop Suite
-Library           SSHLibrary
+Documentation       Test suite for Longevity test of cluster datastore
+
+Library             SSHLibrary
+
+Suite Setup         Start Suite
+Suite Teardown      Stop Suite
+
 
 *** Keywords ***
 Start Suite
 
 Stop Suite
-
index b5db3b69212e2093b9855357cbc0c2f48994a3fe..47ffaf0d3c1e8b602b9ed7d69022943b9178cb98 100644 (file)
@@ -1,22 +1,26 @@
 *** Settings ***
-Documentation     Test suite for NETCONF client
-Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
-Suite Teardown    Delete All Sessions
-Library           Collections
-Library           OperatingSystem
-Library           String
-Library           RequestsLibrary
-Library           ../../../libraries/Common.py
-Variables         ../../../variables/Variables.py
+Documentation       Test suite for NETCONF client
+
+Library             Collections
+Library             OperatingSystem
+Library             String
+Library             RequestsLibrary
+Library             ../../../libraries/Common.py
+Variables           ../../../variables/Variables.py
+
+Suite Setup         Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
+Suite Teardown      Delete All Sessions
+
 
 *** Variables ***
-${NETOPEER}       ${TOOLS_SYSTEM_IP}
-${NETOPEER_USER}    ${TOOLS_SYSTEM_USER}
-${FILE}           ${CURDIR}/../../../variables/xmls/netconf.xml
-${REST_CONT_CONF}    /restconf/config/network-topology:network-topology/topology/topology-netconf
-${REST_CONT_OPER}    /restconf/operational/network-topology:network-topology/topology/topology-netconf
-${REST_NTPR_CONF}    node/controller-config/yang-ext:mount/config:modules
-${REST_NTPR_MOUNT}    node/netopeer/yang-ext:mount/
+${NETOPEER}             ${TOOLS_SYSTEM_IP}
+${NETOPEER_USER}        ${TOOLS_SYSTEM_USER}
+${FILE}                 ${CURDIR}/../../../variables/xmls/netconf.xml
+${REST_CONT_CONF}       /restconf/config/network-topology:network-topology/topology/topology-netconf
+${REST_CONT_OPER}       /restconf/operational/network-topology:network-topology/topology/topology-netconf
+${REST_NTPR_CONF}       node/controller-config/yang-ext:mount/config:modules
+${REST_NTPR_MOUNT}      node/netopeer/yang-ext:mount/
+
 
 *** Test Cases ***
 Add NetConf device
@@ -53,6 +57,7 @@ Verify Device Operational data
     Should Contain    ${resp.content}    statistics
     Should Contain    ${resp.content}    datastores
 
+
 *** Keywords ***
 Get Inventory
     ${resp}    Get Request    session    ${REST_CONT_OPER}/node/netopeer
index b54fd5a3b6694f1d74ae2bf9c4b697e2651d4f83..735cfa9e9b448c3d3b320272a3e267ba4e09fa74 100644 (file)
@@ -1,44 +1,51 @@
 *** Settings ***
-Documentation     Test for measuring execution time of MD-SAL DataStore operations.
+Documentation       Test for measuring execution time of MD-SAL DataStore operations.
 ...
-...               Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2015-2017 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
+...                 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
 ...
-...               This test suite requires odl-restconf and odl-clustering-test-app modules.
-...               The script cluster_rest_script.py is used for generating requests for
-...               operations on people, car and car-people DataStore test models.
-...               (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
+...                 This test suite requires odl-restconf and odl-clustering-test-app modules.
+...                 The script cluster_rest_script.py is used for generating requests for
+...                 operations on people, car and car-people DataStore test models.
+...                 (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
 ...
-...               TODO: Decide whether keyword names should contain spaces or underscores.
-Suite Setup       Start Suite
-Suite Teardown    Stop Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           XML
-Resource          ../../../libraries/RemoteBash.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/SSHKeywords.robot
-Resource          ../../../libraries/TemplatedRequests.robot
-Resource          ../../../libraries/Utils.robot
-Variables         ../../../variables/Variables.py
+...                 TODO: Decide whether keyword names should contain spaces or underscores.
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             XML
+Resource            ../../../libraries/RemoteBash.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/SSHKeywords.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+Resource            ../../../libraries/Utils.robot
+Variables           ../../../variables/Variables.py
+
+Suite Setup         Start Suite
+Suite Teardown      Stop Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
 
 *** Variables ***
-${ITEM_COUNT}     ${10000}
-${ITEM_BATCH}     ${10000}
-${PROCEDURE_TIMEOUT}    11m
-${addcarcmd}      python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
-${addpeoplecmd}    python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 5
-${purchasecmd}    python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 5
-${carurl}         /restconf/config/car:cars
-${peopleurl}      /restconf/config/people:people
-${carpeopleurl}    /restconf/config/car-people:car-people
-${CONTROLLER_LOG_LEVEL}    INFO
-${TOOL_OPTIONS}    ${EMPTY}
+${ITEM_COUNT}               ${10000}
+${ITEM_BATCH}               ${10000}
+${PROCEDURE_TIMEOUT}        11m
+${addcarcmd}
+...                         python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
+${addpeoplecmd}
+...                         python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 5
+${purchasecmd}
+...                         python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 5
+${carurl}                   /restconf/config/car:cars
+${peopleurl}                /restconf/config/people:people
+${carpeopleurl}             /restconf/config/car-people:car-people
+${CONTROLLER_LOG_LEVEL}     INFO
+${TOOL_OPTIONS}             ${EMPTY}
+
 
 *** Test Cases ***
 Add Cars
@@ -101,12 +108,16 @@ Delete CarPeople
     ${rsp}=    RequestsLibrary.Get Request    session    ${carpeopleurl}
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
+
 *** Keywords ***
 Start Suite
     [Documentation]    Suite setup keyword.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_LOG_LEVEL}
-    ${mininet_conn_id}=    SSHLibrary.Open Connection    ${TOOLS_SYSTEM_IP}    prompt=${TOOLS_SYSTEM_PROMPT}    timeout=6s
+    ${mininet_conn_id}=    SSHLibrary.Open Connection
+    ...    ${TOOLS_SYSTEM_IP}
+    ...    prompt=${TOOLS_SYSTEM_PROMPT}
+    ...    timeout=6s
     Builtin.Set Suite Variable    ${mininet_conn_id}
     SSHKeywords.Flexible Mininet Login    ${TOOLS_SYSTEM_USER}
     SSHLibrary.Put File    ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/cluster_rest_script.py    .
@@ -120,20 +131,24 @@ Stop Suite
     RequestsLibrary.Delete All Sessions
 
 Start_Tool
-    [Arguments]    ${command}    ${tool_opt}
     [Documentation]    Start the tool ${command} ${tool_opt}
+    [Arguments]    ${command}    ${tool_opt}
     BuiltIn.Log    ${command}
     ${output}=    SSHLibrary.Write    ${command} ${tool_opt}
     BuiltIn.Log    ${output}
 
 Wait_Until_Tool_Finish
-    [Arguments]    ${timeout}
     [Documentation]    Wait ${timeout} for the tool exit, return the printed output.
-    BuiltIn.Run Keyword And Return    BuiltIn.Wait Until Keyword Succeeds    ${timeout}    1s    SSHLibrary.Read Until Prompt
+    [Arguments]    ${timeout}
+    BuiltIn.Run Keyword And Return
+    ...    BuiltIn.Wait Until Keyword Succeeds
+    ...    ${timeout}
+    ...    1s
+    ...    SSHLibrary.Read Until Prompt
 
 Purchase Is Completed
-    [Arguments]    ${item_count}
     [Documentation]    Check purchase of ${item_count} is completed.
+    [Arguments]    ${item_count}
     ${rsp}=    RequestsLibrary.Get Request    session    ${carpeopleurl}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=car-person
     Should Be Equal As Numbers    ${count}    ${item_count}
@@ -145,8 +160,8 @@ Stop_Tool
     BuiltIn.Log    ${output}
 
 Store_File_To_Workspace
-    [Arguments]    ${source_file_name}    ${target_file_name}
     [Documentation]    Store the ${source_file_name} to the workspace as ${target_file_name}.
+    [Arguments]    ${source_file_name}    ${target_file_name}
     ${output_log}=    SSHLibrary.Execute_Command    cat ${source_file_name}
     BuiltIn.Log    ${output_log}
     Create File    ${target_file_name}    ${output_log}
index d48f628ad2d821effa60d187ab2a894d2a289c37..b2ad8dbe0f0ae6c5fed20aa0eba2a5d8e49c033d 100644 (file)
@@ -1,25 +1,29 @@
 *** Settings ***
-Documentation     Basic library verification suite, handling cars/people in 1-node setup.
+Documentation       Basic library verification suite, handling cars/people in 1-node setup.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
-...               This is a lightweight and stripped-down functional analogue of performance suite.
-...               Intention is to use this as a verify suite for changes in TemplatedRequests resource.
-Suite Setup       Start_Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Variables         ${CURDIR}/../../../variables/Variables.py
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
+...                 This is a lightweight and stripped-down functional analogue of performance suite.
+...                 Intention is to use this as a verify suite for changes in TemplatedRequests resource.
+
+Variables           ${CURDIR}/../../../variables/Variables.py
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+
+Suite Setup         Start_Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
 
 *** Variables ***
-${VAR_BASE}       ${CURDIR}/../../../variables/carpeople/libtest
-${BULK_SIZE}      2
-${TIMEOUT_BUG_4220}    60s
+${VAR_BASE}             ${CURDIR}/../../../variables/carpeople/libtest
+${BULK_SIZE}            2
+${TIMEOUT_BUG_4220}     60s
+
 
 *** Test Cases ***
 Wait_For_Rpcs
@@ -83,6 +87,7 @@ Delete_People
     TemplatedRequests.Delete_Templated    folder=${VAR_BASE}/people
     # TODO: Add specific error check on Get attempt.
 
+
 *** Keywords ***
 Start_Suite
     [Documentation]    Suite setup keyword
@@ -92,6 +97,9 @@ Start_Suite
 Check_Rpc_Readiness
     [Documentation]    Issue invalid RPC requests and assert appropriate http status code
     # So far only buy-car is checked, but other RPCs such as add-car may be added later.
-    ${status}    ${message} =    BuiltIn.Run_Keyword_And_Ignore_Error    TemplatedRequests.Post_As_Json_To_Uri    uri=restconf/operations/car-purchase:buy-car    data={"input":{}}
+    ${status}    ${message} =    BuiltIn.Run_Keyword_And_Ignore_Error
+    ...    TemplatedRequests.Post_As_Json_To_Uri
+    ...    uri=restconf/operations/car-purchase:buy-car
+    ...    data={"input":{}}
     # TODO: Create template directory for this?
     BuiltIn.Should_Not_Contain    ${message}    '50
index 321363077b2108f84c26560d3130b9337b8a7836..7fb96081317f34c8cef2b36d22715c03602f1785 100644 (file)
@@ -1,47 +1,54 @@
 *** Settings ***
-Documentation     Test for measuring execution time of MD-SAL DataStore operations in cluster.
+Documentation       Test for measuring execution time of MD-SAL DataStore operations in cluster.
 ...
-...               Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2015 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
+...                 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
 ...
-...               This test suite requires odl-restconf and odl-clustering-test-app modules.
-...               The script cluster_rest_script.py is used for generating requests for
-...               operations on people, car and car-people DataStore test models.
-...               (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
+...                 This test suite requires odl-restconf and odl-clustering-test-app modules.
+...                 The script cluster_rest_script.py is used for generating requests for
+...                 operations on people, car and car-people DataStore test models.
+...                 (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
 ...
-...               Reported bugs:
-...               https://bugs.opendaylight.org/show_bug.cgi?id=4220
-Suite Setup       Start Suite
-Suite Teardown    Stop Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Library           RequestsLibrary
-Library           SSHLibrary
-Library           XML
-Resource          ../../../libraries/CarPeople.robot
-Resource          ../../../libraries/ClusterManagement.robot
-Resource          ../../../libraries/RemoteBash.robot
-Resource          ../../../libraries/SetupUtils.robot
-Resource          ../../../libraries/SSHKeywords.robot
-Resource          ../../../libraries/TemplatedRequests.robot
-Resource          ../../../libraries/Utils.robot
-Variables         ../../../variables/Variables.py
+...                 Reported bugs:
+...                 https://bugs.opendaylight.org/show_bug.cgi?id=4220
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Library             XML
+Resource            ../../../libraries/CarPeople.robot
+Resource            ../../../libraries/ClusterManagement.robot
+Resource            ../../../libraries/RemoteBash.robot
+Resource            ../../../libraries/SetupUtils.robot
+Resource            ../../../libraries/SSHKeywords.robot
+Resource            ../../../libraries/TemplatedRequests.robot
+Resource            ../../../libraries/Utils.robot
+Variables           ../../../variables/Variables.py
+
+Suite Setup         Start Suite
+Suite Teardown      Stop Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
 
 *** Variables ***
-${ITEM_COUNT}     ${10000}
-${ITEM_BATCH}     ${10000}
-${PROCEDURE_TIMEOUT}    5m
-${threads}        6    # threads are assigned to cluster nodes in round robin way
-${addcarcmd}      python cluster_rest_script.py --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
-${addpeoplecmd}    python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 6
-${purchasecmd}    python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 6
-${carurl}         /restconf/config/car:cars
-${peopleurl}      /restconf/config/people:people
-${carpeopleurl}    /restconf/config/car-people:car-people
-${CONTROLLER_LOG_LEVEL}    INFO
-${TOOL_OPTIONS}    ${EMPTY}
+${ITEM_COUNT}               ${10000}
+${ITEM_BATCH}               ${10000}
+${PROCEDURE_TIMEOUT}        5m
+${threads}                  6    # threads are assigned to cluster nodes in round robin way
+${addcarcmd}
+...                         python cluster_rest_script.py --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
+${addpeoplecmd}
+...                         python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 6
+${purchasecmd}
+...                         python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 6
+${carurl}                   /restconf/config/car:cars
+${peopleurl}                /restconf/config/people:people
+${carpeopleurl}             /restconf/config/car-people:car-people
+${CONTROLLER_LOG_LEVEL}     INFO
+${TOOL_OPTIONS}             ${EMPTY}
+
 
 *** Test Cases ***
 Add Cars
@@ -104,6 +111,7 @@ Delete CarPeople
     ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${carpeopleurl}
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
+
 *** Keywords ***
 Start Suite
     [Documentation]    Suite setup keyword
@@ -111,7 +119,10 @@ Start Suite
     ClusterManagement.ClusterManagement_Setup
     CarPeople.Set_Variables_For_Shard    shard_name=car
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_LOG_LEVEL}
-    ${mininet_conn_id}=    SSHLibrary.Open Connection    ${TOOLS_SYSTEM_IP}    prompt=${DEFAULT_LINUX_PROMPT}    timeout=6s
+    ${mininet_conn_id}=    SSHLibrary.Open Connection
+    ...    ${TOOLS_SYSTEM_IP}
+    ...    prompt=${DEFAULT_LINUX_PROMPT}
+    ...    timeout=6s
     Builtin.Set Suite Variable    ${mininet_conn_id}
     SSHKeywords.Flexible Mininet Login    ${TOOLS_SYSTEM_USER}
     SSHLibrary.Put File    ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/cluster_rest_script.py    .
@@ -124,20 +135,20 @@ Stop Suite
     RequestsLibrary.Delete All Sessions
 
 Start_Tool
-    [Arguments]    ${command}    ${tool_opt}
     [Documentation]    Start the tool ${command} ${tool_opt}
+    [Arguments]    ${command}    ${tool_opt}
     BuiltIn.Log    ${command}
     ${output}=    SSHLibrary.Write    ${command} ${tool_opt}
     BuiltIn.Log    ${output}
 
 Wait_Until_Tool_Finish
-    [Arguments]    ${timeout}
     [Documentation]    Wait ${timeout} for the tool exit.
+    [Arguments]    ${timeout}
     BuiltIn.Wait Until Keyword Succeeds    ${timeout}    1s    SSHLibrary.Read Until Prompt
 
 Purchase Is Completed
-    [Arguments]    ${item_count}
     [Documentation]    Check purchase of ${item_count} is completed.
+    [Arguments]    ${item_count}
     ${rsp}=    RequestsLibrary.Get Request    ${car_leader_session}    ${carpeopleurl}    headers=${ACCEPT_XML}
     ${count}=    XML.Get Element Count    ${rsp.content}    xpath=car-person
     Should Be Equal As Numbers    ${count}    ${item_count}
@@ -149,8 +160,8 @@ Stop_Tool
     BuiltIn.Log    ${output}
 
 Store_File_To_Workspace
-    [Arguments]    ${source_file_name}    ${target_file_name}
     [Documentation]    Store the ${source_file_name} to the workspace as ${target_file_name}.
+    [Arguments]    ${source_file_name}    ${target_file_name}
     ${output_log}=    SSHLibrary.Execute_Command    cat ${source_file_name}
     BuiltIn.Log    ${output_log}
     Create File    ${target_file_name}    ${output_log}
index ddb30a554df28780464e5fc05bfacf9482787f1c..7b02de6007a22f6ae893610e268051a69fbfd276 100644 (file)
@@ -1,40 +1,46 @@
 *** Settings ***
-Documentation     Test when a car shard leader is isolated while configuring cars.
+Documentation       Test when a car shard leader is isolated while configuring cars.
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               This test suite requires odl-restconf and odl-clustering-test-app modules.
-...               The script cluster_rest_script.py is used for generating requests for
-...               PUTing car items while the car shard leader is isolated.
-Suite Setup       Start_Suite
-Suite Teardown    Stop_Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags      critical
-Library           RequestsLibrary
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/CarPeople.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/RemoteBash.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/../../../libraries/Utils.robot
-Resource          ${CURDIR}/../../../variables/Variables.robot
+...                 This test suite requires odl-restconf and odl-clustering-test-app modules.
+...                 The script cluster_rest_script.py is used for generating requests for
+...                 PUTing car items while the car shard leader is isolated.
+
+Library             RequestsLibrary
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/CarPeople.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/RemoteBash.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource            ${CURDIR}/../../../libraries/Utils.robot
+Resource            ${CURDIR}/../../../variables/Variables.robot
+
+Suite Setup         Start_Suite
+Suite Teardown      Stop_Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags        critical
+
 
 *** Variables ***
-${ITEM_COUNT}     ${10000}
-${THREADS}        10
-${ADDCMD}         python ${TOOL_NAME} --port ${RESTCONFPORT} add-with-retries --itemtype car --itemcount ${ITEM_COUNT} --threads ${THREADS}
-${CARURL}         /restconf/config/car:cars
-${SHARD_NAME}     car
-${SHARD_TYPE}     config
-${TEST_LOG_LEVEL}    info
-@{TEST_LOG_COMPONENTS}    org.opendaylight.controller
-${TOOL_OPTIONS}    ${EMPTY}
-${TOOL_NAME}      cluster_rest_script.py
+${ITEM_COUNT}               ${10000}
+${THREADS}                  10
+${ADDCMD}
+...                         python ${TOOL_NAME} --port ${RESTCONFPORT} add-with-retries --itemtype car --itemcount ${ITEM_COUNT} --threads ${THREADS}
+${CARURL}                   /restconf/config/car:cars
+${SHARD_NAME}               car
+${SHARD_TYPE}               config
+${TEST_LOG_LEVEL}           info
+@{TEST_LOG_COMPONENTS}      org.opendaylight.controller
+${TOOL_OPTIONS}             ${EMPTY}
+${TOOL_NAME}                cluster_rest_script.py
+
 
 *** Test Cases ***
 Start_Adding_Cars_To_Follower
@@ -53,9 +59,19 @@ Isolate_Current_Car_Leader
 
 Verify_New_Car_Leader_Elected
     [Documentation]    Verify new owner of the car shard is elected.
-    BuiltIn.Wait_Until_Keyword_Succeeds    10x    5s    ClusterManagement.Verify_Shard_Leader_Elected    ${SHARD_NAME}    ${SHARD_TYPE}    ${True}
-    ...    ${old_car_leader}    member_index_list=${old_car_followers}
-    CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes    ${old_car_followers}    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    10x
+    ...    5s
+    ...    ClusterManagement.Verify_Shard_Leader_Elected
+    ...    ${SHARD_NAME}
+    ...    ${SHARD_TYPE}
+    ...    ${True}
+    ...    ${old_car_leader}
+    ...    member_index_list=${old_car_followers}
+    CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes
+    ...    ${old_car_followers}
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
 
 Verify_Cars_Configured
     [Documentation]    Verify that all cars are configured.
@@ -70,11 +86,12 @@ Rejoin_Isolated_Member
 Delete Cars
     [Documentation]    Remove cars from the datastore
     ${session} =    Resolve_Http_Session_For_Member    member_index=${new_leader_index}
-    ${rsp}=    RequestsLibrary.Delete Request    ${session}    ${CARURL}
+    ${rsp} =    RequestsLibrary.Delete Request    ${session}    ${CARURL}
     Should Be Equal As Numbers    200    ${rsp.status_code}
-    ${rsp}=    RequestsLibrary.Get Request    ${session}    ${CARURL}
+    ${rsp} =    RequestsLibrary.Get Request    ${session}    ${CARURL}
     Should Contain    ${DELETED_STATUS_CODES}    ${rsp.status_code}
 
+
 *** Keywords ***
 Start Suite
     [Documentation]    Upload the script file and create a virtual env
@@ -83,7 +100,7 @@ Start Suite
     ${mininet_conn_id} =    SSHKeywords.Open_Connection_To_Tools_System    prompt=~]>
     Builtin.Set Suite Variable    ${mininet_conn_id}
     SSHLibrary.Put File    ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/${TOOL_NAME}    .
-    ${stdout}    ${stderr}    ${rc}=    SSHLibrary.Execute Command    ls    return_stdout=True    return_stderr=True
+    ${stdout}    ${stderr}    ${rc} =    SSHLibrary.Execute Command    ls    return_stdout=True    return_stderr=True
     ...    return_rc=True
     ${out_file} =    Utils.Get_Log_File_Name    ${TOOL_NAME}
     BuiltIn.Set_Suite_Variable    ${out_file}
@@ -96,52 +113,52 @@ Stop Suite
     Stop_Tool
     ${session} =    Resolve_Http_Session_For_Member    member_index=${new_leader_index}
     # best effort to make sure cars are deleted in case more suites will run after this and the delete test case had trouble
-    ${rsp}=    RequestsLibrary.Delete Request    ${session}    ${CARURL}
+    ${rsp} =    RequestsLibrary.Delete Request    ${session}    ${CARURL}
     BuiltIn.Log    ${rsp.status_code} : ${rsp.text}
     SSHKeywords.Virtual_Env_Delete
     Store_File_To_Workspace    ${out_file}    ${out_file}
     SSHLibrary.Close All Connections
 
 Start_Tool
-    [Arguments]    ${command}    ${tool_opt}
     [Documentation]    Start the tool
+    [Arguments]    ${command}    ${tool_opt}
     # TODO: https://trello.com/c/rXsMu7iz/444-create-keywords-for-the-tool-start-and-stop-in-remotebash-robot
     BuiltIn.Log    ${command}
     SSHKeywords.Virtual_Env_Activate_On_Current_Session    log_output=${True}
-    ${output}=    SSHLibrary.Write    ${command} ${tool_opt} 2>&1 | tee ${out_file}
+    ${output} =    SSHLibrary.Write    ${command} ${tool_opt} 2>&1 | tee ${out_file}
     BuiltIn.Log    ${output}
 
 Stop_Tool
     [Documentation]    Stop the tool if still running.
     # TODO: https://trello.com/c/rXsMu7iz/444-create-keywords-for-the-tool-start-and-stop-in-remotebash-robot
-    ${output}=    SSHLibrary.Read
+    ${output} =    SSHLibrary.Read
     BuiltIn.Log    ${output}
     RemoteBash.Write_Bare_Ctrl_C
-    ${output}=    SSHLibrary.Read_Until_Prompt
+    ${output} =    SSHLibrary.Read_Until_Prompt
     BuiltIn.Log    ${output}
     SSHKeywords.Virtual_Env_Deactivate_On_Current_Session    log_output=${True}
 
 Verify_Cars_Count
-    [Arguments]    ${exp_count}    ${session}
     [Documentation]    Count car items in config ds and compare with expected number.
+    [Arguments]    ${exp_count}    ${session}
     ${count} =    Get_Cars_Count    ${session}
     BuiltIn.Should_Be_Equal_As_Numbers    ${count}    ${exp_count}
 
 Get_Cars_Count
-    [Arguments]    ${session}
     [Documentation]    Count car items in config ds.
-    ${resp}=    RequestsLibrary.Get_Request    ${session}    ${CARURL}
+    [Arguments]    ${session}
+    ${resp} =    RequestsLibrary.Get_Request    ${session}    ${CARURL}
     ${count} =    BuiltIn.Evaluate    len(${resp.json()}[cars][car-entry])
-    BuiltIn.Return_From_Keyword    ${count}
+    RETURN    ${count}
 
 Ensure_Cars_Being_Configured
-    [Arguments]    ${session}
     [Documentation]    FIXME: Add a documentation.
+    [Arguments]    ${session}
     ${count1} =    Get_Cars_Count    ${session}
     ${count2} =    Get_Cars_Count    ${session}
     BuiltIn.Should_Not_Be_Equal_As_Integers    ${count1}    ${count2}
 
 Store_File_To_Workspace
-    [Arguments]    ${source_file_name}    ${target_file_name}
     [Documentation]    Store the ${source_file_name} to the workspace as ${target_file_name}.
+    [Arguments]    ${source_file_name}    ${target_file_name}
     SSHLibrary.Get_File    ${source_file_name}    ${target_file_name}
index c8bf11b3b0c74a1208551414bba81ea64331f7bc..1a21fcd6e20f6c3451d65ed86b9995952aa9ef8d 100644 (file)
@@ -1,65 +1,72 @@
 *** Settings ***
-Documentation     Suite for testing upgrading persisted data from earlier release.
+Documentation       Suite for testing upgrading persisted data from earlier release.
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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
 ...
 ...
-...               This suite kills the running (newer) ODL at its default location.
-...               It then installs (configurable) older ODL to an alternative location,
-...               pushes large amount of car data, verifies and kills the older ODL.
-...               The journal and snapshot files are transferred to the default location
-...               and the newer ODL is started.
-...               Then it verifies the config data is still present and matches what was seen before.
+...                 This suite kills the running (newer) ODL at its default location.
+...                 It then installs (configurable) older ODL to an alternative location,
+...                 pushes large amount of car data, verifies and kills the older ODL.
+...                 The journal and snapshot files are transferred to the default location
+...                 and the newer ODL is started.
+...                 Then it verifies the config data is still present and matches what was seen before.
 ...
-...               In principle, the suite should also work if "newer" ODL is in fact older.
-...               The limiting factor is featuresBoot, the value should be applicable to both ODL versions.
+...                 In principle, the suite should also work if "newer" ODL is in fact older.
+...                 The limiting factor is featuresBoot, the value should be applicable to both ODL versions.
 ...
-...               Note that in order to create traffic large enough for snapshots to be created,
-...               this suite also actis as a stress test for Restconf.
-...               But as that is not a primary focus of this suite,
-...               data seen on newer ODL is only compared to what was seen on the older ODL
-...               (stored in ${data_before} suite variable).
+...                 Note that in order to create traffic large enough for snapshots to be created,
+...                 this suite also actis as a stress test for Restconf.
+...                 But as that is not a primary focus of this suite,
+...                 data seen on newer ODL is only compared to what was seen on the older ODL
+...                 (stored in ${data_before} suite variable).
 ...
-...               As using Robotframework would be both too slow and too memory consuming,
-...               this suite uses a specialized Python utility for pushing the data locally on ODL_SYSTEM.
-...               The utility filename is configurable, as there may be changes in PATCH behavior in future.
+...                 As using Robotframework would be both too slow and too memory consuming,
+...                 this suite uses a specialized Python utility for pushing the data locally on ODL_SYSTEM.
+...                 The utility filename is configurable, as there may be changes in PATCH behavior in future.
 ...
-...               This suite uses relatively new support for PATCH http method.
-...               It repetitively replaces a segment of cars with moving IDs,
-...               so that there is a lot of data in journal (both write and delete),
-...               but the overall size of data stored remains limited.
+...                 This suite uses relatively new support for PATCH http method.
+...                 It repetitively replaces a segment of cars with moving IDs,
+...                 so that there is a lot of data in journal (both write and delete),
+...                 but the overall size of data stored remains limited.
 ...
-...               This is 1-node suite, but it still uses ClusterManagement.Check_Cluster_Is_In_Sync
-...               in order to detect the same sync condition as 3-node suite would do.
-...               Jolokia feature is required for that.
+...                 This is 1-node suite, but it still uses ClusterManagement.Check_Cluster_Is_In_Sync
+...                 in order to detect the same sync condition as 3-node suite would do.
+...                 Jolokia feature is required for that.
 ...
-...               Minimal set of features to be installed: odl-restconf, odl-jolokia, odl-clustering-test-app.
-Suite Setup       Setup_Suite
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      1node    carpeople    critical
-Library           String
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/CompareStream.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/../../../libraries/NexusKeywords.robot
+...                 Minimal set of features to be installed: odl-restconf, odl-jolokia, odl-clustering-test-app.
+
+Library             String
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/CompareStream.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource            ${CURDIR}/../../../libraries/NexusKeywords.robot
+
+Suite Setup         Setup_Suite
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        1node    carpeople    critical
+
 
 *** Variables ***
-${ALTERNATIVE_BUNDLEFOLDER_PARENT}    /tmp/older
-${CAR_VAR_DIR}    ${CURDIR}/../../../variables/carpeople/libtest/cars
-${CLUSTER_BOOTUP_SYNC_TIMEOUT}    1200s    # Rebooting after kill may take longer time, especially for -all- install.
-${ITERATIONS}     1000
-${MOVE_PER_ITER}    1000
-${PREVIOUS_ODL_RELEASE_ZIP_URL}    ${EMPTY}
-${PYTHON_UTILITY_FILENAME}    replace_cars.py
-${SEGMENT_SIZE}    10000
+${ALTERNATIVE_BUNDLEFOLDER_PARENT}      /tmp/older
+${CAR_VAR_DIR}                          ${CURDIR}/../../../variables/carpeople/libtest/cars
+# Rebooting after kill may take longer time, especially for -all- install.
+${CLUSTER_BOOTUP_SYNC_TIMEOUT}
+...                                     1200s
+${ITERATIONS}                           1000
+${MOVE_PER_ITER}                        1000
+${PREVIOUS_ODL_RELEASE_ZIP_URL}         ${EMPTY}
+${PYTHON_UTILITY_FILENAME}              replace_cars.py
+${SEGMENT_SIZE}                         10000
+
 
 *** Test Cases ***
 Select_Latest_Previous_Release_If_Not_Specified
@@ -67,7 +74,9 @@ Select_Latest_Previous_Release_If_Not_Specified
     ...    Note: If current stream is not found on nexus, then it is taken as new one (not released yet).
     ...    So in this case, latest release version is return.
     BuiltIn.Set_Suite_Variable    ${odl_zip_url}    ${PREVIOUS_ODL_RELEASE_ZIP_URL}
-    BuiltIn.Pass_Execution_If    '${odl_zip_url}'!=''    Bundle url to previous release is provided: ${PREVIOUS_ODL_RELEASE_ZIP_URL}, no need to search in nexus.
+    BuiltIn.Pass_Execution_If
+    ...    '${odl_zip_url}'!=''
+    ...    Bundle url to previous release is provided: ${PREVIOUS_ODL_RELEASE_ZIP_URL}, no need to search in nexus.
     ${previous_release} =    NexusKeywords.Get_Latest_ODL_Previous_Stream_Release_URL    ${ODL_STREAM}
     BuiltIn.Set_Suite_Variable    ${odl_zip_url}    ${previous_release}
 
@@ -82,35 +91,46 @@ Kill_Original_Odl
 Install_Older_Odl
     [Documentation]    Download .zip of older ODL, unpack, delete .zip, copy featuresBoot line.
     # Download.
-    SSHKeywords.Execute_Command_Should_Pass    mkdir -p "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && rm -rf * && wget -N "${odl_zip_url}"
+    SSHKeywords.Execute_Command_Should_Pass
+    ...    mkdir -p "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && rm -rf * && wget -N "${odl_zip_url}"
     # Unzip and detect bundle folder name.
-    ${bundle_dir} =    SSHKeywords.Execute_Command_Should_Pass    cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && unzip -q *.zip && rm *.zip && ls -1
+    ${bundle_dir} =    SSHKeywords.Execute_Command_Should_Pass
+    ...    cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && unzip -q *.zip && rm *.zip && ls -1
     BuiltIn.Set_Suite_Variable    \${alternative_bundlefolder}    ${ALTERNATIVE_BUNDLEFOLDER_PARENT}/${bundle_dir}
     # TODO: Add more strict checks. Folder should have single line, without .zip extension.
     # Extract featuresBoot lines.
     ${cfg_filename} =    BuiltIn.Set_Variable    org.apache.karaf.features.cfg
     ${cfg_older} =    BuiltIn.Set_Variable    ${alternative_bundlefolder}/etc/${cfg_filename}
     ${cfg_newer} =    BuiltIn.Set_Variable    ${WORKSPACE}/${BUNDLEFOLDER}/etc/${cfg_filename}
-    ${vanilla_line} =    SSHKeywords.Execute_Command_Should_Pass    grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
-    ${csit_line} =    SSHKeywords.Execute_Command_Should_Pass    grep 'featuresBoot' "${cfg_newer}" | grep -v 'featuresBootAsynchronous'
+    ${vanilla_line} =    SSHKeywords.Execute_Command_Should_Pass
+    ...    grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
+    ${csit_line} =    SSHKeywords.Execute_Command_Should_Pass
+    ...    grep 'featuresBoot' "${cfg_newer}" | grep -v 'featuresBootAsynchronous'
     ${karaf4_features} =    Extract_Karaf4_Boot_Features    ${csit_line}
     # TODO: this works only if old odl is karaf3. Once old and new odl both are e.g. karaf4 this will create invalid line.
-    ${new_csit_line} =    CompareStream.Set_Variable_If_At_Least_Nitrogen    ${vanilla_line},${karaf4_features}    ${csit_line}
+    ${new_csit_line} =    CompareStream.Set_Variable_If_At_Least_Nitrogen
+    ...    ${vanilla_line},${karaf4_features}
+    ...    ${csit_line}
     # Replace the vanilla line.
     SSHKeywords.Execute_Command_Should_Pass    sed -i 's/${vanilla_line}/${new_csit_line}/g' "${cfg_older}"
     # Verify the replaced line.
-    ${updated_line} =    SSHKeywords.Execute_Command_Should_Pass    grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
+    ${updated_line} =    SSHKeywords.Execute_Command_Should_Pass
+    ...    grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
     BuiltIn.Should_Not_Be_Equal    ${vanilla_line}    ${updated_line}
     BuiltIn.Should_Be_Equal    ${new_csit_line}    ${updated_line}
 
 Start_Older_Odl
     [Documentation]    Start older ODL on background.
     [Tags]    1node    carpeople    # Not critical, to save space in default log.html presentation
-    ClusterManagement.Start_Members_From_List_Or_All    wait_for_sync=True    timeout=${CLUSTER_BOOTUP_SYNC_TIMEOUT}    karaf_home=${alternative_bundlefolder}
+    ClusterManagement.Start_Members_From_List_Or_All
+    ...    wait_for_sync=True
+    ...    timeout=${CLUSTER_BOOTUP_SYNC_TIMEOUT}
+    ...    karaf_home=${alternative_bundlefolder}
 
 Add_Data
     [Documentation]    Put car data to config datastore of older ODL.
-    ${command} =    BuiltIn.Set_Variable    python ${PYTHON_UTILITY_FILENAME} --segment-size=${SEGMENT_SIZE} --iterations=${ITERATIONS} --move-per-iter=${MOVE_PER_ITER}
+    ${command} =    BuiltIn.Set_Variable
+    ...    python ${PYTHON_UTILITY_FILENAME} --segment-size=${SEGMENT_SIZE} --iterations=${ITERATIONS} --move-per-iter=${MOVE_PER_ITER}
     SSHKeywords.Execute_Command_Should_Pass    ${command}    stderr_must_be_empty=True
     # TODO: I have seen 401 here once. Implement workaround or report a Bug.
 
@@ -124,7 +144,12 @@ Validate_Data
     ${first_id} =    BuiltIn.Evaluate    (${ITERATIONS} - 1) * ${MOVE_PER_ITER} + 1
     SetupUtils.Set_Known_Bug_Id    5909
     # The following line is the second part of TemplatedRequests.Get_As_Json_Templated for verify=True.
-    TemplatedRequests.Verify_Response_As_Json_Templated    response=${data_before}    folder=${CAR_VAR_DIR}    base_name=data    iterations=${SEGMENT_SIZE}    iter_start=${first_id}
+    TemplatedRequests.Verify_Response_As_Json_Templated
+    ...    response=${data_before}
+    ...    folder=${CAR_VAR_DIR}
+    ...    base_name=data
+    ...    iterations=${SEGMENT_SIZE}
+    ...    iter_start=${first_id}
 
 Kill_Older_Odl
     [Documentation]    Kill the older ODL immediatelly.
@@ -133,7 +158,8 @@ Kill_Older_Odl
 Transfer_Persisted_Data
     [Documentation]    Move snapshots and (segmented-)journal into the original ODL installation.
     # SSHLibrary.Switch_Connection    ${odl_system_ssh_index}
-    ${stdout} =    SSHKeywords.Execute_Command_Should_Pass    cp -rv "${alternative_bundlefolder}/snapshots" "${WORKSPACE}/${BUNDLEFOLDER}/" && cp -rv "${alternative_bundlefolder}/"*journal "${WORKSPACE}/${BUNDLEFOLDER}/"
+    ${stdout} =    SSHKeywords.Execute_Command_Should_Pass
+    ...    cp -rv "${alternative_bundlefolder}/snapshots" "${WORKSPACE}/${BUNDLEFOLDER}/" && cp -rv "${alternative_bundlefolder}/"*journal "${WORKSPACE}/${BUNDLEFOLDER}/"
     Set_Suite_Variable    ${stdout}
 
 Check_Snapshot_With_Transferred_Persisted_Data
@@ -155,6 +181,7 @@ Archive_Older_Karaf_Log
     SSHLibrary.Get_File    ${alternative_bundlefolder}/data/log/karaf.log.xz    older.karaf.log.xz
     # TODO: Uncompress first (or last) megabyte for better readability?
 
+
 *** Keywords ***
 Setup_Suite
     [Documentation]    Activate dependency Resources, create SSH connection, copy Python utility.
@@ -170,9 +197,9 @@ Check_Restored_Data
     BuiltIn.Should_Be_Equal    ${data_before}    ${data_after}
 
 Extract_Karaf4_Boot_Features
-    [Arguments]    ${csit_line}
     [Documentation]    Extract boot features. It is used for the 1st line of karaf4 featuresBoot parameter from org.apache.karaf.features.cfg.
-    ${bfeatures}    String.Replace_String    ${csit_line}    ${Space}    ${Empty}
-    ${bfeatures}    String.Replace_String    ${bfeatures}    featuresBoot=    ${Empty}
-    ${bfeatures}    String.Replace_String    ${bfeatures}    ,\\    ${Empty}
-    BuiltIn.Return_From_Keyword    ${bfeatures}
+    [Arguments]    ${csit_line}
+    ${bfeatures} =    String.Replace_String    ${csit_line}    ${Space}    ${Empty}
+    ${bfeatures} =    String.Replace_String    ${bfeatures}    featuresBoot=    ${Empty}
+    ${bfeatures} =    String.Replace_String    ${bfeatures}    ,\\    ${Empty}
+    RETURN    ${bfeatures}
index 4e8505f4b019a664bb4e1de5f1758953763db5fc..0900ebfbc07d0c173504b1f9fea2d691a6ad4f51 100644 (file)
@@ -1,69 +1,73 @@
 *** Settings ***
-Documentation     MD-SAL Data Store benchmarking.
+Documentation       MD-SAL Data Store benchmarking.
 ...
-...               Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2015 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
+...                 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
 ...
-...               This test suite uses the odl-dsbenchmark-impl feature controlled
-...               via dsbenchmark.py tool for testing the MD-SAL Data Store performance.
-...               (see the 'https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Data_Store_Benchmarking_and_Data_Access_Patterns')
+...                 This test suite uses the odl-dsbenchmark-impl feature controlled
+...                 via dsbenchmark.py tool for testing the MD-SAL Data Store performance.
+...                 (see the 'https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Data_Store_Benchmarking_and_Data_Access_Patterns')
 ...
-...               Based on values in test suite variables it triggers required numbers of
-...               warm-up and measured test runs: odl-dsbenchmark-impl module generates
-...               (towards MD-SAL Data Store) specified structure, type and number of operations.
-...               The test suite performs checks for start-up and test execution timeouts
-...               (Start Measurement, Wait For Results) and basic checks for test runs results
-...               (Check Results). Finally it provides total numbers per operation structure and type
-...               (by default in the perf_per_struct.csv, perf_per_ops.csv files)
-...               suitable for plotting in system test environment. See also the
-...               'https://wiki.opendaylight.org/view/CrossProject:Integration_Group:System_Test:Step_by_Step_Guide#Optional_-_Plot_a_graph_from_your_job'
-...               Included totals can be filtered using the FILTER parameter (RegExp).
-...               Because of the way how graphs are drawn, it is recomended to keep
-...               all test suite variables unchanged as defined for the 1st build.
-...               Parameters WARMUPS, RUNS and accordingly the TIMEOUT value can be changed
-...               for each build if needed. Parameter UNITS defines time units returned
-...               by odl-dsbenchmark-impl module. The dsbenchmark.py tool always returns
-...               values in miliseconds.
+...                 Based on values in test suite variables it triggers required numbers of
+...                 warm-up and measured test runs: odl-dsbenchmark-impl module generates
+...                 (towards MD-SAL Data Store) specified structure, type and number of operations.
+...                 The test suite performs checks for start-up and test execution timeouts
+...                 (Start Measurement, Wait For Results) and basic checks for test runs results
+...                 (Check Results). Finally it provides total numbers per operation structure and type
+...                 (by default in the perf_per_struct.csv, perf_per_ops.csv files)
+...                 suitable for plotting in system test environment. See also the
+...                 'https://wiki.opendaylight.org/view/CrossProject:Integration_Group:System_Test:Step_by_Step_Guide#Optional_-_Plot_a_graph_from_your_job'
+...                 Included totals can be filtered using the FILTER parameter (RegExp).
+...                 Because of the way how graphs are drawn, it is recomended to keep
+...                 all test suite variables unchanged as defined for the 1st build.
+...                 Parameters WARMUPS, RUNS and accordingly the TIMEOUT value can be changed
+...                 for each build if needed. Parameter UNITS defines time units returned
+...                 by odl-dsbenchmark-impl module. The dsbenchmark.py tool always returns
+...                 values in miliseconds.
 ...
-...               When running this robot suite always use --exclude tag for distinguish
-...               the run for 3node setup: need a benchmark for leader and follow (--exclude singlenode_setup)
-...               the run for 1node setup: no followr present (--exclude clustered_setup)
-Suite Setup       Setup_Everything
-Suite Teardown    Teardown_Everything
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
-Library           OperatingSystem
-Library           SSHLibrary    timeout=10s
-Library           RequestsLibrary
-Variables         ${CURDIR}/../../../variables/Variables.py
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/RemoteBash.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource          ${CURDIR}/../../../libraries/Utils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 When running this robot suite always use --exclude tag for distinguish
+...                 the run for 3node setup: need a benchmark for leader and follow (--exclude singlenode_setup)
+...                 the run for 1node setup: no followr present (--exclude clustered_setup)
+
+Library             OperatingSystem
+Library             SSHLibrary    timeout=10s
+Library             RequestsLibrary
+Variables           ${CURDIR}/../../../variables/Variables.py
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/RemoteBash.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource            ${CURDIR}/../../../libraries/Utils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Everything
+Suite Teardown      Teardown_Everything
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
+
 
 *** Variables ***
-${ODL_LOG_LEVEL}    info
-${TX_TYPE}        {TX-CHAINING,SIMPLE-TX}
-${OP_TYPE}        {PUT,READ,MERGE,DELETE}
-${TOTAL_OPS}      100000
-${OPS_PER_TX}     100000
-${INNER_OPS}      100000
-${WARMUPS}        4
-${RUNS}           8
-${TIMEOUT}        3h
-${FILTER}         EXEC
-${UNITS}          microseconds
-${tool}           dsbenchmark.py
-${tool_startup_timeout}    10s
-${tool_log_name}    dsbenchmark.log
-${tool_output_name}    test.csv
-${tool_results1_name}    perf_per_struct.csv
-${tool_results2_name}    perf_per_ops.csv
+${ODL_LOG_LEVEL}            info
+${TX_TYPE}                  {TX-CHAINING,SIMPLE-TX}
+${OP_TYPE}                  {PUT,READ,MERGE,DELETE}
+${TOTAL_OPS}                100000
+${OPS_PER_TX}               100000
+${INNER_OPS}                100000
+${WARMUPS}                  4
+${RUNS}                     8
+${TIMEOUT}                  3h
+${FILTER}                   EXEC
+${UNITS}                    microseconds
+${tool}                     dsbenchmark.py
+${tool_startup_timeout}     10s
+${tool_log_name}            dsbenchmark.log
+${tool_output_name}         test.csv
+${tool_results1_name}       perf_per_struct.csv
+${tool_results2_name}       perf_per_ops.csv
+
 
 *** Test Cases ***
 Measure_Both_Datastores_For_One_Node_Odl_Setup
@@ -238,6 +242,7 @@ Merge_Csvs_Together
     Merge_Csv    perf_per_ops.csv
     Merge_Csv    perf_per_struct.csv
 
+
 *** Keywords ***
 Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to mininet machine,
@@ -257,33 +262,44 @@ Teardown_Everything
     SSHLibrary.Close_All_Connections
 
 Start_Benchmark_Tool
-    [Arguments]    ${tested_datastore}    ${tested_node_ip}    ${warmups}    ${runs}    ${total_ops}    ${inner_ops}
-    ...    ${tx_type}    ${ops_per_tx}    ${op_type}    ${retry}=${EMPTY}
     [Documentation]    Start the benchmark tool. Check that it has been running at least for ${tool_startup_timeout} period.
     ...    If the script exits early, retry once after \${retry} if specified.
-    ${command}=    BuiltIn.Set_Variable    python ${tool} --host ${tested_node_ip} --port ${RESTCONFPORT} --warmup ${warmups} --runs ${runs} --total ${total_ops} --inner ${inner_ops} --txtype ${tx_type} --ops ${ops_per_tx} --optype ${op_type} --plot ${FILTER} --units ${UNITS} --datastore ${tested_datastore} &> ${tool_log_name}
+    [Arguments]    ${tested_datastore}    ${tested_node_ip}    ${warmups}    ${runs}    ${total_ops}    ${inner_ops}
+    ...    ${tx_type}    ${ops_per_tx}    ${op_type}    ${retry}=${EMPTY}
+    ${command}=    BuiltIn.Set_Variable
+    ...    python ${tool} --host ${tested_node_ip} --port ${RESTCONFPORT} --warmup ${warmups} --runs ${runs} --total ${total_ops} --inner ${inner_ops} --txtype ${tx_type} --ops ${ops_per_tx} --optype ${op_type} --plot ${FILTER} --units ${UNITS} --datastore ${tested_datastore} &> ${tool_log_name}
     BuiltIn.Log    ${command}
     SSHKeywords.Virtual_Env_Activate_On_Current_Session
     ${output}=    SSHLibrary.Write    ${command}
-    ${status}    ${message}=    BuiltIn.Run Keyword And Ignore Error    Write Until Expected Output    ${EMPTY}    ${TOOLS_SYSTEM_PROMPT}    ${tool_startup_timeout}
+    ${status}    ${message}=    BuiltIn.Run Keyword And Ignore Error
+    ...    Write Until Expected Output
+    ...    ${EMPTY}
+    ...    ${TOOLS_SYSTEM_PROMPT}
+    ...    ${tool_startup_timeout}
     ...    1s
     BuiltIn.Log    ${status}
     BuiltIn.Log    ${message}
-    BuiltIn.Return From Keyword If    "${status}" != "PASS"
-    BuiltIn.Run Keyword If    """${retry}""" == ""    BuiltIn.Fail    Benchmark tool is not running.
+    IF    "${status}" != "PASS"    RETURN
+    IF    """${retry}""" == ""    BuiltIn.Fail    Benchmark tool is not running.
     BuiltIn.Comment    An ugly hack for Carbon -all- jobs being slow to finish booting. FIXME: Use WUKS and open a Bug.
     BuiltIn.Sleep    ${retry}
     ${output}=    SSHLibrary.Write    ${command}
-    ${status}    ${message}=    BuiltIn.Run Keyword And Ignore Error    Write Until Expected Output    ${EMPTY}    ${TOOLS_SYSTEM_PROMPT}    ${tool_startup_timeout}
+    ${status}    ${message}=    BuiltIn.Run Keyword And Ignore Error
+    ...    Write Until Expected Output
+    ...    ${EMPTY}
+    ...    ${TOOLS_SYSTEM_PROMPT}
+    ...    ${tool_startup_timeout}
     ...    1s
     BuiltIn.Log    ${status}
     BuiltIn.Log    ${message}
-    BuiltIn.Run Keyword If    "${status}" == "PASS"    BuiltIn.Fail    Benchmark tool is not running.
+    IF    "${status}" == "PASS"
+        BuiltIn.Fail    Benchmark tool is not running.
+    END
 
 Wait_Until_Benchmark_Tool_Finish
-    [Arguments]    ${timeout}
     [Documentation]    Wait until the benchmark tool is finished. Fail in case of test timeout (${timeout}).
     ...    In order to prevent SSH session from closing due to inactivity, newline is sent every check.
+    [Arguments]    ${timeout}
     BuiltIn.Wait Until Keyword Succeeds    ${timeout}    30s    BuiltIn.Run Keywords    SSHLibrary.Write    ${EMPTY}
     ...    AND    SSHLibrary.Read Until Prompt
 
@@ -295,15 +311,15 @@ Stop_Benchmark_Tool
     SSHKeywords.Virtual_Env_Deactivate_On_Current_Session
 
 Get_Log_File
-    [Arguments]    ${file_name}
     [Documentation]    Return and log content of the provided file.
+    [Arguments]    ${file_name}
     ${output_log}=    SSHLibrary.Execute_Command    cat ${file_name}
     BuiltIn.Log    ${output_log}
-    [Return]    ${output_log}
+    RETURN    ${output_log}
 
 Store_File_To_Robot
-    [Arguments]    ${file_name}    ${file_prefix}
     [Documentation]    Store the provided file from the MININET to the ROBOT machine.
+    [Arguments]    ${file_name}    ${file_prefix}
     ${output_log}=    SSHLibrary.Execute_Command    cat ${file_name}
     BuiltIn.Log    ${output_log}
     OperatingSystem.Create_File    ${file_prefix}${file_name}    ${output_log}
@@ -323,19 +339,19 @@ Check Results
     BuiltIn.Should Not Contain    ${tool_log}    status: NOK
 
 Set_Node_Ip_For_Benchmark
-    [Arguments]    ${state}    ${tested_ds}    ${file_prefix}
     [Documentation]    Returns the node ip which should be tested
-    BuiltIn.Return From Keyword If    ${NUM_ODL_SYSTEM}==1    ${ODL_SYSTEM_1_IP}
+    [Arguments]    ${state}    ${tested_ds}    ${file_prefix}
+    IF    ${NUM_ODL_SYSTEM}==1    RETURN    ${ODL_SYSTEM_1_IP}
     ${shard_type}=    BuiltIn.Set_Variable_If    "${tested_ds}"=="CONFIG"    config    operational
     ${leader}    ${followers}=    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_type=${shard_type}
-    BuiltIn.Return From Keyword If    "${state}"=="leader"    ${ODL_SYSTEM_${leader}_IP}
-    BuiltIn.Return From Keyword    ${ODL_SYSTEM_${followers}[0]_IP}
+    IF    "${state}"=="leader"    RETURN    ${ODL_SYSTEM_${leader}_IP}
+    RETURN    ${ODL_SYSTEM_${followers}[0]_IP}
 
 Measuring_Template
-    [Arguments]    ${state}    ${tested_ds}    ${file_prefix}    ${retry}=${EMPTY}    ${warmups}=${WARMUPS}    ${runs}=${RUNS}
-    ...    ${total_ops}=${TOTAL_OPS}    ${inner_ops}=${INNER_OPS}    ${tx_type}=${TX_TYPE}    ${ops_per_tx}=${OPS_PER_TX}    ${op_type}=${OP_TYPE}
     [Documentation]    Keywork which will cover a whole banchmark.
     ...    If ${file_prefix} is ${Empty} we have 1 node odl.
+    [Arguments]    ${state}    ${tested_ds}    ${file_prefix}    ${retry}=${EMPTY}    ${warmups}=${WARMUPS}    ${runs}=${RUNS}
+    ...    ${total_ops}=${TOTAL_OPS}    ${inner_ops}=${INNER_OPS}    ${tx_type}=${TX_TYPE}    ${ops_per_tx}=${OPS_PER_TX}    ${op_type}=${OP_TYPE}
     ${odl_node_ip}=    Set_Node_Ip_For_Benchmark    ${state}    ${tested_ds}    ${file_prefix}
     Start_Benchmark_Tool    ${tested_ds}    ${odl_node_ip}    ${warmups}    ${runs}    ${total_ops}    ${inner_ops}
     ...    ${tx_type}    ${ops_per_tx}    ${op_type}    retry=${retry}
@@ -346,7 +362,10 @@ Measuring_Template
     Store_File_To_Robot    ${tool_results1_name}    ${file_prefix}
     Store_File_To_Robot    ${tool_results2_name}    ${file_prefix}
     ${odl_node_ip_after}=    Set_Node_Ip_For_Benchmark    ${state}    ${tested_ds}    ${file_prefix}
-    BuiltIn.Should_Be_Equal    ${odl_node_ip}    ${odl_node_ip_after}    Leader changed from ${odl_node_ip} to ${odl_node_ip_after} during the benchmark.
+    BuiltIn.Should_Be_Equal
+    ...    ${odl_node_ip}
+    ...    ${odl_node_ip_after}
+    ...    Leader changed from ${odl_node_ip} to ${odl_node_ip_after} during the benchmark.
     [Teardown]    Stop_Measurement_And_Save_Logs
 
 Stop_Measurement_And_Save_Logs
@@ -354,8 +373,8 @@ Stop_Measurement_And_Save_Logs
     Collect Logs
 
 Merge_Csv
-    [Arguments]    ${final_file}
     [Documentation]    Creates ${final_file} csv file from existing files in the current directory
+    [Arguments]    ${final_file}
     ${final_columns}=    BuiltIn.Set_Variable    ${Empty}
     ${final_values}=    BuiltIn.Set_variable    ${Empty}
     @{csv_files}=    OperatingSystem.List_Files_In_Directory    .    *${final_file}
@@ -365,22 +384,31 @@ Merge_Csv
         ${csv_content}=    OperatingSystem.GetFile    ${file}
         ${column_names}=    Get_Column_Names    ${file}    ${csv_content}
         ${column_values}=    String.Get_Line    ${csv_content}    1
-        ${final_columns}=    BuiltIn.Set_Variable_If    "${final_columns}"=="${Empty}"    ${column_names}    ${final_columns},${column_names}
-        ${final_values}=    BuiltIn.Set_Variable_If    "${final_values}"=="${Empty}"    ${column_values}    ${final_values},${column_values}
+        ${final_columns}=    BuiltIn.Set_Variable_If
+        ...    "${final_columns}"=="${Empty}"
+        ...    ${column_names}
+        ...    ${final_columns},${column_names}
+        ${final_values}=    BuiltIn.Set_Variable_If
+        ...    "${final_values}"=="${Empty}"
+        ...    ${column_values}
+        ...    ${final_values},${column_values}
     END
     ${content}=    BuiltIn.Catenate    SEPARATOR=${\n}    ${final_columns}    ${final_values}
     OperatingSystem.Create_File    ${final_file}    ${content}
 
 Get_Column_Names
-    [Arguments]    ${file_name}    ${file_content}
     [Documentation]    Returns the first line of the given csv file. It is modified if the file name
     ...    indicates that it is the file from the shard follower.
+    [Arguments]    ${file_name}    ${file_content}
     ${column_names}=    String.Get_Line    ${file_content}    0
-    BuiltIn.Return_From_Keyword_If    "_fol_" not in "${file_name}"    ${column_names}
+    IF    "_fol_" not in "${file_name}"    RETURN    ${column_names}
     # now we have followers and FOL_ will be prepended to the column names
-    @{columns}    String.Split_String    ${column_names}    ,
-    ${final_columns}    BuiltIn.Set_Variable    ${Empty}
+    @{columns}=    String.Split_String    ${column_names}    ,
+    ${final_columns}=    BuiltIn.Set_Variable    ${Empty}
     FOR    ${column}    IN    @{columns}
-        ${final_columns}    BuiltIn.Set_Variable_If    "${final_columns}"=="${Empty}"    FOL_${column}    ${final_columns},FOL_${column}
+        ${final_columns}=    BuiltIn.Set_Variable_If
+        ...    "${final_columns}"=="${Empty}"
+        ...    FOL_${column}
+        ...    ${final_columns},FOL_${column}
     END
-    BuiltIn.Return_From_Keyword    ${final_columns}
+    RETURN    ${final_columns}
index 63e83526aa7425a2a7934185b566a9774315f0ad..394f557b2d50b188934ee30c1673a03540fb12d8 100644 (file)
@@ -1,26 +1,30 @@
 *** Settings ***
-Documentation     Cluster Singleton testing: Chasing the Leader
+Documentation       Cluster Singleton testing: Chasing the Leader
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               This test aims to establish the service operates correctly when faced with
-...               rapid application transitions without having a stabilized application.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource          ${CURDIR}/../../../libraries/CompareStream.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 This test aims to establish the service operates correctly when faced with
+...                 rapid application transitions without having a stabilized application.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource            ${CURDIR}/../../../libraries/CompareStream.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-${TEST_DURATION}    1m
+${TEST_DURATION}            1m
 ${ACCEPTED_PER_SEC_RATE}    5
 # NOTE: The shared infra that we use can sometimes be sluggish and we get false failures.
 # There are cases when the rate will be under 20 as well as over 100. Normally it is over
@@ -29,6 +33,7 @@ ${ACCEPTED_PER_SEC_RATE}    5
 # Some discussion of this can be found in the comments of
 # https://git.opendaylight.org/gerrit/#/c/74692/.
 
+
 *** Test Cases ***
 Register_Candidates
     [Documentation]    Register a candidate application on each node which starts the test.
@@ -42,7 +47,11 @@ Do_Nothing
 
 Unregister_Candidates_And_Validate_Criteria
     [Documentation]    Unregister the testing service and check recevied statistics.
-    CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results    ${cs_all_indices}    ${ACCEPTED_PER_SEC_RATE}    ${TEST_DURATION}
+    CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results
+    ...    ${cs_all_indices}
+    ...    ${ACCEPTED_PER_SEC_RATE}
+    ...    ${TEST_DURATION}
+
 
 *** Keywords ***
 Setup_Keyword
index 32e46e5b4ead462bd39ea18d5dfd2e047ad3ba87..3e6fe95cf2544cd274dd845077a79264ed131ffe 100644 (file)
@@ -1,29 +1,34 @@
 *** Settings ***
-Documentation     Cluster Singleton testing: Chasing the Leader
+Documentation       Cluster Singleton testing: Chasing the Leader
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               This test aims to establish the service operates correctly when faced with
-...               rapid application transitions without having a stabilized application.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource          ${CURDIR}/../../../libraries/CompareStream.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 This test aims to establish the service operates correctly when faced with
+...                 rapid application transitions without having a stabilized application.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource            ${CURDIR}/../../../libraries/CompareStream.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
 # TODO: change back to 24h when jenkins has more granular steps to abort jobs than days; now 23h
-${TEST_DURATION}    23h
+${TEST_DURATION}            23h
 ${ACCEPTED_PER_SEC_RATE}    100
 
+
 *** Test Cases ***
 Register_Candidates
     [Documentation]    Register a candidate application on each node which starts the test.
@@ -37,7 +42,11 @@ Do_Nothing
 
 Unregister_Candidates_And_Validate_Criteria
     [Documentation]    Unregister the testing service and check recevied statistics.
-    CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results    ${cs_all_indices}    ${ACCEPTED_PER_SEC_RATE}    ${TEST_DURATION}
+    CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results
+    ...    ${cs_all_indices}
+    ...    ${ACCEPTED_PER_SEC_RATE}
+    ...    ${TEST_DURATION}
+
 
 *** Keywords ***
 Setup_Keyword
index 1f4109cdecfdba7e0d08588a7406d810f16503c6..f9c3d3ed92d9c88a1e35252240ef5741afdaac8a 100644 (file)
@@ -1,41 +1,51 @@
 *** Settings ***
-Documentation     Cluster Singleton testing: Master Stability
+Documentation       Cluster Singleton testing: Master Stability
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               Cluster Singleton service is designed to ensure that only one instance of an
-...               application is registered globally in the cluster.
-...               The goal is to establish the service operates correctly in face of application
-...               registration changing without moving the active instance.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           Collections
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 Cluster Singleton service is designed to ensure that only one instance of an
+...                 application is registered globally in the cluster.
+...                 The goal is to establish the service operates correctly in face of application
+...                 registration changing without moving the active instance.
+
+Library             Collections
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
 ${STABILITY_TIMEOUT}    1m
 
+
 *** Test Cases ***
 Register_Singleton_Constant_On_Each_Node_And_Verify
     [Documentation]    Register a candidate application on each node.
     CsCommon.Register_Singleton_Constant_On_Nodes    ${cs_all_indices}
     ${owner}    ${candidates}=    CsCommon.Get_And_Save_Present_CsOwner_And_CsCandidates    1
-    BuiltIn.Wait_Until_Keyword_Succeeds    15s    2s    CsCommon.Verify_Singleton_Constant_On_Nodes    ${cs_all_indices}    ${CS_CONSTANT_PREFIX}${owner}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    15s
+    ...    2s
+    ...    CsCommon.Verify_Singleton_Constant_On_Nodes
+    ...    ${cs_all_indices}
+    ...    ${CS_CONSTANT_PREFIX}${owner}
 
 Unregister_Singleton_Constant_On_Non_Master_Node
     [Documentation]    Unregister the application on a non master node.
-    ${unregistered_node} =    Get_Node_Idx_To_Unregister
+    ${unregistered_node}=    Get_Node_Idx_To_Unregister
     CsCommon.Unregister_Singleton_And_Update_Expected_Candidates    ${unregistered_node}
     BuiltIn.Set_Suite_Variable    ${unregistered_node}
 
@@ -45,16 +55,23 @@ Monitor_Stability_While_Unregistered
 
 Reregister_Singleton_Constant
     [Documentation]    Re-register the unregistered candidate.
-    CsCommon.Register_Singleton_And_Update_Expected_Candidates    ${unregistered_node}    ${CS_CONSTANT_PREFIX}${unregistered_node}
+    CsCommon.Register_Singleton_And_Update_Expected_Candidates
+    ...    ${unregistered_node}
+    ...    ${CS_CONSTANT_PREFIX}${unregistered_node}
 
 Verify_Stability_After_Reregistration
     [Documentation]    Verify that the owner remains on the same node after the unregistered candidate re-registration.
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    5x    3s    CsCommon.Verify_Owner_And_Candidates_Stable    ${cs_owner}
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    5x
+    ...    3s
+    ...    CsCommon.Verify_Owner_And_Candidates_Stable
+    ...    ${cs_owner}
 
 Unregister_Singleton_Constant_On_Each_Node
     [Documentation]    Unregister the application from each node.
     CsCommon.Unregister_Singleton_Constant_On_Nodes    ${cs_all_indices}
 
+
 *** Keywords ***
 Setup_Keyword
     SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
@@ -63,5 +80,5 @@ Setup_Keyword
 Get_Node_Idx_To_Unregister
     [Documentation]    Return the first non owner node from the stored candidate list.
     FOR    ${index}    IN    @{cs_candidates}
-        BuiltIn.Return_From_Keyword_If    "${index}" != "${cs_owner}"    ${index}
+        IF    "${index}" != "${cs_owner}"    RETURN    ${index}
     END
index c67d5566434764a284d532cf1602764ead03b4cf..16e3858acf8b4e8b91466a656bc6ab57ccc495f3 100644 (file)
@@ -1,34 +1,39 @@
 *** Settings ***
-Documentation     Cluster Singleton testing: Partition And Heal
+Documentation       Cluster Singleton testing: Partition And Heal
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               Cluster Singleton service is designed to ensure that only one instance of
-...               an application is registered globally in the cluster.
-...               The goal is to establish the service operates correctly in face of node
-...               failures.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           Collections
-Library           SSHLibrary
-Library           RequestsLibrary
-Resource          ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/MdsalLowlevel.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 Cluster Singleton service is designed to ensure that only one instance of
+...                 an application is registered globally in the cluster.
+...                 The goal is to establish the service operates correctly in face of node
+...                 failures.
+
+Library             Collections
+Library             SSHLibrary
+Library             RequestsLibrary
+Resource            ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/MdsalLowlevel.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-${STABILITY_TIMEOUT_ISOLATED}    120s
-${STABILITY_TIMEOUT_REJOINED}    60s
-@{STATUS_ISOLATED}    ${501}
+${STABILITY_TIMEOUT_ISOLATED}       120s
+${STABILITY_TIMEOUT_REJOINED}       60s
+@{STATUS_ISOLATED}                  ${501}
+
 
 *** Test Cases ***
 Register_Singleton_Constant_On_Each_Node
@@ -39,7 +44,12 @@ Verify_Singleton_Constant_On_Each_Node
     [Documentation]    Store the owner and candidates of the application and initially verify that all
     ...    odl nodes are used.
     ${owner}    ${candidates}=    CsCommon.Get_And_Save_Present_CsOwner_And_CsCandidates    1
-    BuiltIn.Wait_Until_Keyword_Succeeds    15    2s    CsCommon.Verify_Singleton_Constant_On_Nodes    ${cs_all_indices}    ${CS_CONSTANT_PREFIX}${owner}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    15
+    ...    2s
+    ...    CsCommon.Verify_Singleton_Constant_On_Nodes
+    ...    ${cs_all_indices}
+    ...    ${CS_CONSTANT_PREFIX}${owner}
 
 Isolate_Owner_Node
     [Documentation]    Isolate the cluster node which is the owner. Wait until the new owner is elected and store
@@ -48,7 +58,10 @@ Isolate_Owner_Node
 
 Monitor_Stability_While_Isolated
     [Documentation]    Monitor the stability of the singleton application and fail the the owner is changed during the monitoring.
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${STABILITY_TIMEOUT_ISOLATED}    3s    CsCommon.Verify_Singleton_Constant_During_Isolation
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    ${STABILITY_TIMEOUT_ISOLATED}
+    ...    3s
+    ...    CsCommon.Verify_Singleton_Constant_During_Isolation
 
 Rejoin_Isolated_node
     [Documentation]    Rejoin isolated node.
@@ -58,6 +71,7 @@ Unregister_Singleton_Constant_On_Each_Node
     [Documentation]    Unregister the application on every node.
     CsCommon.Unregister_Singleton_Constant_On_Nodes    ${cs_all_indices}
 
+
 *** Keywords ***
 Setup_Keyword
     [Documentation]    Suite setup.
index 5ac029245ad09c78614c6e49ac6adf6379b29d22..a7e830a5d5b4bbba718b525104d3bdeac4304c46 100644 (file)
@@ -1,44 +1,53 @@
 *** Settings ***
-Documentation     Cluster Singleton testing: Partition And Heal longevity suite
+Documentation       Cluster Singleton testing: Partition And Heal longevity suite
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               Cluster Singleton service is designed to ensure that only one instance of
-...               an application is registered globally in the cluster.
-...               The goal is to establish the service operates correctly in face of node
-...               failures.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           Collections
-Library           SSHLibrary
-Library           RequestsLibrary
-Resource          ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/MdsalLowlevel.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 Cluster Singleton service is designed to ensure that only one instance of
+...                 an application is registered globally in the cluster.
+...                 The goal is to establish the service operates correctly in face of node
+...                 failures.
+
+Library             Collections
+Library             SSHLibrary
+Library             RequestsLibrary
+Resource            ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/MdsalLowlevel.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
 # TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS}    82800
-${STABILITY_TIMEOUT_ISOLATED}    120s
-${STABILITY_TIMEOUT_REJOINED}    60s
-@{STATUS_ISOLATED}    ${501}
+${LONGEVITY_TEST_DURATION_IN_SECS}      82800
+${STABILITY_TIMEOUT_ISOLATED}           120s
+${STABILITY_TIMEOUT_REJOINED}           60s
+@{STATUS_ISOLATED}                      ${501}
+
 
 *** Test Cases ***
 CS_Pertition_And_Heal
     [Documentation]    24h lasting suite for isolating the cluster singleton leader repeatedly.
     CsCommon.Register_Singleton_Constant_On_Nodes    ${cs_all_indices}
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${LONGEVITY_TEST_DURATION_IN_SECS}    3s    Test_Scenario
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    ${LONGEVITY_TEST_DURATION_IN_SECS}
+    ...    3s
+    ...    Test_Scenario
     CsCommon.Unregister_Singleton_Constant_On_Nodes    ${cs_all_indices}
 
+
 *** Keywords ***
 Setup_Keyword
     [Documentation]    Suite setup.
@@ -50,10 +59,23 @@ Test_Scenario
     ...    Monitor the stability of the singleton application and fail the the owner is changed during the monitoring. Monitoring
     ...    is done after the node isolation and after the node rejoin.
     ${owner}    ${candidates}=    CsCommon.Get_And_Save_Present_CsOwner_And_CsCandidates    1
-    BuiltIn.Wait_Until_Keyword_Succeeds    15s    2s    CsCommon.Verify_Singleton_Constant_On_Nodes    ${cs_all_indices}    ${CS_CONSTANT_PREFIX}${owner}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    15s
+    ...    2s
+    ...    CsCommon.Verify_Singleton_Constant_On_Nodes
+    ...    ${cs_all_indices}
+    ...    ${CS_CONSTANT_PREFIX}${owner}
     KarafKeywords.Log_Message_To_Controller_Karaf    Isolating node${owner}.
     CsCommon.Isolate_Owner_And_Verify_Isolated
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${STABILITY_TIMEOUT_ISOLATED}    3s    CsCommon.Verify_Singleton_Constant_During_Isolation
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    ${STABILITY_TIMEOUT_ISOLATED}
+    ...    3s
+    ...    CsCommon.Verify_Singleton_Constant_During_Isolation
     KarafKeywords.Log_Message_To_Controller_Karaf    Rejoining node${owner}.
     CsCommon.Rejoin_Node_And_Verify_Rejoined
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${STABILITY_TIMEOUT_REJOINED}    3s    CsCommon.Verify_Singleton_Constant_On_Nodes    ${cs_all_indices}    ${CS_CONSTANT_PREFIX}${cs_owner}
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    ${STABILITY_TIMEOUT_REJOINED}
+    ...    3s
+    ...    CsCommon.Verify_Singleton_Constant_On_Nodes
+    ...    ${cs_all_indices}
+    ...    ${CS_CONSTANT_PREFIX}${cs_owner}
index 340538a5a706ecef69f469613d3bf36ab92ebaf2..5dca16f9120889ac2f7a43e2a03edfc942077440 100644 (file)
@@ -1,36 +1,38 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Clean Leader Shutdown
+Documentation       DOMDataBroker testing: Clean Leader Shutdown
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure that applications do not observe disruption when a shard
-...               leader is shut down cleanly. This is performed by having a steady-stream
-...               producer execute operations against the shard and then initiate leader shard
-...               shutdown, then the producer is shut down cleanly.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Clean_Leader_Shutdown_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure that applications do not observe disruption when a shard
+...                 leader is shut down cleanly. This is performed by having a steady-stream
+...                 producer execute operations against the shard and then initiate leader shard
+...                 shutdown, then the producer is shut down cleanly.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Clean_Leader_Shutdown_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Local_Leader_Shutdown
     [Documentation]    Shutdown the leader on the same node as transaction producer.
     local
-
 Restart
     [Documentation]    Restart odl
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Remote_Leader_Shutdown
     [Documentation]    Shutdown the leader on different node as transaction producer.
     remote
index 693a660ae76075e2e29497586af3a563380a2b2f..6363c1f998540c587ff50311c56d08ac360a1f52 100644 (file)
@@ -1,40 +1,42 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Clean Leader Shutdown
+Documentation       DOMDataBroker testing: Clean Leader Shutdown
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure that applications do not observe disruption when a shard
-...               leader is shut down cleanly. This is performed by having a steady-stream
-...               producer execute operations against the shard and then initiate leader shard
-...               shutdown, then the producer is shut down cleanly.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-...               AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown     BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-...               AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Clean_Leader_Shutdown_PrefBasedShard_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure that applications do not observe disruption when a shard
+...                 leader is shut down cleanly. This is performed by having a steady-stream
+...                 producer execute operations against the shard and then initiate leader shard
+...                 shutdown, then the producer is shut down cleanly.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+...                     AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown       BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+...                     AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Clean_Leader_Shutdown_PrefBasedShard_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Local_Leader_Shutdown
     [Documentation]    Shutdown the leader on the same node as transaction producer.
     local
-
 Restart
     [Documentation]    Restart odl.
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Remote_Leader_Shutdown
     [Documentation]    Shutdown the leader on different node as transaction producer.
     remote
index 277cb1b58c729412e5ff8d5399b41328c4a4f92b..8a19a960c475cdf7cbea1ea4df1263a14af0edb3 100644 (file)
@@ -1,54 +1,52 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Client Isolation
+Documentation       DOMDataBroker testing: Client Isolation
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The purpose of this test is to ascertain that the failure modes of
-...               cds-access-client work as expected. This is performed by having a steady
-...               stream of transactions flowing from the frontend and isolating the node hosting
-...               the frontend from the rest of the cluster.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Client_Isolation_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The purpose of this test is to ascertain that the failure modes of
+...                 cds-access-client work as expected. This is performed by having a steady
+...                 stream of transactions flowing from the frontend and isolating the node hosting
+...                 the frontend from the rest of the cluster.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Client_Isolation_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Producer_On_Shard_Leader_Node_ChainedTx
     [Documentation]    Client isolation with producer on shard leader with chained transactions.
     leader    ${CHAINED_TX}
-
 Restart1
     [Documentation]    Restart odl
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Producer_On_Shard_Leader_Node_SimpleTx
     [Documentation]    Client isolation with producer on shard leader with simple transactions.
     leader    ${SIMPLE_TX}
-
 Restart2
     [Documentation]    Restart odl
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Producer_On_Shard_Non_Leader_Node_ChainedTx
     [Documentation]    Client isolation with producer on shard non-leader with chained transactions.
     non-leader    ${CHAINED_TX}
-
 Restart3
     [Documentation]    Restart odl
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Producer_On_Shard_Non_Leader_Node_SimpleTx
     [Documentation]    Client isolation with producer on shard non-leader with simple transactions.
     non-leader    ${SIMPLE_TX}
index fe9e750fc1e10ec453b83709c026d7b8c4872550..a60cbaf0b4c2d6b418634eeed503df6733a68039 100644 (file)
@@ -1,62 +1,60 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Client Isolation
+Documentation       DOMDataBroker testing: Client Isolation
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The purpose of this test is to ascertain that the failure modes of
-...               cds-access-client work as expected. This is performed by having a steady
-...               stream of transactions flowing from the frontend and isolating the node hosting
-...               the frontend from the rest of the cluster.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-...               AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown     BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-...               AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Client_Isolation_PrefBasedShard_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The purpose of this test is to ascertain that the failure modes of
+...                 cds-access-client work as expected. This is performed by having a steady
+...                 stream of transactions flowing from the frontend and isolating the node hosting
+...                 the frontend from the rest of the cluster.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+...                     AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown       BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+...                     AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Client_Isolation_PrefBasedShard_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Producer_On_Shard_Leader_Node_Isolated_Transactions
     [Documentation]    Client isolation with producer on shard leader with isolated transactions flag set.
     leader    ${ISOLATED_TRANS_TRUE}
-
 Restart1
     [Documentation]    Restart odl.
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Producer_On_Shard_Leader_Node_Nonisolated_Transactions
     [Documentation]    Client isolation with producer on shard leader with isolated transactions flag unset.
     leader    ${ISOLATED_TRANS_FALSE}
-
 Restart2
     [Documentation]    Restart odl.
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Producer_On_Shard_Non_Leader_Node_Isolated_Transactions
     [Documentation]    Client isolation with producer on shard non-leader with isolated transactions flag set.
     non-leader    ${ISOLATED_TRANS_TRUE}
-
 Restart3
     [Documentation]    Restart odl
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Producer_On_Shard_Non_Leader_Node_Nonisolated_Transactions
     [Documentation]    Client isolation with producer on shard non-leader with isolated transactions flag unset.
     non-leader    ${ISOLATED_TRANS_FALSE}
index 4ad8c56e3ce4ad6bdeac027122e8a0781c43f007..ca8bcdb4d9ff38658d49d43901aaf32cdfe20787 100644 (file)
@@ -1,37 +1,42 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Module based shards sanity suite
+Documentation       DOMDataBroker testing: Module based shards sanity suite
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to call several basic rpc form ClusterAdmin.robot and
-...               MdsalLowlevel.robot to ensute that those rpcs can be safely used in
-...               other suites.
-...               It also verify the ability of the odl-controller-test-app to perform
-...               several activities.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Library           ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
-Resource          ${CURDIR}/../../../libraries/ClusterAdmin.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to call several basic rpc form ClusterAdmin.robot and
+...                 MdsalLowlevel.robot to ensute that those rpcs can be safely used in
+...                 other suites.
+...                 It also verify the ability of the odl-controller-test-app to perform
+...                 several activities.
+
+Library             SSHLibrary
+Library             ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
+Resource            ${CURDIR}/../../../libraries/ClusterAdmin.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-${SHARD_NAME}     default
-${SHARD_TYPE}     config
-${TRANSACTION_RATE_1K}    ${1000}
-${DURATION}       ${60}
-${SIMPLE_TX}      ${False}
-${CHAINED_TX}     ${True}
-${MODULE_SHARD_PREFIX}    prefix-
+${SHARD_NAME}               default
+${SHARD_TYPE}               config
+${TRANSACTION_RATE_1K}      ${1000}
+${DURATION}                 ${60}
+${SIMPLE_TX}                ${False}
+${CHAINED_TX}               ${True}
+${MODULE_SHARD_PREFIX}      prefix-
+
 
 *** Test Cases ***
 Get_Shard_Role
@@ -44,7 +49,11 @@ Get_Shard_Role
 Subscribe_Listener_To_Leader
     [Documentation]    Subscribe listener to leader.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     MdsalLowlevel.Subscribe_Dtcl    ${leader}
     BuiltIn.Sleep    5s
     ${copy_matches} =    MdsalLowlevel.Unsubscribe_Dtcl_No_Tx    ${leader}
@@ -53,7 +62,11 @@ Subscribe_Listener_To_Leader
 Subscribe_Listener_To_Follower
     [Documentation]    Subscribe listener to follower.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower_idx} =    Collections.Get_From_List    ${follower_list}    ${0}
     MdsalLowlevel.Subscribe_Dtcl    ${follower_idx}
     BuiltIn.Sleep    5s
@@ -65,11 +78,22 @@ Make_Leader_Local
     ${shard_name} =    BuiltIn.Set_Variable    ${SHARD_NAME}
     ${shard_type} =    BuiltIn.Set_Variable    ${SHARD_TYPE}
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower1} =    Collections.Get_From_List    ${follower_list}    ${0}
     ClusterAdmin.Make_Leader_Local    ${follower1}    ${shard_name}    ${shard_type}
-    ${leader}    ${follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Verify_Shard_Leader_Elected    ${shard_name}
-    ...    ${shard_type}    ${True}    ${old_leader}    member_index_list=${EMPTY}
+    ${leader}    ${follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Verify_Shard_Leader_Elected
+    ...    ${shard_name}
+    ...    ${shard_type}
+    ...    ${True}
+    ...    ${old_leader}
+    ...    member_index_list=${EMPTY}
     BuiltIn.Should_Be_Equal_As_Numbers    ${follower1}    ${leader}
 
 Remove_Leader_Shard_Replica_And_Add_It_Back
@@ -77,14 +101,42 @@ Remove_Leader_Shard_Replica_And_Add_It_Back
     ${shard_name} =    BuiltIn.Set_Variable    ${SHARD_NAME}
     ${shard_type} =    BuiltIn.Set_Variable    ${SHARD_TYPE}
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}    shard_type=${shard_type}    member_index_list=${all_indices}    verify_restconf=False
+    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ClusterAdmin.Remove_Shard_Replica    ${old_leader}    ${shard_name}    member-${old_leader}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    DdbCommons.Verify_Shard_Replica_Not_Present    ${old_leader}    ${shard_name}    ${shard_type}
-    ${actual_leader}    ${actual_follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}
-    ...    verify_restconf=False    shard_type=${shard_type}    member_index_list=${follower_list}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    DdbCommons.Verify_Shard_Replica_Not_Present
+    ...    ${old_leader}
+    ...    ${shard_name}
+    ...    ${shard_type}
+    ${actual_leader}    ${actual_follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}
+    ...    verify_restconf=False
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${follower_list}
     BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_leader}    ${actual_leader}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterAdmin.Add_Shard_Replica    ${old_leader}    ${shard_name}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}    shard_type=${shard_type}    member_index_list=${all_indices}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterAdmin.Add_Shard_Replica
+    ...    ${old_leader}
+    ...    ${shard_name}
+    ...    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
     ...    verify_restconf=False
 
 Remove_Follower_Shard_Replica_And_Add_It_Back
@@ -92,23 +144,60 @@ Remove_Follower_Shard_Replica_And_Add_It_Back
     ${shard_name} =    BuiltIn.Set_Variable    ${SHARD_NAME}
     ${shard_type} =    BuiltIn.Set_Variable    ${SHARD_TYPE}
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}    shard_type=${shard_type}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower1} =    Collections.Get_From_List    ${follower_list}    ${0}
     ClusterAdmin.Remove_Shard_Replica    ${follower1}    ${shard_name}    member-${follower1}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    DdbCommons.Verify_Shard_Replica_Not_Present    ${follower1}    ${shard_name}    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    DdbCommons.Verify_Shard_Replica_Not_Present
+    ...    ${follower1}
+    ...    ${shard_name}
+    ...    ${shard_type}
     ${new_indices_list} =    ClusterManagement.List_Indices_Minus_Member    ${follower1}
-    ClusterManagement.Verify_Shard_Leader_Elected    ${shard_name}    ${shard_type}    ${False}    ${leader}    member_index_list=${new_indices_list}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterAdmin.Add_Shard_Replica    ${follower1}    ${shard_name}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}    shard_type=${shard_type}    member_index_list=${all_indices}
+    ClusterManagement.Verify_Shard_Leader_Elected
+    ...    ${shard_name}
+    ...    ${shard_type}
+    ...    ${False}
+    ...    ${leader}
+    ...    member_index_list=${new_indices_list}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterAdmin.Add_Shard_Replica
+    ...    ${follower1}
+    ...    ${shard_name}
+    ...    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
     ...    verify_restconf=False
 
 Write_Transactions_One_Node_Leader
     [Documentation]    Write transactions.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${leader_idx_as_list} =    BuiltIn.Create_List    ${leader}
     ${leader_ip_as_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${leader_idx_as_list}
-    MdsalLowlevelPy.Start_Write_Transactions_On_Nodes    ${leader_ip_as_list}    ${leader_idx_as_list}    ${MODULE_SHARD_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}    chained_flag=${CHAINED_TX}
+    MdsalLowlevelPy.Start_Write_Transactions_On_Nodes
+    ...    ${leader_ip_as_list}
+    ...    ${leader_idx_as_list}
+    ...    ${MODULE_SHARD_PREFIX}
+    ...    ${DURATION}
+    ...    ${TRANSACTION_RATE_1K}
+    ...    chained_flag=${CHAINED_TX}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
     FOR    ${resp}    IN    @{resp_list}
         TemplatedRequests.Check_Status_Code    ${resp}[2]
@@ -117,11 +206,21 @@ Write_Transactions_One_Node_Leader
 Write_Transactions_One_Node_Follower
     [Documentation]    Write transactions.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower_idx} =    Collections.Get_From_List    ${follower_list}    ${0}
     ${follower_idx_as_list} =    BuiltIn.Create_List    ${follower_idx}
     ${follower_ip_as_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${follower_idx_as_list}
-    MdsalLowlevelPy.Start_Write_Transactions_On_Nodes    ${follower_ip_as_list}    ${follower_idx_as_list}    ${MODULE_SHARD_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}    chained_flag=${CHAINED_TX}
+    MdsalLowlevelPy.Start_Write_Transactions_On_Nodes
+    ...    ${follower_ip_as_list}
+    ...    ${follower_idx_as_list}
+    ...    ${MODULE_SHARD_PREFIX}
+    ...    ${DURATION}
+    ...    ${TRANSACTION_RATE_1K}
+    ...    chained_flag=${CHAINED_TX}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
     FOR    ${resp}    IN    @{resp_list}
         TemplatedRequests.Check_Status_Code    ${resp}[2]
@@ -131,7 +230,13 @@ Write_Transactions_All_Nodes
     [Documentation]    Write transactions.
     ${all_indices} =    ClusterManagement.List_All_Indices
     ${all_ip_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${all_indices}
-    MdsalLowlevelPy.Start_Write_Transactions_On_Nodes    ${all_ip_list}    ${all_indices}    ${MODULE_SHARD_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}    chained_flag=${CHAINED_TX}
+    MdsalLowlevelPy.Start_Write_Transactions_On_Nodes
+    ...    ${all_ip_list}
+    ...    ${all_indices}
+    ...    ${MODULE_SHARD_PREFIX}
+    ...    ${DURATION}
+    ...    ${TRANSACTION_RATE_1K}
+    ...    chained_flag=${CHAINED_TX}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
     FOR    ${resp}    IN    @{resp_list}
         TemplatedRequests.Check_Status_Code    ${resp}[2]
index 6aea55ad0c7e5699ad313b44660611548f973c57..8d4961aecd717f82211fac846adb3a655763c862 100644 (file)
@@ -1,39 +1,44 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Module based shards sanity suite
+Documentation       DOMDataBroker testing: Module based shards sanity suite
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to call several basic rpc form ClusterAdmin.robot and
-...               MdsalLowlevel.robot to ensute that those rpcs can be safely used in
-...               other suites.
-...               It also verify the ability of the odl-controller-test-app to perform
-...               several activities.
-Suite Setup       BuiltIn.Run_Keywords    SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-...               AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Suite Teardown    BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-...               AND    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Library           ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
-Resource          ${CURDIR}/../../../libraries/ClusterAdmin.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to call several basic rpc form ClusterAdmin.robot and
+...                 MdsalLowlevel.robot to ensute that those rpcs can be safely used in
+...                 other suites.
+...                 It also verify the ability of the odl-controller-test-app to perform
+...                 several activities.
+
+Library             SSHLibrary
+Library             ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
+Resource            ${CURDIR}/../../../libraries/ClusterAdmin.robot
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         BuiltIn.Run_Keywords    SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+...                     AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Suite Teardown      BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+...                     AND    SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-${PREF_BASED_SHARD}    id-ints
-${SHARD_TYPE}     config
-${TRANSACTION_RATE_1K}    ${1000}
-${DURATION}       ${30}
-${SIMPLE_TX}      ${False}
-${CHAINED_TX}     ${True}
-${ID_PREFIX}      prefix-
+${PREF_BASED_SHARD}         id-ints
+${SHARD_TYPE}               config
+${TRANSACTION_RATE_1K}      ${1000}
+${DURATION}                 ${30}
+${SIMPLE_TX}                ${False}
+${CHAINED_TX}               ${True}
+${ID_PREFIX}                prefix-
+
 
 *** Test Cases ***
 Get_Prefix_Shard_Role
@@ -46,7 +51,11 @@ Get_Prefix_Shard_Role
 Subscribe_Listener_To_Leader
     [Documentation]    Subscribe listener to leader.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     MdsalLowlevel.Subscribe_Ddtl    ${leader}
     BuiltIn.Sleep    5s
     ${copy_matches} =    MdsalLowlevel.Unsubscribe_Ddtl_No_Tx    ${leader}
@@ -55,7 +64,11 @@ Subscribe_Listener_To_Leader
 Subscribe_Listener_To_Follower
     [Documentation]    Subscribe listener to follower.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower_idx} =    Collections.Get_From_List    ${follower_list}    ${0}
     MdsalLowlevel.Subscribe_Ddtl    ${follower_idx}
     BuiltIn.Sleep    5s
@@ -67,11 +80,22 @@ Become_Prefix_Leader
     ${shard_name} =    BuiltIn.Set_Variable    ${PREF_BASED_SHARD}
     ${shard_type} =    BuiltIn.Set_Variable    ${SHARD_TYPE}
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!    shard_type=${shard_type}    member_index_list=${all_indices}    verify_restconf=False
+    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}!!
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower1} =    Collections.Get_From_List    ${follower_list}    ${0}
     MdsalLowlevel.Become_Prefix_Leader    ${follower1}    ${shard_name}
-    ${leader}    ${follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Verify_Shard_Leader_Elected    ${shard_name}!!
-    ...    ${shard_type}    ${True}    ${old_leader}    member_index_list=${EMPTY}
+    ${leader}    ${follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Verify_Shard_Leader_Elected
+    ...    ${shard_name}!!
+    ...    ${shard_type}
+    ...    ${True}
+    ...    ${old_leader}
+    ...    member_index_list=${EMPTY}
     BuiltIn.Should_Be_Equal_As_Numbers    ${follower1}    ${leader}
 
 Remove_Leader_Prefix_Shard_Replica_And_Add_It_Back
@@ -79,14 +103,42 @@ Remove_Leader_Prefix_Shard_Replica_And_Add_It_Back
     ${shard_name} =    BuiltIn.Set_Variable    ${PREF_BASED_SHARD}
     ${shard_type} =    BuiltIn.Set_Variable    ${SHARD_TYPE}
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!    shard_type=${shard_type}    member_index_list=${all_indices}    verify_restconf=False
+    ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}!!
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ClusterAdmin.Remove_Prefix_Shard_Replica    ${old_leader}    ${shard_name}    member-${old_leader}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    Verify_Shard_Replica_Not_Present    ${old_leader}    ${shard_name}!!    ${shard_type}
-    ${actual_leader}    ${actual_follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!
-    ...    verify_restconf=False    shard_type=${shard_type}    member_index_list=${follower_list}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    Verify_Shard_Replica_Not_Present
+    ...    ${old_leader}
+    ...    ${shard_name}!!
+    ...    ${shard_type}
+    ${actual_leader}    ${actual_follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}!!
+    ...    verify_restconf=False
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${follower_list}
     BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_leader}    ${actual_leader}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterAdmin.Add_Prefix_Shard_Replica    ${old_leader}    ${shard_name}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!    shard_type=${shard_type}    member_index_list=${all_indices}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterAdmin.Add_Prefix_Shard_Replica
+    ...    ${old_leader}
+    ...    ${shard_name}
+    ...    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}!!
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
     ...    verify_restconf=False
 
 Remove_Follower_Prefix_Shard_Replica_And_Add_It_Back
@@ -94,23 +146,59 @@ Remove_Follower_Prefix_Shard_Replica_And_Add_It_Back
     ${shard_name} =    BuiltIn.Set_Variable    ${PREF_BASED_SHARD}
     ${shard_type} =    BuiltIn.Set_Variable    ${SHARD_TYPE}
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!    shard_type=${shard_type}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}!!
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower1} =    Collections.Get_From_List    ${follower_list}    ${0}
     ClusterAdmin.Remove_Prefix_Shard_Replica    ${follower1}    ${shard_name}    member-${follower1}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    DdbCommons.Verify_Shard_Replica_Not_Present    ${follower1}    ${shard_name}!!    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    DdbCommons.Verify_Shard_Replica_Not_Present
+    ...    ${follower1}
+    ...    ${shard_name}!!
+    ...    ${shard_type}
     ${new_indices_list} =    ClusterManagement.List_Indices_Minus_Member    ${follower1}
-    ClusterManagement.Verify_Shard_Leader_Elected    ${shard_name}!!    ${shard_type}    ${False}    ${leader}    member_index_list=${new_indices_list}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterAdmin.Add_Prefix_Shard_Replica    ${follower1}    ${shard_name}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!    shard_type=${shard_type}    member_index_list=${all_indices}
+    ClusterManagement.Verify_Shard_Leader_Elected
+    ...    ${shard_name}!!
+    ...    ${shard_type}
+    ...    ${False}
+    ...    ${leader}
+    ...    member_index_list=${new_indices_list}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterAdmin.Add_Prefix_Shard_Replica
+    ...    ${follower1}
+    ...    ${shard_name}
+    ...    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    5s
+    ...    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${shard_name}!!
+    ...    shard_type=${shard_type}
+    ...    member_index_list=${all_indices}
     ...    verify_restconf=False
 
 Produce_Transactions_One_Node_Leader
     [Documentation]    Produce transactions.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${leader_idx_as_list} =    BuiltIn.Create_List    ${leader}
     ${leader_ip_as_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${leader_idx_as_list}
-    MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes    ${leader_ip_as_list}    ${leader_idx_as_list}    ${ID_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}
+    MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes
+    ...    ${leader_ip_as_list}
+    ...    ${leader_idx_as_list}
+    ...    ${ID_PREFIX}
+    ...    ${DURATION}
+    ...    ${TRANSACTION_RATE_1K}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
     FOR    ${resp}    IN    @{resp_list}
         TemplatedRequests.Check_Status_Code    ${resp}[2]
@@ -119,11 +207,20 @@ Produce_Transactions_One_Node_Leader
 Produce_Transactions_One_Node_Follower
     [Documentation]    Produce transactions.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
+    ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard
+    ...    shard_name=${SHARD_NAME}
+    ...    shard_type=${SHARD_TYPE}
+    ...    member_index_list=${all_indices}
+    ...    verify_restconf=False
     ${follower_idx} =    Collections.Get_From_List    ${follower_list}    ${0}
     ${follower_idx_as_list} =    BuiltIn.Create_List    ${follower_idx}
     ${follower_ip_as_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${follower_idx_as_list}
-    MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes    ${follower_ip_as_list}    ${follower_idx_as_list}    ${ID_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}
+    MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes
+    ...    ${follower_ip_as_list}
+    ...    ${follower_idx_as_list}
+    ...    ${ID_PREFIX}
+    ...    ${DURATION}
+    ...    ${TRANSACTION_RATE_1K}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
     FOR    ${resp}    IN    @{resp_list}
         TemplatedRequests.Check_Status_Code    ${resp}[2]
@@ -133,7 +230,12 @@ Produce_Transactions
     [Documentation]    Produce transactions.
     ${all_indices} =    ClusterManagement.List_All_Indices
     ${all_ip_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${all_indices}
-    MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes    ${all_ip_list}    ${all_indices}    ${ID_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}
+    MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes
+    ...    ${all_ip_list}
+    ...    ${all_indices}
+    ...    ${ID_PREFIX}
+    ...    ${DURATION}
+    ...    ${TRANSACTION_RATE_1K}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
     FOR    ${resp}    IN    @{resp_list}
         TemplatedRequests.Check_Status_Code    ${resp}[2]
index e828e90f5c46e530f989f051291865f3761f6ca2..57b94dc3c7af0771c5489136cad63a6c929e5084 100644 (file)
@@ -1,45 +1,45 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Explicit Leader Movement
+Documentation       DOMDataBroker testing: Explicit Leader Movement
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure that applications do not observe disruption when a shard
-...               leader is moved as the result of explicit application request. This is performed
-...               by having a steady-stream producer execute operations against the shard and then
-...               initiate shard leader shutdown, then the producer is shut down cleanly.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Explicit_Leader_Movement_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure that applications do not observe disruption when a shard
+...                 leader is moved as the result of explicit application request. This is performed
+...                 by having a steady-stream producer execute operations against the shard and then
+...                 initiate shard leader shutdown, then the producer is shut down cleanly.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Explicit_Leader_Movement_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Local_To_Remote_Movement
     [Documentation]    Leader moves from local to remote node during transaction producing.
     local    remote
-
 Restart1
     [Documentation]    Restart odl
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Remote_To_Remote_Movement
     [Documentation]    Leader moves from one remote to other remote node during transaction producing.
     remote    remote
-
 Restart2
     [Documentation]    Restart odl
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Remote_To_Local_Movement
     [Documentation]    Leader moves from remote to local node during transaction producing.
     remote    local
index 1584307ca66ab824a553e94156828ade5475c722..6a87383844e4cc50632899894ab37b3732d7fad4 100644 (file)
@@ -1,35 +1,44 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Explicit Leader Movement
+Documentation       DOMDataBroker testing: Explicit Leader Movement
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure that applications do not observe disruption when a shard
-...               leader is moved as the result of explicit application request. This is performed
-...               by having a steady-stream producer execute operations against the shard and then
-...               initiate shard leader shutdown, then the producer is shut down cleanly.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure that applications do not observe disruption when a shard
+...                 leader is moved as the result of explicit application request. This is performed
+...                 by having a steady-stream producer execute operations against the shard and then
+...                 initiate shard leader shutdown, then the producer is shut down cleanly.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
 # TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS}    82800
-@{MOVEMENT_DIRECTION_LIST}    remote    local    remote
+${LONGEVITY_TEST_DURATION_IN_SECS}      82800
+@{MOVEMENT_DIRECTION_LIST}              remote    local    remote
+
 
 *** Test Cases ***
 Explicit_Leader_Movement_Test
     [Documentation]    Leader move for 24 hours from one node to another
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${LONGEVITY_TEST_DURATION_IN_SECS}    5s    Test_Scenario
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    ${LONGEVITY_TEST_DURATION_IN_SECS}
+    ...    5s
+    ...    Test_Scenario
+
 
 *** Keywords ***
 Test_Scenario
index 4474a81fcf3413cbc7353031ab83b4ec7e502826..b8ecdcd7b6bb7a31663c1958fd97ded48a7ccfde 100644 (file)
@@ -1,51 +1,51 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Explicit Leader Movement
+Documentation       DOMDataBroker testing: Explicit Leader Movement
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure that applications do not observe disruption when a shard
-...               leader is moved as the result of explicit application request. This is performed
-...               by having a steady-stream producer execute operations against the shard and then
-...               initiate shard leader shutdown, then the producer is shut down cleanly.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-...               AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown     BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-...               AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Explicit_Leader_Movement_PrefBasedShard_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure that applications do not observe disruption when a shard
+...                 leader is moved as the result of explicit application request. This is performed
+...                 by having a steady-stream producer execute operations against the shard and then
+...                 initiate shard leader shutdown, then the producer is shut down cleanly.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+...                     AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown       BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+...                     AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Explicit_Leader_Movement_PrefBasedShard_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Local_To_Remote_Movement
     [Documentation]    Leader moves from local to remote node during transaction producing.
     local    remote
-
 Restart1
     [Documentation]    Restart odl.
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Remote_To_Remote_Movement
     [Documentation]    Leader moves from one remote to other remote node during transaction producing.
     remote    remote
-
 Restart2
     [Documentation]    Restart odl.
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Remote_To_Local_Movement
     [Documentation]    Leader moves from remote to local node during transaction producing.
     remote    local
index 8ad2c0454e9f690e1cf43ad3fab6f8b15b933eab..e22216d467d94c8551943eb93afbc161de074ba5 100644 (file)
@@ -1,35 +1,37 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Leader Isolation
+Documentation       DOMDataBroker testing: Leader Isolation
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
-...               simulating either a network partition, or a prolonged GC pause.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Leader_Isolation_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
+...                 simulating either a network partition, or a prolonged GC pause.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Leader_Isolation_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Healing_Within_Request_Timeout
     [Documentation]    The isolated node (leader) is rejoined as soon as new leader is elected and
     ...    and within request timeout.
     ${HEAL_WITHIN_REQUEST_TIMEOUT}
-
 Restart
     [Documentation]    Restart odl
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Healing_After_Request_Timeout
     [Documentation]    The isolated node (leader) is rejoined after request timeout.
     ${HEAL_AFTER_REQUEST_TIMEOUT}
index 8665a8c2832195b3696a102444f753237f9b61be..9e0c1c350116e695720df06be8e12044c455ff7d 100644 (file)
@@ -1,38 +1,40 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Leader Isolation
+Documentation       DOMDataBroker testing: Leader Isolation
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
-...               simulating either a network partition, or a prolonged GC pause.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-...               AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown     BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-...               AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Leader_Isolation_PrefBasedShard_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
+...                 simulating either a network partition, or a prolonged GC pause.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+...                     AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown       BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+...                     AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Leader_Isolation_PrefBasedShard_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Healing_Within_Request_Timeout
     [Documentation]    The isolated node (leader) is rejoined as soon as new leader is elected and
     ...    and within request timeout.
     ${HEAL_WITHIN_REQUEST_TIMEOUT}
-
 Restart
     [Documentation]    Restart odl.
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Healing_After_Request_Timeout
     [Documentation]    The isolated node (leader) is rejoined after request timeout.
     ${HEAL_AFTER_REQUEST_TIMEOUT}
index 050f73d16fc257041bea3af65a052155b76cd43a..cea35d724b4efbb664ff7c61808eeda5c5f34ebb 100644 (file)
@@ -1,44 +1,44 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Listener Stability for module-based shards
+Documentation       DOMDataBroker testing: Listener Stability for module-based shards
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure listeners do no observe disruption when the leader moves.
-...               This is performed by having a steady stream of transactions being observed by
-...               the listeners and having the leader move.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Listener_Stability_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure listeners do no observe disruption when the leader moves.
+...                 This is performed by having a steady stream of transactions being observed by
+...                 the listeners and having the leader move.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Listener_Stability_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Move_Leader_From_Listener_Local_To_Remote
     [Documentation]    Listener runs on leader node when leader is moved to remote node.
     local    remote
-
 Restart_1
     [Documentation]    Restart odl.
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Move_Leader_From_Listener_Remote_To_Other_Remote
     [Documentation]    Listener runs on follower node when leader is moved to the third node.
     remote    remote
-
 Restart_2
     [Documentation]    Restart odl.
     [Template]    ${EMPTY}
     DdbCommons.Restart_Test_Templ
-
 Move_Leader_From_Listener_Remote_To_Local
     [Documentation]    Listener runs on follower node when leader is moved to local node.
     remote    local
index 5099623fa2840e85d4e6fc939b29ef9dd3c0ddf4..b2955f551a08c7c888b603c953ddf521b443b1f6 100644 (file)
@@ -1,50 +1,50 @@
 *** Settings ***
-Documentation     DOMDataBroker testing: Listener Stability for prefix-based shards
+Documentation       DOMDataBroker testing: Listener Stability for prefix-based shards
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The goal is to ensure listeners do no observe disruption when the leader moves.
-...               This is performed by having a steady stream of transactions being observed by
-...               the listeners and having the leader move.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-...               AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown     BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-...               AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DdbCommons.Listener_Stability_PrefBasedShard_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The goal is to ensure listeners do no observe disruption when the leader moves.
+...                 This is performed by having a steady stream of transactions being observed by
+...                 the listeners and having the leader move.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          BuiltIn.Run_Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+...                     AND    DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown       BuiltIn.Run_Keywords    DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+...                     AND    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DdbCommons.Listener_Stability_PrefBasedShard_Test_Templ
+
+Default Tags        critical
+
 
 *** Test Cases ***
 Move_Leader_From_Listener_Local_To_Remote
     [Documentation]    Listener runs on leader node when leader is moved to remote node.
     local    remote
-
 Restart_1
     [Documentation]    Restart odl.
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Move_Leader_From_Listener_Remote_To_Other_Remote
     [Documentation]    Listener runs on follower node when leader is moved to the third node.
     remote    remote
-
 Restart_2
     [Documentation]    Restart odl.
-    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     [Template]    ${EMPTY}
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     DdbCommons.Restart_Test_Templ
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
 Move_Leader_From_Listener_Remote_To_Local
     [Documentation]    Listener runs on follower node when leader is moved to local node.
     remote    local
index 35ce3ac964020a50dfef524f33798b399fbe8379..b5a14163aa39d2a15adb89c836a0e61bdd8892ce 100644 (file)
@@ -1,26 +1,31 @@
 *** Settings ***
-Documentation     Unset tell-based protocol usage
+Documentation       Unset tell-based protocol usage
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/ShardStability.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+...                 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.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/ShardStability.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+
+Default Tags        critical
+
 
 *** Variables ***
 ${DATASTORE_CFG}    /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
 
+
 *** Test Cases ***
 Stop_All_Members
     [Documentation]    Stop every odl node.
@@ -35,21 +40,39 @@ Unset_Tell_Based_Protocol_Usage
 Start_All_And_Sync
     [Documentation]    Start each member and wait for sync.
     ClusterManagement.Start_Members_From_List_Or_All
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    10s    ClusterManagement.Run_Bash_Command_On_List_Or_All    netstat -punta
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    10s
+    ...    ClusterManagement.Run_Bash_Command_On_List_Or_All
+    ...    netstat -punta
     ${index_list} =    List_Indices_Or_All
     FOR    ${index}    IN    @{index_list}
-        ${output} =    ClusterManagement.Check_Bash_Command_On_Member    command=sudo netstat -punta | grep 2550 | grep LISTEN    member_index=${index}
+        ${output} =    ClusterManagement.Check_Bash_Command_On_Member
+        ...    command=sudo netstat -punta | grep 2550 | grep LISTEN
+        ...    member_index=${index}
         ${listening} =    Get Match    ${output}    LISTEN
-        BuiltIn.Run Keyword If    '${listening}' == 'None'    ClusterManagement.Check_Bash_Command_On_Member    command=pid=$(grep org.apache.karaf.main.Main | grep -v grep | tr -s ' ' | cut -f2 -d' '); sudo /usr/lib/jvm/java-1.8.0/bin/jstack -l ${pid}    member_index=${index}
+        IF    '${listening}' == 'None'
+            ClusterManagement.Check_Bash_Command_On_Member
+            ...    command=pid=$(grep org.apache.karaf.main.Main | grep -v grep | tr -s ' ' | cut -f2 -d' '); sudo /usr/lib/jvm/java-1.8.0/bin/jstack -l ${pid}
+            ...    member_index=${index}
+        END
     END
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}    verify_restconf=True
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    60s
+    ...    10s
+    ...    ShardStability.Shards_Stability_Get_Details
+    ...    ${DEFAULT_SHARD_LIST}
+    ...    verify_restconf=True
+
 
 *** Keywords ***
 Get Match
-    [Arguments]    ${text}    ${regexp}    ${index}=0
     [Documentation]    Wrapper around String.Get Regexp Matches to return None if not found or the first match if found.
+    [Arguments]    ${text}    ${regexp}    ${index}=0
     @{matches} =    String.Get Regexp Matches    ${text}    ${regexp}
     ${matches_length} =    BuiltIn.Get Length    ${matches}
     BuiltIn.Set Suite Variable    ${OS_MATCH}    None
-    BuiltIn.Run Keyword If    ${matches_length} > ${index}    BuiltIn.Set Suite Variable    ${OS_MATCH}    ${matches}[${index}]
-    [Return]    ${OS_MATCH}
+    IF    ${matches_length} > ${index}
+        BuiltIn.Set Suite Variable    ${OS_MATCH}    ${matches}[${index}]
+    END
+    RETURN    ${OS_MATCH}
index 90ce3bf37bf2fc8e4ce22bebe3d8786f7770e86f..994605543214203cc4fd73bbc9449d64eca1a5aa 100644 (file)
@@ -1,26 +1,31 @@
 *** Settings ***
-Documentation     Set tell-based protocol usage
+Documentation       Set tell-based protocol usage
 ...
-...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+...                 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
+...                 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, un-comment usage of tell-based protocol in
-...               config file (means make it true) and starts all nodes again.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/ShardStability.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+...                 Suite stops all odl nodes, un-comment usage of tell-based protocol in
+...                 config file (means make it true) and starts all nodes again.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/ShardStability.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+
+Default Tags        critical
+
 
 *** Variables ***
 ${DATASTORE_CFG}    /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
 
+
 *** Test Cases ***
 Stop_All_Members
     [Documentation]    Stop every odl node.
@@ -35,5 +40,10 @@ Set_Tell_Based_Protocol_Usage
 Start_All_And_Sync
     [Documentation]    Start each member and wait for sync.
     ClusterManagement.Start_Members_From_List_Or_All
-    BuiltIn.Wait_Until_Keyword_Succeeds    300s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}    verify_restconf=True
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    300s
+    ...    10s
+    ...    ShardStability.Shards_Stability_Get_Details
+    ...    ${DEFAULT_SHARD_LIST}
+    ...    verify_restconf=True
     ClusterManagement.Run_Bash_Command_On_List_Or_All    ps -ef | grep java
index 54701b84074bde5aa2a3c6b494db3c7025d48272..6d46d446fc493475296c3e84e9daf319e34b1f4c 100644 (file)
@@ -1,36 +1,39 @@
 *** Settings ***
-Documentation     DOMNotificationBroker testing: No-loss rate
+Documentation       DOMNotificationBroker testing: No-loss rate
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               Provides routing of YANG notifications from publishers to subscribers.
-...               The purpose of this test is to determine the broker can forward messages without
-...               loss. We do this on a single-node setup by incrementally adding publishers and
-...               subscribers.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DnbCommons.Dom_Notification_Broker_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DnbCommons.robot
-Resource          ${CURDIR}/../../../libraries/MdsalLowlevel.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 Provides routing of YANG notifications from publishers to subscribers.
+...                 The purpose of this test is to determine the broker can forward messages without
+...                 loss. We do this on a single-node setup by incrementally adding publishers and
+...                 subscribers.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DnbCommons.robot
+Resource            ${CURDIR}/../../../libraries/MdsalLowlevel.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DnbCommons.Dom_Notification_Broker_Test_Templ
+
+Default Tags        critical
+
 
 *** Variables ***
-${TC_DURATION_IN_SECONDS}    ${300}
+${TC_DURATION_IN_SECONDS}       ${300}
+
 
 *** Test Cases ***
 Notifications_rate_5k
     ${5000}    ${TC_DURATION_IN_SECONDS}
-
 Notifications_rate_20k
     ${20000}    ${TC_DURATION_IN_SECONDS}
-
 Notifications_rate_60k
     ${60000}    ${TC_DURATION_IN_SECONDS}
index a025231354595eb1ff0a941a557dbe26160e4985..bbc404245534395c185661bbd3368e67582efd87 100644 (file)
@@ -1,30 +1,35 @@
 *** Settings ***
-Documentation     DOMNotificationBroker longevity testing: No-loss rate
+Documentation       DOMNotificationBroker longevity testing: No-loss rate
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               Provides routing of YANG notifications from publishers to subscribers.
-...               The purpose of this test is to determine the broker can forward messages without
-...               loss. We do this on a single-node setup by incrementally adding publishers and
-...               subscribers.
-Suite Setup       SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Test Template     DnbCommons.Dom_Notification_Broker_Test_Templ
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DnbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 Provides routing of YANG notifications from publishers to subscribers.
+...                 The purpose of this test is to determine the broker can forward messages without
+...                 loss. We do this on a single-node setup by incrementally adding publishers and
+...                 subscribers.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DnbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template       DnbCommons.Dom_Notification_Broker_Test_Templ
+
+Default Tags        critical
+
 
 *** Variables ***
 # TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS}    82800
-${NOTIFICATION_RATE}    ${60000}
+${LONGEVITY_TEST_DURATION_IN_SECS}      82800
+${NOTIFICATION_RATE}                    ${60000}
+
 
 *** Test Cases ***
 Notifications_longevity
index c14c1e354f12f33bf20ba11b5da7a10bf5461760..b757c9dc0b986897641992f2e94ef5288fa549eb 100644 (file)
@@ -1,28 +1,33 @@
 *** Settings ***
-Documentation     DOMRpcBroker testing: RPC Action Provider Partition And Heal
+Documentation       DOMRpcBroker testing: RPC Action Provider Partition And Heal
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               This tests establishes that the RPC service for actions operates correctly
-...               when faced with node failures.
-...               This suite supports more than three node cluster setup too.
-Suite Setup       Setup_Kw
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 This tests establishes that the RPC service for actions operates correctly
+...                 when faced with node failures.
+...                 This suite supports more than three node cluster setup too.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Kw
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-@{INSTALLED_RPC_MEMEBER_IDX_LIST}    ${1}    ${2}
-${TESTED_MEMBER_WITHOUT_RPC_IDX}    ${3}
+@{INSTALLED_RPC_MEMEBER_IDX_LIST}       ${1}    ${2}
+${TESTED_MEMBER_WITHOUT_RPC_IDX}        ${3}
+
 
 *** Test Cases ***
 Register_Rpc_On_Two_Nodes
@@ -56,12 +61,16 @@ Invoke_Rpc_On_Each_Node_Again
     [Documentation]    Invoke rpc get-contexted-constant on every node. When requested on the node with
     ...    local instance the local value is expected. If invoked on the node with no local instance, any remote
     ...    value is expected.
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    20s    3s    DrbCommons.Verify_Contexted_Constant_On_Active_Nodes
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    20s
+    ...    3s
+    ...    DrbCommons.Verify_Contexted_Constant_On_Active_Nodes
 
 Unregister_Rpc_On_Each_Node
     [Documentation]    Inregister rpc on both nodes.
     DrbCommons.Unregister_Action_On_Nodes    ${INSTALLED_RPC_MEMEBER_IDX_LIST}
 
+
 *** Keywords ***
 Setup_Kw
     [Documentation]    Setup keyword. Create ${possible_constants} list with possible variables of remote constants.
index 2274a1f18b84e780cd528d59e58fd5c780b8ea81..ee9abff3a149cd1e199c4d87d839e6a12126bd53 100644 (file)
@@ -1,27 +1,32 @@
 *** Settings ***
-Documentation     DOMRpcBroker testing: Action Provider Precedence
+Documentation       DOMRpcBroker testing: Action Provider Precedence
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The aim is to establish that remote action implementations have lower priority
-...               than local ones, which is to say that any movement of actions on remote nodes
-...               does not affect routing as long as a local implementation is available.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The aim is to establish that remote action implementations have lower priority
+...                 than local ones, which is to say that any movement of actions on remote nodes
+...                 does not affect routing as long as a local implementation is available.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
 ${UNREGISTERED_RPC_NODE}    ${1}
 
+
 *** Test Cases ***
 Register_Rpc_On_Each_Node
     [Documentation]    Register routed rpc on each node of the cluster.
@@ -56,6 +61,7 @@ Unregister_Rpc_On_Each_Node
     [Documentation]    Unregister rpc on every node.
     DrbCommons.Unregister_Action_On_Nodes    ${all_indices}
 
+
 *** Keywords ***
 Setup_Keyword
     [Documentation]    Create a list of possible constant responses on the node with unregistered rpc.
index 6932715a4d736b916584f47acfb91fee6b5c0f30..d22cb6b13399c5c33ad117c1aca9bf9efec802fa 100644 (file)
@@ -1,28 +1,33 @@
 *** Settings ***
-Documentation     DOMRpcBroker testing: RPC Provider Partition And Heal
+Documentation       DOMRpcBroker testing: RPC Provider Partition And Heal
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               This tests establishes that the RPC service operates correctly when faced
-...               with node failures.
-...               This suite supports more than three node cluster setup too.
-Suite Setup       Setup_Kw
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 This tests establishes that the RPC service operates correctly when faced
+...                 with node failures.
+...                 This suite supports more than three node cluster setup too.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Kw
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-@{INSTALLED_RPC_MEMEBER_IDX_LIST}    ${1}    ${2}
-${TESTED_MEMBER_WITHOUT_RPC_IDX}    ${3}
+@{INSTALLED_RPC_MEMEBER_IDX_LIST}       ${1}    ${2}
+${TESTED_MEMBER_WITHOUT_RPC_IDX}        ${3}
+
 
 *** Test Cases ***
 Register_Rpc_On_Two_Nodes
@@ -56,12 +61,16 @@ Invoke_Rpc_On_Each_Node_Again
     [Documentation]    Invoke rpc get-constant on every node. When requested on the node with
     ...    local instance the local value is expected. If invoked on the node with no local instance, any remote
     ...    value is expected.
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    20s    3s    DrbCommons.Verify_Constant_On_Active_Nodes
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    20s
+    ...    3s
+    ...    DrbCommons.Verify_Constant_On_Active_Nodes
 
 Unregister_Rpc_On_Each_Node
     [Documentation]    Inregister rpc on both nodes.
     DrbCommons.Unregister_Rpc_On_Nodes    ${INSTALLED_RPC_MEMEBER_IDX_LIST}
 
+
 *** Keywords ***
 Setup_Kw
     [Documentation]    Setup keyword. Create ${possible_constants} list with possible variables of remote constants.
index e9424b460a7667feab45cf99c452817ae332d927..b054c500395ebbdb1a74d31848a7f43663250a67 100644 (file)
@@ -1,39 +1,48 @@
 *** Settings ***
-Documentation     DOMRpcBroker testing: RPC Provider Partition And Heal
+Documentation       DOMRpcBroker testing: RPC Provider Partition And Heal
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               This tests establishes that the RPC service operates correctly when faced
-...               with node failures.
-...               This suite supports more than three node cluster setup too.
-Suite Setup       Setup_Kw
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 This tests establishes that the RPC service operates correctly when faced
+...                 with node failures.
+...                 This suite supports more than three node cluster setup too.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Kw
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-@{INSTALLED_RPC_MEMEBER_IDX_LIST}    ${1}    ${2}
+@{INSTALLED_RPC_MEMEBER_IDX_LIST}       ${1}    ${2}
 # TODO: Consider unregistering one at random for each iteration, as in the precedence longevity suite.
-${TESTED_MEMBER_WITHOUT_RPC_IDX}    ${3}
+${TESTED_MEMBER_WITHOUT_RPC_IDX}        ${3}
 # TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS}    82800
+${LONGEVITY_TEST_DURATION_IN_SECS}      82800
+
 
 *** Test Cases ***
 Rpc_Provider_Precedence_Longevity
     [Documentation]    Test register rpc on two of three nodes and repeat the tested scenario for 24h.
     DrbCommons.Register_Rpc_On_Nodes    ${INSTALLED_RPC_MEMEBER_IDX_LIST}
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${LONGEVITY_TEST_DURATION_IN_SECS}    1s    Test_Scenario
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    ${LONGEVITY_TEST_DURATION_IN_SECS}
+    ...    1s
+    ...    Test_Scenario
     DrbCommons.Unregister_Rpc_On_Nodes    ${INSTALLED_RPC_MEMEBER_IDX_LIST}
 
+
 *** Keywords ***
 Setup_Kw
     [Documentation]    Setup keyword. Create ${possible_constants} list with possible variables of remote constants.
@@ -47,4 +56,7 @@ Test_Scenario
     DrbCommons.Isolate_Node    ${isolated_idx}
     BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    DrbCommons.Verify_Constant_On_Active_Nodes
     DrbCommons.Rejoin_Node    ${isolated_idx}
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    20s    1s    DrbCommons.Verify_Constant_On_Active_Nodes
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    20s
+    ...    1s
+    ...    DrbCommons.Verify_Constant_On_Active_Nodes
index 4b8c622af5ee3bc3d3b79f77d4a9c73c1c883a3b..67db388f133dd4a4b432218f0432f35703264a91 100644 (file)
@@ -1,27 +1,32 @@
 *** Settings ***
-Documentation     DOMRpcBroker testing: RPC Provider Precedence
+Documentation       DOMRpcBroker testing: RPC Provider Precedence
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The aim is to establish that remote RPC implementations have lower priority
-...               than local ones, which is to say that any movement of RPCs on remote nodes
-...               does not affect routing as long as a local implementation is available.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
+...                 The aim is to establish that remote RPC implementations have lower priority
+...                 than local ones, which is to say that any movement of RPCs on remote nodes
+...                 does not affect routing as long as a local implementation is available.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
 ${UNREGISTERED_RPC_NODE}    ${1}
 
+
 *** Test Cases ***
 Register_Rpc_On_Each_Node
     [Documentation]    Register global rpc on each node of the cluster.
@@ -56,6 +61,7 @@ Unregister_Rpc_On_Each_Node
     [Documentation]    Unregister rpc on every node.
     DrbCommons.Unregister_Rpc_On_Nodes    ${all_indices}
 
+
 *** Keywords ***
 Setup_Keyword
     [Documentation]    Create a list of possible constant responses on the node with unregistered rpc.
index def4f14e77281c948167d433a747d483c912bc57..ade242f75fa887dffed297efa5f7e67191648616 100644 (file)
@@ -1,36 +1,45 @@
 *** Settings ***
-Documentation     DOMRpcBroker testing: RPC Provider Precedence
+Documentation       DOMRpcBroker testing: RPC Provider Precedence
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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
+...                 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
 ...
-...               The aim is to establish that remote RPC implementations have lower priority
-...               than local ones, which is to say that any movement of RPCs on remote nodes
-...               does not affect routing as long as a local implementation is available.
-Suite Setup       Setup_Keyword
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Library           SSHLibrary
-Resource          ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 The aim is to establish that remote RPC implementations have lower priority
+...                 than local ones, which is to say that any movement of RPCs on remote nodes
+...                 does not affect routing as long as a local implementation is available.
+
+Library             SSHLibrary
+Resource            ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Keyword
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
 # TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS}    82800
+${LONGEVITY_TEST_DURATION_IN_SECS}      82800
+
 
 *** Test Cases ***
 Rpc_Provider_Precedence_Longevity
     [Documentation]    Repeat the tested scenario for 24h.
     DrbCommons.Register_Rpc_On_Nodes    ${all_indices}
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${LONGEVITY_TEST_DURATION_IN_SECS}    1s    Test_Scenario
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    ${LONGEVITY_TEST_DURATION_IN_SECS}
+    ...    1s
+    ...    Test_Scenario
     DrbCommons.Unregister_Rpc_On_Nodes    ${all_indices}
 
+
 *** Keywords ***
 Setup_Keyword
     [Documentation]    Create a list of possible constant responses on the node with unregistered rpc.
index a093d01790381c4f7b96442a264bfc3f2754a225..073c5916675adc98f1b600fbd784d890722565eb 100644 (file)
@@ -1,31 +1,36 @@
 *** Settings ***
-Documentation     Controller functional HA testing of global singleton rpcs if jvm frozen.
+Documentation       Controller functional HA testing of global singleton rpcs if jvm frozen.
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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 Setup       Setup_Suite
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing    member_index_list=${active_nodes}
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
-Resource          ${CURDIR}/../../../variables/Variables.robot
+...                 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
+
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+Resource            ${CURDIR}/../../../variables/Variables.robot
+
+Suite Setup         Setup_Suite
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing    member_index_list=${active_nodes}
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-${RPC_URL}        /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL}                  /restconf/operations/basic-rpc-test:basic-global
 &{EMPTY_DICT}
-${SERVICE}        Basic-rpc-test']
-${TEST_LOG_LEVEL}    info
-@{TEST_LOG_COMPONENTS}    org.opendaylight.controller.remote.rpc
-${EOS_URL}        /restconf/operational/entity-owners:entity-owners
-${active_nodes}    ${EMPTY}
+${SERVICE}                  Basic-rpc-test']
+${TEST_LOG_LEVEL}           info
+@{TEST_LOG_COMPONENTS}      org.opendaylight.controller.remote.rpc
+${EOS_URL}                  /restconf/operational/entity-owners:entity-owners
+${active_nodes}             ${EMPTY}
+
 
 *** Test Cases ***
 Get_Basic_Rpc_Test_Owner
@@ -81,6 +86,7 @@ Rpc_After_Rejoin_On_All
         Run_Rpc    ${idx}
     END
 
+
 *** Keywords ***
 Setup_Suite
     [Documentation]    FIXME: Add a documentation.
@@ -88,25 +94,34 @@ Setup_Suite
     SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All    ${TEST_LOG_LEVEL}    ${TEST_LOG_COMPONENTS}
 
 Run_Rpc
-    [Arguments]    ${node_idx}
     [Documentation]    Run rpc and log the entity ownership service details to karaf log.
     ...    Logging the details was a developer's request during the implementation to improve debugging.
-    ${session} =    Resolve_Http_Session_For_Member    member_index=${node_idx}
-    ${out} =    TemplatedRequests.Get_From_Uri    ${EOS_URL}    session=${session}
+    [Arguments]    ${node_idx}
+    ${session}=    Resolve_Http_Session_For_Member    member_index=${node_idx}
+    ${out}=    TemplatedRequests.Get_From_Uri    ${EOS_URL}    session=${session}
     KarafKeywords.Log_Message_To_Controller_Karaf    EOS rest resp: ${out}    member_index_list=${active_nodes}
     TemplatedRequests.Post_To_Uri    ${RPC_URL}    ${EMPTY}    ${HEADERS_XML}    ${ACCEPT_XML}    session=${session}
 
 Verify_Owner_Elected
-    [Arguments]    ${new_elected}    ${old_owner}    ${node_to_ask}
     [Documentation]    Verify new owner was elected or remained the same.
+    [Arguments]    ${new_elected}    ${old_owner}    ${node_to_ask}
     ${owner}    ${successors}=    Get_Present_Brt_Owner_And_Successors    ${node_to_ask}
-    BuiltIn.Run_Keyword_If    ${new_elected}    BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
-    BuiltIn.Run_Keyword_If    not ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    IF    ${new_elected}
+        BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
+    END
+    IF    not ${new_elected}
+        BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    END
 
 Get_Present_Brt_Owner_And_Successors
-    [Arguments]    ${node_to_ask}    ${store}=${False}
     [Documentation]    Find a basic rpc test service owner and successors and store them if indicated.
-    ${brt_owner}    ${brt_successors}=    ClusterManagement.Get_Owner_And_Successors_For_Device    ${SERVICE}    org.opendaylight.mdsal.ServiceEntityType    ${node_to_ask}
-    BuiltIn.Run_Keyword_If    ${store}    BuiltIn.Set_Suite_Variable    ${brt_owner}    ${brt_owner}
-    BuiltIn.Run_Keyword_If    ${store}    BuiltIn.Set_Suite_Variable    ${brt_successors}    ${brt_successors}
-    BuiltIn.Return_From_Keyword    ${brt_owner}    ${brt_successors}
+    [Arguments]    ${node_to_ask}    ${store}=${False}
+    ${brt_owner}    ${brt_successors}=    ClusterManagement.Get_Owner_And_Successors_For_Device
+    ...    ${SERVICE}
+    ...    org.opendaylight.mdsal.ServiceEntityType
+    ...    ${node_to_ask}
+    IF    ${store}    BuiltIn.Set_Suite_Variable    ${brt_owner}    ${brt_owner}
+    IF    ${store}
+        BuiltIn.Set_Suite_Variable    ${brt_successors}    ${brt_successors}
+    END
+    RETURN    ${brt_owner}    ${brt_successors}
index 83a5b8593661303acfe7aa0dc99dcbf70d58a28f..96029838fb78a2ac6fabef645f2aab3bfe077cdf 100644 (file)
@@ -1,32 +1,37 @@
 *** Settings ***
-Documentation     Controller functional HA testing of global singleton rpcs.
+Documentation       Controller functional HA testing of global singleton rpcs.
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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 Setup       Setup_Suite
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/ShardStability.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/../../../variables/Variables.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
+...                 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
+
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/ShardStability.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource            ${CURDIR}/../../../variables/Variables.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup         Setup_Suite
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-${RPC_URL}        /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL}                  /restconf/operations/basic-rpc-test:basic-global
 &{EMPTY_DICT}
-${SERVICE}        Basic-rpc-test']
-${TEST_LOG_LEVEL}    info
-@{TEST_LOG_COMPONENTS}    org.opendaylight.controller.remote.rpc
-${EOS_URL}        /restconf/operational/entity-owners:entity-owners
-${RPC_STATUS_ISOLATED}    501
+${SERVICE}                  Basic-rpc-test']
+${TEST_LOG_LEVEL}           info
+@{TEST_LOG_COMPONENTS}      org.opendaylight.controller.remote.rpc
+${EOS_URL}                  /restconf/operational/entity-owners:entity-owners
+${RPC_STATUS_ISOLATED}      501
+
 
 *** Test Cases ***
 Get_Basic_Rpc_Test_Owner
@@ -51,8 +56,13 @@ Isolate_Current_Owner_Member
 
 Verify_New_Basic_Rpc_Test_Owner_Elected
     [Documentation]    Verify new owner of the service is elected.
-    ${idx}=    Collections.Get_From_List    ${old_brt_successors}    0
-    BuiltIn.Wait_Until_Keyword_Succeeds    70s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}    member_index_list=${old_brt_successors}
+    ${idx} =    Collections.Get_From_List    ${old_brt_successors}    0
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    70s
+    ...    10s
+    ...    ShardStability.Shards_Stability_Get_Details
+    ...    ${DEFAULT_SHARD_LIST}
+    ...    member_index_list=${old_brt_successors}
     BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    Verify_Owner_Elected    ${True}    ${old_brt_owner}    ${idx}
     Get_Present_Brt_Owner_And_Successors    ${idx}    store=${True}
 
@@ -73,7 +83,11 @@ Rpc_On_Non_Isolated_Cluster_Nodes
 Rejoin_Isolated_Member
     [Documentation]    Rejoin isolated node
     ClusterManagement.Rejoin_Member_From_List_Or_All    ${old_brt_owner}
-    BuiltIn.Wait_Until_Keyword_Succeeds    70s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    70s
+    ...    10s
+    ...    ShardStability.Shards_Stability_Get_Details
+    ...    ${DEFAULT_SHARD_LIST}
 
 Rpc_After_Rejoin_On_New_Owner
     [Documentation]    Run rpc on the new service owner node.
@@ -90,6 +104,7 @@ Rpc_After_Rejoin_On_All
         Run_Rpc    ${idx}
     END
 
+
 *** Keywords ***
 Setup_Suite
     [Documentation]    FIXME: Add a documentation.
@@ -97,30 +112,39 @@ Setup_Suite
     SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All    ${TEST_LOG_LEVEL}    ${TEST_LOG_COMPONENTS}
 
 Run_Rpc
-    [Arguments]    ${node_idx}
     [Documentation]    Run rpc and log the entity ownership service details to karaf log.
     ...    Logging the details was a developer's request during the implementation to improve debugging.
+    [Arguments]    ${node_idx}
     ${session} =    Resolve_Http_Session_For_Member    member_index=${node_idx}
     Get_And_Log_EOS_Output_To_Karaf_Log    ${session}
     TemplatedRequests.Post_To_Uri    ${RPC_URL}    ${EMPTY}    ${HEADERS_XML}    ${ACCEPT_XML}    session=${session}
 
 Verify_Owner_Elected
-    [Arguments]    ${new_elected}    ${old_owner}    ${node_to_ask}
     [Documentation]    Verify new owner was elected or remained the same.
-    ${owner}    ${successors}=    Get_Present_Brt_Owner_And_Successors    ${node_to_ask}
-    BuiltIn.Run_Keyword_If    ${new_elected}    BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
-    BuiltIn.Run_Keyword_If    not ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    [Arguments]    ${new_elected}    ${old_owner}    ${node_to_ask}
+    ${owner}    ${successors} =    Get_Present_Brt_Owner_And_Successors    ${node_to_ask}
+    IF    ${new_elected}
+        BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
+    END
+    IF    not ${new_elected}
+        BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    END
 
 Get_Present_Brt_Owner_And_Successors
-    [Arguments]    ${node_to_ask}    ${store}=${False}
     [Documentation]    Find a basic rpc test service owner and successors and store them if indicated.
-    ${brt_owner}    ${brt_successors}=    ClusterManagement.Get_Owner_And_Successors_For_Device    ${SERVICE}    org.opendaylight.mdsal.ServiceEntityType    ${node_to_ask}
-    BuiltIn.Run_Keyword_If    ${store}    BuiltIn.Set_Suite_Variable    ${brt_owner}    ${brt_owner}
-    BuiltIn.Run_Keyword_If    ${store}    BuiltIn.Set_Suite_Variable    ${brt_successors}    ${brt_successors}
-    BuiltIn.Return_From_Keyword    ${brt_owner}    ${brt_successors}
+    [Arguments]    ${node_to_ask}    ${store}=${False}
+    ${brt_owner}    ${brt_successors} =    ClusterManagement.Get_Owner_And_Successors_For_Device
+    ...    ${SERVICE}
+    ...    org.opendaylight.mdsal.ServiceEntityType
+    ...    ${node_to_ask}
+    IF    ${store}    BuiltIn.Set_Suite_Variable    ${brt_owner}    ${brt_owner}
+    IF    ${store}
+        BuiltIn.Set_Suite_Variable    ${brt_successors}    ${brt_successors}
+    END
+    RETURN    ${brt_owner}    ${brt_successors}
 
 Get_And_Log_EOS_Output_To_Karaf_Log
-    [Arguments]    ${session}
     [Documentation]    Log the entity ownership service details to karaf.log
+    [Arguments]    ${session}
     ${out} =    TemplatedRequests.Get_From_Uri    ${EOS_URL}    session=${session}
     KarafKeywords.Log_Message_To_Controller_Karaf    EOS rest resp: ${out}
index 04f83b43cfa6901f8223fde87320b15dd9f105ea..59c0767e5ffaa467d3855a4bca7ffc2fe5ba598a 100644 (file)
@@ -1,31 +1,36 @@
 *** Settings ***
-Documentation     Controller functional HA testing of global singleton rpcs.
+Documentation       Controller functional HA testing of global singleton rpcs.
 ...
-...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+...                 Copyright (c) 2017 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 Setup       Setup_Suite
-Suite Teardown    SSHLibrary.Close_All_Connections
-Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags      critical
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource          ${CURDIR}/../../../libraries/ShardStability.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
-Resource          ${CURDIR}/../../../variables/Variables.robot
+...                 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
+
+Resource            ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource            ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource            ${CURDIR}/../../../libraries/ShardStability.robot
+Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource            ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource            ${CURDIR}/../../../libraries/WaitForFailure.robot
+Resource            ${CURDIR}/../../../variables/Variables.robot
+
+Suite Setup         Setup_Suite
+Suite Teardown      SSHLibrary.Close_All_Connections
+Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags        critical
+
 
 *** Variables ***
-${RPC_URL}        /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL}                  /restconf/operations/basic-rpc-test:basic-global
 &{EMPTY_DICT}
-${SERVICE}        Basic-rpc-test']
-${TEST_LOG_LEVEL}    info
-@{TEST_LOG_COMPONENTS}    org.opendaylight.controller.remote.rpc
-${EOS_URL}        /restconf/operational/entity-owners:entity-owners
+${SERVICE}                  Basic-rpc-test']
+${TEST_LOG_LEVEL}           info
+@{TEST_LOG_COMPONENTS}      org.opendaylight.controller.remote.rpc
+${EOS_URL}                  /restconf/operational/entity-owners:entity-owners
+
 
 *** Test Cases ***
 Get_Basic_Rpc_Test_Owner
@@ -66,8 +71,18 @@ Restart_Stopped_Member
 
 Verify_New_Owner_Remained_After_Rejoin
     [Documentation]    Verify no owner change happened after rejoin.
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    15s    2s    Verify_Owner_Elected    ${False}    ${brt_owner}    ${brt_owner}
-    BuiltIn.Wait_Until_Keyword_Succeeds    70s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+    ...    15s
+    ...    2s
+    ...    Verify_Owner_Elected
+    ...    ${False}
+    ...    ${brt_owner}
+    ...    ${brt_owner}
+    BuiltIn.Wait_Until_Keyword_Succeeds
+    ...    70s
+    ...    10s
+    ...    ShardStability.Shards_Stability_Get_Details
+    ...    ${DEFAULT_SHARD_LIST}
 
 Rpc_After_Rejoin_On_New_Owner
     [Documentation]    Run rpc on the new service owner node.
@@ -84,6 +99,7 @@ Rpc_After_Rejoin_On_All
         Run_Rpc    ${idx}
     END
 
+
 *** Keywords ***
 Setup_Suite
     [Documentation]    FIXME: Add a documentation.
@@ -91,25 +107,34 @@ Setup_Suite
     SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All    ${TEST_LOG_LEVEL}    ${TEST_LOG_COMPONENTS}
 
 Run_Rpc
-    [Arguments]    ${node_idx}
     [Documentation]    Run rpc and log the entity ownership service details to karaf log.
     ...    Logging the details was a developer's request during the implementation to improve debugging.
-    ${session} =    Resolve_Http_Session_For_Member    member_index=${node_idx}
-    ${out} =    TemplatedRequests.Get_From_Uri    ${EOS_URL}    session=${session}
+    [Arguments]    ${node_idx}
+    ${session}=    Resolve_Http_Session_For_Member    member_index=${node_idx}
+    ${out}=    TemplatedRequests.Get_From_Uri    ${EOS_URL}    session=${session}
     KarafKeywords.Log_Message_To_Controller_Karaf    EOS rest resp: ${out}
     TemplatedRequests.Post_To_Uri    ${RPC_URL}    ${EMPTY}    ${HEADERS_XML}    ${ACCEPT_XML}    session=${session}
 
 Verify_Owner_Elected
-    [Arguments]    ${new_elected}    ${old_owner}    ${node_to_ask}
     [Documentation]    Verify new owner was elected or remained the same.
+    [Arguments]    ${new_elected}    ${old_owner}    ${node_to_ask}
     ${owner}    ${successors}=    Get_Present_Brt_Owner_And_Successors    ${node_to_ask}
-    BuiltIn.Run_Keyword_If    ${new_elected}    BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
-    BuiltIn.Run_Keyword_If    not ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    IF    ${new_elected}
+        BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
+    END
+    IF    not ${new_elected}
+        BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    END
 
 Get_Present_Brt_Owner_And_Successors
-    [Arguments]    ${node_to_ask}    ${store}=${False}
     [Documentation]    Find a basic rpc test service owner and successors and store them if indicated.
-    ${brt_owner}    ${brt_successors}=    ClusterManagement.Get_Owner_And_Successors_For_Device    ${SERVICE}    org.opendaylight.mdsal.ServiceEntityType    ${node_to_ask}
-    BuiltIn.Run_Keyword_If    ${store}    BuiltIn.Set_Suite_Variable    ${brt_owner}    ${brt_owner}
-    BuiltIn.Run_Keyword_If    ${store}    BuiltIn.Set_Suite_Variable    ${brt_successors}    ${brt_successors}
-    BuiltIn.Return_From_Keyword    ${brt_owner}    ${brt_successors}
+    [Arguments]    ${node_to_ask}    ${store}=${False}
+    ${brt_owner}    ${brt_successors}=    ClusterManagement.Get_Owner_And_Successors_For_Device
+    ...    ${SERVICE}
+    ...    org.opendaylight.mdsal.ServiceEntityType
+    ...    ${node_to_ask}
+    IF    ${store}    BuiltIn.Set_Suite_Variable    ${brt_owner}    ${brt_owner}
+    IF    ${store}
+        BuiltIn.Set_Suite_Variable    ${brt_successors}    ${brt_successors}
+    END
+    RETURN    ${brt_owner}    ${brt_successors}