mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 15:35:51 +03:00
[PR #80] [CLOSED] Fixed issue when parsing mountpoints from received from Proxmox API #213
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#213
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/80
Author: @johnknott
Created: 7/10/2020
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
f176a2eFixed issue when parsing mountpoints from received from Proxmox API📊 Changes
1 file changed (+8 additions, -9 deletions)
View changed files
📝
proxmox/config_lxc.go(+8 -9)📄 Description
This was causing problems when creating LXC containers with mountpoints in the Terraform Provider.
https://github.com/Telmate/terraform-provider-proxmox/issues/157
mpConfMap.readDeviceConfig expects a list of strings of the form ["key1=value","key2=value"]
But when parsing the mountpoints it was sent a list like ["/mnt/pve/storage-box","mp=/mnt/something"]
Note the missing '=' in the first entry, which cause an entry in the confMap with an empty string as a key and nil as a value. So I rejigged this a bit, and also included the 'volume' key.
This was previously causing an 'Error writing fields: Invalid address to set: []string{"mountpoint", "3317302270", ""}' in the Terraform Provider. when creating an LXC resource with mountpoints. The resource would be created but state wouldn't not be written.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.