public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jakob Klocker <j.klocker@proxmox.com>
To: "Max R. Carrara" <m.carrara@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH common/manager/proxmox-widget-toolkit/storage 00/13] GUI Support for Custom Storage Plugins
Date: Tue, 14 Jul 2026 13:33:13 +0200	[thread overview]
Message-ID: <a4390fdc-178c-482b-8906-fe4f284cb6b7@proxmox.com> (raw)
In-Reply-To: <20260623143402.772452-1-m.carrara@proxmox.com>

Thanks for the patches.

I've applied the patches and tested it with the sshfs plugin [0].
Tested following:

* Adding a storage of a custom type (sshfs) via the new GUI dialog -
fields are generated from the schema, labels/titles render correctly.
I added the `multiline` format to the sshfs plugin's private-key
property. Without it the key field was a single-line input and the
multiline key couldn't be entered properly, with `multiline` it is
correctly rendered as a textarea and preserves newlines.

* Editing an existing storage - `fixed` properties (e.g. `path` in
sshfs) are shown read only, and the sensitive multiline key field
shows "Unchanged" instead of leaking the stored key.

* Assigning a volume from the custom storage to a VM - works.

* Queried the new endpoints (`pvesh get /plugins/storage/plugin` and
`.../plugin/{type}`) - all inbuilt plugins plus the custom one show
up with a correctly derived schema (titles, sensitive flags, content
types).

I've left two minor comments on the individual patches, apart from
that everything worked as expected. Great work.

Tested-by: Jakob Klocker <j.klocker@proxmox.com>

[0]
https://git.proxmox.com/?p=pve-storage-plugin-examples.git;a=tree;f=plugin-sshfs;h=c7543808f7226209650d1b8b6e449392bc1f0d2d;hb=HEAD


