+ ${index_list} = ClusterManagement.List_Indices_Or_All given_list=${member_index_list}
+ : FOR ${index} IN @{index_list} # usually: 1, 2, 3.
+ \ Execute_Controller_Karaf_Command_On_Background log:set ${bgpcep_level} org.opendaylight.bgpcep member_index=${index}
+ \ Execute_Controller_Karaf_Command_On_Background log:set ${protocol_level} org.opendaylight.protocol member_index=${index}
+
+Wait_For_Karaf_Log
+ [Arguments] ${message} ${timeout}=60 ${member_index}=${1}
+ [Documentation] Read karaf logs until message appear
+ # TODO: refactor this keyword to use the new workflow to account for multiple controllers. Initial work was done
+ # in this patch https://git.opendaylight.org/gerrit/#/c/45596/
+ # however, the consumers of this keyword were breaking after that change. Initial theory is that a previous
+ # keyword used before this "Wait For Karaf Log" keyword was closing the karaf console connection, so the
+ # "Flexible SSH Login" keyword from the patch above (45596) was failing.
+ BuiltIn.Log Waiting for '${message}' in karaf log
+ SSHLibrary.Open_Connection ${ODL_SYSTEM_IP} port=${KARAF_SHELL_PORT} prompt=${KARAF_PROMPT_LOGIN} timeout=${timeout}
+ SSHLibrary.Login ${KARAF_USER} ${KARAF_PASSWORD} loglevel=${loglevel}
+ SSHLibrary.Write log:tail
+ SSHLibrary.Read_Until ${message}
+ SSHLibrary.Close_Connection
+
+Restart_Bundle
+ [Arguments] ${bundle_id}
+ [Documentation] Restarts bundle passed as argument. Note this operation is only for testing and not production environments
+ # TODO: prepare this for cluster environment and multiple controllers
+ Execute_Controller_Karaf_Command_With_Retry_On_Background bundle:restart -f $(bundle:id '${bundle_id}')
+
+Restart_Karaf
+ [Documentation] Restarts Karaf and polls log to detect when Karaf is up and running again
+ # TODO: prepare this for cluster environment and multiple controllers
+ Execute_Controller_Karaf_Command_With_Retry_On_Background log:clear
+ Execute_Controller_Karaf_Command_With_Retry_On_Background shutdown -r -f
+ BuiltIn.Run_Keyword_And_Return_Status BuiltIn.Wait_Until_Keyword_Succeeds 240s 60s Wait_For_Karaf_Log Karaf started in
+
+Restart_Jetty
+ [Documentation] Restarts jetty bundle (to reload certificates or key/truststore information)
+ Execute_Controller_Karaf_Command_With_Retry_On_Background log:clear
+ Restart_Bundle OPS4J Pax Web - Jetty
+ Wait_For_Karaf_Log Instantiated the Application class org.opendaylight.restconf.RestconfApplication
+ Wait_For_Karaf_Log Instantiated the Application class org.opendaylight.netconf.sal.rest.impl.RestconfApplication
+ Wait_For_Karaf_Log Instantiated the Application class org.opendaylight.aaa.idm.IdmLightApplication