]> git.proxmox.com Git - pve-client.git/commitdiff
register standard option inside PVE::APIClient::Config
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 5 Jun 2018 06:03:57 +0000 (08:03 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 5 Jun 2018 06:03:57 +0000 (08:03 +0200)
PVE/APIClient/Commands/remote.pm
PVE/APIClient/Config.pm

index c9e0e622a032f295948a9e978e2311d7c15c5578..5d04e3a87cc21e73793dfe907c9e359e0f305030 100644 (file)
@@ -3,7 +3,7 @@ package PVE::APIClient::Commands::remote;
 use strict;
 use warnings;
 
-use PVE::JSONSchema qw(register_standard_option get_standard_option);
+use PVE::JSONSchema qw(get_standard_option);
 use PVE::APIClient::Config;
 
 use PVE::CLIHandler;
@@ -13,19 +13,6 @@ use PVE::PTY ();
 
 use base qw(PVE::CLIHandler);
 
-my $complete_remote_name = sub {
-
-    my $config = PVE::APIClient::Config->new();
-    return $config->remote_names;
-};
-
-register_standard_option('pveclient-remote-name', {
-    description => "The name of the remote.",
-    type => 'string',
-    pattern => qr(\w+),
-    completion => $complete_remote_name,
-});
-
 sub read_password {
    return PVE::PTY::read_password("Remote password: ")
 }
index 6c5b537d84c3aca9cb17b3ad7517f16bde638b14..40caed86f92f3869a79be0ebfc78b14df48c6ff0 100644 (file)
@@ -5,8 +5,22 @@ use warnings;
 use JSON;
 
 use File::HomeDir ();
+use PVE::JSONSchema qw(register_standard_option get_standard_option);
 use PVE::Tools qw(file_get_contents file_set_contents);
 
+my $complete_remote_name = sub {
+
+    my $config = PVE::APIClient::Config->new();
+    return $config->remote_names;
+};
+
+register_standard_option('pveclient-remote-name', {
+    description => "The name of the remote.",
+    type => 'string',
+    pattern => qr(\w+),
+    completion => $complete_remote_name,
+});
+
 sub new {
     my ($class) = @_;