all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [WIP manager 3/3] gui: add nvme as a bus type for creating disks
Date: Wed, 31 Jul 2024 15:40:33 +0200	[thread overview]
Message-ID: <20240731134033.1733932-3-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20240731134033.1733932-1-a.lauterer@proxmox.com>

From: Oguz Bektas <o.bektas@proxmox.com>

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 www/manager6/Utils.js                   | 3 ++-
 www/manager6/form/BusTypeSelector.js    | 2 ++
 www/manager6/form/ControllerSelector.js | 2 +-
 www/manager6/qemu/CloudInit.js          | 4 ++--
 www/mobile/QemuSummary.js               | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index db86fa9a..aba72135 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -13,7 +13,7 @@ Ext.define('PVE.Utils', {
 
     toolkit: undefined, // (extjs|touch), set inside Toolkit.js
 
-    bus_match: /^(ide|sata|virtio|scsi)(\d+)$/,
+    bus_match: /^(ide|sata|virtio|scsi|nvme)\d+$/,
 
     log_severity_hash: {
 	0: "panic",
@@ -1560,6 +1560,7 @@ Ext.define('PVE.Utils', {
 	ide: 4,
 	sata: 6,
 	scsi: 31,
+	nvme: 8,
 	virtio: 16,
 	unused: 256,
     },
diff --git a/www/manager6/form/BusTypeSelector.js b/www/manager6/form/BusTypeSelector.js
index 0f040229..fbc6f222 100644
--- a/www/manager6/form/BusTypeSelector.js
+++ b/www/manager6/form/BusTypeSelector.js
@@ -16,6 +16,8 @@ Ext.define('PVE.form.BusTypeSelector', {
 
 	me.comboItems.push(['scsi', 'SCSI']);
 
+	me.comboItems.push(['nvme', 'NVMe']);
+
 	if (me.withUnused) {
 	    me.comboItems.push(['unused', 'Unused']);
 	}
diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index d7c2625d..8c766598 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -39,7 +39,7 @@ Ext.define('PVE.form.ControllerSelector', {
 		deviceid.setValue(2);
 		return;
 	    }
-	    clist = ['ide', 'scsi', 'sata'];
+	    clist = ['ide', 'scsi', 'sata', 'nvme'];
 	} else {
 	    // in most cases we want to add a disk to the same controller we previously used
 	    clist = PVE.Utils.sortByPreviousUsage(me.vmconfig);
diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
index 49519726..4ea58641 100644
--- a/www/manager6/qemu/CloudInit.js
+++ b/www/manager6/qemu/CloudInit.js
@@ -135,7 +135,7 @@ Ext.define('PVE.qemu.CloudInit', {
 	    var id = record.data.key;
 	    var value = record.data.value;
 	    var ciregex = new RegExp("vm-" + me.pveSelNode.data.vmid + "-cloudinit");
-		if (id.match(/^(ide|scsi|sata)\d+$/) && ciregex.test(value)) {
+		if (id.match(/^(ide|scsi|sata|nvme)\d+$/) && ciregex.test(value)) {
 		    found = id;
 		    me.ciDriveId = found;
 		    me.ciDrive = value;
@@ -330,7 +330,7 @@ Ext.define('PVE.qemu.CloudInit', {
 	    };
 	}
 
-	PVE.Utils.forEachBus(['ide', 'scsi', 'sata'], function(type, id) {
+	PVE.Utils.forEachBus(['ide', 'scsi', 'sata', 'nvme'], function(type, id) {
 	    me.rows[type+id] = {
 		visible: false,
 	    };
diff --git a/www/mobile/QemuSummary.js b/www/mobile/QemuSummary.js
index c416ea7d..a484fcb6 100644
--- a/www/mobile/QemuSummary.js
+++ b/www/mobile/QemuSummary.js
@@ -12,7 +12,7 @@ Ext.define('PVE.QemuSummary', {
 
     config_keys: [
 	'name', 'memory', 'sockets', 'cores', 'ostype', 'bootdisk', /^net\d+/,
-	/^ide\d+/, /^virtio\d+/, /^sata\d+/, /^scsi\d+/, /^unused\d+/,
+	/^ide\d+/, /^virtio\d+/, /^sata\d+/, /^scsi\d+/, /^nvme\d+/, /^unused\d+/
     ],
 
     initialize: function() {
-- 
2.39.2



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


  parent reply	other threads:[~2024-07-31 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 13:16 [pve-devel] [WIP qemu-server, manager 0/3] nvme-emulation, current state Aaron Lauterer
2024-07-31 13:40 ` [pve-devel] [WIP qemu-server 1/3] fix #2255: add support for nvme emulation Aaron Lauterer
2024-07-31 13:40   ` [pve-devel] [WIP qemu-server 2/3] nvme: make it somewhat work with current version Aaron Lauterer
2024-07-31 13:40   ` Aaron Lauterer [this message]
2024-07-31 15:30   ` [pve-devel] [WIP qemu-server 1/3] fix #2255: add support for nvme emulation 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=20240731134033.1733932-3-a.lauterer@proxmox.com \
    --to=a.lauterer@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal