From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ACD7EBAC9F for ; Fri, 15 Dec 2023 15:03:51 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 866663583 for ; Fri, 15 Dec 2023 15:03:21 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 15 Dec 2023 15:03:20 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id B506047547 for ; Fri, 15 Dec 2023 15:03:20 +0100 (CET) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Date: Fri, 15 Dec 2023 15:03:19 +0100 Message-Id: <20231215140319.405818-1-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.002 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH manager v2] ui: qemu: add wwn text field X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2023 14:03:51 -0000 This is useful to test multipath devices which need a wwn. We use 'e.g.' rather than 'Example', otherwise the 18 characters of the example do not fit in the field. Suggested-by: Friedrich Weber Signed-off-by: Maximiliano Sandoval --- Differences from v1: - Use WWN rather than WWID, the reason being that wwn is already documented. www/manager6/qemu/HDEdit.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js index b78647ec..6ccd198d 100644 --- a/www/manager6/qemu/HDEdit.js +++ b/www/manager6/qemu/HDEdit.js @@ -91,6 +91,7 @@ Ext.define('PVE.qemu.HDInputPanel', { PVE.Utils.propertyStringSet(me.drive, values.readOnly, 'ro', 'on'); PVE.Utils.propertyStringSet(me.drive, values.cache, 'cache'); PVE.Utils.propertyStringSet(me.drive, values.aio, 'aio'); + PVE.Utils.propertyStringSet(me.drive, values.wwn, 'wwn', values.wwn); ['mbps_rd', 'mbps_wr', 'iops_rd', 'iops_wr'].forEach(name => { let burst_name = `${name}_max`; @@ -151,6 +152,7 @@ Ext.define('PVE.qemu.HDInputPanel', { values.iothread = PVE.Parser.parseBoolean(drive.iothread); values.readOnly = PVE.Parser.parseBoolean(drive.ro); values.aio = drive.aio || '__default__'; + values.wwn = drive.wwn; values.mbps_rd = drive.mbps_rd; values.mbps_wr = drive.mbps_wr; @@ -285,6 +287,22 @@ Ext.define('PVE.qemu.HDInputPanel', { disabled: '{!isVirtIO && !isSCSI}', }, }, + { + xtype: 'proxmoxtextfield', + name: 'wwn', + fieldLabel: 'WWN', + emptyText: gettext('e.g.') + ': 0x5566777799999999', + value: '', + skipEmptyText: true, + deleteEmpty: true, + submitEmptyText: false, + validator: function(v) { + if (!v || (/^0x[0-9a-fA-F]{16}$/).test(v)) { + return true; + } + return gettext('Invalid Value'); + }, + }, ); advancedColumn2.push( -- 2.39.2