mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[PR #167] [MERGED] Feature: storage #278
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#278
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:Feature-Storage📝 Commits (2)
d5721c6Add feature to interact with Storage Backendscec3464Use 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:
Gives the json output of all the configured storage back-ends
Gives the json formatted output of a storage back-ends current configuration
Creates the storage back-end configuration
Updates the storage back-end configuration
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.