mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-26 07:55:50 +03:00
[PR #95] [MERGED] Add ResizeQemuDiskRaw function to allow caller more control over disk resizes #225
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#225
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/95
Author: @doransmestad
Created: 10/28/2020
Status: ✅ Merged
Merged: 10/28/2020
Merged by: @ggongaware
Base:
master← Head:dsmestad-allow-more-disk-resize-control-pr📝 Commits (1)
61c0cb6Add ResizeQemuDiskRaw function to allow caller more control over disk resizes📊 Changes
1 file changed (+13 additions, -1 deletions)
View changed files
📝
proxmox/client.go(+13 -1)📄 Description
I added a new function
ResizeQemuDiskRawto augment the functionality already provided byResizeQemuDisk. Before this change we could only resize disks by increasing them by a specified number of gigabytes. With the new "Raw" function, the raw string can be provided that will be sent directly to proxmox. This allows the caller to set the disk size (instead of relying on an increase), and other orders of magnitude (vs just gigabytes).The diff here is a bit confusing as I reused the functionality from
ResizeQemuDiskin my new function, and then reducedResizeQemuDiskto just re-formatting the provided gigabyte number into a string then passing that formatted string (+10G for example) to the newRawfunction in an effort to reduce potential code duplication.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.