Merge "adding missing example flows"
authorLuis Gomez <ecelgp@gmail.com>
Sun, 30 Nov 2014 01:26:44 +0000 (01:26 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Sun, 30 Nov 2014 01:26:44 +0000 (01:26 +0000)
20 files changed:
test/csit/suites/clustering/datastore/001_start_cluster.txt [new file with mode: 0644]
test/csit/suites/clustering/datastore/010_crud_on_leader.txt [moved from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_01_execute_on_leader.txt with 80% similarity]
test/csit/suites/clustering/datastore/020_crud_on_any_follower.txt [moved from test/csit/suites/clustering/datastore/basic/020_restconf_rpc_crud_test_02_execute_on_follower1.txt with 81% similarity]
test/csit/suites/clustering/datastore/030_failover_crud_on_new_leader.txt [moved from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_05_execute_on_new_leader.txt with 86% similarity]
test/csit/suites/clustering/datastore/040_failover_read_from_follower.txt [moved from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_06_execute_on_remaining_follower.txt with 80% similarity]
test/csit/suites/clustering/datastore/050_failover_crud_on_any_follower.txt [moved from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_07_execute_on_remaining_follower.txt with 89% similarity]
test/csit/suites/clustering/datastore/060_failover_read_from_new_leader.txt [moved from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_08_execute_on_new_leader.txt with 79% similarity]
test/csit/suites/clustering/datastore/130_recovery_restart_leader.txt [new file with mode: 0644]
test/csit/suites/clustering/datastore/140_recovery_restart_follower.txt [new file with mode: 0644]
test/csit/suites/clustering/datastore/__init__.txt [moved from test/csit/suites/clustering/datastore/basic/__init__.txt with 51% similarity]
test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_09_execute_on_last_node.txt [deleted file]
test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt [deleted file]
test/csit/suites/clustering/datastore/basic/130_restconf_disaster_recovery_restart_leader.txt [deleted file]
test/csit/suites/clustering/datastore/basic/140_restconf_disaster_recovery_restart_follower.txt [deleted file]
test/csit/suites/clustering/longevity/010__longevity.txt [moved from test/csit/suites/clustering/datastore/longevity/010__longevity.txt with 100% similarity]
test/csit/suites/clustering/longevity/__init__.txt [moved from test/csit/suites/clustering/datastore/longevity/__init__.txt with 100% similarity]
test/csit/suites/clustering/routedrpc/001_start_cluster.txt [new file with mode: 0644]
test/csit/suites/clustering/routedrpc/023_routed_rpc_crud_test.txt [moved from test/csit/suites/clustering/datastore/routedrpc/023_routed_rpc_crud_test.txt with 65% similarity]
test/csit/suites/clustering/routedrpc/024_routed_rpc_crud_test.txt [moved from test/csit/suites/clustering/datastore/routedrpc/024_routed_rpc_crud_test.txt with 64% similarity]
test/tools/cluster-deployer/remote_host.py

diff --git a/test/csit/suites/clustering/datastore/001_start_cluster.txt b/test/csit/suites/clustering/datastore/001_start_cluster.txt
new file mode 100644 (file)
index 0000000..da9264a
--- /dev/null
@@ -0,0 +1,38 @@
+*** Settings ***
+Documentation     Start the controllers
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/config/
+
+*** Test Cases *** 
+Stop All Controllers
+    [Documentation]    Stop all the controllers in the cluster
+    Stopcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+    KillController    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+
+
+Clean All Journals
+    [Documentation]    Clean the journals of all the controllers in the cluster
+    CleanJournal    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    5
+
+Start All Controllers
+    [Documentation]    Start all the controllers in the cluster
+    Startcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    120
\ No newline at end of file
similarity index 80%
rename from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_01_execute_on_leader.txt
rename to test/csit/suites/clustering/datastore/010_crud_on_leader.txt
index 3bf86cba992ce4204c4101b71a2373f9cc553e6a..f09db2f15f92497893d70779b393cab241548f17 100644 (file)
@@ -1,14 +1,14 @@
 *** Settings ***
-Documentation     Test suite for testing Distributed Datastore main operations performed from leader
+Documentation     This test finds the leader for shards in a 3-Node cluster and executes CRUD operations on them
 
 Library           Collections
-Library           ../../../../libraries/RequestsLibrary.py
-Library           ../../../../libraries/Common.py
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/SettingsLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
-Variables         ../../../../variables/Variables.py
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
+Variables         ../../../variables/Variables.py
 
 
 *** Variables ***
@@ -21,7 +21,7 @@ ${SHARD_CAR_PERSON_NAME}      shard-car-people-config
 *** Test Cases ***
 Add cars and get cars from Leader
     [Documentation]    Add 100 cars and get added cars from Leader
-    ${CURRENT_CAR_LEADER}   GetLeader   ${SHARD_CAR_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
+    ${CURRENT_CAR_LEADER}   GetLeader   ${SHARD_CAR_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${MEMBER1}   ${MEMBER2}    ${MEMBER3}
     Log    CURRENT_CAR_SHARD_LEADER ${CURRENT_CAR_LEADER}
     Set Suite Variable  ${CURRENT_CAR_LEADER}
        ${resp}         AddCar  ${CURRENT_CAR_LEADER}   ${PORT} ${100}
@@ -32,7 +32,7 @@ Add cars and get cars from Leader
 Add persons and get persons from Leader
     [Documentation]    Add 100 persons and get persons
     [Documentation]    Note: There should be one person added first to enable rpc
-    ${CURRENT_PEOPLE_LEADER}   GetLeader   ${SHARD_PEOPLE_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
+    ${CURRENT_PEOPLE_LEADER}   GetLeader   ${SHARD_PEOPLE_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${MEMBER1}   ${MEMBER2}    ${MEMBER3}
     Set Suite Variable  ${CURRENT_PEOPLE_LEADER}
        ${resp}         AddPerson       ${CURRENT_PEOPLE_LEADER}        ${PORT} ${0}
        ${resp}         AddPerson       ${CURRENT_PEOPLE_LEADER}        ${PORT} ${100}
@@ -43,7 +43,7 @@ Add persons and get persons from Leader
 Add car-person mapping and get car-person mapping from Leader
     [Documentation]    Add car-person and get car-person from Leader
     [Documentation]  Note: This is done to enable working of rpc
-    ${CURRENT_CAR_PERSON_LEADER}   GetLeader   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
+    ${CURRENT_CAR_PERSON_LEADER}   GetLeader   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${MEMBER1}   ${MEMBER2}  ${MEMBER3}
     Set Suite Variable  ${CURRENT_CAR_PERSON_LEADER}
        ${resp}         AddCarPerson    ${CURRENT_CAR_PERSON_LEADER}   ${PORT}     ${0}
        Sleep       2
@@ -53,7 +53,6 @@ Add car-person mapping and get car-person mapping from Leader
 
 Purchase 100 cars using Leader
     [Documentation]  Purchase 100 cars using Leader
-
        ${resp}         BuyCar  ${CURRENT_CAR_PERSON_LEADER}    ${PORT} ${100}
     Sleep       2
        ${resp}         GetCarPersonMappings    ${CURRENT_CAR_PERSON_LEADER}    ${PORT} ${0}
@@ -67,7 +66,7 @@ Get car-person mappings using Leader
 
 Get car-person mappings using Follower1
    [Documentation]     Get car-person mappings using Follower1 to see 100 entry
-   ${FOLLOWERS}   GetFollowers   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
+   ${FOLLOWERS}   GetFollowers   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${MEMBER1}   ${MEMBER2}    ${MEMBER3}
    Log                 ${FOLLOWERS}
    SET SUITE VARIABLE  ${FOLLOWERS}
        ${resp}         GetCarPersonMappings    ${FOLLOWERS[0]}     ${PORT}     ${0}
similarity index 81%
rename from test/csit/suites/clustering/datastore/basic/020_restconf_rpc_crud_test_02_execute_on_follower1.txt
rename to test/csit/suites/clustering/datastore/020_crud_on_any_follower.txt
index 8b54e98351f04d74a01a255927b10c6a1d200295..baaa24e44e7660119e42441ca79dd683be626eea 100644 (file)
@@ -1,14 +1,14 @@
 *** Settings ***
-Documentation     Test suite for testing Distributed Datastore main operations performed from follower1
+Documentation     This test finds the followers of certain shards in a 3-Node cluster and executes CRUD operations on any one follower
 
 Library           Collections
-Library           ../../../../libraries/RequestsLibrary.py
-Library           ../../../../libraries/Common.py
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/SettingsLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
-Variables         ../../../../variables/Variables.py
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
+Variables         ../../../variables/Variables.py
 
 *** Variables ***
 ${REST_CONTEXT}    /restconf/config/
@@ -20,7 +20,7 @@ ${SHARD_CAR_PERSON_NAME}      shard-car-people-config
 *** Test Cases ***
 Add cars and get cars from Follower1
     [Documentation]    Add 100 cars and get added cars from Follower1
-    ${FOLLOWERS}   GetFollowers   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
+    ${FOLLOWERS}   GetFollowers   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${MEMBER1}   ${MEMBER2}    ${MEMBER3}
     Log                ${FOLLOWERS}
     SET SUITE VARIABLE  ${FOLLOWERS}
 
@@ -66,7 +66,7 @@ Get car-person mappings using Follower1
 
 Get car-person mappings using Leader
    [Documentation]     Get car-person mappings using Leader to see 100 entry
-    ${CURRENT_CAR_LEADER}   GetLeader   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
+    ${CURRENT_CAR_LEADER}   GetLeader   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${MEMBER1}   ${MEMBER2}    ${MEMBER3}
     Log     ${CURRENT_CAR_LEADER}
     Sleep   1
        ${resp}         GetCarPersonMappings    ${CURRENT_CAR_LEADER}   ${PORT} ${0}
similarity index 86%
rename from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_05_execute_on_new_leader.txt
rename to test/csit/suites/clustering/datastore/030_failover_crud_on_new_leader.txt
index 08573e84205ddba7910f85425da38b3fa72c2cae..e40888d365c3597a836ccad6583c9628c26234c0 100644 (file)
@@ -1,8 +1,8 @@
 *** Settings ***
-Documentation     Run this test after running test no 03
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
+Documentation     This test brings down the current leader of the "car" shard and then executes CRUD operations on the new leader
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
 
 *** Variables ***
 ${SHARD}    shard-car-config
@@ -10,10 +10,10 @@ ${SHARD}    shard-car-config
 *** Test Cases ***
 Switch Leader
     [Documentation]    stop leader and elect new leader
-  ${OLD_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
+  ${OLD_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
   Stopcontroller  ${OLD_LEADER}  ${USERNAME}  ${PASSWORD}  ${KARAFHOME}
   Sleep    30
-  ${NEW_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
+  ${NEW_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
   Log  ${NEW_LEADER}
   Set Suite Variable   ${NEW_LEADER}
 
similarity index 80%
rename from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_06_execute_on_remaining_follower.txt
rename to test/csit/suites/clustering/datastore/040_failover_read_from_follower.txt
index 7b70f71357b35c6e48706b089b42106b0ed991b1..9cfd3588d911fd807317fe9211ed7654f7a16c86 100644 (file)
@@ -1,7 +1,7 @@
 *** Settings ***
-Documentation     Run this test after running test no 05
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
+Documentation     This test tries to read the data that was written by the previous test from any one follower
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
 
 *** Variables ***
 ${SHARD}    shard-car-config
@@ -9,7 +9,7 @@ ${SHARD}    shard-car-config
 *** Test Cases ***
 Find follower
     [Documentation]    find follower
-  ${FOLLOWERS}    GetFollowers  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
+  ${FOLLOWERS}    GetFollowers  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
   Log  ${FOLLOWERS}
   ${LAST_FOLLOWER}  Set Variable  ${FOLLOWERS[0]}
   Set Suite Variable   ${LAST_FOLLOWER}
similarity index 89%
rename from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_07_execute_on_remaining_follower.txt
rename to test/csit/suites/clustering/datastore/050_failover_crud_on_any_follower.txt
index 62be8a9987d6615350ad7babefd7c114d0e6d5cd..89bb931b70e018c4a23e95e3d8813c48ab763031 100644 (file)
@@ -1,7 +1,7 @@
 *** Settings ***
-Documentation     Run this test after running test no 06
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
+Documentation     This test executes CRUD operations on any one follower after the old leader has been brought down
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
 
 *** Variables ***
 ${SHARD}    shard-car-config
@@ -9,7 +9,7 @@ ${SHARD}    shard-car-config
 *** Test Cases ***
 Find follower
     [Documentation]    find follower
-  ${FOLLOWERS}    GetFollowers  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
+  ${FOLLOWERS}    GetFollowers  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
   Log  ${FOLLOWERS}
   ${LAST_FOLLOWER}  Set Variable  ${FOLLOWERS[0]}
   Set Suite Variable   ${LAST_FOLLOWER}
similarity index 79%
rename from test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_08_execute_on_new_leader.txt
rename to test/csit/suites/clustering/datastore/060_failover_read_from_new_leader.txt
index 06496e9e10ae34c7e366aff214ea10549596cc2b..d673aefb59ca8e4af6b4b75269de9261286ac051 100644 (file)
@@ -1,7 +1,7 @@
 *** Settings ***
-Documentation     Run this test after running test no 07
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
+Documentation     This test reads the data from the leader that was written to the follower by the previous test
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
 
 *** Variables ***
 ${SHARD}    shard-car-config
@@ -9,7 +9,7 @@ ${SHARD}    shard-car-config
 *** Test Cases ***
 Find Leader
     [Documentation]    find new leader
-  ${NEW_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
+  ${NEW_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
   Log  ${NEW_LEADER}
   Set Suite Variable   ${NEW_LEADER}
 
diff --git a/test/csit/suites/clustering/datastore/130_recovery_restart_leader.txt b/test/csit/suites/clustering/datastore/130_recovery_restart_leader.txt
new file mode 100644 (file)
index 0000000..567eb3f
--- /dev/null
@@ -0,0 +1,104 @@
+*** Settings ***
+Documentation     This test kills the leader and verifies that on restart the old leader is able to rejoin the cluster
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/config/
+${KARAF_HOME}      /root/odl/dist
+${USER_NAME}       root
+${PASSWORD}        Ecp123
+${CAR_SHARD}      shard-car-config
+
+*** Test Cases *** 
+Stop All Controllers
+    [Documentation]    Stop all the controllers in the cluster
+    Stopcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+    KillController    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+
+
+Clean All Journals
+    [Documentation]    Clean the journals of all the controllers in the cluster
+    CleanJournal    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    5
+
+Start All Controllers
+    [Documentation]    Start all the controllers in the cluster
+    Startcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    120
+
+Delete all cars
+    [Documentation]    Delete all the cars from the system
+       ${resp}         DeleteAllCars   ${MEMBER1}      ${PORT}         0
+       ${resp}         GetCars ${MEMBER1}      ${PORT}         0
+       Should Be Equal As Strings    ${resp.status_code}    404
+       
+
+Delete all people
+    [Documentation]    Delete all the people from the system
+       ${resp}         DeleteAllPersons        ${MEMBER1}      ${PORT}         0
+       ${resp}         GetPersons      ${MEMBER1}      ${PORT}    0    
+       Should Be Equal As Strings    ${resp.status_code}    404
+
+Add 200 cars
+    [Documentation]    Add 200 cars
+       ${resp}         AddCar  ${MEMBER1}      ${PORT}  ${200}
+       Should Be Equal As Strings    ${resp.status_code}    204
+
+Add 200 people
+    [Documentation]    Add 200 people
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT} ${0}    
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT}  ${200}
+       Should Be Equal As Strings    ${resp.status_code}    204
+
+Add Car Person mapping
+    [Documentation]    Add Car Persons
+       ${resp}         AddCarPerson    ${MEMBER1}      ${PORT} ${0}    
+       ${resp}         BuyCar  ${MEMBER1}      ${PORT} ${200}  
+
+Stop the Leader
+    ${CAR_LEADER}  GetLeader  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
+    Set Suite Variable    ${CAR_LEADER}
+    Stopcontroller    ${CAR_LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+    KillController    ${CAR_LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+
+Get all the cars from Follower 1
+    ${followers}  GetFollowers  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
+       ${resp}         Getcars ${followers[0]} ${PORT} ${0}
+       Should Be Equal As Strings    ${resp.status_code}    200
+       Should Contain     ${resp.content}   manufacturer1
+
+Restart the Leader
+    Startcontroller   ${CAR_LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    120
+
+Get all the cars from Leader
+       ${resp}         Getcars ${CAR_LEADER}   ${PORT} ${0}
+       Should Be Equal As Strings    ${resp.status_code}    200
+       Should Contain     ${resp.content}   manufacturer1
+
+Cleanup All Controllers 
+    [Documentation]    Stop all the controllers in the cluster
+    Stopcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+
+
+
diff --git a/test/csit/suites/clustering/datastore/140_recovery_restart_follower.txt b/test/csit/suites/clustering/datastore/140_recovery_restart_follower.txt
new file mode 100644 (file)
index 0000000..195ef3e
--- /dev/null
@@ -0,0 +1,105 @@
+*** Settings ***
+Documentation     This test kills any of the followers and verifies that when that follower is restarted it can join the cluster
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/config/
+${KARAF_HOME}      /root/odl/dist
+${USER_NAME}       root
+${PASSWORD}        Ecp123
+${CAR_SHARD}      shard-car-config
+
+*** Test Cases *** 
+Stop All Controllers
+    [Documentation]    Stop all the controllers in the cluster
+    Stopcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+    KillController    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+
+
+Clean All Journals
+    [Documentation]    Clean the journals of all the controllers in the cluster
+    CleanJournal    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    5
+
+Start All Controllers
+    [Documentation]    Start all the controllers in the cluster
+    Startcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    120
+
+Delete all cars
+    [Documentation]    Delete all the cars from the system
+       ${resp}         DeleteAllCars   ${MEMBER1}      ${PORT}         0
+       ${resp}         GetCars ${MEMBER1}      ${PORT}         0
+       Should Be Equal As Strings    ${resp.status_code}    404
+       
+
+Delete all people
+    [Documentation]    Delete all the people from the system
+       ${resp}         DeleteAllPersons        ${MEMBER1}      ${PORT}         0
+       ${resp}         GetPersons      ${MEMBER1}      ${PORT}    0    
+       Should Be Equal As Strings    ${resp.status_code}    404
+
+Add 200 cars
+    [Documentation]    Add 200 cars
+       ${resp}         AddCar  ${MEMBER1}      ${PORT}  ${200}
+       Should Be Equal As Strings    ${resp.status_code}    204
+
+Add 200 people
+    [Documentation]    Add 200 people
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT} ${0}    
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT}  ${200}
+       Should Be Equal As Strings    ${resp.status_code}    204
+
+Add Car Person mapping
+    [Documentation]    Add Car Persons
+       ${resp}         AddCarPerson    ${MEMBER1}      ${PORT} ${0}    
+       ${resp}         BuyCar  ${MEMBER1}      ${PORT} ${200}  
+
+Stop one of the followers
+    ${followers}  GetFollowers  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
+    ${CAR_FOLLOWER}    Set Variable    ${followers[0]}
+    Set Suite Variable    ${CAR_FOLLOWER}
+    Stopcontroller    ${CAR_FOLLOWER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+    KillController    ${CAR_FOLLOWER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+
+Get all the cars from the other Follower
+    ${followers}  GetFollowers  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
+       ${resp}         Getcars ${followers[0]} ${PORT} ${0}
+       Should Be Equal As Strings    ${resp.status_code}    200
+       Should Contain     ${resp.content}   manufacturer1
+
+Restart the Stopped Follower
+    Startcontroller   ${CAR_FOLLOWER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    120
+
+Get all the cars from Stopped Follower
+       ${resp}         Getcars ${CAR_FOLLOWER} ${PORT} ${0}
+       Should Be Equal As Strings    ${resp.status_code}    200
+       Should Contain     ${resp.content}   manufacturer1
+
+Cleanup All Controllers 
+    [Documentation]    Stop all the controllers in the cluster
+    Stopcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+
+
+
similarity index 51%
rename from test/csit/suites/clustering/datastore/basic/__init__.txt
rename to test/csit/suites/clustering/datastore/__init__.txt
index a6ced85fa2ccc6beab52f385ea797508edd9d623..cf422c9cf5fac4eef5bb6203c7bfe3c50818bac3 100644 (file)
@@ -1,5 +1,5 @@
 *** Settings ***
-Documentation     Test suite for MD-SAL NSF
+Documentation     Test suite for Clustering Datastore
 Library     SSHLibrary
 
 
diff --git a/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_09_execute_on_last_node.txt b/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_09_execute_on_last_node.txt
deleted file mode 100644 (file)
index f309081..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-*** Settings ***
-Documentation     Run this test after running test no 05
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
-
-*** Variables ***
-${SHARD}    shard-car-config
-
-*** Test Cases ***
-Stop Leader
-    [Documentation]    find new leader
-  ${FOLLOWERS}    GetFollowers  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
-  Log  ${FOLLOWERS}
-  ${LAST_FOLLOWER}  Set Variable  ${FOLLOWERS[0]}
-  Set Suite Variable   ${LAST_FOLLOWER}
-  ${NEW_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
-  Log  ${NEW_LEADER}
-  Stopcontroller  ${NEW_LEADER}  ${USERNAME}  ${PASSWORD}  ${KARAFHOME}
-  Sleep    30
-
-
-Get cars from last follower
-    [Documentation]    get cars from last follower
-       ${resp}         Getcars ${LAST_FOLLOWER}        ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    500
-
-Add cars and get cars from last follower
-    [Documentation]    Add 80 cars and get added cars from last follower
-       ${resp}         AddCar  ${LAST_FOLLOWER}        ${PORT} ${80}
-       Should Be Equal As Strings    ${resp.status_code}    500
diff --git a/test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt b/test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt
deleted file mode 100644 (file)
index 8bc6695..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-*** Settings ***
-Documentation     Test suite for testing Distributed Datastore main operations performed from follower2
-
-Library           Collections
-Library           ../../../../libraries/RequestsLibrary.py
-Library           ../../../../libraries/Common.py
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/SettingsLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
-Variables         ../../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT}    /restconf/config/
-${SHARD_CAR_NAME}      shard-car-config
-${SHARD_PEOPLE_NAME}      shard-people-config
-${SHARD_CAR_PERSON_NAME}      shard-car-people-config
-
-
-*** Test Cases ***
-Add cars and get cars from Follower2
-    [Documentation]    Add 100 cars and get added cars from Follower2
-    ${FOLLOWERS}   GetFollowers   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
-    Log                ${FOLLOWERS}
-    SET SUITE VARIABLE  ${FOLLOWERS}
-
-       ${resp}         AddCar  ${FOLLOWERS[1]} ${PORT} ${100}
-       Sleep   1
-       ${resp}         Getcars ${FOLLOWERS[1]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   manufacturer1
-
-Add persons and get persons from Follower2
-    [Documentation]    Add 100 persons and get persons from Follower2
-    [Documentation]    Note: There should be one person added first to enable rpc
-       ${resp}         AddPerson       ${FOLLOWERS[1]} ${PORT} ${0}
-       ${resp}         AddPerson       ${FOLLOWERS[1]} ${PORT} ${100}
-       Sleep   1
-       ${resp}         GetPersons      ${FOLLOWERS[1]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   user5
-
-Add car-person mapping and get car-person mapping from Follower2
-    [Documentation]    Add car-person and get car-person from Follower2
-    [Documentation]  Note: This is done to enable working of rpc
-
-       ${resp}         AddCarPerson    ${FOLLOWERS[1]} ${PORT} ${0}
-       ${resp}         GetCarPersonMappings    ${FOLLOWERS[1]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   user0
-
-Purchase 100 cars using Follower1
-    [Documentation]  Purchase 100 cars using Follower2
-
-       ${resp}         BuyCar  ${FOLLOWERS[1]} ${PORT} ${100}
-       Sleep   1
-       ${resp}         GetCarPersonMappings    ${FOLLOWERS[1]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-
-Get car-person mappings using Follower2
-   [Documentation]     Get car-person mappings using follower2 to see 100 entry
-       ${resp}         GetCarPersonMappings    ${FOLLOWERS[1]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   user100
-       Should Contain     ${resp.content}   user5
-
-Get car-person mappings using Leader
-   [Documentation]     Get car-person mappings using Leader to see 100 entry
-    ${CURRENT_CAR_LEADER}   GetLeader   ${SHARD_CAR_PERSON_NAME}   ${3}    ${3}    ${1}    ${PORT}     ${LEADER}   ${FOLLOWER1}    ${FOLLOWER2}
-    Log     ${CURRENT_CAR_LEADER}
-    Sleep   1
-       ${resp}         GetCarPersonMappings    ${CURRENT_CAR_LEADER}   ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   user100
-
-Get car-person mappings using Follower1
-   [Documentation]     Get car-person mappings using Follower1 to see 100 entry
-       ${resp}         GetCarPersonMappings    ${FOLLOWERS[0]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   user0
-       Should Contain     ${resp.content}   user100
diff --git a/test/csit/suites/clustering/datastore/basic/130_restconf_disaster_recovery_restart_leader.txt b/test/csit/suites/clustering/datastore/basic/130_restconf_disaster_recovery_restart_leader.txt
deleted file mode 100644 (file)
index 925daba..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-*** Settings ***
-Documentation     Test suite for RESTCONF RPC CAR PERSON 
-Library           Collections
-Library           ../../../../libraries/RequestsLibrary.py
-Library           ../../../../libraries/Common.py
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/SettingsLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
-Variables         ../../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT}    /restconf/config/
-${KARAF_HOME}      /root/odl/dist
-${USER_NAME}       root
-${PASSWORD}        Ecp123
-${CAR_SHARD}      shard-car-config
-
-*** Test Cases *** 
-Stop All Controllers
-    [Documentation]    Stop all the controllers in the cluster
-    Stopcontroller    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    30
-    KillController    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    KillController    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    KillController    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-
-
-Clean All Journals
-    [Documentation]    Clean the journals of all the controllers in the cluster
-    CleanJournal    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    CleanJournal    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    CleanJournal    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    5
-
-Start All Controllers
-    [Documentation]    Start all the controllers in the cluster
-    Startcontroller    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Startcontroller    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Startcontroller    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    120
-
-Delete all cars
-    [Documentation]    Delete all the cars from the system
-       ${resp}         DeleteAllCars   ${LEADER}       ${PORT}         0
-       ${resp}         GetCars ${LEADER}       ${PORT}         0
-       Should Be Equal As Strings    ${resp.status_code}    404
-       
-
-Delete all people
-    [Documentation]    Delete all the people from the system
-       ${resp}         DeleteAllPersons        ${LEADER}       ${PORT}         0
-       ${resp}         GetPersons      ${LEADER}       ${PORT}    0    
-       Should Be Equal As Strings    ${resp.status_code}    404
-
-Add 20000 cars
-    [Documentation]    Add 200 cars
-       ${resp}         AddCar  ${LEADER}       ${PORT}  ${200}
-       Should Be Equal As Strings    ${resp.status_code}    204
-
-Add 20000 people
-    [Documentation]    Add 200 people
-       ${resp}         AddPerson       ${LEADER}       ${PORT} ${0}    
-       ${resp}         AddPerson       ${LEADER}       ${PORT}  ${200}
-       Should Be Equal As Strings    ${resp.status_code}    204
-
-Add Car Person mapping
-    [Documentation]    Add Car Persons
-       ${resp}         AddCarPerson    ${LEADER}       ${PORT} ${0}    
-       ${resp}         BuyCar  ${LEADER}       ${PORT} ${200}  
-
-Stop the Leader
-    ${CAR_LEADER}  GetLeader  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
-    Set Suite Variable    ${CAR_LEADER}
-    Stopcontroller    ${CAR_LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    30
-    KillController    ${CAR_LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-
-Get all the cars from Follower 1
-    ${followers}  GetFollowers  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
-       ${resp}         Getcars ${followers[0]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   manufacturer1
-
-Restart the Leader
-    Startcontroller   ${CAR_LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    120
-
-Get all the cars from Leader
-       ${resp}         Getcars ${CAR_LEADER}   ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   manufacturer1
-
-Cleanup All Controllers 
-    [Documentation]    Stop all the controllers in the cluster
-    Stopcontroller    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    30
-
-
-
diff --git a/test/csit/suites/clustering/datastore/basic/140_restconf_disaster_recovery_restart_follower.txt b/test/csit/suites/clustering/datastore/basic/140_restconf_disaster_recovery_restart_follower.txt
deleted file mode 100644 (file)
index 87793c5..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-*** Settings ***
-Documentation     Test suite for RESTCONF RPC CAR PERSON 
-Library           Collections
-Library           ../../../../libraries/RequestsLibrary.py
-Library           ../../../../libraries/Common.py
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/SettingsLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
-Variables         ../../../../variables/Variables.py
-
-*** Variables ***
-${REST_CONTEXT}    /restconf/config/
-${KARAF_HOME}      /root/odl/dist
-${USER_NAME}       root
-${PASSWORD}        Ecp123
-${CAR_SHARD}      shard-car-config
-
-*** Test Cases *** 
-Stop All Controllers
-    [Documentation]    Stop all the controllers in the cluster
-    Stopcontroller    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    30
-    KillController    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    KillController    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    KillController    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-
-
-Clean All Journals
-    [Documentation]    Clean the journals of all the controllers in the cluster
-    CleanJournal    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    CleanJournal    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    CleanJournal    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    5
-
-Start All Controllers
-    [Documentation]    Start all the controllers in the cluster
-    Startcontroller    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Startcontroller    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Startcontroller    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    120
-
-Delete all cars
-    [Documentation]    Delete all the cars from the system
-       ${resp}         DeleteAllCars   ${LEADER}       ${PORT}         0
-       ${resp}         GetCars ${LEADER}       ${PORT}         0
-       Should Be Equal As Strings    ${resp.status_code}    404
-       
-
-Delete all people
-    [Documentation]    Delete all the people from the system
-       ${resp}         DeleteAllPersons        ${LEADER}       ${PORT}         0
-       ${resp}         GetPersons      ${LEADER}       ${PORT}    0    
-       Should Be Equal As Strings    ${resp.status_code}    404
-
-Add 20000 cars
-    [Documentation]    Add 200 cars
-       ${resp}         AddCar  ${LEADER}       ${PORT}  ${200}
-       Should Be Equal As Strings    ${resp.status_code}    204
-
-Add 20000 people
-    [Documentation]    Add 200 people
-       ${resp}         AddPerson       ${LEADER}       ${PORT} ${0}    
-       ${resp}         AddPerson       ${LEADER}       ${PORT}  ${200}
-       Should Be Equal As Strings    ${resp.status_code}    204
-
-Add Car Person mapping
-    [Documentation]    Add Car Persons
-       ${resp}         AddCarPerson    ${LEADER}       ${PORT} ${0}    
-       ${resp}         BuyCar  ${LEADER}       ${PORT} ${200}  
-
-Stop of of the followers
-    ${followers}  GetFollowers  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
-    ${CAR_FOLLOWER}    Set Variable    ${followers[0]}
-    Set Suite Variable    ${CAR_FOLLOWER}
-    Stopcontroller    ${CAR_FOLLOWER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    30
-    KillController    ${CAR_FOLLOWER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-
-Get all the cars from the other Follower
-    ${followers}  GetFollowers  ${CAR_SHARD}  ${3}  ${3}  ${1}  8181  ${LEADER}  ${FOLLOWER1}  ${FOLLOWER2}
-       ${resp}         Getcars ${followers[0]} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   manufacturer1
-
-Restart the Stopped Follower
-    Startcontroller   ${CAR_FOLLOWER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    120
-
-Get all the cars from Stopped Follower
-       ${resp}         Getcars ${CAR_FOLLOWER} ${PORT} ${0}
-       Should Be Equal As Strings    ${resp.status_code}    200
-       Should Contain     ${resp.content}   manufacturer1
-
-Cleanup All Controllers 
-    [Documentation]    Stop all the controllers in the cluster
-    Stopcontroller    ${LEADER}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Stopcontroller    ${FOLLOWER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
-    Sleep    30
-
-
-
diff --git a/test/csit/suites/clustering/routedrpc/001_start_cluster.txt b/test/csit/suites/clustering/routedrpc/001_start_cluster.txt
new file mode 100644 (file)
index 0000000..da9264a
--- /dev/null
@@ -0,0 +1,38 @@
+*** Settings ***
+Documentation     Start the controllers
+Library           Collections
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${REST_CONTEXT}    /restconf/config/
+
+*** Test Cases *** 
+Stop All Controllers
+    [Documentation]    Stop all the controllers in the cluster
+    Stopcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Stopcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    30
+    KillController    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    KillController    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+
+
+Clean All Journals
+    [Documentation]    Clean the journals of all the controllers in the cluster
+    CleanJournal    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    CleanJournal    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    5
+
+Start All Controllers
+    [Documentation]    Start all the controllers in the cluster
+    Startcontroller    ${MEMBER1}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER2}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Startcontroller    ${MEMBER3}    ${USER_NAME}    ${PASSWORD}    ${KARAF_HOME}
+    Sleep    120
\ No newline at end of file
similarity index 65%
rename from test/csit/suites/clustering/datastore/routedrpc/023_routed_rpc_crud_test.txt
rename to test/csit/suites/clustering/routedrpc/023_routed_rpc_crud_test.txt
index 1e1781dce8ed0520ffa31ba6f9213728ed4c4a06..2ee99f23063dce66cc068ce099141c8c88af0698 100644 (file)
@@ -1,12 +1,12 @@
 *** Settings ***
 Documentation     Test suite for Routed RPC. 
 Library           Collections
-Library           ../../../../libraries/RequestsLibrary.py
-Library           ../../../../libraries/Common.py
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/SettingsLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Variables         ../../../../variables/Variables.py
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Variables         ../../../variables/Variables.py
 
 *** Variables ***
 ${REST_CONTEXT}    /restconf/config/
@@ -15,17 +15,17 @@ ${REST_CONTEXT}    /restconf/config/
 *** Test Cases *** 
 Add cars and get cars from Leader 
     [Documentation]    Add 100 cars and get added cars from Leader
-       ${resp}         AddCar  ${LEADER}       ${PORT} ${100}  
-       ${resp}         Getcars ${LEADER}       ${PORT} ${0}
+       ${resp}         AddCar  ${MEMBER1}      ${PORT} ${100}  
+       ${resp}         Getcars ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain     ${resp.content}   manufacturer1      
                
 Add persons and get persons from Leader 
     [Documentation]    Add 100 persons and get persons
     [Documentation]    Note: There should be one person added first to enable rpc
-       ${resp}         AddPerson       ${LEADER}       ${PORT} ${0}    
-       ${resp}         AddPerson       ${LEADER}       ${PORT} ${100}  
-       ${resp}         GetPersons      ${LEADER}       ${PORT} ${0}
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT} ${0}    
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT} ${100}  
+       ${resp}         GetPersons      ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain     ${resp.content}   user5
        SLEEP   10      
@@ -33,32 +33,32 @@ Add persons and get persons from Leader
 Add car-person mapping and get car-person mapping from Follower1
     [Documentation]    Add car-person and get car-person from Leader
     [Documentation]    Note: This is done to enable working of rpc
-        ${resp}                AddCarPerson    ${FOLLOWER1}    ${PORT} ${0}
-        ${resp}                GetCarPersonMappings    ${FOLLOWER1}    ${PORT} ${0}
+        ${resp}                AddCarPerson    ${MEMBER2}      ${PORT} ${0}
+        ${resp}                GetCarPersonMappings    ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings      ${resp.status_code}     200
         Should Contain ${resp.content} user0
        SLEEP   5
 
 Purchase 100 cars using Follower1 
     [Documentation]  Purchase 100 cars using Follower1
-       ${resp}         BuyCar  ${FOLLOWER1}    ${PORT} ${100}
-       ${resp}         GetCarPersonMappings    ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         BuyCar  ${MEMBER2}      ${PORT} ${100}
+       ${resp}         GetCarPersonMappings    ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
 
 Get Cars from Leader
     [Documentation]    Get 100 using Leader
-       ${resp}         Getcars ${LEADER}       ${PORT} ${0}
+       ${resp}         Getcars ${MEMBER1}      ${PORT} ${0}
         Should Be Equal As Strings    ${resp.status_code}    200
         Should Contain     ${resp.content}   manufacturer99
 
 Get persons from Leader
     [Documentation]    Get 101 Persons from Leader
-       ${resp}         GetPersons      ${LEADER}       ${PORT} ${0}
+       ${resp}         GetPersons      ${MEMBER1}      ${PORT} ${0}
         Should Be Equal As Strings    ${resp.status_code}    200
         Should Contain     ${resp.content}   user100
 
 Get car-person mappings using Leader
    [Documentation]     Get 101 car-person mappings using Leader to see 100 entry
-       ${resp}         GetCarPersonMappings    ${LEADER}       ${PORT} ${0}
+       ${resp}         GetCarPersonMappings    ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain     ${resp.content}   user100
similarity index 64%
rename from test/csit/suites/clustering/datastore/routedrpc/024_routed_rpc_crud_test.txt
rename to test/csit/suites/clustering/routedrpc/024_routed_rpc_crud_test.txt
index 82d4acc694a460e5c596950445f947ab9e183919..e29c3f5bf19a1f61ed437d5a884f0c10c1fa6026 100644 (file)
@@ -1,13 +1,13 @@
 *** Settings ***
 Documentation     Test suite for Routed RPC. 
 Library           Collections
-Library           ../../../../libraries/RequestsLibrary.py
-Library           ../../../../libraries/Common.py
-Library           ../../../../libraries/CrudLibrary.py
-Library           ../../../../libraries/SettingsLibrary.py
-Library           ../../../../libraries/UtilLibrary.py
-Library           ../../../../libraries/ClusterStateLibrary.py
-Variables         ../../../../variables/Variables.py
+Library           ../../../libraries/RequestsLibrary.py
+Library           ../../../libraries/Common.py
+Library           ../../../libraries/CrudLibrary.py
+Library           ../../../libraries/SettingsLibrary.py
+Library           ../../../libraries/UtilLibrary.py
+Library           ../../../libraries/ClusterStateLibrary.py
+Variables         ../../../variables/Variables.py
 
 *** Variables ***
 ${REST_CONTEXT}    /restconf/config/
@@ -15,104 +15,104 @@ ${REST_CONTEXT}    /restconf/config/
 *** Test Cases *** 
 Add cars and get cars from Leader 
     [Documentation]    Add 100 cars and get added cars from Leader
-       ${resp}         AddCar  ${LEADER}       ${PORT} ${100}  
-       ${resp}         Getcars ${LEADER}       ${PORT} ${0}
+       ${resp}         AddCar  ${MEMBER1}      ${PORT} ${100}  
+       ${resp}         Getcars ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain     ${resp.content}   manufacturer1      
        
 Add persons and get persons from Leader 
     [Documentation]    Add 100 persons and get persons
     [Documentation]    Note: There should be one person added first to enable rpc
-       ${resp}         AddPerson       ${LEADER}       ${PORT} ${0}    
-       ${resp}         AddPerson       ${LEADER}       ${PORT} ${100}  
-       ${resp}         GetPersons      ${LEADER}       ${PORT} ${0}
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT} ${0}    
+       ${resp}         AddPerson       ${MEMBER1}      ${PORT} ${100}  
+       ${resp}         GetPersons      ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain     ${resp.content}   user5      
 
 Add car-person mapping and get car-person mapping from Follower1
     [Documentation]     Add car-person and get car-person from Follower1
     [Documentation]  Note: This is done to enable working of rpc
-       ${resp}         AddCarPerson    ${FOLLOWER1}    ${PORT} ${0}
-       ${resp}         GetCarPersonMappings    ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         AddCarPerson    ${MEMBER2}      ${PORT} ${0}
+       ${resp}         GetCarPersonMappings    ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content} user0
 
 Purchase 100 cars using Follower 
     [Documentation]  Purchase 100 cars using Follower
        SLEEP   10
-       ${resp}         BuyCar  ${FOLLOWER1}    ${PORT} ${100}  
-       ${resp}         GetCarPersonMappings    ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         BuyCar  ${MEMBER2}      ${PORT} ${100}  
+       ${resp}         GetCarPersonMappings    ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
 
 Get Cars from Leader
     [Documentation]    Get 100 using Leader
-       ${resp}         Getcars ${LEADER}       ${PORT} ${0}
+       ${resp}         Getcars ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         manufacturer9
 
 Get persons from Leader
     [Documentation]    Get 11 Persons from Leader
-       ${resp}         GetPersons      ${LEADER}       ${PORT} ${0}
+       ${resp}         GetPersons      ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         user100
 
 Get car-person mappings using Leader
    [Documentation]     Get car-person mappings using Leader to see 100 entry
-       ${resp}         GetCarPersonMappings    ${LEADER}       ${PORT} ${0}
+       ${resp}         GetCarPersonMappings    ${MEMBER1}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         user100
 
 Stop Leader
    [Documentation]     Stop Leader controller
-       ${resp}         Stopcontroller  ${LEADER}       root    Ecp123  /opt/clustering/dist
+       ${resp}         Stopcontroller  ${MEMBER1}      ${USERNAME}     ${PASSWORD}     ${KARAF_HOME}
        SLEEP   30
-       ${resp}         Killcontroller  ${LEADER}       root    Ecp123  /opt/clustering/dist
+       ${resp}         Killcontroller  ${MEMBER1}      ${USERNAME}     ${PASSWORD}     ${KARAF_HOME}
 
        
 Add cars and get cars from Follower1 
     [Documentation]    Add 100 cars and get added cars from Follower
-       ${resp}         AddCar  ${FOLLOWER1}    ${PORT} ${100}  
-       ${resp}         Getcars ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         AddCar  ${MEMBER2}      ${PORT} ${100}  
+       ${resp}         Getcars ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         manufacturer1
 
 Add persons and get persons from Follower1
     [Documentation]    Add 100 persons and get persons
     [Documentation]    Note: There should be one person added first to enable rpc
-       ${resp}         AddPerson       ${FOLLOWER1}    ${PORT} ${0}    
-       ${resp}         AddPerson       ${FOLLOWER1}    ${PORT} ${100}  
-       ${resp}         GetPersons      ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         AddPerson       ${MEMBER2}      ${PORT} ${0}    
+       ${resp}         AddPerson       ${MEMBER2}      ${PORT} ${100}  
+       ${resp}         GetPersons      ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         user5
        SLEEP   10
        
 Purchase 100 cars using Follower2 
     [Documentation]  Purchase 100 cars using Follower2
-       ${resp}         BuyCar  ${FOLLOWER2}    ${PORT} ${100}
+       ${resp}         BuyCar  ${MEMBER3}      ${PORT} ${100}
        SLEEP   10
-       ${resp}         GetCarPersonMappings    ${FOLLOWER2}    ${PORT} ${0}
+       ${resp}         GetCarPersonMappings    ${MEMBER3}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
 
 Get Cars from Follower1
     [Documentation]    Get 100 using Follower1
-       ${resp}         Getcars ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         Getcars ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         manufacturer9
 
 Get persons from Follower1
     [Documentation]    Get 11 Persons from Follower1
-       ${resp}         GetPersons      ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         GetPersons      ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         user100
 
 Get car-person mappings using Follower1
    [Documentation]     Get car-person mappings using Follower1 to see 100 entry
-       ${resp}         GetCarPersonMappings    ${FOLLOWER1}    ${PORT} ${0}
+       ${resp}         GetCarPersonMappings    ${MEMBER2}      ${PORT} ${0}
        Should Be Equal As Strings    ${resp.status_code}    200
        Should Contain  ${resp.content}         user100
 
 Start Leader
    [Documentation]     Start Leader controller 
-       ${resp}         Startcontroller ${LEADER}       root    Ecp123  /opt/clustering/dist
+       ${resp}         Startcontroller ${MEMBER1}      ${USERNAME}     ${PASSWORD}     ${KARAF_HOME}
        SLEEP   20
 
index d6780ce9603cb601e42727c7119a54f1efd4079b..aebea60e2e79ed6fbd2d64c9b329b9124beddcc4 100644 (file)
@@ -1,6 +1,6 @@
 # remote_host.py
-
-# 
+#
+#
 # The RemoteHost class provides methods to do operations on a remote host
 #
 
@@ -18,8 +18,10 @@ class RemoteHost:
                lib = SSHLibrary()
                lib.open_connection(self.host)
                lib.login(username=self.user,password=self.password)
-               lib.execute_command(command)
+               rc = lib.execute_command(command, return_rc = True)
                lib.close_connection()
+               if rc[1] != 0:
+                  raise Exception('remote command failed [{0}] with exit code {1}'.format(command, rc))
 
 
        def mkdir(self, dir_name):
@@ -37,4 +39,4 @@ class RemoteHost:
            self.exec_cmd("ps axf | grep karaf | grep -v grep | awk '{print \"kill -9 \" $1}' | sh")
 
        def start_controller(self, dir_name):
-               self.exec_cmd(dir_name + "/odl/bin/start")
\ No newline at end of file
+               self.exec_cmd(dir_name + "/odl/bin/start")