Closed Tinyblargon closed 8 months ago
Okay so upon even further investigation, it can create, delete and read the disk inforamtion when backed by LVM, but not update it.
safe to merge @Tinyblargon ?
@mleone87 Still working on this one, sorry for making a premature pull request.
I now know the full extend of what needs to change tho.
These 2 parts of the code I'm gonna extract as a function as the code for parsing the disk info is sadly gonna get more complicated:
https://github.com/Telmate/proxmox-api-go/blob/master/proxmox/config_qemu_disk.go#L208-L216 https://github.com/Telmate/proxmox-api-go/blob/master/proxmox/config_qemu_disk.go#L305-L333
@mleone87 It's ready to merge.
Work Done:
diskSyntaxEnum
to keep track of which disk syntax should be used when updating the disk.ConfigQemu
af11eb2f59353382a606d0353be0c1afca06dbf7The following code was moved to its own functions: https://github.com/Telmate/proxmox-api-go/blob/0b0c911a0a512b0ddd8642a9745d9ade4411d1c2/proxmox/config_qemu_disk.go#L208-L216
Ran into a bug where the disk format was returned empty by the library.
Apparently the lvm, and file storage back-ends use different syntax for the disks:
storage:100/vm-100-disk-0.raw
storage:vm-100-disk-0