Some systems may need to add sudo or even change the command
(e.g. lsof in MacOS)
Change-Id: Ife06559dd3cd8ff76b5b433d687bd7bbbb48b9b6
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
*** Variables ***
${SSHKeywords__current_remote_working_directory} .
${SSHKeywords__current_venv_path} /tmp/defaultvenv
+${NETSTAT_COMMAND} netstat -punta
*** Keywords ***
Open_Connection_To_ODL_System
Count_Port_Occurences
[Arguments] ${port} ${state} ${name}
[Documentation] Run 'netstat' on the remote machine and count occurences of given port in the given state connected to process with the given name.
- ${output} = SSHLibrary.Execute_Command netstat -natp 2> /dev/null | grep -E ":${port} .+ ${state} .+${name}" | wc -l
+ ${output} = SSHLibrary.Execute_Command ${NETSTAT_COMMAND} 2> /dev/null | grep -E ":${port} .+ ${state} .+${name}" | wc -l
[Return] ${output}
Virtual_Env_Set_Path