mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Added eagerzeroedthick disk option to disk spec for vmware_guest (#28121)
* Added eagerzeroedthick disk option to disk spec * Updated docstrings for vmware_guest disk * VMware: Integration test for disk type Signed-off-by: Steve Jacobs <sjacobs@brokencrew.com> Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
a6e425e5a3
commit
400d821fdb
2 changed files with 68 additions and 2 deletions
|
@ -100,7 +100,8 @@ options:
|
|||
- A list of disks to add.
|
||||
- 'Valid attributes are:'
|
||||
- ' - C(size_[tb,gb,mb,kb]) (integer): Disk storage size in specified unit.'
|
||||
- ' - C(type) (string): Valid value is C(thin) (default: None).'
|
||||
- ' - C(type) (string): Valid values are:'
|
||||
- ' C(thin) thin disk, C(eagerzeroedthick) eagerzeroedthick disk, added in version 2.5, Default: C(None) thick disk, no eagerzero.'
|
||||
- ' - C(datastore) (string): Datastore to use for the disk. If C(autoselect_datastore) is enabled, filter datastore selection.'
|
||||
- ' - C(autoselect_datastore) (bool): select the less used datastore.'
|
||||
cdrom:
|
||||
|
@ -1018,8 +1019,11 @@ class PyVmomiHelper(PyVmomi):
|
|||
|
||||
# is it thin?
|
||||
if 'type' in expected_disk_spec:
|
||||
if expected_disk_spec.get('type', '').lower() == 'thin':
|
||||
disk_type = expected_disk_spec.get('type', '').lower()
|
||||
if disk_type == 'thin':
|
||||
diskspec.device.backing.thinProvisioned = True
|
||||
elif disk_type == 'eagerzeroedthick':
|
||||
diskspec.device.backing.eagerlyScrub = True
|
||||
|
||||
# which datastore?
|
||||
if expected_disk_spec.get('datastore'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue