[PR #95] [MERGED] Add ResizeQemuDiskRaw function to allow caller more control over disk resizes #225

Closed
opened 2026-02-28 00:41:17 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: dsmestad-allow-more-disk-resize-control-pr


📝 Commits (1)

  • 61c0cb6 Add 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 ResizeQemuDiskRaw to augment the functionality already provided by ResizeQemuDisk. 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 ResizeQemuDisk in my new function, and then reduced ResizeQemuDisk to just re-formatting the provided gigabyte number into a string then passing that formatted string (+10G for example) to the new Raw function 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.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/95 **Author:** [@doransmestad](https://github.com/doransmestad) **Created:** 10/28/2020 **Status:** ✅ Merged **Merged:** 10/28/2020 **Merged by:** [@ggongaware](https://github.com/ggongaware) **Base:** `master` ← **Head:** `dsmestad-allow-more-disk-resize-control-pr` --- ### 📝 Commits (1) - [`61c0cb6`](https://github.com/Telmate/proxmox-api-go/commit/61c0cb632c9f6afba5b207c6479bb68e761c535a) Add ResizeQemuDiskRaw function to allow caller more control over disk resizes ### 📊 Changes **1 file changed** (+13 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/client.go` (+13 -1) </details> ### 📄 Description I added a new function `ResizeQemuDiskRaw` to augment the functionality already provided by `ResizeQemuDisk`. 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 `ResizeQemuDisk` in my new function, and then reduced `ResizeQemuDisk` to just re-formatting the provided gigabyte number into a string then passing that formatted string (+10G for example) to the new `Raw` function in an effort to reduce potential code duplication. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:41:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#225
No description provided.