From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id D54291FF16B
	for <inbox@lore.proxmox.com>; Thu,  6 Mar 2025 12:44:24 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id EC864456D;
	Thu,  6 Mar 2025 12:43:46 +0100 (CET)
To: pve-devel@lists.proxmox.com
Date: Thu,  6 Mar 2025 12:10:41 +0100
In-Reply-To: <20250306110831.6426-1-lou.lecrivain@orange.fr>
References: <20250306110831.6426-1-lou.lecrivain@orange.fr>
X-Mailman-Approved-At: Thu, 06 Mar 2025 12:43:42 +0100
MIME-Version: 1.0
Message-ID: <mailman.840.1741261422.293.pve-devel@lists.proxmox.com>
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Post: <mailto:pve-devel@lists.proxmox.com>
From: "lou.lecrivain--- via pve-devel" <pve-devel@lists.proxmox.com>
Precedence: list
Cc: lou.lecrivain@orange.fr, Jonatan Crystall <jonatan.crystall@gwdg.de>
X-Mailman-Version: 2.1.29
X-BeenThere: pve-devel@lists.proxmox.com
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
Subject: [pve-devel] [PATCH] pve-manager: add UI dialogs for Nautobot IPAM
 backend
Content-Type: multipart/mixed; boundary="===============5377726537639268401=="
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

--===============5377726537639268401==
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <lou.lecrivain@orange.fr>
X-Original-To: pve-devel@lists.proxmox.com
Delivered-To: pve-devel@lists.proxmox.com
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by lists.proxmox.com (Postfix) with ESMTPS id C2438D3F7A
	for <pve-devel@lists.proxmox.com>; Thu,  6 Mar 2025 12:11:33 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id A3AD73660
	for <pve-devel@lists.proxmox.com>; Thu,  6 Mar 2025 12:11:03 +0100 (CET)
Received: from smtp.smtpout.orange.fr (smtp-75.smtpout.orange.fr [80.12.242.75])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by firstgate.proxmox.com (Proxmox) with ESMTPS
	for <pve-devel@lists.proxmox.com>; Thu,  6 Mar 2025 12:11:03 +0100 (CET)
Received: from localhost ([176.139.8.107])
	by smtp.orange.fr with ESMTPA
	id q97st3gOU8Q2cq97wtAlXp; Thu, 06 Mar 2025 12:10:56 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr;
	s=t20230301; t=1741259456;
	bh=uWygWphVd5h3xC+hvQAriCAIi+Cu4psB7pSu+vK1XiA=;
	h=From:To:Subject:Date:Message-Id:MIME-Version;
	b=FMDCntFMSQ3v+LpbJVPsjw2LX/deiOIir8nbh30MgMS5or1RnU9zu0gnZcu9dGvcu
	 p4yeQoNfAhFC1CjUHLtmvDfAUY0E7PEZpyQHxugZmvylh5HIjBnTvIYX0CntIpp2cr
	 YwrKaQrOLIfJJVGHRqS12shQORPlnFn7NG4fIjJzR/1rIR0ESEwyy2xahrFz2yn3fc
	 7g3M3nd+uObC0+SGYKggqIosTpW1Rj+Bq7TLMgiyxU9Kuxh3Ee01Wr9EMk6i4m/qDt
	 qLiNibX0wwoRN+OYJejwGGWzh37fJqhSFjBMZ3FTunc96ikZRrJc9QEq94fUWsn4qf
	 2qoDlPNSuOhoQ==
X-ME-Helo: localhost
X-ME-Auth: bG91LmxlY3JpdmFpbkBvcmFuZ2UuZnI=
X-ME-Date: Thu, 06 Mar 2025 12:10:56 +0100
X-ME-IP: 176.139.8.107
From: lou.lecrivain@orange.fr
To: pve-devel@lists.proxmox.com
Cc: h.duerr@proxmox.com,
	Jonatan Crystall <jonatan.crystall@gwdg.de>,
	Lou Lecrivain <lou.lecrivain@wdz.de>
