]> git.proxmox.com Git - pve-storage.git/commitdiff
Added target-group and host-group options for ZFS comstar views. Use "comstar_tg...
authorChris Allen <Chris Allen>
Tue, 11 Mar 2014 22:07:53 +0000 (15:07 -0700)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 25 Jun 2014 07:13:54 +0000 (09:13 +0200)
Signed-off-by: Chris Allen <Chris Allen>
PVE/Storage/LunCmd/Comstar.pm
PVE/Storage/ZFSPlugin.pm

index aa1c61439ab4246affd47d66fc743508ef8bdc57..1b079f0abcd4d6b504845dd14343aac903c4ecb8 100644 (file)
@@ -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);
index 302d2d608091fe6958f071cfb3b2e29004303e13..208e718f404fe4d47beb45a119932515a4ea9a4f 100644 (file)
@@ -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 },
     };
 }