From: Dietmar Maurer Date: Thu, 14 Jun 2018 06:54:17 +0000 (+0200) Subject: use packages from PVE::APIClient X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=commitdiff_plain;h=c9138c03bcb92d01e8c7d9f195ac2f9b4d5458b3;hp=a086d1ce00cd52814070f36d73ca67b94b3cf981 use packages from PVE::APIClient --- 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 ded6736..a169066 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; @@ -31,7 +31,7 @@ sub call_method { die "implement me"; } -use base qw(PVE::CLIHandler); +use base qw(PVE::APIClient::CLIHandler); my $cmd = $ARGV[0];