+Connect To Controller Karaf
+ [Documentation] Connect to the controller's karaf console.
+ ${connection}= SSHLibrary.Open_Connection ${CONTROLLER} port=${KARAF_SHELL_PORT} prompt=>
+ Set Suite Variable ${controller_index} ${connection}
+ SSHLibrary.Login ${KARAF_USER} ${KARAF_PASSWORD}
+
+Log Message To Controller Karaf
+ [Arguments] ${message}
+ [Documentation] Send a message into the controller's karaf log file.
+ # Background info: If there was no previous SSH connection, the "Get
+ # Connection" returns an information structure whose "index" field
+ # resolves to "None", and the "Switch Connection" below does not
+ # complain.
+ ${current}= Get_Connection
+ ${connection}= Set Variable ${current.index}
+ BuiltIn.Run Keyword If ${controller_index} <> -1 Switch Connection ${controller_index}
+ BuiltIn.Run Keyword If ${controller_index} == -1 Connect to Controller Karaf
+ SSHLibrary.Write log:log "ROBOT MESSAGE: ${message}"
+ SSHLibrary.Read_Until_Prompt
+ Switch Connection ${connection}
+