all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v1 pve-storage 0/8] Base Module + Documentation for PVE::Storage::Plugin API
@ 2025-03-26 14:20 Max Carrara
  2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 1/8] pluginbase: introduce PVE::Storage::PluginBase with doc scaffold Max Carrara
                   ` (8 more replies)
  0 siblings, 9 replies; 39+ messages in thread
From: Max Carrara @ 2025-03-26 14:20 UTC (permalink / raw)
  To: pve-devel

Abstract Base Module + Documentation for PVE::Storage::Plugin API - v1
======================================================================

This series adds a base module (interface) for PVE::Storage::Plugin,
named PVE::Storage::PluginBase, which lists all methods that are part of
the Storage Plugin API. Additionally, docstrings for every method are
added in order to provide context for (third-party) developers, as
sometimes a complete roundtrip through our code is otherwise necessary
in order to (really) understand what a method does.

Special thanks go to @Maximilano, who has helped me out a lot with this
series!

Essentially, the base module is similar to PVE::LXC::Plugin [1], with
the exception that docstrings are added.

Instead of documenting every single parameter separately, common /
recurring method parameters are listed and explained at the very top of
the file. The caching mechanism of a few methods is also described in
the top-level documentation.

Any feedback regarding the docs is highly appreciated -- I hope that we
haven't overlooked anything. We tried to keep things concise unless it's
absolutely necessary to add additional context.

Also, most (but not all) of the methods `croak` right now if they're
unimplemented, but I feel like default return values for certain methods
could be returned instead. Then again, ::Plugin already provides those
defaults, so I'm not sure if it matters either way.

References
----------

[1]: https://git.proxmox.com/?p=pve-container.git;a=blob;f=src/PVE/LXC/Setup/Plugin.pm;h=b9d9c2d9d19e086438faeda6cfce8f854dddc7ea;hb=refs/heads/master

Summary of Changes
------------------

Max Carrara (8):
  pluginbase: introduce PVE::Storage::PluginBase with doc scaffold
  pluginbase: add high-level plugin API description
  pluginbase: document SectionConfig methods
  pluginbase: document general plugin methods
  pluginbase: document hooks
  pluginbase: document image operation methods
  pluginbase: document volume operations
  pluginbase: document import and export methods

 src/PVE/Storage/Makefile      |    1 +
 src/PVE/Storage/Plugin.pm     |    2 +-
 src/PVE/Storage/PluginBase.pm | 1475 +++++++++++++++++++++++++++++++++
 3 files changed, 1477 insertions(+), 1 deletion(-)
 create mode 100644 src/PVE/Storage/PluginBase.pm

-- 
2.39.5



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


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2025-04-14 14:35 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-26 14:20 [pve-devel] [PATCH v1 pve-storage 0/8] Base Module + Documentation for PVE::Storage::Plugin API Max Carrara
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 1/8] pluginbase: introduce PVE::Storage::PluginBase with doc scaffold Max Carrara
2025-03-31 15:13   ` Fabian Grünbichler
2025-04-02 16:31     ` Max Carrara
2025-04-03  7:12       ` Fabian Grünbichler
2025-04-03 14:05         ` Max Carrara
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 2/8] pluginbase: add high-level plugin API description Max Carrara
2025-03-31 15:13   ` Fabian Grünbichler
2025-04-02 16:31     ` Max Carrara
2025-04-03  7:12       ` Fabian Grünbichler
2025-04-03 14:05         ` Max Carrara
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 3/8] pluginbase: document SectionConfig methods Max Carrara
2025-03-31 15:13   ` Fabian Grünbichler
2025-04-02 16:31     ` Max Carrara
2025-04-11 13:49     ` Wolfgang Bumiller
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 4/8] pluginbase: document general plugin methods Max Carrara
2025-03-28 12:50   ` Maximiliano Sandoval
2025-03-31 15:12   ` Fabian Grünbichler
2025-04-02 16:31     ` Max Carrara
2025-04-11 14:04       ` Wolfgang Bumiller
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 5/8] pluginbase: document hooks Max Carrara
2025-03-28 13:07   ` Maximiliano Sandoval
2025-03-31 15:12   ` Fabian Grünbichler
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 6/8] pluginbase: document image operation methods Max Carrara
2025-03-31 15:12   ` Fabian Grünbichler
2025-04-02 16:32     ` Max Carrara
2025-04-03  7:23       ` Fabian Grünbichler
2025-04-03 14:05         ` Max Carrara
2025-04-11 14:08   ` Wolfgang Bumiller
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 7/8] pluginbase: document volume operations Max Carrara
2025-03-31 15:12   ` Fabian Grünbichler
2025-04-02 16:32     ` Max Carrara
2025-04-14  8:24       ` Wolfgang Bumiller
2025-03-26 14:20 ` [pve-devel] [PATCH v1 pve-storage 8/8] pluginbase: document import and export methods Max Carrara
2025-04-01  8:40   ` Fabian Grünbichler
2025-04-01  9:40     ` Fiona Ebner
2025-04-14 14:35       ` Wolfgang Bumiller
2025-04-02 16:32     ` Max Carrara
2025-04-11 13:27 ` [pve-devel] [PATCH v1 pve-storage 0/8] Base Module + Documentation for PVE::Storage::Plugin API Wolfgang Bumiller

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