[pve-devel] storage plugins: what is plugindata()->{content}[1]
Max Carrara
m.carrara at proxmox.com
Tue Feb 25 11:50:31 CET 2025
On Fri Feb 7, 2025 at 1:34 PM CET, Roland Kammerer wrote:
> On Fri, Feb 07, 2025 at 10:18:42AM +0100, Fabian Grünbichler wrote:
> >
> > > Roland Kammerer via pve-devel <pve-devel at lists.proxmox.com> hat am 07.02.2025 10:02 CET geschrieben:
> > > Hi all,
> > >
> > > rather simple question I guess, but I could not find the answer in
> > > https://pve.proxmox.com/wiki/Storage_Plugin_Development and linked
> > > documents and looks like my grep foo is lacking today, so here we go:
> > > I guess I know what the first hash in the 'content' array is, but what
> > > is the second? Actually, why is there a second one?
> > >
> > > Storage/LVMPlugin.pm:
> > > content => [ {images => 1, rootdir => 1}, { images => 1 }]
> > >
> > > vs.
> > >
> > > Storage/LvmThinPlugin.pm:
> > > content => [ {images => 1, rootdir => 1}, { images => 1, rootdir => 1}]
> > >
> > > Best, rck
> >
> > the first one defines the allowed/valid content types, the second the default one(s):
>
> thanks Fabian and Fiona, that explains it.
>
> > we are working on improving the docs and cleaning all of this up!
>
> that is great news, even after maintaining a plugin for some time it
> usually takes a deep dive into some core code to actually understand
> some of the API. If there is then something to review or give feedback
> from an external plugin dev's point of view feel free to explicitly ping
> me.
>
> Best, rck
Thanks a lot for the offer! I do actually have a couple questions. It
would be nice if you could answer them, as it would aid in cleaning all
this up, but please don't feel like you have to, of course!
Note that I can't guarantee that everything will be incorporated into
the code of course, but I still wanted to reach out, as I'm in the
process of sorting all of this out.
1. Which parts of the plugin API (specifically PVE::Storage::Plugin)
are hard to grasp / work with?
2. Since you've been working with the code for a while, do you have any
improvement suggestions for the API? If so, which?
(Note that by that I don't mean new features and such, but rather
improvements to the API as a whole -- the subroutines it consists of
etc.)
3. Are there any parts of the API that you would change? If so, which?
4. Do you think you would benefit from having (API) subroutines
documented via docstrings?
5. Is there any kind of "tooling" that you'd like to have, which would
aid you with plugin development? By that I mean things like being
able to check if your plugin conforms to the current API version and
such.
6. Is there any other things you'd like to mention? Feedback, critique
and such are all welcome!
Also, should something pop up in the future that you'd like to mention,
please feel free to ping me here on the mailing list and let me know
what it is (: I'm always grateful for any feedback!
Thanks a lot in advance for your time!
More information about the pve-devel
mailing list