[pve-devel] pve-storage : dynamic plugin loading ?

Alexandre DERUMIER aderumier at odiso.com
Fri Dec 28 09:27:16 CET 2012


Hi Dietmar,

Do you think it's possible to add dynamic plugin loading in pve-storage ?

instead:
use PVE::Storage::Plugin;
use PVE::Storage::DirPlugin;
use PVE::Storage::LVMPlugin;
use PVE::Storage::NFSPlugin;
use PVE::Storage::ISCSIPlugin;
use PVE::Storage::RBDPlugin;
use PVE::Storage::SheepdogPlugin;
use PVE::Storage::ISCSIDirectPlugin;
use PVE::Storage::NexentaPlugin;
use PVE::Storage::NetappPNFSPlugin;

# load and initialize all plugins
PVE::Storage::DirPlugin->register();
PVE::Storage::LVMPlugin->register();
PVE::Storage::NFSPlugin->register();
PVE::Storage::ISCSIPlugin->register();
PVE::Storage::RBDPlugin->register();
PVE::Storage::SheepdogPlugin->register();
PVE::Storage::ISCSIDirectPlugin->register();
PVE::Storage::NexentaPlugin->register();
PVE::Storage::NetappPNFSPlugin->register();


Having something like (I don't know how to do this in perl ;)

use PVE::Storage::*
PVE::Storage::*->register();


I don't know if this can be a security or performance problem, but it could easier to develop some third party plugin (like my netapp plugin),
If you don't have time, or hardware to test it by example.

What do you think about it ?





More information about the pve-devel mailing list