public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH network/manager 0/2] Refactor IPAM API methods
Date: Mon, 20 Nov 2023 17:28:31 +0100	[thread overview]
Message-ID: <20231120162833.431139-1-s.hanreich@proxmox.com> (raw)

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




             reply	other threads:[~2023-11-20 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 16:28 Stefan Hanreich [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231120162833.431139-1-s.hanreich@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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