public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH network/manager 0/2] Refactor IPAM API methods
@ 2023-11-20 16:28 Stefan Hanreich
  2023-11-20 16:28 ` [pve-devel] [PATCH pve-network 1/2] api: refactor URL structure for Ipam Stefan Hanreich
  2023-11-20 16:28 ` [pve-devel] [PATCH pve-manager 2/2] sdn: Update IPAM API endpoints Stefan Hanreich
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Hanreich @ 2023-11-20 16:28 UTC (permalink / raw)
  To: pve-devel

Moving the API method for the IPAM index to /ipams/pve/status which seems
better suited as it returns the current state of the PVE IPAM. This could be
then extended further to return the current status of other IPAM plugins,
although it is probably preferrable to use the respective API / UI of the IPAM
for retrieving its current status rather than using the PVE API.

Additionally moved the IPAM Mapping create / update / delete endpoints to 
/vnets/{vnetid}/ips since they are part of the VNet and those methods
not only manage IPAM related state but also stuff like DNS plugin state.

Currently I did not add a links relation to the endpoint, since there is no
GET endpoint that would retrieve a single mapping from the API. I did not find
any other relations present in our current API. If we move to displaying the
state of the IPAM to the Zone panel, then we could move the Index as well as
the create / update / delete methods to the Zone endpoint and then it would be
possible to show a proper child relation.



pve-network:

Stefan Hanreich (1):
  api: refactor URL structure for Ipam

 src/PVE/API2/Network/SDN.pm                  |  6 --
 src/PVE/API2/Network/SDN/Ipams.pm            | 83 +++++++++++++++++
 src/PVE/API2/Network/SDN/{Ipam.pm => Ips.pm} | 97 ++------------------
 src/PVE/API2/Network/SDN/Makefile            |  2 +-
 src/PVE/API2/Network/SDN/Vnets.pm            |  6 ++
 5 files changed, 100 insertions(+), 94 deletions(-)
 rename src/PVE/API2/Network/SDN/{Ipam.pm => Ips.pm} (58%)


pve-manager:

Stefan Hanreich (1):
  sdn: Update IPAM API endpoints

 www/manager6/sdn/IpamEdit.js  |  4 +++-
 www/manager6/tree/DhcpTree.js | 15 +++++++++++----
 2 files changed, 14 insertions(+), 5 deletions(-)


Summary over all repositories:
  7 files changed, 114 insertions(+), 99 deletions(-)

-- 
murpp v0.4.0




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-21 21:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 16:28 [pve-devel] [PATCH network/manager 0/2] Refactor IPAM API methods Stefan Hanreich
2023-11-20 16:28 ` [pve-devel] [PATCH pve-network 1/2] api: refactor URL structure for Ipam Stefan Hanreich
2023-11-20 16:43   ` [pve-devel] applied: " Thomas Lamprecht
2023-11-20 16:28 ` [pve-devel] [PATCH pve-manager 2/2] sdn: Update IPAM API endpoints Stefan Hanreich
2023-11-21 21:14   ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal