Reformat Robot files to follow best practices
Best practices in Robot files consist in using three spaces as
separator and not using tabs. This change updates all files
and includes the checking of the format as part of
`devops-stages/stage-test.sh`. In addition, it checks that files
have no CRLF terminators.
Change-Id: Ie71c2dd92585eba3baf98df0be54f05828819ad8
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/robot-systest/lib/ssh_lib.robot b/robot-systest/lib/ssh_lib.robot
index 216cd59..8be049e 100644
--- a/robot-systest/lib/ssh_lib.robot
+++ b/robot-systest/lib/ssh_lib.robot
@@ -14,7 +14,7 @@
Test SSH Connection
[Arguments] ${host} ${username} ${password} ${privatekey}
- Open Connection ${host}
+ Open Connection ${host}
Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
... ELSE Login With Public Key ${username} ${privatekey}
Execute Command hostname
@@ -24,8 +24,8 @@
[Arguments] ${host} ${username} ${password} ${privatekey} ${file}
Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
+ Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
+ ... ELSE Login With Public Key ${username} ${privatekey}
${rc}= Execute Command ls ${file} >& /dev/null return_stdout=False return_rc=True
Close All Connections
Should Be Equal As Integers ${rc} 0
@@ -34,32 +34,32 @@
[Arguments] ${host} ${username} ${password} ${privatekey} ${folder}
Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
+ Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
+ ... ELSE Login With Public Key ${username} ${privatekey}
${output}= Execute Command ls -d ${folder}
Close All Connections
Should Be Equal As Strings ${output} ${folder}
Get Remote File Content
- [Arguments] ${host} ${username} ${password} ${privatekey} ${file}
+ [Arguments] ${host} ${username} ${password} ${privatekey} ${file}
- Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
+ Open Connection ${host}
+ Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
+ ... ELSE Login With Public Key ${username} ${privatekey}
${output}= Execute Command cat ${file}
Close All Connections
[Return] ${output}
Ping Many
- [Arguments] ${host} ${username} ${password} ${privatekey} @{ip_list}
+ [Arguments] ${host} ${username} ${password} ${privatekey} @{ip_list}
- Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
+ Open Connection ${host}
+ Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
+ ... ELSE Login With Public Key ${username} ${privatekey}
FOR ${ip} IN @{ip_list}
- ${result}= Execute Command ping -c 5 -W 1 ${ip} > /dev/null && echo OK shell=True
- Log ${result}
- Should Contain ${result} OK
+ ${result}= Execute Command ping -c 5 -W 1 ${ip} > /dev/null && echo OK shell=True
+ Log ${result}
+ Should Contain ${result} OK
END
Close All Connections
@@ -68,8 +68,8 @@
[Arguments] ${host} ${username} ${password} ${privatekey} ${command}
Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
+ Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
+ ... ELSE Login With Public Key ${username} ${privatekey}
${stdout} ${rc}= Execute Command ${command} return_rc=True return_stdout=True
log ${rc}
log ${stdout}