[pve-devel] pve-manager/www: API for external plugins?

Roland Kammerer roland.kammerer at linbit.com
Mon Nov 21 09:26:21 CET 2022


Hi Thomas,

sorry for the long delay, and thanks for the pointers. In general we
would be willing to work on that if it does not take us too much effort.
We currently try to figure that out. A colleague of mine told me that
the js part should not be the problem, what I am not sure about is this
part:

On Fri, Nov 04, 2022 at 02:46:15PM +0100, Thomas Lamprecht wrote:
> If done somewhat nicely and safely we'd accept such a thing, the plugins
> would get an new method (e.g., api_schema) that returns a perl hash ref
> containing the properties including type, description and flags like if the
> setting is editable (after storage addition),

Okay, sure the plugins have to report their schema, I'm just not sure
about the "perl hash ref". How/where would/are the web part and the
plugins communicate? Would that be a real reference somewhere or would
the plugins just output a json dict that is somewhere parsed back?

> and a new API endpoint returning the schema's of all (external)
> plugins similar so that they can be shown in the add Drop down and
> used for creating the basic form.

Also obvious in general, I have the same problem of how and where do js
and perl code talk to each other.

Any hints and pointers in the right direction are welcome.

Best, rck




More information about the pve-devel mailing list