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.
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 for dhcp-rangeans not dhcp_range. I've also tried dhcprange and dhcp.range but 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.
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-range
ans notdhcp_range
. I've also trieddhcprange
anddhcp.range
but 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