[PR #129] [MERGED] Fixed DeleteVmParams #253

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/129
Author: @ConnorJarvis
Created: 7/21/2021
Status: Merged
Merged: 7/26/2021
Merged by: @ggongaware

Base: masterHead: fix_delete_vm


📝 Commits (2)

  • d05ec9d Fixed when you pass params to DeleteVmParams
  • 56261aa Cleaned up implementation to reduce duplicated code

📊 Changes

2 files changed (+10 additions, -5 deletions)

View changed files

📝 proxmox/client.go (+3 -3)
📝 proxmox/session.go (+7 -2)

📄 Description

The delete path expects parameters to be URL values, not contained within the body. Passing any body values to the DELETE path returns "501 Unexpected content for method 'DELETE'"

Updated DeleteVmParams to use a new function ParamsToValues which is the exact same as ParamsToBody with no conversion to []byte.
ParamsToBody now calls ParamsToValues and converts to []byte


🔄 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/129 **Author:** [@ConnorJarvis](https://github.com/ConnorJarvis) **Created:** 7/21/2021 **Status:** ✅ Merged **Merged:** 7/26/2021 **Merged by:** [@ggongaware](https://github.com/ggongaware) **Base:** `master` ← **Head:** `fix_delete_vm` --- ### 📝 Commits (2) - [`d05ec9d`](https://github.com/Telmate/proxmox-api-go/commit/d05ec9deead91263fe795a12668a31915bc878ea) Fixed when you pass params to DeleteVmParams - [`56261aa`](https://github.com/Telmate/proxmox-api-go/commit/56261aa7336fe697bf8dafc413e7b817cb96775a) Cleaned up implementation to reduce duplicated code ### 📊 Changes **2 files changed** (+10 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/client.go` (+3 -3) 📝 `proxmox/session.go` (+7 -2) </details> ### 📄 Description The delete path expects parameters to be URL values, not contained within the body. Passing any body values to the DELETE path returns "501 Unexpected content for method 'DELETE'" Updated DeleteVmParams to use a new function ParamsToValues which is the exact same as ParamsToBody with no conversion to []byte. ParamsToBody now calls ParamsToValues and converts to []byte --- <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:26 +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#253
No description provided.