mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[GH-ISSUE #88] Return a value for storage_type when reading qemu disks (or remove the need for it entirely) #15
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doransmestad on GitHub (Aug 5, 2020).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/88
I'm working on a pull request for the terraform provider, and it looks like the qemuDisk's attribute
storage_typeis required for the creation/update of disks within a qemu resource, but that value is not returned by a call toNewConfigQemuFromApi. This is unfortunate as I'm not able to be sure of the current value to use forstorage_typeafter creation (to detect drift and correctly update the terraform state).Ideally, we could remove the need for
storage_typeas it appears to only be used here: https://github.com/Telmate/proxmox-api-go/blob/master/proxmox/config_qemu.go#L900 in order to format the disk path correctly. Perhaps we could issue another API query to proxmox to list storage types (/storage/<storage_name>) and pull out thetypeattribute from there? Then we wouldn't need storage_type at all.Or, if not the above, when a VM is read perhaps we can re-use the logic from line 900 above to return the storage_type format required (dir vs rbd for example).
Thoughts? I'm happy to attempt a contribution of either approach depending on preference.
@yukron commented on GitHub (Oct 23, 2020):
PR #94 would resolve this, also adding "format" key to Reads.
@Tinyblargon commented on GitHub (Dec 5, 2024):
This has been solved by the new disk schema.