mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #165] How to reach API endpoint options with '-' in the name ? #88
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#88
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 @gabrielmorin1 on GitHub (Apr 30, 2024).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/165
Hello,
I'm trying to use an API endpoint's option that as a dash in it's name. As it's impossible to have dashes in Python variables, I'm facing a major problem.
I have this code I wrote :
And this is the documentation page I'm following for the API : https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/sdn/vnets/{vnet}/subnets (POST)
The attended behavior : creates a vnet with the following parameters : subnet, type, gateway, snap, dnszoneprefix, dhcp-range.
The issue I'm facing is with the parameter
dhcp_range='start-address=192.168.130.10,end-address=192.168.130.20'. When I put it, it's not recognized, because the API is waiting fordhcp-rangeans notdhcp_range. I've also trieddhcprangeanddhcp.rangebut it's not working.I read about the 'dotted notation' in the documentation but my programming skills are not good enough to determine if this method can work and if, how ; because from what I'm understanding I'm playing with endpoint options and not endpoint itself.
Many thanks in advance for your answers,
Best regards
@jhollowe commented on GitHub (May 1, 2024):
For a hyphen in a path name, this is covered in the proxmoxer docs
for a hyphen in a parameter name, see my answer in another issue: https://github.com/proxmoxer/proxmoxer/issues/159#issuecomment-1981198470