Skip to content

Commit

Permalink
lpar: Fix completion statuses for STOP operation
Browse files Browse the repository at this point in the history
The status of a stopped LPAR should be 'not-operating'.

Signed-off-by: Alexander Egorenkov <[email protected]>
  • Loading branch information
eaibmz authored and andy-maier committed Aug 31, 2021
1 parent 51226d4 commit 1aed39c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zhmcclient/_lpar.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ def stop(self, wait_for_completion=True, operation_timeout=None,
status has reached the desired value. If `wait_for_completion=True`,
this method repeatedly checks the status of the LPAR after the HMC
operation has completed, and waits until the status is in the desired
state "operating", or if `allow_status_exceptions` was
state "not-operating", or if `allow_status_exceptions` was
set additionally in the state "exceptions".
Authorization requirements:
Expand All @@ -903,7 +903,7 @@ def stop(self, wait_for_completion=True, operation_timeout=None,
* If `True`, this method will wait for completion of the
asynchronous job performing the operation, and for the status
becoming "operating" (or in addition "exceptions", if
becoming "not-operating" (or in addition "exceptions", if
`allow_status_exceptions` was set.
* If `False`, this method will return immediately once the HMC has
Expand Down Expand Up @@ -958,7 +958,7 @@ def stop(self, wait_for_completion=True, operation_timeout=None,
wait_for_completion=wait_for_completion,
operation_timeout=operation_timeout)
if wait_for_completion:
statuses = ["operating"]
statuses = ["not-operating"]
if allow_status_exceptions:
statuses.append("exceptions")
self.wait_for_status(statuses, status_timeout)
Expand Down

0 comments on commit 1aed39c

Please sign in to comment.