]> git.proxmox.com Git - pmg-api.git/blobdiff - src/PMG/ModGroup.pm
ModGroup: add possibility to explode to all targets
[pmg-api.git] / src / PMG / ModGroup.pm
index b0fa9a6cd3549e098949158e2a2de2435f10645a..d4e1cd5c7a7e6941c1c14139af69769d5ace2203 100644 (file)
@@ -81,6 +81,23 @@ sub subgroups {
     return $res;
 }
 
+# explode the groups, so we have one for each target we need
+# only to be used by the rRemove action when there was a spaminfo
+sub explode {
+    my ($self, $targets) = @_;
+
+    my $groups = $self->{groups};
+    my $ea = $self->{ea};
+    my $res;
+
+    # TODO: implment it more direclty with less overhead!
+    for my $target ($targets->@*) {
+       $self->subgroups([$target]);
+    }
+
+    return $self->subgroups($targets);
+}
+
 1;
 
 __END__