all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager v2] ui: qemu: add wwn text field
@ 2023-12-15 14:03 Maximiliano Sandoval
  2024-01-05 10:54 ` Fiona Ebner
  0 siblings, 1 reply; 3+ messages in thread
From: Maximiliano Sandoval @ 2023-12-15 14:03 UTC (permalink / raw)
  To: pve-devel

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 <f.weber@proxmox.com>
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
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





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

* Re: [pve-devel] [PATCH manager v2] ui: qemu: add wwn text field
  2023-12-15 14:03 [pve-devel] [PATCH manager v2] ui: qemu: add wwn text field Maximiliano Sandoval
@ 2024-01-05 10:54 ` Fiona Ebner
  2024-01-05 15:50   ` Maximiliano Sandoval
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2024-01-05 10:54 UTC (permalink / raw)
  To: Proxmox VE development discussion, Maximiliano Sandoval

Am 15.12.23 um 15:03 schrieb Maximiliano Sandoval:
> 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 <f.weber@proxmox.com>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>

Is there a user request for this feature or other common use cases? If
it's just for testing multipath, it's a rather niche use case and fine
to be CLI only.




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

* Re: [pve-devel] [PATCH manager v2] ui: qemu: add wwn text field
  2024-01-05 10:54 ` Fiona Ebner
@ 2024-01-05 15:50   ` Maximiliano Sandoval
  0 siblings, 0 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2024-01-05 15:50 UTC (permalink / raw)
  To: Fiona Ebner; +Cc: Proxmox VE development discussion

Fiona Ebner <f.ebner@proxmox.com> writes:

> Is there a user request for this feature or other common use cases? If
> it's just for testing multipath, it's a rather niche use case and fine
> to be CLI only.

Yeah, its mostly for debugging. Probably it is niche enough to not have
it in the web UI.

--
Maximiliano




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

end of thread, other threads:[~2024-01-05 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-15 14:03 [pve-devel] [PATCH manager v2] ui: qemu: add wwn text field Maximiliano Sandoval
2024-01-05 10:54 ` Fiona Ebner
2024-01-05 15:50   ` Maximiliano Sandoval

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal