[PR #265] [MERGED] Feature: list guests #354

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/265
Author: @Tinyblargon
Created: 6/6/2023
Status: Merged
Merged: 6/7/2023
Merged by: @mleone87

Base: masterHead: Feature-ListGuests


📝 Commits (5)

  • 04bce30 refactor: better code reuse
  • 8c03d71 refactor: add constant to improve readability
  • b2c6f98 Add TODO
  • 033e99f feat: add new ListGuests()
  • 7dd6a19 refactor: command list guests

📊 Changes

5 files changed (+368 additions, -11 deletions)

View changed files

📝 cli/command/list/list-guests.go (+6 -1)
📝 cli/command/list/list.go (+0 -2)
📝 proxmox/client.go (+11 -8)
📝 proxmox/config_guest.go (+112 -0)
proxmox/config_guest_test.go (+239 -0)

📄 Description

Work done this PR:

  • Added a replacement for (c *Client) GetVmList() with ListGuests(client *Client). Reason for change:
    • Moving the function outside of the Client class makes it easier for a user to find the function.
    • Converting the output of the new function to a more usable data structure.
  • Added unit tests for the conversions logic.
  • Optimized code in (c *Client) GetResourceList().
  • Updated the command: list guests to use the new implementation.
  • Updated (c *Client) GetVmList() to not break code that depends on it.
  • Added TODO for future deprecation.

🔄 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/265 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 6/6/2023 **Status:** ✅ Merged **Merged:** 6/7/2023 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `Feature-ListGuests` --- ### 📝 Commits (5) - [`04bce30`](https://github.com/Telmate/proxmox-api-go/commit/04bce30c93e0fb628697a0b9cbda88f77fee56c1) refactor: better code reuse - [`8c03d71`](https://github.com/Telmate/proxmox-api-go/commit/8c03d7147d7bd87e97a0316025b96b5ee9f88e29) refactor: add constant to improve readability - [`b2c6f98`](https://github.com/Telmate/proxmox-api-go/commit/b2c6f98d46f7b8225e3607cb9ecfccb7f575b8b4) Add TODO - [`033e99f`](https://github.com/Telmate/proxmox-api-go/commit/033e99f6da2b13ff173aeb7989240918fef6250f) feat: add new ListGuests() - [`7dd6a19`](https://github.com/Telmate/proxmox-api-go/commit/7dd6a1982a9756a8c766fed5816855aa9d89a0e4) refactor: command list guests ### 📊 Changes **5 files changed** (+368 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `cli/command/list/list-guests.go` (+6 -1) 📝 `cli/command/list/list.go` (+0 -2) 📝 `proxmox/client.go` (+11 -8) 📝 `proxmox/config_guest.go` (+112 -0) ➕ `proxmox/config_guest_test.go` (+239 -0) </details> ### 📄 Description Work done this PR: - Added a replacement for `(c *Client) GetVmList()` with `ListGuests(client *Client)`. Reason for change: - Moving the function outside of the `Client` class makes it easier for a user to find the function. - Converting the output of the new function to a more usable data structure. - Added unit tests for the conversions logic. - Optimized code in `(c *Client) GetResourceList()`. - Updated the command: `list guests` to use the new implementation. - Updated `(c *Client) GetVmList()` to not break code that depends on it. - Added `TODO` for future deprecation. --- <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:52 +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#354
No description provided.