[PR #167] [MERGED] Feature: storage #278

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/167
Author: @Tinyblargon
Created: 4/24/2022
Status: Merged
Merged: 4/24/2022
Merged by: @mleone87

Base: masterHead: Feature-Storage


📝 Commits (2)

  • d5721c6 Add feature to interact with Storage Backends
  • cec3464 Use Correct Input Validation

📊 Changes

7 files changed (+1342 additions, -3 deletions)

View changed files

📝 README.md (+44 -0)
📝 main.go (+56 -0)
📝 proxmox/client.go (+34 -0)
📝 proxmox/config_metrics.go (+2 -2)
proxmox/config_storage.go (+1126 -0)
📝 proxmox/util.go (+26 -0)
📝 proxmox/validate.go (+54 -1)

📄 Description

Added the functionality to interact with the storage configuration of Proxmox.

Due to the nested structs the feature got a bit more complex than anticipated.
The nested structs will make it more clear to the end user which setting correspond to the chosen type of storage back-end.
I felt this was a better way of doing it than putting all the settings into a simple map like the Proxmox API does.

Features include:

  • getStorageList
    Gives the json output of all the configured storage back-ends
  • getStorage
    Gives the json formatted output of a storage back-ends current configuration
  • createStorage
    Creates the storage back-end configuration
  • updateStorage
    Updates the storage back-end configuration
  • deleteStorage
    Deletes the storage back-end

Suggestion:
When implementing this feature in the Terraform provider i suggest making a resource for each type of storage back-end. Instead of one complicated and monolithic resource that includes all types.


🔄 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/167 **Author:** [@Tinyblargon](https://github.com/Tinyblargon) **Created:** 4/24/2022 **Status:** ✅ Merged **Merged:** 4/24/2022 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `Feature-Storage` --- ### 📝 Commits (2) - [`d5721c6`](https://github.com/Telmate/proxmox-api-go/commit/d5721c6132b2ead7bc57fea59eb0f1eafd4c3dc2) Add feature to interact with Storage Backends - [`cec3464`](https://github.com/Telmate/proxmox-api-go/commit/cec346493d985dde401b9db58b000415d56320a0) Use Correct Input Validation ### 📊 Changes **7 files changed** (+1342 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+44 -0) 📝 `main.go` (+56 -0) 📝 `proxmox/client.go` (+34 -0) 📝 `proxmox/config_metrics.go` (+2 -2) ➕ `proxmox/config_storage.go` (+1126 -0) 📝 `proxmox/util.go` (+26 -0) 📝 `proxmox/validate.go` (+54 -1) </details> ### 📄 Description Added the functionality to interact with the storage configuration of Proxmox. Due to the nested structs the feature got a bit more complex than anticipated. The nested structs will make it more clear to the end user which setting correspond to the chosen type of storage back-end. I felt this was a better way of doing it than putting all the settings into a simple map like the Proxmox API does. Features include: - getStorageList Gives the json output of all the configured storage back-ends - getStorage Gives the json formatted output of a storage back-ends current configuration - createStorage Creates the storage back-end configuration - updateStorage Updates the storage back-end configuration - deleteStorage Deletes the storage back-end Suggestion: When implementing this feature in the Terraform provider i suggest making a resource for each type of storage back-end. Instead of one complicated and monolithic resource that includes all types. --- <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:32 +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#278
No description provided.