[PR #76] [MERGED] fix proxmox API errors on empty params #207

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/76
Author: @jda
Created: 4/25/2020
Status: Merged
Merged: 5/28/2020
Merged by: @ggongaware

Base: masterHead: emptytag


📝 Commits (1)

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 proxmox/session.go (+3 -1)

📄 Description

When attempting to clone a VM that already has disks (so none need to be sent), the clone operation errors out because of empty params in call to proxmox API.

Before:

2020-04-24T20:33:09.737-0700 [DEBUG] plugin.terraform-provider-proxmox: full=1&name=terraform-test-vm&newid=102&pool=managed&storage=&target=tachikoma
[snip]
2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: Pragma: no-cache
2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: Server: pve-api-daemon/3.0
2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: 
2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: {"data":null,"errors":{"storage":"invalid format - storage ID '' contains illegal characters\n"}}
2020/04/24 20:33:09 [DEBUG] proxmox_vm_qemu.cloudinit--test: apply errored, but we're indicating that via the Error pointer rather than returning it: 400 Parameter verification failed.

After, empty param is omitted and operation succedes:

2020-04-24T20:47:47.206-0700 [DEBUG] plugin.terraform-provider-proxmox: full=1&name=terraform-test-vm&newid=102&pool=managed&target=tachikoma


🔄 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/76 **Author:** [@jda](https://github.com/jda) **Created:** 4/25/2020 **Status:** ✅ Merged **Merged:** 5/28/2020 **Merged by:** [@ggongaware](https://github.com/ggongaware) **Base:** `master` ← **Head:** `emptytag` --- ### 📝 Commits (1) - [`1b5a882`](https://github.com/Telmate/proxmox-api-go/commit/1b5a882938b13fe06942fbdd29732b535b1f0b8d) skip empty params ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/session.go` (+3 -1) </details> ### 📄 Description When attempting to clone a VM that already has disks (so none need to be sent), the clone operation errors out because of empty params in call to proxmox API. Before: ``` 2020-04-24T20:33:09.737-0700 [DEBUG] plugin.terraform-provider-proxmox: full=1&name=terraform-test-vm&newid=102&pool=managed&storage=&target=tachikoma [snip] 2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: Pragma: no-cache 2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: Server: pve-api-daemon/3.0 2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: 2020-04-24T20:33:09.745-0700 [DEBUG] plugin.terraform-provider-proxmox: {"data":null,"errors":{"storage":"invalid format - storage ID '' contains illegal characters\n"}} 2020/04/24 20:33:09 [DEBUG] proxmox_vm_qemu.cloudinit--test: apply errored, but we're indicating that via the Error pointer rather than returning it: 400 Parameter verification failed. ``` After, empty param is omitted and operation succedes: ``` 2020-04-24T20:47:47.206-0700 [DEBUG] plugin.terraform-provider-proxmox: full=1&name=terraform-test-vm&newid=102&pool=managed&target=tachikoma ``` --- <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:07 +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#207
No description provided.