From: Chris Allen Date: Tue, 11 Mar 2014 22:07:53 +0000 (-0700) Subject: Added target-group and host-group options for ZFS comstar views. Use "comstar_tg... X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff_plain;h=454c15e270b5e3012fb6817cbc50daba52e4b354 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 --- diff --git a/PVE/Storage/LunCmd/Comstar.pm b/PVE/Storage/LunCmd/Comstar.pm index aa1c614..1b079f0 100644 --- a/PVE/Storage/LunCmd/Comstar.pm +++ b/PVE/Storage/LunCmd/Comstar.pm @@ -66,6 +66,15 @@ sub run_lun_command { } elsif ($method eq 'list_lu') { $guid = $params[0]; @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); diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm index 302d2d6..208e718 100644 --- a/PVE/Storage/ZFSPlugin.pm +++ b/PVE/Storage/ZFSPlugin.pm @@ -338,7 +338,15 @@ sub properties { sparse => { description => "use sparse volumes", 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 }, nowritecache => { optional => 1 }, sparse => { optional => 1 }, + comstar_hg => { optional => 1 }, + comstar_tg => { optional => 1 }, content => { optional => 1 }, }; }