-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul qemu disks merge #255
Overhaul qemu disks merge #255
Conversation
this allows for the user to manually provide the current config or let the library provide the config
…ring]interface{}}`
disks getting updated when nothing changes, adds the current state to the pending state.
before it was defined of each disk, but it is the same for all linked disk. thats why it's moved to `ConfigQemu`. when the vm has no linked disks `LinkedVmId` becomes `0`
The latest main for the proxmox-api-go project includes RNG device creation. Return value for proxmox.ConfigQemu.CreateQemuEfiParams() have changed ( Telmate/proxmox-api-go#255 )
The latest main for the proxmox-api-go project includes RNG device creation. Return value for proxmox.ConfigQemu.CreateQemuEfiParams() have changed ( Telmate/proxmox-api-go#255 )
Heads up: This was a fatal blow to the downstream terraform provider. In API terms, “deprecated” means discouraged for use and likely to be removed, while “obsolete” means already removed or replaced. Perhaps this should be removed from QemuConfig or at least have its comment updated? 😅 |
This is a new implementation of the disk structure discussed in #187 and deprecates the old implementation.
Code reworked:
ConfigQemu
data structure to its own function to improve test-ability.ConfigQemu
to its own function to improve test-ability.nil
.ConfigQemu
func NewConfigQemuFromApi(
will no longer return the deprecated parts oftype ConfigQemu
Features added:
func (newConfig ConfigQemu) setAdvanced
).func (storages QemuStorages) Validate()
func MoveQemuDisk
to be a full implementation for disk migration, storage/disk-type change.type ConfigQemu.Iso
to keep the spirit of the old implementation. This feature feels out of place in this code and should be delegated to implementations like the Terraform provider.Features deprecated:
func (config ConfigQemu) CreateVm
func (config ConfigQemu) UpdateConfig
func (c *Client) MoveQemuDisk
type ConfigQemu.QemuDisks
type ConfigQemu.QemuIso
All the deprecated functions still work and don't make use of the new disk implementation (bugs included).
Reasoning for moving the CRUD logic to this library:
Currently I am working on a Terraform implementation.