[PR #207] [MERGED] Cli overhaul: guest create,get,delete commands (partial basic tests) #312

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/207
Author: @Tinyblargon
Created: 10/15/2022
Status: Merged
Merged: 10/20/2022
Merged by: @mleone87

Base: masterHead: CLI-Overhaul


📝 Commits (10+)

  • bae7412 Add TODO items for new CLI
  • a2cc692 Make code more Dry
  • fc6e809 Tidy code
  • a693aef refactor: Make functions private
  • 669ce52 Update TODO
  • c334542 Merge branch 'Telmate:master' into CLI-Overhaul
  • ad727eb refactor: Make variable global
  • d428236 feat: Add commands to create guests
  • 90612a3 feat: Add command to get guest configuration
  • a9d8ace feat: Add command to delete guest

📊 Changes

36 files changed (+333 additions, -124 deletions)

View changed files

📝 cli/command/commands/commands.go (+1 -0)
📝 cli/command/create/create-acmeaccount.go (+2 -2)
📝 cli/command/create/create-pool.go (+4 -4)
📝 cli/command/create/create-storage.go (+2 -2)
📝 cli/command/create/create.go (+2 -2)
cli/command/create/guest/create-guest-lxc.go (+20 -0)
cli/command/create/guest/create-guest-qemu.go (+20 -0)
cli/command/create/guest/create-guest.go (+48 -0)
📝 cli/command/delete/delete-acmeaccount.go (+1 -1)
cli/command/delete/delete-guest.go (+33 -0)
📝 cli/command/delete/delete-metricserver.go (+1 -1)
📝 cli/command/delete/delete-pool.go (+2 -3)
📝 cli/command/delete/delete-storage.go (+1 -1)
📝 cli/command/delete/delete-user.go (+2 -3)
📝 cli/command/delete/delete.go (+1 -1)
📝 cli/command/get/get-acmeaccount.go (+1 -1)
cli/command/get/get-guest.go (+38 -0)
📝 cli/command/get/get-metricserver.go (+1 -1)
📝 cli/command/get/get-pool.go (+2 -17)
📝 cli/command/get/get-storage.go (+1 -1)

...and 16 more files

📄 Description

Another pull for https://github.com/Telmate/proxmox-api-go/issues/171

Work so far:

  • Added the commands for creating, deleting and retrieving the configuration of qemu and lxc guests.
  • Added TODO items to keep track of which commands have been migrated to the new cli.
  • Added basic test for Qemu creating, retrieving and destroying.
  • refactored some code to make the implementation more DRY (only refactored code that has tests).

Only some basic test for Qemu. No test for Lxc yet, Lxc relies on a template which we cant upload yet in an automated fashion.


🔄 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/207 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 10/15/2022 **Status:** ✅ Merged **Merged:** 10/20/2022 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `CLI-Overhaul` --- ### 📝 Commits (10+) - [`bae7412`](https://github.com/Telmate/proxmox-api-go/commit/bae74127dce10e76ebf673c9f6587935f4bc1d9d) Add TODO items for new CLI - [`a2cc692`](https://github.com/Telmate/proxmox-api-go/commit/a2cc6927f4ee5ab1b0197950e9f35c07e4c1fb9d) Make code more Dry - [`fc6e809`](https://github.com/Telmate/proxmox-api-go/commit/fc6e80972768528a6cdea0ba8b0f9f5c6cc4dc5c) Tidy code - [`a693aef`](https://github.com/Telmate/proxmox-api-go/commit/a693aef0d7c5a07aa2e4ca1b400ae13e776f4e1c) refactor: Make functions private - [`669ce52`](https://github.com/Telmate/proxmox-api-go/commit/669ce52cdc41619fcf2461ac370c15f2073308d2) Update TODO - [`c334542`](https://github.com/Telmate/proxmox-api-go/commit/c334542e9b2b72f9142e13d7db9e374a5a570846) Merge branch 'Telmate:master' into CLI-Overhaul - [`ad727eb`](https://github.com/Telmate/proxmox-api-go/commit/ad727eb6f1ab0aaa7865ce437c65655ef2b89cc6) refactor: Make variable global - [`d428236`](https://github.com/Telmate/proxmox-api-go/commit/d428236c027f8ee7288005d0dc5fb61888a3cbf0) feat: Add commands to create guests - [`90612a3`](https://github.com/Telmate/proxmox-api-go/commit/90612a32c8aea90a994414ccfecbf0d66e5d62ce) feat: Add command to get guest configuration - [`a9d8ace`](https://github.com/Telmate/proxmox-api-go/commit/a9d8aced0d4c18797503030fb9133113b070531f) feat: Add command to delete guest ### 📊 Changes **36 files changed** (+333 additions, -124 deletions) <details> <summary>View changed files</summary> 📝 `cli/command/commands/commands.go` (+1 -0) 📝 `cli/command/create/create-acmeaccount.go` (+2 -2) 📝 `cli/command/create/create-pool.go` (+4 -4) 📝 `cli/command/create/create-storage.go` (+2 -2) 📝 `cli/command/create/create.go` (+2 -2) ➕ `cli/command/create/guest/create-guest-lxc.go` (+20 -0) ➕ `cli/command/create/guest/create-guest-qemu.go` (+20 -0) ➕ `cli/command/create/guest/create-guest.go` (+48 -0) 📝 `cli/command/delete/delete-acmeaccount.go` (+1 -1) ➕ `cli/command/delete/delete-guest.go` (+33 -0) 📝 `cli/command/delete/delete-metricserver.go` (+1 -1) 📝 `cli/command/delete/delete-pool.go` (+2 -3) 📝 `cli/command/delete/delete-storage.go` (+1 -1) 📝 `cli/command/delete/delete-user.go` (+2 -3) 📝 `cli/command/delete/delete.go` (+1 -1) 📝 `cli/command/get/get-acmeaccount.go` (+1 -1) ➕ `cli/command/get/get-guest.go` (+38 -0) 📝 `cli/command/get/get-metricserver.go` (+1 -1) 📝 `cli/command/get/get-pool.go` (+2 -17) 📝 `cli/command/get/get-storage.go` (+1 -1) _...and 16 more files_ </details> ### 📄 Description Another pull for https://github.com/Telmate/proxmox-api-go/issues/171 Work so far: - Added the commands for creating, deleting and retrieving the configuration of qemu and lxc guests. - Added TODO items to keep track of which commands have been migrated to the new cli. - Added basic test for Qemu creating, retrieving and destroying. - refactored some code to make the implementation more DRY (only refactored code that has tests). Only some basic test for Qemu. No test for Lxc yet, Lxc relies on a template which we cant upload yet in an automated fashion. --- <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:43 +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#312
No description provided.