From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id DF1F81FF0B7 for ; Fri, 13 Nov 2026 21:33:51 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 7B0C32167A; Fri, 13 Nov 2026 21:33:38 +0100 (CET) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Subject: [PATCH common/manager/proxmox-widget-toolkit/storage/storage-plugin-examples v5 00/19] GUI Support for Custom Storage Plugins Date: Fri, 13 Nov 2026 21:33:04 +0100 Message-ID: <20261113203330.932813-1-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794602010482 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.301 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: UDOCZUDVM25H2AO4AHU4GWH7IMS3RFAM X-Message-ID-Hash: UDOCZUDVM25H2AO4AHU4GWH7IMS3RFAM X-MailFrom: m.carrara@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Alfonso Kuen , Thomas Ellmenreich , Jakob Klocker X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: GUI Support for Custom Storage Plugins - v5 =========================================== This is another refresh based on the feedback on v4 and also some off-list discussions. Some additional fixes and little things have also been rolled in. Most notably, instead of using an `x-sensitive` keyword, the `sensitive` keyword from [1] is now used. Additionally, the `multiline` format was changed to a keyword instead. Plugins can now also specify a display name. As always, I smoke-tested these changes, but some additional testing certainly wouldn't hurt. Maintainer Notice ----------------- - pve-storage needs a version bump on its libpve-common-perl dependency, since third-party storage plugins might now start using the new `multiline` format and have pve-common as a transitive dependency - pve-manager needs version bumps on its libpve-storage-perl and proxmox-widget-toolkit dependencies, due to the API changes and the new helper in Utils.js - libpve-storage-plugin-sshfs-perl needs a version bump on libpve-storage-perl, since it now uses the `multiline` string format for one of its properties, but does not explicitly depend on libpve-common-perl Building -------- Note that building pve-manager directly depends on the changes made to pve-storage, so you'll have to install the storage package in your build env first before building pve-manager. There shouldn't be any other issues otherwise. Notable Changes Since v4 ------------------------ - Rebase on latest master. - pve-common: Use boolean `multiline` keyword instead of a format. This keeps the `format` key available for additional checks and also makes it easier on the Rust side later. This was the result of both on-list and off-list discussions w/ @Thomas and @Wolfgang; many thanks for the inputs! - pve-storage: Plugins can now have display names. A plugin's display name is now used in the UI to make things look a little prettier. I skipped the author, version, etc. fields that @Wolfgang suggested, as these currently are not used in the UI anywhere. They can be added later on with ease. - pve-storage: Mark *all* properties of a given plugin as hidden if it's not exposed in the create / edit dialogue. ... for consistency's sake. - pve-storage: Support the `sensitive` keyword from [1], and fall back to the built-in `sensitive_properties()` if it is not set. - pve-storage: Allow filtering custom plugins by their `origin`, which is either `builtin` or `custom`. - pve-storage: Improve the overall code that's added, with a some additional guardrails added and redundant things removed. - proxmox-widget-toolkit: Handle a few more edge cases; the most notable one is that combobox titles are now provided as raw strings instead of HTML-encoding them upfront -- the titles are now HTML-encoded by specifying `listConfig.getInnerTpl`. - pve-manager: Handle a bunch of edge cases and also improve the loading of custom plugins in the Datacenter > Storage view. Now only custom plugins' metadata are fetched, thanks to the new `origin` filter parameter in the API. There's now also a new retry logic in rare cases where fetching the plugin metadata fails. This is admittedly a bit extra, but I thought it wouldn't hurt. - pve-storage-plugin-examples: Use the new `multiline` key instead of the format. Also set a display name. Previous Versions ----------------- rfc-v1: https://lore.proxmox.com/pve-devel/20250908180058.530119-1-m.carrara@proxmox.com/ rfc-v2: https://lore.proxmox.com/pve-devel/20251121165858.818307-1-m.carrara@proxmox.com/ v1: https://lore.proxmox.com/pve-devel/20260623143402.772452-1-m.carrara@proxmox.com/ v2: https://lore.proxmox.com/pve-devel/20260717154943.696411-1-m.carrara@proxmox.com/ v3: https://lore.proxmox.com/pve-devel/20260727143445.513900-1-m.carrara@proxmox.com/ v4: https://lore.proxmox.com/pve-devel/20261106154554.2182986-1-m.carrara@proxmox.com/ References ---------- [1] https://lore.proxmox.com/all/20261101213835.353604-1-t.lamprecht@proxmox.com/ Summary of Changes ------------------ pve-common: Max R. Carrara (1): json schema: add multiline validation keyword src/PVE/JSONSchema.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) pve-storage: Max R. Carrara (9): api: plugins/storage: add initial routes and endpoints api: plugins/storage/plugin: include schema in plugin metadata api: plugins/storage/plugin: handle sensitive properties in schema api: plugins/storage/plugin: factor plugin metadata code into helper api: plugins/storage/plugin: add plugins' 'content' to their metadata all plugins: add 'title' to properties, adapt 'description's all plugins, api: mark certain properties as advanced in plugindata() all plugins, api: mark certain properties as hidden in plugindata() api: plugins/storage/plugin: allow plugins to have display names src/PVE/API2/Makefile | 1 + src/PVE/API2/Plugins/Makefile | 18 ++ src/PVE/API2/Plugins/Storage.pm | 58 ++++++ src/PVE/API2/Plugins/Storage/Makefile | 17 ++ src/PVE/API2/Plugins/Storage/Plugin.pm | 247 +++++++++++++++++++++++++ src/PVE/Storage/BTRFSPlugin.pm | 13 ++ src/PVE/Storage/CIFSPlugin.pm | 25 ++- src/PVE/Storage/CephFSPlugin.pm | 19 +- src/PVE/Storage/DirPlugin.pm | 24 ++- src/PVE/Storage/ESXiPlugin.pm | 6 + src/PVE/Storage/ISCSIDirectPlugin.pm | 2 + src/PVE/Storage/ISCSIPlugin.pm | 10 +- src/PVE/Storage/LVMPlugin.pm | 21 ++- src/PVE/Storage/LvmThinPlugin.pm | 7 +- src/PVE/Storage/NFSPlugin.pm | 20 +- src/PVE/Storage/PBSPlugin.pm | 9 +- src/PVE/Storage/Plugin.pm | 56 ++++-- src/PVE/Storage/RBDPlugin.pm | 24 ++- src/PVE/Storage/ZFSPlugin.pm | 22 ++- src/PVE/Storage/ZFSPoolPlugin.pm | 14 +- 20 files changed, 571 insertions(+), 42 deletions(-) create mode 100644 src/PVE/API2/Plugins/Makefile create mode 100644 src/PVE/API2/Plugins/Storage.pm create mode 100644 src/PVE/API2/Plugins/Storage/Makefile create mode 100644 src/PVE/API2/Plugins/Storage/Plugin.pm proxmox-widget-toolkit: Max R. Carrara (3): form: introduce new 'proxmoxtextarea' field utils: introduce helper function getFieldDefFromPropertySchema acme: use helper to construct ExtJS fields from property schemas src/Utils.js | 212 +++++++++++++++++++++++++++++++++++ src/form/TextAreaField.js | 47 ++++++++ src/window/ACMEPluginEdit.js | 47 +++----- 3 files changed, 277 insertions(+), 29 deletions(-) pve-manager: Max R. Carrara (5): api: sort modules and API method registrations ui: storage: remove entry of the removed DRBD plugin api: add API routes 'plugins' and 'plugins/storage' ui: storage view: display error when no editor for storage type exists ui: storage: add basic UI integration for custom storage plugins PVE/API2.pm | 26 +-- PVE/API2/Makefile | 1 + PVE/API2/Plugins.pm | 61 +++++++ www/manager6/Makefile | 1 + www/manager6/Utils.js | 5 - www/manager6/dc/StorageView.js | 147 ++++++++++++++-- www/manager6/storage/Base.js | 10 +- www/manager6/storage/CustomEdit.js | 274 +++++++++++++++++++++++++++++ 8 files changed, 498 insertions(+), 27 deletions(-) create mode 100644 PVE/API2/Plugins.pm create mode 100644 www/manager6/storage/CustomEdit.js pve-storage-plugin-examples: Max R. Carrara (1): sshfs: Update SSHFS plugin .../src/PVE/Storage/Custom/SSHFSPlugin.pm | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) Summary over all repositories: 33 files changed, 1379 insertions(+), 104 deletions(-) -- Generated by murpp 0.12.0