From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 2/2] sdn: Update IPAM API endpoints
Date: Mon, 20 Nov 2023 17:28:33 +0100 [thread overview]
Message-ID: <20231120162833.431139-3-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20231120162833.431139-1-s.hanreich@proxmox.com>
The IPAM-related API endpoints were moved, reflect those changes in
the UI as well.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
www/manager6/sdn/IpamEdit.js | 4 +++-
www/manager6/tree/DhcpTree.js | 15 +++++++++++----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/www/manager6/sdn/IpamEdit.js b/www/manager6/sdn/IpamEdit.js
index 18e22c592..73e5d2e1a 100644
--- a/www/manager6/sdn/IpamEdit.js
+++ b/www/manager6/sdn/IpamEdit.js
@@ -52,8 +52,10 @@ Ext.define('PVE.sdn.IpamEdit', {
isCreate: false,
mapping: {},
+ url: '/cluster/sdn/vnets',
+
submitUrl: function(url, values) {
- return `${url}/${values.zone}/${values.vnet}/${values.mac}`;
+ return `${url}/${values.vnet}/ips`;
},
initComponent: function() {
diff --git a/www/manager6/tree/DhcpTree.js b/www/manager6/tree/DhcpTree.js
index ca279c29a..b7baba606 100644
--- a/www/manager6/tree/DhcpTree.js
+++ b/www/manager6/tree/DhcpTree.js
@@ -17,7 +17,7 @@ Ext.define('PVE.sdn.DhcpTree', {
let me = this;
Proxmox.Utils.API2Request({
- url: `/cluster/sdn/ipam`,
+ url: `/cluster/sdn/ipams/pve/status`,
method: 'GET',
success: function(response, opts) {
let root = {
@@ -105,8 +105,17 @@ Ext.define('PVE.sdn.DhcpTree', {
return;
}
+ let params = {
+ zone: data.zone,
+ mac: data.mac,
+ };
+
+ let encodedParams = Ext.Object.toQueryString(params);
+
+ let url = `/cluster/sdn/vnets/${data.vnet}/ips?${encodedParams}`;
+
Proxmox.Utils.API2Request({
- url: `/cluster/sdn/ipam/${data.zone}/${data.vnet}/${data.mac}`,
+ url,
method: 'DELETE',
waitMsgTarget: view,
failure: function(response, opts) {
@@ -149,7 +158,6 @@ Ext.define('PVE.sdn.DhcpTree', {
Ext.create('PVE.sdn.IpamEdit', {
autoShow: true,
mapping: data,
- url: `/cluster/sdn/ipam`,
extraRequestParams: {
vmid: data.vmid,
mac: data.mac,
@@ -217,7 +225,6 @@ Ext.define('PVE.sdn.DhcpTree', {
Ext.create('PVE.sdn.IpamEdit', {
autoShow: true,
mapping: {},
- url: `/cluster/sdn/ipam`,
isCreate: true,
extraRequestParams: {
vnet: data.name,
--
2.39.2
next prev parent 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 [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 ` Stefan Hanreich [this message]
2023-11-21 21:14 ` [pve-devel] applied: [PATCH pve-manager 2/2] sdn: Update IPAM API endpoints 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-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.