[PR #220] [MERGED] refactor(pools): 🔨 update the Pool function to use the modern endpoint #224

Closed
opened 2026-03-03 15:30:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/luthermonson/go-proxmox/pull/220
Author: @kernel-sanders
Created: 12/5/2025
Status: Merged
Merged: 12/17/2025
Merged by: @luthermonson

Base: mainHead: add-modern-pools-endpoint


📝 Commits (2)

  • ae576a8 refactor(pools): 🔨 update the Pool function to use the modern endpoint
  • cfacde1 test(pools): 🚨 fix the mock server to handle the query param on /pools

📊 Changes

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

View changed files

📝 pools.go (+21 -5)
📝 tests/mocks/pve7x/pools.go (+68 -0)

📄 Description

Querying pools by path value (/pools/{poolid}) is deprecated and the new way is by query parameter (/pools/?poolid={poolid}). This supports nested pools. As the return value of /pools/ is always an array, the Pool function was modified to extract the single pool result and return it.

Old endpoint docs showing deprecation: https://pve.proxmox.com/pve-docs/api-viewer/#/pools/{poolid}
New endpoint docs: https://pve.proxmox.com/pve-docs/api-viewer/#/pools


🔄 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/luthermonson/go-proxmox/pull/220 **Author:** [@kernel-sanders](https://github.com/kernel-sanders) **Created:** 12/5/2025 **Status:** ✅ Merged **Merged:** 12/17/2025 **Merged by:** [@luthermonson](https://github.com/luthermonson) **Base:** `main` ← **Head:** `add-modern-pools-endpoint` --- ### 📝 Commits (2) - [`ae576a8`](https://github.com/luthermonson/go-proxmox/commit/ae576a85ccea85b3353f5d808cc64d1244d34bed) refactor(pools): 🔨 update the Pool function to use the modern endpoint - [`cfacde1`](https://github.com/luthermonson/go-proxmox/commit/cfacde108b69b4905dc2379f07c064f68cb6b6bc) test(pools): 🚨 fix the mock server to handle the query param on /pools ### 📊 Changes **2 files changed** (+89 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `pools.go` (+21 -5) 📝 `tests/mocks/pve7x/pools.go` (+68 -0) </details> ### 📄 Description Querying pools by path value (/pools/{poolid}) is deprecated and the new way is by query parameter (/pools/?poolid={poolid}). This supports nested pools. As the return value of /pools/ is always an array, the Pool function was modified to extract the single pool result and return it. Old endpoint docs showing deprecation: https://pve.proxmox.com/pve-docs/api-viewer/#/pools/{poolid} New endpoint docs: https://pve.proxmox.com/pve-docs/api-viewer/#/pools --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:30:46 +03:00
Sign in to join this conversation.
No labels
pull-request
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/go-proxmox#224
No description provided.