[pve-devel] [PATCH v2 storage 4/5] disk reassign: add not implemented yet message to storages

Aaron Lauterer a.lauterer at proxmox.com
Thu Sep 3 11:06:43 CEST 2020

sent to early without finishing the last sentence...

On 9/3/20 11:01 AM, Aaron Lauterer wrote:
> On 9/3/20 9:58 AM, Fabian Grünbichler wrote:
>> wouldn't it make more sense to implement it in Dir/NFS/CIFSPlugin, and
>> add this 'implement me' into Plugin itself? otherwise this breaks
>> external plugins. also, would it make sense to add a feature for this so
>> that we can check in the calling code with a meaningful error message
>> before attempting and die-ing?
> The storage plugins are a bit of a mess hierarchically. The base plugin (Plugin.pm) implements quite a few methods for the dir based plugins (dir, nfs, cifs) like `find_free_diskname` for example.
> The other plugins overwrite these methods.
> If we want to do it properly and to avoid code duplication, we should probably add another class in between to which me move the common file based operations which are used by all the dir based plugins.
> Plugin.pm
>      BaseDirPlugin.pm
>          DirPlugin.pm
>          NFSPlugin.pm
>          CIFSPlugin.pm
> Having the reassigning as additional feature sounds good. I will try that. But this will need
But this will need the intermediate dir base class so that we can add the feature just for them and not all plugins, especially third party ones which we cannot update.

Then again, what if a third party plugin is using the dir based methods in the plugin.pm already?
should I just add new things to the intermediate BaseDirPlugin in order to stay compatible?

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

More information about the pve-devel mailing list