On 6/23/26 4:34 PM, Max R. Carrara wrote:
> GUI Support for Custom Storage Plugins
> ======================================
> 
> This series builds upon my previous RFC (see below), with some issues
> fixed and some further improvements made. The RFC status is dropped,
> rerolling this series as a proper v1.
> 
> Big thanks to @Daniel H. for testing the RFC v2 and providing feedback!
> 
> tl;dr: Integrate custom storage plugins into our web UI by deriving
> ExtJS field definitions from our SectionConfig JSON schema. JSON schema
> keys are converted into ExtJS field attributes in the front end.
> 
> Notable Changes Since rfc-v2
> ----------------------------
> 
> - Rebase on master
> 
> - Add a new "multiline" format in pve-common that prevents strings with
>   line breaks from being folded (thanks @Daniel H. for spotting this!)
> 
> - Add 'title' keys to every inbuilt property and adapt some properties'
>   descriptions (see patch #07 for the details)
> 
> - Add a new 'proxmoxtextarea' field in the widget toolkit (see patch #08)
>   --> If a property has the "multiline" format, this field is used
>       instead the one matching its type
> 
> - Use some of our custom ExtJS fields for the inbuilt 'content',
>   'preallocation' and 'snapshot-as-volume-chain' properties
> 
> - Refrain from exposing properties in the UI that are exposed for any
>   inbuilt storage types (in order to remain consistent)
> 
> - As with inbuilt plugins, make 'preallocation' and
>   'snapshot-as-volume-chain' properties advanced fields
>   --> The tech-preview hint for the SAVC property is also added if a
>       plugin uses that property
> 
> - If any field uses some kind of textarea field (such as "multiline"
>   format properties), put those fields into the wide column at the
>   bottom of the editing window instead
> 
> - If no `title` key is provided in a given plugin's schema, transform
>   its property name into title case instead, e.g. "foo_bar" --> "Foo
>   Bar", "foo-bar" --> "Foo Bar"
> 
> Overall, this results in a lot more polish. Testing would be much
> appreciated -- any custom plugin should work out of the box with this
> series.
> 
> If you need prebuilt packages, holler at me! :)
> 
> 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/
> 
> Summary of Changes
> ------------------
> 
> 
> pve-common:
> 
> Max R. Carrara (1):
>   json schema: add multiline string format
> 
>  src/PVE/JSONSchema.pm | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 
> pve-storage:
> 
> Max R. Carrara (6):
>   api: plugins/storage: add initial routes and endpoints
>   api: plugins/storage/plugin: include schema in plugin metadata
>   api: plugins/storage/plugin: mark 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
> 
>  src/PVE/API2/Makefile                  |   1 +
>  src/PVE/API2/Plugins/Makefile          |  18 +++
>  src/PVE/API2/Plugins/Storage.pm        |  54 ++++++++
>  src/PVE/API2/Plugins/Storage/Makefile  |  17 +++
>  src/PVE/API2/Plugins/Storage/Plugin.pm | 163 +++++++++++++++++++++++++
>  src/PVE/Storage/BTRFSPlugin.pm         |   1 +
>  src/PVE/Storage/CIFSPlugin.pm          |  10 +-
>  src/PVE/Storage/CephFSPlugin.pm        |   6 +-
>  src/PVE/Storage/DirPlugin.pm           |  11 +-
>  src/PVE/Storage/ESXiPlugin.pm          |   1 +
>  src/PVE/Storage/ISCSIPlugin.pm         |   6 +-
>  src/PVE/Storage/LVMPlugin.pm           |  10 +-
>  src/PVE/Storage/LvmThinPlugin.pm       |   3 +-
>  src/PVE/Storage/NFSPlugin.pm           |   6 +-
>  src/PVE/Storage/PBSPlugin.pm           |   5 +-
>  src/PVE/Storage/Plugin.pm              |  46 +++++--
>  src/PVE/Storage/RBDPlugin.pm           |  16 ++-
>  src/PVE/Storage/ZFSPlugin.pm           |  16 ++-
>  src/PVE/Storage/ZFSPoolPlugin.pm       |   9 +-
>  19 files changed, 362 insertions(+), 37 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                 | 150 +++++++++++++++++++++++++++++++++++
>  src/form/TextAreaField.js    |  47 +++++++++++
>  src/window/ACMEPluginEdit.js |  42 +++-------
>  3 files changed, 210 insertions(+), 29 deletions(-)
> 
> 
> pve-manager:
> 
> Max R. Carrara (3):
>   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                        |   6 +
>  PVE/API2/Makefile                  |   1 +
>  PVE/API2/Plugins.pm                |  61 +++++++++
>  www/manager6/Makefile              |   1 +
>  www/manager6/dc/StorageView.js     | 132 +++++++++++++-----
>  www/manager6/storage/Base.js       |   2 +
>  www/manager6/storage/CustomEdit.js | 208 +++++++++++++++++++++++++++++
>  7 files changed, 377 insertions(+), 34 deletions(-)
>  create mode 100644 PVE/API2/Plugins.pm
>  create mode 100644 www/manager6/storage/CustomEdit.js
> 
> 
> Summary over all repositories:
>   30 files changed, 954 insertions(+), 100 deletions(-)
> 





      parent reply	other threads:[~2026-07-14 11:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 14:33 [PATCH common/manager/proxmox-widget-toolkit/storage 00/13] GUI Support for Custom Storage Plugins Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-common 01/13] json schema: add multiline string format Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-storage 02/13] api: plugins/storage: add initial routes and endpoints Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-storage 03/13] api: plugins/storage/plugin: include schema in plugin metadata Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-storage 04/13] api: plugins/storage/plugin: mark sensitive properties in schema Max R. Carrara
2026-07-14 11:21   ` Jakob Klocker
2026-06-23 14:33 ` [PATCH pve-storage 05/13] api: plugins/storage/plugin: factor plugin metadata code into helper Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-storage 06/13] api: plugins/storage/plugin: add plugins' 'content' to their metadata Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-storage 07/13] all plugins: add 'title' to properties, adapt 'description's Max R. Carrara
2026-07-14 11:24   ` Jakob Klocker
2026-06-23 14:33 ` [PATCH proxmox-widget-toolkit 08/13] form: introduce new 'proxmoxtextarea' field Max R. Carrara
2026-06-23 14:33 ` [PATCH proxmox-widget-toolkit 09/13] utils: introduce helper function getFieldDefFromPropertySchema Max R. Carrara
2026-06-23 14:33 ` [PATCH proxmox-widget-toolkit 10/13] acme: use helper to construct ExtJS fields from property schemas Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-manager 11/13] api: add API routes 'plugins' and 'plugins/storage' Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-manager 12/13] ui: storage view: display error when no editor for storage type exists Max R. Carrara
2026-06-23 14:33 ` [PATCH pve-manager 13/13] ui: storage: add basic UI integration for custom storage plugins Max R. Carrara
2026-07-14 11:33 ` Jakob Klocker [this message]

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=a4390fdc-178c-482b-8906-fe4f284cb6b7@proxmox.com \
    --to=j.klocker@proxmox.com \
    --cc=m.carrara@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal