ovirt_vm: Fix issue in resetting the storage domain lease (#57469)

Currently, there is no way to remove the lease. The patch allows to
reset it by passing an empty string ('') to lease.
pull/57737/head
Nijin Ashok 5 years ago committed by ansibot
parent 69ead0ba78
commit 166a5c909c

@ -262,7 +262,7 @@ options:
version_added: "2.5"
lease:
description:
- Name of the storage domain this virtual machine lease reside on.
- Name of the storage domain this virtual machine lease reside on. Pass an empty string to remove the lease.
- NOTE - Supported since oVirt 4.1.
version_added: "2.4"
custom_compatibility_version:
@ -1345,7 +1345,7 @@ class VmsModule(BaseModule):
id=get_id_by_name(
service=self._connection.system_service().storage_domains_service(),
name=self.param('lease')
)
) if self.param('lease') else None
)
) if self.param('lease') is not None else None,
cpu=otypes.Cpu(

Loading…
Cancel
Save