--- /dev/null
+*** 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
*** 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 ***
*** 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}
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}
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
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}
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}
*** 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/
*** 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}
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}
*** 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
*** 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}
*** 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
*** 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}
*** 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
*** 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}
*** 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
*** 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}
--- /dev/null
+*** 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
+
+
+
--- /dev/null
+*** 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
+
+
+
*** Settings ***
-Documentation Test suite for MD-SAL NSF
+Documentation Test suite for Clustering Datastore
Library SSHLibrary
+++ /dev/null
-*** 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
+++ /dev/null
-*** 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
+++ /dev/null
-*** 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
-
-
-
+++ /dev/null
-*** 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
-
-
-
--- /dev/null
+*** 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
*** 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/
*** 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
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
*** 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/
*** 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
# remote_host.py
-
-#
+#
+#
# The RemoteHost class provides methods to do operations on a remote host
#
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):
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")