26.08.2016 10:08, Lindsay Mathieson пишет:
On 25 August 2016 at 22:44, Dmitry Petuhov <mityapetu...@gmail.com> wrote:
New in v3:
- Moved constant APIVER definion after other use statements.
- Added check for api() method and PVE::Storage::Plugin inheritabce.
- Added warning message on api version mismatch.
- Moved custom plugins loading after standard plugins.
Will there be documentation for the Plugin API? on the Wiki?
That's not really API :)
Just create module with base class PVE::Storage::Plugin, add api()
method and reload methods:
type, plugindata, properties, options, parse_volname, filesystem_path,
create_base, clone_image, alloc_image, free_image, list_images, status,
activate_storage, deactivate_storage, activate_volume,
deactivate_volume, volume_resize, volume_snapshot,
volume_snapshot_rollback, volume_snapshot_delete, volume_has_feature.
Many of them may be just placeholders, dying with errors or silently
returning true, if your module not provides some functionality. See
/usr/share/perl5/PVE/Storage/Plugin.pm for lists of parameters and
returning values.
Although, simple description of parameters and returning values of these
methods in comments in Plugin.pm (maybe in POD format?) could be helpful.
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel