mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 15:21:25 -07:00
VMware: Add support in VMWare modules for BIOS and instance UUID's (#44399)
* Add support for changing UUID type referenced * Update all appropriate VMware modules to include UUID type * Add integration test for filtering on instance UUID
This commit is contained in:
parent
f135960fc2
commit
e18d5ea8b3
17 changed files with 179 additions and 21 deletions
|
@ -65,6 +65,7 @@ options:
|
|||
default: vm_name
|
||||
choices:
|
||||
- 'uuid'
|
||||
- 'instance_uuid'
|
||||
- 'dns_name'
|
||||
- 'inventory_path'
|
||||
- 'vm_name'
|
||||
|
@ -194,8 +195,11 @@ class VmwareGuestFileManager(PyVmomi):
|
|||
if module.params['vm_id_type'] == 'inventory_path':
|
||||
vm = find_vm_by_id(self.content, vm_id=module.params['vm_id'], vm_id_type="inventory_path", folder=folder)
|
||||
else:
|
||||
vm = find_vm_by_id(self.content, vm_id=module.params['vm_id'], vm_id_type=module.params['vm_id_type'],
|
||||
datacenter=datacenter, cluster=cluster)
|
||||
vm = find_vm_by_id(self.content,
|
||||
vm_id=module.params['vm_id'],
|
||||
vm_id_type=module.params['vm_id_type'],
|
||||
datacenter=datacenter,
|
||||
cluster=cluster)
|
||||
|
||||
if not vm:
|
||||
module.fail_json(msg='Unable to find virtual machine.')
|
||||
|
@ -391,7 +395,7 @@ def main():
|
|||
vm_id_type=dict(
|
||||
default='vm_name',
|
||||
type='str',
|
||||
choices=['inventory_path', 'uuid', 'dns_name', 'vm_name']),
|
||||
choices=['inventory_path', 'uuid', 'instance_uuid', 'dns_name', 'vm_name']),
|
||||
vm_username=dict(type='str', required=True),
|
||||
vm_password=dict(type='str', no_log=True, required=True),
|
||||
directory=dict(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue