1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-10 18:15:39 +00:00
This commit is contained in:
Shreyash 2026-06-09 21:05:32 +05:30 committed by GitHub
commit be74415f0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 5 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- xenserver_guest_info - use fallback chain for determining VDI format from ``sm_config`` keys ``image-format``, ``vdi_type``, ``type``, defaulting to ``raw`` (https://github.com/ansible-collections/community.general/pull/12119, https://github.com/ansible-collections/community.general/pull/12215).

View file

@ -456,7 +456,13 @@ def gather_vm_facts(module: AnsibleModule, vm_params):
"os_device": vm_vbd_params["device"],
"uuid": vm_vbd_params["VDI"]["uuid"],
"vbd_userdevice": vm_vbd_params["userdevice"],
"vdi_type": vm_vbd_params["VDI"].get("sm_config", {}).get("vdi_type", ""),
"vdi_type": vm_vbd_params["VDI"]["sm_config"].get(
"image-format",
vm_vbd_params["VDI"]["sm_config"].get(
"vdi_type",
vm_vbd_params["VDI"]["sm_config"].get("type", "raw"),
),
),
}
vm_facts["disks"].append(vm_disk_params)

View file

@ -406,7 +406,9 @@ instance:
"size": 42949672960,
"sr": "Local storage",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
"vbd_userdevice": "0"
"uuid": "3f98b388-b2c0-4355-9a01-15c0e61b5a76",
"vbd_userdevice": "0",
"vdi_type": "vhd"
},
{
"name": "testvm_11-1",
@ -415,7 +417,9 @@ instance:
"size": 42949672960,
"sr": "Local storage",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
"vbd_userdevice": "1"
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"vbd_userdevice": "1",
"vdi_type": "vhd"
}
],
"domid": "56",

View file

@ -103,7 +103,9 @@ instance:
"size": 42949672960,
"sr": "Local storage",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
"vbd_userdevice": "0"
"uuid": "3f98b388-b2c0-4355-9a01-15c0e61b5a76",
"vbd_userdevice": "0",
"vdi_type": "vhd"
},
{
"name": "windows-template-testing-1",
@ -112,7 +114,9 @@ instance:
"size": 42949672960,
"sr": "Local storage",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
"vbd_userdevice": "1"
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"vbd_userdevice": "1",
"vdi_type": "vhd"
}
],
"domid": "56",