[PR #234] [MERGED] Feature: Group #330

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/234
Author: @Tinyblargon
Created: 2/9/2023
Status: Merged
Merged: 2/9/2023
Merged by: @mleone87

Base: masterHead: Feature-Group


📝 Commits (10+)

📊 Changes

48 files changed (+2944 additions, -455 deletions)

View changed files

📝 cli/command/commands/commands.go (+2 -0)
cli/command/delete/delete-group.go (+18 -0)
📝 cli/command/delete/delete.go (+2 -0)
cli/command/get/get-group.go (+18 -0)
📝 cli/command/get/get.go (+2 -0)
cli/command/list/list-groups.go (+33 -0)
📝 cli/command/list/list-users.go (+19 -2)
📝 cli/command/list/list.go (+0 -3)
cli/command/member/group/add-users.go (+31 -0)
cli/command/member/group/clear-users.go (+26 -0)
cli/command/member/group/group.go (+16 -0)
cli/command/member/group/remove-users.go (+31 -0)
cli/command/member/group/set-users.go (+36 -0)
cli/command/member/member.go (+16 -0)
cli/command/set/set-group.go (+51 -0)
📝 main.go (+1 -1)
proxmox/config_group.go (+412 -0)
proxmox/config_group_test.go (+614 -0)
📝 proxmox/config_user.go (+168 -41)
📝 proxmox/config_user_test.go (+417 -49)

...and 28 more files

📄 Description

Work done for this feature:

  • Added commands to list, get, set (create/update) and delete groups
  • Added commands to set (create/update), add, remove, and remove all users from a group
  • Added and improved Validate functions for ever custom type. (these are meant for the custom validator functions in the Terraform provider)
  • Added integration test for new cli commands.
  • Improved integration test for user cli commands.
  • Added test for all new pure functions.
  • Splitted the ListUsers() function into listUsersPartial() and listUsersFull() as not every fuction using ListUsers() needed the full information
  • created a test/data folder to contain data needed for testing

Improved the standard cli test.

  • It can now do multiple contain and notcontain matches every test. (this is why almost every cli test has some small change)
  • Structs can be passed to the InputJson and OutputJson settings

Ran all unit and integration tests and they completed successfully.


🔄 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/234 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 2/9/2023 **Status:** ✅ Merged **Merged:** 2/9/2023 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `Feature-Group` --- ### 📝 Commits (10+) - [`909d635`](https://github.com/Telmate/proxmox-api-go/commit/909d635223333a84c4bfe56cab3a292002d37462) feat: allow test to take struct as input - [`185214d`](https://github.com/Telmate/proxmox-api-go/commit/185214d83e674fa15f04a6dc167e188bc66201e1) style: fixed typos - [`0fc06bf`](https://github.com/Telmate/proxmox-api-go/commit/0fc06bf5cbea5047a9f8637c669b30e99d1f83e2) feat: List Groups - [`ff70758`](https://github.com/Telmate/proxmox-api-go/commit/ff707585f321e11ae282452b1d2304a4ed2a0311) feat: allow for seting a base value - [`dd9eb9d`](https://github.com/Telmate/proxmox-api-go/commit/dd9eb9db382b86d1d34f78715acd9dcdb1d3276f) feat: Get Group - [`59d42ee`](https://github.com/Telmate/proxmox-api-go/commit/59d42ee222741fb07174e5d8c01c2e1ef30c61df) test: Fix test - [`09e6966`](https://github.com/Telmate/proxmox-api-go/commit/09e6966ee89e3b7ae23b294ebace6e231e27ce96) feat: Delete Group - [`53967fc`](https://github.com/Telmate/proxmox-api-go/commit/53967fcca20b407340206fedd5ab75af3deaa303) refactor: make test data reusable - [`b41fb57`](https://github.com/Telmate/proxmox-api-go/commit/b41fb5743b3889cd6b5bb92b09a43695c5263893) feat: Set Group - [`daf13c5`](https://github.com/Telmate/proxmox-api-go/commit/daf13c586aac9d95cacd1a3a96018de2f5d0761c) feat: Add toggle for user list command ### 📊 Changes **48 files changed** (+2944 additions, -455 deletions) <details> <summary>View changed files</summary> 📝 `cli/command/commands/commands.go` (+2 -0) ➕ `cli/command/delete/delete-group.go` (+18 -0) 📝 `cli/command/delete/delete.go` (+2 -0) ➕ `cli/command/get/get-group.go` (+18 -0) 📝 `cli/command/get/get.go` (+2 -0) ➕ `cli/command/list/list-groups.go` (+33 -0) 📝 `cli/command/list/list-users.go` (+19 -2) 📝 `cli/command/list/list.go` (+0 -3) ➕ `cli/command/member/group/add-users.go` (+31 -0) ➕ `cli/command/member/group/clear-users.go` (+26 -0) ➕ `cli/command/member/group/group.go` (+16 -0) ➕ `cli/command/member/group/remove-users.go` (+31 -0) ➕ `cli/command/member/group/set-users.go` (+36 -0) ➕ `cli/command/member/member.go` (+16 -0) ➕ `cli/command/set/set-group.go` (+51 -0) 📝 `main.go` (+1 -1) ➕ `proxmox/config_group.go` (+412 -0) ➕ `proxmox/config_group_test.go` (+614 -0) 📝 `proxmox/config_user.go` (+168 -41) 📝 `proxmox/config_user_test.go` (+417 -49) _...and 28 more files_ </details> ### 📄 Description Work done for this feature: - Added commands to list, get, set (create/update) and delete groups - Added commands to set (create/update), add, remove, and remove all users from a group - Added and improved `Validate` functions for ever custom type. (these are meant for the custom validator functions in the Terraform provider) - Added integration test for new cli commands. - Improved integration test for user cli commands. - Added test for all new pure functions. - Splitted the `ListUsers()` function into `listUsersPartial()` and `listUsersFull()` as not every fuction using `ListUsers()` needed the full information - created a `test/data` folder to contain data needed for testing Improved the standard cli test. - It can now do multiple contain and notcontain matches every test. (this is why almost every cli test has some small change) - Structs can be passed to the `InputJson` and `OutputJson` settings Ran all unit and integration tests and they completed successfully. --- <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:46 +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#330
No description provided.