mirror of
https://github.com/Corsinvest/cv4pve-api-powershell.git
synced 2026-04-25 20:25:48 +03:00
[GH-ISSUE #12] Convert Hashtables into appropriate querystring values #11
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cv4pve-api-powershell#11
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?
Originally created by @XNoobMaster69 on GitHub (Jan 3, 2024).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/12
What happened?
I tried to pass a
<Hashtable>argument to the Module, but I kept getting a response with a status code of 400. Here's the example:New-PveNodesQemu -Node $node -Vmid 105 -Memory 2048 -ScsiN $storageConfig -IdeN $bootableIso -NetN $networkConfigTo resolve the issue, I received a suggestion to change the variable to
$networkConfig = @{ 1 = "model=virtio,bridge=vmbr0,macaddr=$mac" }, but during debugging, I noticed that the value was not properly escaped in the URI.The only way for
$networkConfigto be accepted was to format it like this:$networkConfig = @{ 1 = "model%3Dvirtio%2Cbridge%3Dvmbr0%2Cmacaddr%3D$mac" }Expected behavior
Accept
<Hashtable>Format and maybe add a simple example to the documentation about the correct aproach.Relevant log output
No response
Proxmox VE Version
8.1.3
Version (bug)
8.1.0
Version (working)
No response
On what operating system are you experiencing the issue?
Windows
Pull Request