mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #62] proxmoxer variables inside .post(variable=array) error #30
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#30
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 @enimath on GitHub (Jun 15, 2021).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/62
Hello,
I want to send post method via proxmoxer but I want to use variables "hdd3_type" instead of scsi2 (when I put scsi2=hdd3array it is working!) :
code :
return
parameter verification failed. - b'{"data":null,"errors":{"hdd3_type":"property is not defined in schema and the schema does not allow additional properties"}}'I was checking also some other methods to omit this error but without success.
.post(hdd3_type+'='+hdd3array)return
Not Implemented: Method 'POST /nodes/local-15/qemu/100/config/scsi2=moosefs:3,format=qcow2,discard=on' not implemented - b'{"data":null}'@jhollowe commented on GitHub (Jun 25, 2021):
Python sees
hdd3_typeand doesn't think it is a variable, but simply a name of an argument to thepost()function. You need to change the actual name of the argument using the contents of thehdd3_typevariable. An easy way to do this is by setting up a dict with your data and then unpack that dict as the arguments to the postFeel free to close the issue if this works or comment back with any further errors!
(I didn't test this, but it should work)
@enimath commented on GitHub (Aug 2, 2021):
hello ,
it is working , thanks for help !
I had also add module
from typing_extensions import ParamSpec