[pve-devel] applied: [PATCH pve-client] use packages from PVE::APIClient

Dietmar Maurer dietmar at proxmox.com
Thu Jun 14 09:26:21 CEST 2018


applied (and updated file from pve-common with additional fixes)

> On June 14, 2018 at 9:00 AM Dietmar Maurer <dietmar at proxmox.com> wrote:
> 
> 
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> ---
>  PVE/APIClient/Commands/GuestStatus.pm |  6 +++---
>  PVE/APIClient/Commands/config.pm      |  6 +++---
>  PVE/APIClient/Commands/list.pm        |  4 ++--
>  PVE/APIClient/Commands/lxc.pm         |  8 ++++----
>  PVE/APIClient/Commands/remote.pm      |  8 ++++----
>  PVE/APIClient/Config.pm               | 14 +++++++-------
>  pveclient                             |  6 +++---
>  7 files changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/PVE/APIClient/Commands/GuestStatus.pm
> b/PVE/APIClient/Commands/GuestStatus.pm
> index 4a50164..57784e5 100644
> --- a/PVE/APIClient/Commands/GuestStatus.pm
> +++ b/PVE/APIClient/Commands/GuestStatus.pm
> @@ -6,13 +6,13 @@ use warnings;
>  use PVE::APIClient::Helpers;
>  use PVE::APIClient::Config;
>  
> -use PVE::JSONSchema qw(get_standard_option);
> +use PVE::APIClient::JSONSchema qw(get_standard_option);
>  
>  use File::Temp qw(tempfile);
>  
> -use PVE::CLIHandler;
> +use PVE::APIClient::CLIHandler;
>  
> -use base qw(PVE::CLIHandler);
> +use base qw(PVE::APIClient::CLIHandler);
>  
>  my $guest_status_command = sub {
>      my ($remote, $vmid, $cmd, $param) = @_,
> diff --git a/PVE/APIClient/Commands/config.pm
> b/PVE/APIClient/Commands/config.pm
> index 6f24e2c..d467b4c 100644
> --- a/PVE/APIClient/Commands/config.pm
> +++ b/PVE/APIClient/Commands/config.pm
> @@ -4,13 +4,13 @@ use strict;
>  use warnings;
>  use Data::Dumper;
>  
> -use PVE::JSONSchema qw(get_standard_option);
> +use PVE::APIClient::JSONSchema qw(get_standard_option);
>  use PVE::APIClient::Tools qw(extract_param);
>  use PVE::APIClient::Config;
>  
> -use PVE::CLIHandler;
> +use PVE::APIClient::CLIHandler;
>  
> -use base qw(PVE::CLIHandler);
> +use base qw(PVE::APIClient::CLIHandler);
>  
>  __PACKAGE__->register_method ({
>      name => 'list',
> diff --git a/PVE/APIClient/Commands/list.pm b/PVE/APIClient/Commands/list.pm
> index aed0a54..2190ad6 100644
> --- a/PVE/APIClient/Commands/list.pm
> +++ b/PVE/APIClient/Commands/list.pm
> @@ -4,9 +4,9 @@ use strict;
>  use warnings;
>  use JSON;
>  
> -use PVE::JSONSchema qw(get_standard_option);
> +use PVE::APIClient::JSONSchema qw(get_standard_option);
>  
> -use base qw(PVE::CLIHandler);
> +use base qw(PVE::APIClient::CLIHandler);
>  
>  __PACKAGE__->register_method ({
>      name => 'list',
> diff --git a/PVE/APIClient/Commands/lxc.pm b/PVE/APIClient/Commands/lxc.pm
> index d535188..601f86f 100644
> --- a/PVE/APIClient/Commands/lxc.pm
> +++ b/PVE/APIClient/Commands/lxc.pm
> @@ -11,11 +11,11 @@ use MIME::Base64;
>  use Digest::SHA;
>  use HTTP::Response;
>  
> -use PVE::JSONSchema qw(get_standard_option);
> -use PVE::CLIHandler;
> -use PVE::PTY;
> +use PVE::APIClient::JSONSchema qw(get_standard_option);
> +use PVE::APIClient::CLIHandler;
> +use PVE::APIClient::PTY;
>  
> -use base qw(PVE::CLIHandler);
> +use base qw(PVE::APIClient::CLIHandler);
>  use PVE::APIClient::Config;
>  
>  my $CRLF = "\x0D\x0A";
> diff --git a/PVE/APIClient/Commands/remote.pm
> b/PVE/APIClient/Commands/remote.pm
> index 0c3d17a..8deac33 100644
> --- a/PVE/APIClient/Commands/remote.pm
> +++ b/PVE/APIClient/Commands/remote.pm
> @@ -3,16 +3,16 @@ package PVE::APIClient::Commands::remote;
>  use strict;
>  use warnings;
>  
> -use PVE::JSONSchema qw(get_standard_option);
> +use PVE::APIClient::JSONSchema qw(get_standard_option);
>  use PVE::APIClient::Tools qw(extract_param);
>  use PVE::APIClient::Config;
>  
> -use PVE::CLIHandler;
> +use PVE::APIClient::CLIHandler;
>  
>  use PVE::APIClient::LWP;
> -use PVE::PTY ();
> +use PVE::APIClient::PTY;
>  
> -use base qw(PVE::CLIHandler);
> +use base qw(PVE::APIClient::CLIHandler);
>  
>  sub read_password {
>     return PVE::PTY::read_password("Remote password: ")
> diff --git a/PVE/APIClient/Config.pm b/PVE/APIClient/Config.pm
> index 7189d8e..478e658 100644
> --- a/PVE/APIClient/Config.pm
> +++ b/PVE/APIClient/Config.pm
> @@ -4,11 +4,11 @@ use strict;
>  use warnings;
>  use JSON;
>  
> -use PVE::JSONSchema;
> -use PVE::SectionConfig;
> +use PVE::APIClient::JSONSchema;
> +use PVE::APIClient::SectionConfig;
>  use PVE::APIClient::Tools qw(file_get_contents file_set_contents);
>  
> -use base qw(PVE::SectionConfig);
> +use base qw(PVE::APIClient::SectionConfig);
>  
>  my $remote_namne_regex = qw(\w+);
>  
> @@ -24,7 +24,7 @@ my $complete_remote_name = sub {
>      return $list;
>  };
>  
> -PVE::JSONSchema::register_standard_option('pveclient-remote-name', {
> +PVE::APIClient::JSONSchema::register_standard_option('pveclient-remote-name',
> {
>      description => "The name of the remote.",
>      type => 'string',
>      pattern => $remote_namne_regex,
> @@ -158,8 +158,8 @@ package PVE::APIClient::RemoteConfig;
>  use strict;
>  use warnings;
>  
> -use PVE::JSONSchema qw(register_standard_option get_standard_option);
> -use PVE::SectionConfig;
> +use PVE::APIClient::JSONSchema qw(register_standard_option
> get_standard_option);
> +use PVE::APIClient::SectionConfig;
>  
>  use base qw( PVE::APIClient::Config);
>  
> @@ -225,7 +225,7 @@ package PVE::APIClient::DefaultsConfig;
>  use strict;
>  use warnings;
>  
> -use PVE::JSONSchema qw(register_standard_option get_standard_option);
> +use PVE::APIClient::JSONSchema qw(register_standard_option
> get_standard_option);
>  
>  use base qw( PVE::APIClient::Config);
>  
> diff --git a/pveclient b/pveclient
> index 384a2d2..a7e41ef 100755
> --- a/pveclient
> +++ b/pveclient
> @@ -7,8 +7,8 @@ use warnings;
>  use Cwd 'abs_path';
>  use Data::Dumper;
>  
> -use PVE::JSONSchema qw(register_standard_option get_standard_option);
> -use PVE::CLIHandler;
> +use PVE::APIClient::JSONSchema qw(register_standard_option
> get_standard_option);
> +use PVE::APIClient::CLIHandler;
>  
>  use PVE::APIClient::LWP;
>  use PVE::APIClient::Helpers;
> @@ -40,7 +40,7 @@ sub call_method {
>      return $res->{data};
>  }
>  
> -use base qw(PVE::CLIHandler);
> +use base qw(PVE::APIClient::CLIHandler);
>  
>  my $cmd = $ARGV[0];
>  
> -- 
> 2.11.0
> 
> 



More information about the pve-devel mailing list