mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ovirt_storage_domain: Improve logic for state controlling. (#46951)
This commit is contained in:
parent
9a5561da0f
commit
c3cc2ecc5b
1 changed files with 7 additions and 0 deletions
|
@ -565,6 +565,13 @@ def control_state(sd_module):
|
|||
return
|
||||
|
||||
sd_service = sd_module._service.service(sd.id)
|
||||
|
||||
# In the case of no status returned, it's an attached storage domain.
|
||||
# Redetermine the corresponding serivce and entity:
|
||||
if sd.status is None:
|
||||
sd_service = sd_module._attached_sd_service(sd)
|
||||
sd = get_entity(sd_service)
|
||||
|
||||
if sd.status == sdstate.LOCKED:
|
||||
wait(
|
||||
service=sd_service,
|
||||
|
|
Loading…
Reference in a new issue