mirror of
https://github.com/luthermonson/go-proxmox.git
synced 2026-04-26 17:35:48 +03:00
[PR #40] [MERGED] Rewrite Clone and MoveDisk qemu calls to support all endpoint parameters #94
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#94
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?
📋 Pull Request Information
Original PR: https://github.com/luthermonson/go-proxmox/pull/40
Author: @jqueuniet
Created: 1/13/2023
Status: ✅ Merged
Merged: 1/13/2023
Merged by: @luthermonson
Base:
main← Head:rewrite_args_clone_movedisk📝 Commits (2)
ff34b9aRewrite clone and movedisk qemu calls to support all parameters9505503Naming conventions📊 Changes
2 files changed (+51 additions, -18 deletions)
View changed files
📝
types.go(+25 -0)📝
virtual_machines.go(+26 -18)📄 Description
I tried implementing the full range of parameters supported by those calls while I was at it.
For
Clone, I kept newid exclusively in the Options structure in the end, since an implicit call to NextID as the default behavior makes sense and simplifies client usage in most cases.For
MoveDisk, I'm a bit torn on what to do withdisksince it is mandatory but is also part of the JSON payload so I need it in the Options struct anyway. The current implementation now has two way to pass this information, either through the arg, or through the Options struct if thediskarg is empty. I could also systematically overwrite the struct value with the arg even when empty, or drop the arg altogether, which would make the struct mandatory in practice.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.