+ Wait Until Keyword Succeeds 60s 2s Check Cars-Persons Deleted ${controller_ip}
+
+Stop One Or More Controllers
+ [Arguments] @{controllers}
+ [Documentation] Give this keyword a scalar or list of controllers to be stopped.
+ ${cmd} = Set Variable ${KARAF_HOME}/bin/stop
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ : FOR ${ip} IN @{controllers}
+ \ Wait Until Keyword Succeeds 120 s 3 s Controller Down Check ${ip}
+
+Start One Or More Controllers
+ [Arguments] @{controllers}
+ [Documentation] Give this keyword a scalar or list of controllers to be started.
+ ${cmd} = Set Variable ${KARAF_HOME}/bin/start
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ # TODO: This should throw an error if controller never comes up.
+ : FOR ${ip} IN @{controllers}
+ \ UtilLibrary.Wait For Controller Up ${ip} ${RESTCONFPORT}
+
+Kill One Or More Controllers
+ [Arguments] @{controllers}
+ [Documentation] Give this keyword a scalar or list of controllers to be stopped.
+ ${cmd} = Set Variable ps axf | grep karaf | grep -v grep | awk '{print \"kill -9 \" $1}' | sh
+ log ${cmd}
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ : FOR ${ip} IN @{controllers}
+ \ Wait Until Keyword Succeeds 12 s 3 s Controller Down Check ${ip}
+
+Controller Down Check
+ [Arguments] ${ip}
+ [Documentation] Checks to see if a controller is down by verifying that the karaf process isn't present.
+ ${cmd} = Set Variable ps axf | grep karaf | grep -v grep | wc -l
+ ${response} Run Command On Remote System ${ip} ${cmd}
+ Log Number of controller instances running: ${response}
+ Should Start With ${response} 0 Controller process found or there may be extra instances of karaf running on the host machine.
+
+Clean One Or More Journals
+ [Arguments] @{controllers}
+ [Documentation] Give this keyword a scalar or list of controllers on which to clean journals.
+ ${del_cmd} = Set Variable rm -rf ${KARAF_HOME}/journal
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${del_cmd}
+
+Clean One Or More Snapshots
+ [Arguments] @{controllers}
+ [Documentation] Give this keyword a scalar or list of controllers on which to clean snapshots.
+ ${del_cmd} = Set Variable rm -rf ${KARAF_HOME}/snapshots
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${del_cmd}
+
+Show Cluster Configuation Files
+ [Arguments] @{controllers}
+ [Documentation] Prints out the cluster configuration files for one or more controllers.
+ Log controllers: @{controllers}
+ ${cmd} = Set Variable cat ${KARAF_HOME}/configuration/initial/akka.conf
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ ${cmd} = Set Variable cat ${KARAF_HOME}/configuration/initial/modules.conf
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ ${cmd} = Set Variable cat ${KARAF_HOME}/configuration/initial/module-shards.conf
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ ${cmd} = Set Variable cat ${KARAF_HOME}/configuration/initial/jolokia.xml
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ ${cmd} = Set Variable cat ${KARAF_HOME}/etc/initial/org.apache.karaf.management.cfg
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}
+ ${cmd} = Set Variable cat ${KARAF_HOME}/etc/org.apache.karaf.features.cfg
+ : FOR ${ip} IN @{controllers}
+ \ Run Command On Remote System ${ip} ${cmd}