Fix for ovirt_disk Can't Update Disk Name Independently (#44371) (#44372)

* Fix for ovirt_disk Can't Update Disk Name Independently (#44371)

* Adding Disk Rename Example to Example Section (#44371)
pull/44287/merge
Chris Keller 6 years ago committed by ansibot
parent 3f8b51491d
commit 60a6841296

@ -181,6 +181,13 @@ EXAMPLES = '''
format: cow format: cow
interface: virtio interface: virtio
# Change Disk Name
- ovirt_disk:
id: 00000000-0000-0000-0000-000000000000
storage_domain: data
name: "new disk name"
vm_name: rhel7
# Upload local image to disk and attach it to vm: # Upload local image to disk and attach it to vm:
# Since Ansible 2.3 # Since Ansible 2.3
- ovirt_disk: - ovirt_disk:
@ -513,6 +520,7 @@ class DisksModule(BaseModule):
def _update_check(self, entity): def _update_check(self, entity):
return ( return (
equal(self._module.params.get('name'), entity.name) and
equal(self._module.params.get('description'), entity.description) and equal(self._module.params.get('description'), entity.description) and
equal(self.param('quota_id'), getattr(entity.quota, 'id', None)) and equal(self.param('quota_id'), getattr(entity.quota, 'id', None)) and
equal(convert_to_bytes(self._module.params.get('size')), entity.provisioned_size) and equal(convert_to_bytes(self._module.params.get('size')), entity.provisioned_size) and

Loading…
Cancel
Save