mirror of
https://github.com/luthermonson/go-proxmox.git
synced 2026-04-26 17:35:48 +03:00
[GH-ISSUE #39] argument issues with qemu Clone/MoveDisk and policy on API backward compatibility #12
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-proxmox#12
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 @jqueuniet on GitHub (Jan 12, 2023).
Original GitHub issue: https://github.com/luthermonson/go-proxmox/issues/39
Hi,
I'm having issues using this client implementation of qemu
CloneandMoveDisk.MoveDiskseems focused on moving disks between storage backends and forces the use of the optionalstorageparameter, whereas I would like to use it to move disks from one VM to another while keeping the same storage backend, for which I need the optional parametersformat,target-diskandtarget-vmid.Clonehas similar issues and forces the usage of thetargetoptional parameter even though it only works with shared storage backends. I'm using local ZFS pools with templates in the local filesystem, and thus needs thefull,storageandformatoptional parameters instead.I could do a PR implementing all this while keeping the current optional parameters, but as those methods are using hardcoded args, this either means duplicating methods or breaking API compatibility, and I would like to ask for opinions on this subject first.
@luthermonson commented on GitHub (Jan 12, 2023):
MoveDiskdoes no justice to the move_disk api end point at all and i totally agree. maybe it can be rewritten by having aMoveDIskOptionswhich can just be passed as nil if you have none and use it if you need it? Move storage to that and makediska mandatory string?Clonealso lacks some optionals doesn't it. Maybe the same thing? Make the newid mandatory and have aCloneOptionswith the optional options and make it a pointer if you want to pass no params?@jqueuniet commented on GitHub (Jan 13, 2023):
Discussion resolved with PR #40