rename ZFSDirPlugin to ZFSPoolPlugin

Turned out it makes no sense to duplicated DirPlugin features. So I
also changed the name to make it less confusing. So we can only
create zvols inside a zfs pool with this plugin.
This commit is contained in:
Dietmar Maurer
2015-01-24 14:13:24 +01:00
parent 6ab6e0a260
commit 85fda4dd7f
4 changed files with 10 additions and 12 deletions

View File

@ -27,7 +27,7 @@ use PVE::Storage::RBDPlugin;
use PVE::Storage::SheepdogPlugin;
use PVE::Storage::ISCSIDirectPlugin;
use PVE::Storage::GlusterfsPlugin;
use PVE::Storage::ZFSDirPlugin;
use PVE::Storage::ZFSPoolPlugin;
use PVE::Storage::ZFSPlugin;
# load and initialize all plugins
@ -39,7 +39,7 @@ PVE::Storage::RBDPlugin->register();
PVE::Storage::SheepdogPlugin->register();
PVE::Storage::ISCSIDirectPlugin->register();
PVE::Storage::GlusterfsPlugin->register();
PVE::Storage::ZFSDirPlugin->register();
PVE::Storage::ZFSPoolPlugin->register();
PVE::Storage::ZFSPlugin->register();
PVE::Storage::Plugin->init();

View File

@ -1,4 +1,4 @@
SOURCES=Plugin.pm DirPlugin.pm LVMPlugin.pm NFSPlugin.pm ISCSIPlugin.pm RBDPlugin.pm SheepdogPlugin.pm ISCSIDirectPlugin.pm GlusterfsPlugin.pm ZFSDirPlugin.pm ZFSPlugin.pm
SOURCES=Plugin.pm DirPlugin.pm LVMPlugin.pm NFSPlugin.pm ISCSIPlugin.pm RBDPlugin.pm SheepdogPlugin.pm ISCSIDirectPlugin.pm GlusterfsPlugin.pm ZFSPoolPlugin.pm ZFSPlugin.pm
.PHONY: install
install:

View File

@ -5,9 +5,9 @@ use warnings;
use IO::File;
use POSIX;
use PVE::Tools qw(run_command);
use PVE::Storage::ZFSDirPlugin;
use PVE::Storage::ZFSPoolPlugin;
use base qw(PVE::Storage::ZFSDirPlugin);
use base qw(PVE::Storage::ZFSPoolPlugin);
use PVE::Storage::LunCmd::Comstar;
use PVE::Storage::LunCmd::Istgt;
use PVE::Storage::LunCmd::Iet;

View File

@ -1,4 +1,4 @@
package PVE::Storage::ZFSDirPlugin;
package PVE::Storage::ZFSPoolPlugin;
use strict;
use warnings;
@ -11,15 +11,14 @@ use PVE::Storage::Plugin;
use base qw(PVE::Storage::Plugin);
sub type {
return 'zfsdir';
return 'zfspool';
}
sub plugindata {
return {
content => [ { images => 1, rootdir => 1, vztmpl => 1, iso => 1, backup => 1},
{ images => 1 }],
content => [ {images => 1}, { images => 1 }],
};
}
}
sub properties {
return {
@ -36,7 +35,6 @@ sub properties {
sub options {
return {
path => { fixed => 1 },
pool => { fixed => 1 },
blocksize => { optional => 1 },
sparse => { optional => 1 },
@ -142,7 +140,7 @@ sub path {
if($vtype eq "images"){
$path = "/dev/zvol/$scfg->{pool}/$volname";
} else {
die "$vtype is not allowed in ZFSDir!";
die "$vtype is not allowed in ZFSPool!";
}
return ($path, $vmid, $vtype);