mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[PR #255] [MERGED] Overhaul qemu disks merge #345
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#345
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/Telmate/proxmox-api-go/pull/255
Author: @Tinyblargon
Created: 5/2/2023
Status: ✅ Merged
Merged: 5/14/2023
Merged by: @mleone87
Base:
master← Head:Overhaul-Qemu-Disks-Merge📝 Commits (10+)
339baf9feat: add parsing of qemu disks into structa4ec1a1feat: Add Disks parameter in ConfigQemu struct5fc83d2feat: Map Qemu Disks to api valuesa89a72estyle: put in alphabetical order8e45a16feat: Add serial key to disks4967e1bdocs: Add TODO7f697adtest: add test for QemuDiskSerial.Validate4454dcarefactor: Add enum and validate allowed values327c98afix: typoaec9e6dfeat: Add enum for QemuDiskFormat and validate allowed values📊 Changes
13 files changed (+9989 additions, -617 deletions)
View changed files
📝
proxmox/client.go(+11 -1)➕
proxmox/config_guest.go(+37 -0)📝
proxmox/config_qemu.go(+795 -616)➕
proxmox/config_qemu_disk.go(+1030 -0)➕
proxmox/config_qemu_disk_ide.go(+306 -0)➕
proxmox/config_qemu_disk_sata.go(+318 -0)➕
proxmox/config_qemu_disk_scsi.go(+480 -0)➕
proxmox/config_qemu_disk_test.go(+838 -0)➕
proxmox/config_qemu_disk_virtio.go(+384 -0)📝
proxmox/config_qemu_test.go(+5611 -0)📝
proxmox/util.go(+25 -0)➕
proxmox/util_test.go(+74 -0)➕
test/data/test_data_qemu/type_QemuDiskSerial.go(+80 -0)📄 Description
This is a new implementation of the disk structure discussed in #187 and deprecates the old implementation.
Code reworked:
ConfigQemudata structure to its own function to improve test-ability.ConfigQemuto its own function to improve test-ability.nil.ConfigQemufunc NewConfigQemuFromApi(will no longer return the deprecated parts oftype ConfigQemuFeatures added:
func (newConfig ConfigQemu) setAdvanced).func (storages QemuStorages) Validate()func MoveQemuDiskto be a full implementation for disk migration, storage/disk-type change.type ConfigQemu.Isoto 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) CreateVmfunc (config ConfigQemu) UpdateConfigfunc (c *Client) MoveQemuDisktype ConfigQemu.QemuDiskstype ConfigQemu.QemuIsoAll 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
CloudInit.UpgradePackagesgives error on older PVE #406