mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
committed by
Abhijeet Kasurde
parent
f135960fc2
commit
e18d5ea8b3
@@ -79,9 +79,12 @@
|
||||
- "guest_facts_0001['instance']['guest_consolidation_needed'] is defined"
|
||||
- "'portgroup_portkey' in guest_facts_0001['instance']['hw_eth0']"
|
||||
- "'portgroup_key' in guest_facts_0001['instance']['hw_eth0']"
|
||||
- "guest_facts_0001['instance']['instance_uuid'] is defined"
|
||||
|
||||
- set_fact: vm1_uuid="{{ guest_facts_0001['instance']['hw_product_uuid'] }}"
|
||||
|
||||
- set_fact: vm1_instance_uuid="{{ guest_facts_0001['instance']['instance_uuid'] }}"
|
||||
|
||||
- debug: var=vm1_uuid
|
||||
|
||||
# Testcase 0002: Get details about virtual machines using UUID
|
||||
@@ -175,3 +178,34 @@
|
||||
# - "guest_facts_0004['instance']['snapshots'][1]['name'] == 'snap2'"
|
||||
# - "guest_facts_0004['instance']['current_snapshot']['name'] == 'snap2'"
|
||||
# - "guest_facts_0002['instance']['hw_folder'] == vm1 | dirname"
|
||||
|
||||
# Testcase 0005: Get details about virtual machines using UUID
|
||||
- name: get list of facts about virtual machines using instance UUID
|
||||
vmware_guest_facts:
|
||||
validate_certs: False
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance['json']['username'] }}"
|
||||
password: "{{ vcsim_instance['json']['password'] }}"
|
||||
datacenter: "{{ dc1 | basename }}"
|
||||
uuid: "{{ vm1_instance_uuid }}"
|
||||
use_instance_uuid: True
|
||||
register: guest_facts_0005
|
||||
|
||||
- debug: msg="{{ guest_facts_0005 }}"
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "guest_facts_0005['instance']['hw_name'] == vm1 | basename"
|
||||
- "guest_facts_0005['instance']['hw_product_uuid'] is defined"
|
||||
- "guest_facts_0005['instance']['hw_product_uuid'] == vm1_uuid"
|
||||
- "guest_facts_0005['instance']['hw_cores_per_socket'] is defined"
|
||||
- "guest_facts_0005['instance']['hw_datastores'] is defined"
|
||||
- "guest_facts_0005['instance']['hw_esxi_host'] == h1 | basename"
|
||||
- "guest_facts_0005['instance']['hw_files'] is defined"
|
||||
- "guest_facts_0005['instance']['hw_guest_ha_state'] is defined"
|
||||
- "guest_facts_0005['instance']['hw_is_template'] is defined"
|
||||
- "guest_facts_0005['instance']['hw_folder'] is defined"
|
||||
- "guest_facts_0005['instance']['guest_question'] is defined"
|
||||
- "guest_facts_0005['instance']['guest_consolidation_needed'] is defined"
|
||||
- "guest_facts_0005['instance']['instance_uuid'] is defined"
|
||||
- "guest_facts_0005['instance']['instance_uuid'] == vm1_instance_uuid"
|
||||
|
||||
Reference in New Issue
Block a user