mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41: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
|
@ -62,7 +62,7 @@ options:
|
|||
description:
|
||||
- The VMware identification method by which the virtual machine will be identified.
|
||||
default: vm_name
|
||||
choices: ['uuid', 'dns_name', 'inventory_path', 'vm_name']
|
||||
choices: ['uuid', 'instance_uuid', 'dns_name', 'inventory_path', 'vm_name']
|
||||
vm_username:
|
||||
description:
|
||||
- The user to login-in to the virtual machine.
|
||||
|
@ -230,7 +230,8 @@ class VMwareShellManager(PyVmomi):
|
|||
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)
|
||||
datacenter=datacenter,
|
||||
cluster=cluster)
|
||||
|
||||
if not vm:
|
||||
module.fail_json(msg='Unable to find virtual machine.')
|
||||
|
@ -327,7 +328,11 @@ def main():
|
|||
folder=dict(type='str'),
|
||||
vm_id=dict(type='str', required=True),
|
||||
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),
|
||||
vm_shell=dict(type='str', required=True),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue