[PR #273] [MERGED] Feature: guest features #361

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

📋 Pull Request Information

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

Base: masterHead: Feature-Guest-Features


📝 Commits (7)

  • 938fbc2 refactor: put in alphabetical order
  • bd6f10d feat: Add nil check
  • 7c6d46c refactor: nil check implemented by CheckVmRef
  • 11feae1 feat: obtain features the guest has enabled
  • d5a6ce3 refactor: nest config in guest command
  • ca58b91 feat: add command to get guests enabled features
  • daeb78f feat: validate input is enum value

📊 Changes

8 files changed (+196 additions, -11 deletions)

View changed files

📝 cli/command/commands/commands.go (+1 -0)
📝 cli/command/get/guest/get-guest-config.go (+5 -5)
cli/command/get/guest/get-guest-feature.go (+32 -0)
cli/command/get/guest/get-guest.go (+15 -0)
📝 proxmox/client.go (+7 -0)
📝 proxmox/config_guest.go (+76 -5)
📝 proxmox/config_guest_test.go (+59 -0)
📝 proxmox/config_qemu.go (+1 -1)

📄 Description

Add functionality to check which features are enable for a guest system.

Work done:

  • Moved nil check into *Client.CheckVmRef() bd6f10d241 7c6d46ce75
  • Changed get guest command to get guest config d5a6ce30b8
  • Added the get guest feature command ca58b91dcc
  • Added unit tests 11feae1f09
  • Added function GuestHasFeature() to check if the guest has a specific feature 11feae1f09
  • Added function ListGuestFeatures() to check all the features a guest has enabled 11feae1f09
  • Put value in alphabetical order 938fbc2900

The reason GuestHasFeature() and ListGuestFeatures() exist is because only one feature can be checked at the time resulting in multiple API calls. For this reason I didn't incorporate it into ConfigQemu and ConfigLxc.


🔄 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/273 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 7/14/2023 **Status:** ✅ Merged **Merged:** 12/6/2023 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `Feature-Guest-Features` --- ### 📝 Commits (7) - [`938fbc2`](https://github.com/Telmate/proxmox-api-go/commit/938fbc2900f310bc69dd1614ae7c8e37738665b1) refactor: put in alphabetical order - [`bd6f10d`](https://github.com/Telmate/proxmox-api-go/commit/bd6f10d241dedbbd8aa98b8e74a1a5b946b37866) feat: Add nil check - [`7c6d46c`](https://github.com/Telmate/proxmox-api-go/commit/7c6d46ce75b54afe7dc0854460704df06573a423) refactor: nil check implemented by `CheckVmRef` - [`11feae1`](https://github.com/Telmate/proxmox-api-go/commit/11feae1f09a04483dcd94bcbadad72a4a3fc1550) feat: obtain features the guest has enabled - [`d5a6ce3`](https://github.com/Telmate/proxmox-api-go/commit/d5a6ce30b8c2ff636318d726aab2573ea65c618a) refactor: nest config in guest command - [`ca58b91`](https://github.com/Telmate/proxmox-api-go/commit/ca58b91dcca44ff40c3ad92d8c91944b825b6d2c) feat: add command to get guests enabled features - [`daeb78f`](https://github.com/Telmate/proxmox-api-go/commit/daeb78f5a0180f4d4af02f68d735f11c7ffa90eb) feat: validate input is enum value ### 📊 Changes **8 files changed** (+196 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `cli/command/commands/commands.go` (+1 -0) 📝 `cli/command/get/guest/get-guest-config.go` (+5 -5) ➕ `cli/command/get/guest/get-guest-feature.go` (+32 -0) ➕ `cli/command/get/guest/get-guest.go` (+15 -0) 📝 `proxmox/client.go` (+7 -0) 📝 `proxmox/config_guest.go` (+76 -5) 📝 `proxmox/config_guest_test.go` (+59 -0) 📝 `proxmox/config_qemu.go` (+1 -1) </details> ### 📄 Description Add functionality to check which features are enable for a guest system. Work done: - Moved nil check into `*Client.CheckVmRef()` bd6f10d241dedbbd8aa98b8e74a1a5b946b37866 7c6d46ce75b54afe7dc0854460704df06573a423 - Changed `get guest` command to `get guest config` d5a6ce30b8c2ff636318d726aab2573ea65c618a - Added the `get guest feature` command ca58b91dcca44ff40c3ad92d8c91944b825b6d2c - Added unit tests 11feae1f09a04483dcd94bcbadad72a4a3fc1550 - Added function `GuestHasFeature()` to check if the guest has a specific feature 11feae1f09a04483dcd94bcbadad72a4a3fc1550 - Added function `ListGuestFeatures()` to check all the features a guest has enabled 11feae1f09a04483dcd94bcbadad72a4a3fc1550 - Put value in alphabetical order 938fbc2900f310bc69dd1614ae7c8e37738665b1 The reason `GuestHasFeature()` and `ListGuestFeatures()` exist is because only one feature can be checked at the time resulting in multiple API calls. For this reason I didn't incorporate it into `ConfigQemu` and `ConfigLxc`. --- <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:54 +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#361
No description provided.