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:
Jake Hill 2019-02-25 08:37:07 +00:00 committed by Abhijeet Kasurde
parent f135960fc2
commit e18d5ea8b3
17 changed files with 179 additions and 21 deletions

View file

@ -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),