]> git.proxmox.com Git - pve-container.git/commitdiff
use complete_migration_target from PVE::Cluster
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 7 Sep 2015 05:31:28 +0000 (07:31 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 7 Sep 2015 05:31:28 +0000 (07:31 +0200)
src/PVE/API2/LXC.pm
src/PVE/LXC.pm

index 0fac3a88debf59497451d0a12a4f175546bb8a30..4c8da5f91fb2c05b5a3537535253794a444505d9 100644 (file)
@@ -700,7 +700,7 @@ __PACKAGE__->register_method({
            vmid => get_standard_option('pve-vmid', { completion => \&PVE::LXC::complete_ctid }),
            target => get_standard_option('pve-node', {
                description => "Target node.",
-               completion => \&PVE::LXC::complete_migration_target,
+               completion => \&PVE::Cluster::complete_migration_target,
            }),
            online => {
                type => 'boolean',
index abb8567e43519956eed32fbce0785e77fdb4e804..7b919061d9415f94eb595f9271dbdcfa7282bc70 100644 (file)
@@ -2245,19 +2245,6 @@ sub complete_os_templates {
     return $res;
 }
 
-sub complete_migration_target {
-
-    my $res = [];
-
-    my $nodelist = PVE::Cluster::get_nodelist();
-    foreach my $node (@$nodelist) {
-       next if $node eq $nodename;
-       push @$res, $node;
-    }
-
-    return $res;
-}
-
 my $complete_ctid_full = sub {
     my ($running) = @_;