[pve-devel] [PATCH] Document PVE::Storage::Plugin public methods
Dmitry Petuhov
mityapetuhov at gmail.com
Tue Jan 17 10:10:49 CET 2017
17.01.2017 10:28, Jasmin J. wrote:
> Hi!
>
> THX for describing it, it would have been very helpful when I was writing
> my DRBD8 plugin.
>
> On 01/16/2017 09:46 PM, Dmitry Petuhov wrote:
>> +# public
>> +# returns $path to image/directory to be passed to qemu/lxc.
>> sub path {
>> my ($class, $scfg, $volname, $storeid, $snapname) = @_;
>>
>> return $class->filesystem_path($scfg, $volname, $snapname);
>> }
>
> I have implemented "filesystem_path" instead of "path" in my plugin,
> because
> this was done in the LVM plugin also. Are you sure "path" is the public
> interface and not "filesystem_path"?
Yes, search in /usr/share/perl5/PVE showed that all outside modules call
$plugin->path() (maybe I missed something).
But overloading filesystem_path() is OK, because default path() just
calls your filesystem_path().
More information about the pve-devel
mailing list