]> git.proxmox.com Git - pve-cluster.git/commitdiff
new bash completion helper: complete_migration_target
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 7 Sep 2015 05:23:59 +0000 (07:23 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 7 Sep 2015 05:23:59 +0000 (07:23 +0200)
moved from PVE::LXC

data/PVE/Cluster.pm

index 83fc17ea86911ff96d14b3e01fe1a7152df9deff..7c1a7644caf763ed5dbf1e0cee3da40aabe26d95 100644 (file)
@@ -1507,4 +1507,19 @@ sub complete_local_vmid {
     return $res;
 }
 
+sub complete_migration_target {
+
+    my $res = [];
+
+    my $nodename = PVE::INotify::nodename();
+
+    my $nodelist = get_nodelist();
+    foreach my $node (@$nodelist) {
+       next if $node eq $nodename;
+       push @$res, $node;
+    }
+
+    return $res;
+}
+
 1;