Subject: [PATCH] pve-manager: add UI dialogs for Nautobot IPAM backend
Date: Thu,  6 Mar 2025 12:10:41 +0100
Message-Id: <20250306111041.6597-1-lou.lecrivain@orange.fr>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250306110831.6426-1-lou.lecrivain@orange.fr>
References: <20250306110831.6426-1-lou.lecrivain@orange.fr>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
	AWL                     0.200 Adjusted score from AWL reputation of From: address
	BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
	DKIM_SIGNED               0.1 Message has a DKIM or DK signature, not necessarily valid
	DKIM_VALID               -0.1 Message has at least one valid DKIM or DK signature
	DKIM_VALID_AU            -0.1 Message has a valid DKIM or DK signature from author's domain
	DKIM_VALID_EF            -0.1 Message has a valid DKIM or DK signature from envelope-from domain
	DMARC_PASS               -0.1 DMARC pass policy
	FREEMAIL_FROM           0.001 Sender email is commonly abused enduser mail provider
	RCVD_IN_DNSWL_NONE     -0.0001 Sender listed at https://www.dnswl.org/, no trust
	RCVD_IN_MSPIKE_H4       0.001 Very Good reputation (+4)
	RCVD_IN_MSPIKE_WL       0.001 Mailspike good senders
	SPF_HELO_PASS          -0.001 SPF: HELO matches SPF record
	SPF_PASS               -0.001 SPF: sender matches SPF record
X-Mailman-Approved-At: Thu, 06 Mar 2025 12:43:42 +0100

From: Jonatan Crystall <jonatan.crystall@gwdg.de>

Co-authored-by: Jonatan Crystall <jonatan.crystall@gwdg.de>
Signed-off-by: Lou Lecrivain <lou.lecrivain@wdz.de>
---
 www/manager6/Makefile                  |  1 +
 www/manager6/Utils.js                  |  5 +++
 www/manager6/sdn/ipams/NautobotEdit.js | 52 ++++++++++++++++++++++++++
 3 files changed, 58 insertions(+)
 create mode 100644 www/manager6/sdn/ipams/NautobotEdit.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index c94a5cdf..aee431ae 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -292,6 +292,7 @@ JSSRC= 							\
 	sdn/IpamView.js					\
 	sdn/ipams/Base.js				\
 	sdn/ipams/NetboxEdit.js				\
+	sdn/ipams/NautobotEdit.js				\
 	sdn/ipams/PVEIpamEdit.js			\
 	sdn/ipams/PhpIpamEdit.js			\
 	sdn/DnsView.js					\
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 90011a8f..338039b5 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -931,6 +931,11 @@ Ext.define('PVE.Utils', {
 	    ipanel: 'PhpIpamInputPanel',
 	    faIcon: 'th',
 	},
+	nautobot: {
+	    name: 'Nautobot',
+	    ipanel: 'NautobotInputPanel',
+	    faIcon: 'th',
+	},
     },
 
     sdndnsSchema: {
diff --git a/www/manager6/sdn/ipams/NautobotEdit.js b/www/manager6/sdn/ipams/NautobotEdit.js
new file mode 100644
index 00000000..06d8f2c8
--- /dev/null
+++ b/www/manager6/sdn/ipams/NautobotEdit.js
@@ -0,0 +1,52 @@
+Ext.define('PVE.sdn.ipams.NautobotInputPanel', {
+    extend: 'PVE.panel.SDNIpamBase',
+
+    onlineHelp: 'pvesdn_ipam_plugin_nautobot', // TODO: update docs
+
+    onGetValues: function(values) {
+        var me = this;
+
+	if (me.isCreate) {
+	    values.type = me.type;
+	} else {
+	    delete values.ipam;
+	}
+
+	return values;
+    },
+
+    initComponent: function() {
+	var me = this;
+
+	me.items = [
+	    {
+		xtype: me.isCreate ? 'textfield' : 'displayfield',
+		name: 'ipam',
+		maxLength: 10,
+		value: me.zone || '',
+		fieldLabel: 'ID',
+		allowBlank: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'url',
+		fieldLabel: gettext('URL'),
+		allowBlank: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'token',
+		fieldLabel: gettext('Token'),
+		allowBlank: false,
+	    },
+		{
+		xtype: 'textfield',
+		name: 'namespace',
+		fieldLabel: gettext('Namespace'),
+		allowBlank: false,
+		},
+	];
+
+	me.callParent();
+    },
+});
-- 
2.39.5



--===============5377726537639268401==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

--===============5377726537639268401==--