@@ -75,8 +75,8 @@ class RedfishClient:
7575 Constructor
7676 Callbacks are provided because:
7777 1. Each BMC instance may have its own BMC users management mechanism.
78- 1 . Password is not allowed to be saved for security concern.
79- 2 . If token expires or becomes invalid for some reason (for example, being revoked from BMC web interface),
78+ 2 . Password is not allowed to be saved for security concern.
79+ 3 . If token expires or becomes invalid for some reason (for example, being revoked from BMC web interface),
8080 RedfishClient will do login retry in which password is required anyway. It will get password from an external password provider,
8181 for example class BMC which holds the responsibility of generating password from TPM.
8282
@@ -127,7 +127,7 @@ def __build_logout_cmd(self):
127127 return cmd
128128
129129 '''
130- Build the POST command to do firmware upgdate -multipart
130+ Build the POST command to do firmware update -multipart
131131
132132 Args:
133133 fw_image: A string, path to the firmware image file
@@ -328,7 +328,7 @@ def __obfuscate_auth_token(self, cmd):
328328 return obfuscation_cmd
329329
330330 '''
331- Obfuscate password while aksing for password change
331+ Obfuscate password while asking for password change
332332
333333 Args:
334334 cmd: A string, the cURL command to be obfuscated
@@ -424,7 +424,7 @@ def __get_headers_and_body_from_curl_output(self, curl_output):
424424 Returns:
425425 An integer, RedfishClient error code
426426 '''
427- def __curl_errors_to_redfish_erros_translation (self , curl_error ):
427+ def __curl_errors_to_redfish_errors_translation (self , curl_error ):
428428 return self .CURL_TO_REDFISH_ERROR_MAP .get (
429429 curl_error , RedfishClient .ERR_CODE_CURL_FAILURE )
430430
@@ -506,7 +506,7 @@ def __exec_curl_cmd_internal(self, cmd):
506506 else :
507507 logger .log_notice (f'cURL error:' )
508508 self .log_multi_line_str (error_str )
509- ret = self .__curl_errors_to_redfish_erros_translation (ret )
509+ ret = self .__curl_errors_to_redfish_errors_translation (ret )
510510
511511 return (ret , http_status_code , output_str , error_str )
512512
@@ -967,7 +967,6 @@ def login(self):
967967 except Exception as e :
968968 logger .log_error (f'Login failure: Exception during parsing body: { str (e )} ' )
969969 self .log_multi_line_str (response )
970- pass
971970
972971 # Extract both token and session ID from headers
973972 token = headers .get ('X-Auth-Token' )
@@ -1223,7 +1222,7 @@ def redfish_api_trigger_bmc_debug_log_dump(self):
12231222 Get BMC debug log dump file
12241223
12251224 Args:
1226- task_id: A string, the task ID returned from redfish_api_trigger_bmc_debug
1225+ task_id: A string, the task ID returned from redfish_api_trigger_bmc_debug_log_dump
12271226 filename: A string, the output file name
12281227 file_path: A string, the output file path
12291228 timeout: An integer, overall timeout in seconds
@@ -1357,9 +1356,6 @@ def redfish_api_get_eeprom_info(self, component_name):
13571356 def redfish_api_change_login_password (self , new_password , user = None ):
13581357 logger .log_notice ('Changing BMC password\n ' )
13591358 cmd = self .__build_change_password_cmd (new_password , user )
1360- ret = RedfishClient .ERR_CODE_OK
1361- response = ''
1362- error = ''
13631359 ret , _ , response , error = self .exec_curl_cmd (cmd )
13641360
13651361 if (ret != RedfishClient .ERR_CODE_OK ):
@@ -1387,7 +1383,7 @@ def redfish_api_change_login_password(self, new_password, user=None):
13871383 if '@Message.ExtendedInfo' in json_response :
13881384 for info in json_response ['@Message.ExtendedInfo' ]:
13891385 if info ['MessageId' ].endswith ('Success' ):
1390- logger .log_notice ('Password changed sucessfully ' )
1386+ logger .log_notice ('Password changed successfully ' )
13911387 return (RedfishClient .ERR_CODE_OK , '' )
13921388
13931389 msg = 'Error: Unexpected response format'
0 commit comments