Update code to adhere to coding guideline
Change-Id: I859340a2f17e19b7b5cbb24807499db7ad455f74
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 49cd88e..7935509 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -169,8 +169,8 @@
Incorrect examples:
```
- ${var1} = Set Variable ${1}
- ${var1} = My Keyword
+ ${var1}= Set Variable ${1}
+ ${var1}= My Keyword
```
- General variable naming conventions:
- Variable names should be lower case with few exceptions:
diff --git a/extended/test_sbe_side_switch.robot b/extended/test_sbe_side_switch.robot
index b936b8a..7e2bdfd 100644
--- a/extended/test_sbe_side_switch.robot
+++ b/extended/test_sbe_side_switch.robot
@@ -29,8 +29,8 @@
... msg=Expects boot attempts left 3, but got ${attempts_left}.
# Get which side the SBE is booted with. By default 0.
- ${sbe_val} = Get SBE
- ${sbe_cur_side} = Evaluate ${sbe_side_bit_mask} & ${sbe_val}
+ ${sbe_val}= Get SBE
+ ${sbe_cur_side}= Evaluate ${sbe_side_bit_mask} & ${sbe_val}
Trigger Watchdog Error To Switch SBE Boot Side
@@ -38,8 +38,8 @@
Wait Until Keyword Succeeds 2 min 30 sec Watchdog Object Should Exist
# Verify that the side has switched.
- ${sbe_val} = Get SBE
- ${sbe_orig_side} = Evaluate ${sbe_side_bit_mask} & ${sbe_val}
+ ${sbe_val}= Get SBE
+ ${sbe_orig_side}= Evaluate ${sbe_side_bit_mask} & ${sbe_val}
Run Keyword If ${sbe_orig_side} == ${0}
... Should Be True ${sbe_cur_side} == ${sbe_side_bit_mask}
diff --git a/lib/pdu/pdu.robot b/lib/pdu/pdu.robot
index aa1b216..7ea280e 100644
--- a/lib/pdu/pdu.robot
+++ b/lib/pdu/pdu.robot
@@ -6,7 +6,7 @@
*** Keywords ***
Validate Prereq
[Documentation] Validate prerequisites for PDU.
- ${PDU_VAR_LIST} = Create List PDU_TYPE PDU_IP PDU_USERNAME PDU_PASSWORD PDU_SLOT_NO
+ ${PDU_VAR_LIST}= Create List PDU_TYPE PDU_IP PDU_USERNAME PDU_PASSWORD PDU_SLOT_NO
: FOR ${PDU_VAR} IN @{PDU_VAR_LIST}
\ Should Not Be Empty ${${PDU_VAR}} msg=Unable to find variable ${PDU_VAR}
diff --git a/lib/utils.robot b/lib/utils.robot
index 852989d..81b82a2 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -1594,11 +1594,11 @@
# Description of argument(s):
# openbmc_password The root password for the open BMC system.
- @{password} = Create List ${openbmc_password}
- ${data} = Create Dictionary data=@{password}
+ @{password}= Create List ${openbmc_password}
+ ${data}= Create Dictionary data=@{password}
- ${headers} = Create Dictionary Content-Type=application/json
- ${resp} = Post Request openbmc ${BMC_USER_URI}root/action/SetPassword
+ ${headers}= Create Dictionary Content-Type=application/json
+ ${resp}= Post Request openbmc ${BMC_USER_URI}root/action/SetPassword
... data=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
... msg=Updating the new root password failed, RC=${resp.status_code}.
diff --git a/lib/xcat/xcat_utils.robot b/lib/xcat/xcat_utils.robot
index 9d2e61d..7eaadfa 100644
--- a/lib/xcat/xcat_utils.robot
+++ b/lib/xcat/xcat_utils.robot
@@ -51,7 +51,7 @@
OperatingSystem.File Should Exist ${node_cfg_file_path} msg=cfg file missing.
File Should Not Be Empty ${node_cfg_file_path} msg=Empty config file.
- ${bmc_list} = OperatingSystem.Get File ${node_cfg_file_path}
+ ${bmc_list}= OperatingSystem.Get File ${node_cfg_file_path}
[Return] ${bmc_list}
Add Nodes To XCAT
diff --git a/openpower/ras/test_host_ras.robot b/openpower/ras/test_host_ras.robot
index 0409a85..1873329 100755
--- a/openpower/ras/test_host_ras.robot
+++ b/openpower/ras/test_host_ras.robot
@@ -353,7 +353,7 @@
Collect eSEL Log ${log_prefix}
${error_log_file_path}= Catenate ${log_prefix}esel.txt
- ${rc} ${output} = Run and Return RC and Output
+ ${rc} ${output}= Run and Return RC and Output
... grep -i ${signature_desc} ${error_log_file_path}
Should Be Equal ${rc} ${0}
Should Not Be Empty ${output}
diff --git a/syslib/utils_os.robot b/syslib/utils_os.robot
index 02326ab..0c518a3 100755
--- a/syslib/utils_os.robot
+++ b/syslib/utils_os.robot
@@ -585,8 +585,8 @@
# json_tmp_file_path Path of file to write to.
# last Is this the last element in the parent JSON?
Write New JSON List ${json_tmp_file_path} ${class}
- ${output} = Retrieve Hardware Info ${class}
- ${output} = Clean Up String ${output}
+ ${output}= Retrieve Hardware Info ${class}
+ ${output}= Clean Up String ${output}
Run Keyword if ${output.__class__ is not type(None)}
... Append To File ${json_tmp_file_path} ${output}
Close New JSON List ${json_tmp_file_path}
@@ -621,7 +621,7 @@
# Description of argument(s):
# class Device class to retrieve with lshw.
${output} ${stderr} ${rc}= OS Execute Command lshw -c ${class} -json
- ${output} = Verify JSON string ${output}
+ ${output}= Verify JSON string ${output}
[Return] ${output}
@@ -630,8 +630,8 @@
[Arguments] ${unver_string}
# Description of argument(s):
# unver_string JSON String we will be checking for lshw comma errors.
- ${unver_string} = Convert to String ${unver_string}
- ${ver_string} = Replace String Using Regexp ${unver_string} }\\s*{ },{
+ ${unver_string}= Convert to String ${unver_string}
+ ${ver_string}= Replace String Using Regexp ${unver_string} }\\s*{ },{
[Return] ${ver_string}
@@ -640,10 +640,10 @@
[Arguments] ${dirty_string}
# Description of argument(s):
# dirty_string String that will be space stripped and have comma removed.
- ${clean_string} = Strip String ${dirty_string}
- ${last_char} = Get Substring ${clean_string} -1
- ${trimmed_string} = Get Substring ${clean_string} 0 -1
- ${clean_string} = Set Variable If '${last_char}' == ','
+ ${clean_string}= Strip String ${dirty_string}
+ ${last_char}= Get Substring ${clean_string} -1
+ ${trimmed_string}= Get Substring ${clean_string} 0 -1
+ ${clean_string}= Set Variable If '${last_char}' == ','
... ${trimmed_string} ${clean_string}
[Return] ${clean_string}
diff --git a/tests/ipmi/test_sensors_ipmi.robot b/tests/ipmi/test_sensors_ipmi.robot
index f260df8..9736b10 100644
--- a/tests/ipmi/test_sensors_ipmi.robot
+++ b/tests/ipmi/test_sensors_ipmi.robot
@@ -309,7 +309,7 @@
[Tags] Verify_IPMI_BT_Capabilities_Command
[Setup] Run Keywords REST Hard Power Off AND REST Power On
- ${output} = Run IPMI command 0x06 0x36
+ ${output}= Run IPMI command 0x06 0x36
Should Be True "${output}" == " 01 3f 3f 0a 01"
... msg=Incorrect Output.
diff --git a/tests/test_occ_power.robot b/tests/test_occ_power.robot
index 6dd36ee..1d57e6d 100644
--- a/tests/test_occ_power.robot
+++ b/tests/test_occ_power.robot
@@ -48,21 +48,21 @@
[Documentation] Verify OCC state and count after host reboot.
[Tags] Verify_OCC_State_After_Host_Reboot
- ${occ_count_before} = Count OCC Object Entry
+ ${occ_count_before}= Count OCC Object Entry
Verify OCC State ${1}
Host Reboot
Verify OCC State ${1}
- ${occ_count_after} = Count OCC Object Entry
+ ${occ_count_after}= Count OCC Object Entry
Should be Equal ${occ_count_before} ${occ_count_after}
Verify OCC State After BMC Reset
[Documentation] Verify OCC state and count after BMC reset.
[Tags] Verify_OCC_State_After_BMC_Reset
- ${occ_count_before} = Count OCC Object Entry
+ ${occ_count_before}= Count OCC Object Entry
OBMC Reboot (run)
Verify OCC State ${1}
- ${occ_count_after} = Count OCC Object Entry
+ ${occ_count_after}= Count OCC Object Entry
Should be Equal ${occ_count_before} ${occ_count_after}
Verify OCC State At Standby
diff --git a/tests_ldap/test_user_ldap_management.robot b/tests_ldap/test_user_ldap_management.robot
index 1d5cca8..e601d1e 100644
--- a/tests_ldap/test_user_ldap_management.robot
+++ b/tests_ldap/test_user_ldap_management.robot
@@ -173,7 +173,7 @@
Configure LDAP Server On BMC
[Documentation] Configure LDAP Server On BMC.
- ${LDAP_SECURE_MODE} = Convert To Boolean ${LDAP_SECURE_MODE}
+ ${LDAP_SECURE_MODE}= Convert To Boolean ${LDAP_SECURE_MODE}
@{ldap_parm_list}= Create List
... ${LDAP_SERVER_URI} ${LDAP_BIND_DN}