Added target-group and host-group options for ZFS comstar views. Use "comstar_tg" and "comstar_hg" in "/etc/pve/storage.pm".

Signed-off-by: Chris Allen <Chris Allen>
This commit is contained in:
Chris Allen
2014-03-11 15:07:53 -07:00
committed by Dietmar Maurer
parent 551534a3bc
commit 454c15e270
2 changed files with 20 additions and 1 deletions

View File

@ -66,6 +66,15 @@ sub run_lun_command {
} elsif ($method eq 'list_lu') { } elsif ($method eq 'list_lu') {
$guid = $params[0]; $guid = $params[0];
@params = undef; @params = undef;
} elsif ($method eq 'add_view') {
if ($scfg->{comstar_tg}) {
unshift @params, $scfg->{comstar_tg};
unshift @params, '--target-group';
}
if ($scfg->{comstar_hg}) {
unshift @params, $scfg->{comstar_hg};
unshift @params, '--host-group';
}
} }
my $cmdmap = $get_lun_cmd_map->($method); my $cmdmap = $get_lun_cmd_map->($method);

View File

@ -338,7 +338,15 @@ sub properties {
sparse => { sparse => {
description => "use sparse volumes", description => "use sparse volumes",
type => 'boolean', type => 'boolean',
} },
comstar_tg => {
description => "target group for comstar views",
type => 'string',
},
comstar_hg => {
description => "host group for comstar views",
type => 'string',
},
}; };
} }
@ -353,6 +361,8 @@ sub options {
iscsiprovider => { fixed => 1 }, iscsiprovider => { fixed => 1 },
nowritecache => { optional => 1 }, nowritecache => { optional => 1 },
sparse => { optional => 1 }, sparse => { optional => 1 },
comstar_hg => { optional => 1 },
comstar_tg => { optional => 1 },
content => { optional => 1 }, content => { optional => 1 },
}; };
} }