[pve-devel] [PATCH v4 pve-network 10/33] api: add endpoints for managing PVE IPAM

Stefan Hanreich s.hanreich at proxmox.com
Mon Nov 20 13:34:22 CET 2023


On 11/20/23 13:28, DERUMIER, Alexandre wrote:
> Hi,
> 
>>> I'll look again into this, maybe POST / PUT / DELETE
>>> `/ipams/pve/mapping` or `/ipams/pve/ip` would be a good alternative
>>> here? We need to move away from MAC addresses as a unique identifier
>>> anyway (since with dual-stack there can be multiple IP addresses for
>>> the same MAC address) so I would need to adjust those endpoints
>>> anyway to
>>> work on IP/MAC pairings).
> 
>>> So the endpoints would then look like this:
>>>
>>> GET /ipams/pve
>>>
>>> POST /ipams/pve/ip
>>> PUT /ipams/pve/ip
>>> DELETE /ipams/pve/ip
> 
> 
> You should use plugin name in path    ,for me it should work with any
> ipam plugin
> 
> 
> so, simply : "/ipams/ip"

Not sure about this, since the endpoint returns the state of the PVE
IPAM and never returns the state of Netbox IPAM, for instance. Since if
you want to inspect that state you would use the Netbox API / Web UI.
For that reason it would make sense for me to use pve in the API path.

> So, I think that theses should be subpath of subnets
> 
> /subnets/<subnetid/ips

This sounds like a good idea - and is probably better than what I
proposed. I'll quickly talk with Thomas about this.





More information about the pve-devel mailing list