[PR #212] [MERGED] Cli overhaul: snapshot #315

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/212
Author: @Tinyblargon
Created: 10/24/2022
Status: Merged
Merged: 10/26/2022
Merged by: @mleone87

Base: masterHead: Feature-Snapshot


📝 Commits (10+)

  • 8352730 refactor: Deprecate old snapshot functions
  • 37f62b5 feat: Add way to update the description of a snapshot
  • 0e0ebb8 feat: Add CreateSnapshot function
  • 6551610 feat: Add function to format the snapshots as a json tree
  • 0a23b40 test: FormatSnapshotsTree
  • eb50349 feat: Formats snapsots as a list
  • 97e6af0 test: validate output of FormatSnapshotsList()
  • 96dbb8a feat: add function to return optional IDs
  • e33fb7b refactor: Raname function and add comment
  • 1db435f Missing from previous commit

📊 Changes

24 files changed (+735 additions, -74 deletions)

View changed files

📝 cli/command/create/create-acmeaccount.go (+1 -1)
📝 cli/command/create/create-pool.go (+1 -1)
cli/command/create/create-snapshot.go (+39 -0)
📝 cli/command/create/create-storage.go (+1 -1)
📝 cli/command/create/guest/create-guest.go (+1 -1)
cli/command/delete/delete-snapshot.go (+30 -0)
📝 cli/command/delete/delete.go (+1 -1)
📝 cli/command/get/get.go (+1 -1)
cli/command/guest/guest-rollback.go (+29 -0)
📝 cli/command/list/list-snapshots.go (+31 -24)
📝 cli/command/node/node-reboot.go (+1 -1)
📝 cli/command/node/node-shutdown.go (+1 -1)
📝 cli/command/set/set-metricserver.go (+2 -2)
📝 cli/command/set/set-user.go (+2 -2)
📝 cli/command/update/update-poolcomment.go (+3 -3)
cli/command/update/update-snapshotdescription.go (+28 -0)
📝 cli/command/update/update-storage.go (+1 -1)
📝 cli/validate.go (+16 -5)
📝 main.go (+3 -3)
📝 proxmox/client.go (+40 -22)

...and 4 more files

📄 Description

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

Work so far:

  • Added the commands for creating, deleting, updating, listing and rolling back snapshots.
  • Marked function names as deprecated as they implied that the snapshot functions only work with Qemu virtual machines.
  • Changed output of list snapshots to a json tree and list depending on the --no-tree flag
  • Added unit test for testing the formatting when listing a guests snapshot.
  • Added integration tests for snapshot function.
  • Manually tested the legacy commands still work as intended.
  • Expanded the (test *Test) StandardTest(t *testing.T) (out []byte) to be able to return the json output for more advanced processing.

🔄 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/212 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 10/24/2022 **Status:** ✅ Merged **Merged:** 10/26/2022 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `Feature-Snapshot` --- ### 📝 Commits (10+) - [`8352730`](https://github.com/Telmate/proxmox-api-go/commit/8352730ceb048731a9b45c2f18d901a6909fa398) refactor: Deprecate old snapshot functions - [`37f62b5`](https://github.com/Telmate/proxmox-api-go/commit/37f62b5e9cc9a222a1cca879495af1f70a9422d7) feat: Add way to update the description of a snapshot - [`0e0ebb8`](https://github.com/Telmate/proxmox-api-go/commit/0e0ebb86c51b38ee75fb345c220e1ee626b5b6d9) feat: Add CreateSnapshot function - [`6551610`](https://github.com/Telmate/proxmox-api-go/commit/6551610be6b7ffbf261c57189364c09bee046f20) feat: Add function to format the snapshots as a json tree - [`0a23b40`](https://github.com/Telmate/proxmox-api-go/commit/0a23b40344d6edf0e8119299fa456f32206b16db) test: FormatSnapshotsTree - [`eb50349`](https://github.com/Telmate/proxmox-api-go/commit/eb50349aa6f80b3d337ef5f84a948a7260307d68) feat: Formats snapsots as a list - [`97e6af0`](https://github.com/Telmate/proxmox-api-go/commit/97e6af057281efac2b235d599849e2b851c4fdb2) test: validate output of FormatSnapshotsList() - [`96dbb8a`](https://github.com/Telmate/proxmox-api-go/commit/96dbb8a000a3f4b0b1be411b365b78b361d9c0bc) feat: add function to return optional IDs - [`e33fb7b`](https://github.com/Telmate/proxmox-api-go/commit/e33fb7b63ae53eda29fb20054c946340e7e0d3a0) refactor: Raname function and add comment - [`1db435f`](https://github.com/Telmate/proxmox-api-go/commit/1db435f205c14cab1ba0dd6699abc262d922f228) Missing from previous commit ### 📊 Changes **24 files changed** (+735 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `cli/command/create/create-acmeaccount.go` (+1 -1) 📝 `cli/command/create/create-pool.go` (+1 -1) ➕ `cli/command/create/create-snapshot.go` (+39 -0) 📝 `cli/command/create/create-storage.go` (+1 -1) 📝 `cli/command/create/guest/create-guest.go` (+1 -1) ➕ `cli/command/delete/delete-snapshot.go` (+30 -0) 📝 `cli/command/delete/delete.go` (+1 -1) 📝 `cli/command/get/get.go` (+1 -1) ➕ `cli/command/guest/guest-rollback.go` (+29 -0) 📝 `cli/command/list/list-snapshots.go` (+31 -24) 📝 `cli/command/node/node-reboot.go` (+1 -1) 📝 `cli/command/node/node-shutdown.go` (+1 -1) 📝 `cli/command/set/set-metricserver.go` (+2 -2) 📝 `cli/command/set/set-user.go` (+2 -2) 📝 `cli/command/update/update-poolcomment.go` (+3 -3) ➕ `cli/command/update/update-snapshotdescription.go` (+28 -0) 📝 `cli/command/update/update-storage.go` (+1 -1) 📝 `cli/validate.go` (+16 -5) 📝 `main.go` (+3 -3) 📝 `proxmox/client.go` (+40 -22) _...and 4 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, updating, listing and rolling back snapshots. - Marked function names as deprecated as they implied that the snapshot functions only work with Qemu virtual machines. - Changed output of `list snapshots` to a json tree and list depending on the `--no-tree` flag - Added unit test for testing the formatting when listing a guests snapshot. - Added integration tests for snapshot function. - Manually tested the legacy commands still work as intended. - Expanded the `(test *Test) StandardTest(t *testing.T) (out []byte)` to be able to return the json output for more advanced processing. --- <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#315
No description provided.