Skip to content

Commit

Permalink
Merge pull request #159 from DMTF/README-Task-Fix
Browse files Browse the repository at this point in the history
Corrected variable names in sample code for task handling
  • Loading branch information
mraineri authored May 31, 2024
2 parents 9c0e28f + 48f3b7c commit b3ee9be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ An example of a POST operation with a possible task is shown below.
body = {"ResetType": "GracefulShutdown"}
response = REDFISH_OBJ.post("/redfish/v1/Systems/1/Actions/ComputerSystem.Reset", body=body)
if(response.is_processing):
task = response.monitor(context)
task = response.monitor(REDFISH_OBJ)
while(task.is_processing):
retry_time = task.retry_after
task_status = task.dict['TaskState']
time.sleep(retry_time if retry_time else 5)
task = response.monitor(context)
task = response.monitor(REDFISH_OBJ)
Logout the created session
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit b3ee9be

Please sign in to comment.