X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=blobdiff_plain;f=pveclient;h=34e2aab8b1b14028e534bc0024cf8420ad529fa1;hp=f78770b5d4ce5f50bdf60622e8992ef057356b18;hb=bcd2a4df2940389f01ae8af26a8e57af3728f1e8;hpb=4db9ff67bc9b370e179e568f102be9242323632a diff --git a/pveclient b/pveclient index f78770b..34e2aab 100755 --- a/pveclient +++ b/pveclient @@ -9,6 +9,7 @@ use Data::Dumper; use PVE::APIClient::JSONSchema qw(register_standard_option get_standard_option); use PVE::APIClient::CLIHandler; +use PVE::APIClient::PTY; use PVE::APIClient::LWP; use PVE::APIClient::Helpers; @@ -49,6 +50,11 @@ sub call_api_method { use base qw(PVE::APIClient::CLIHandler); +sub read_password { + return PVE::APIClient::PTY::read_password("Remote password: ") +} + + my $cmd = $ARGV[0]; if ($cmd && $cmd eq 'packagedepends') { @@ -172,9 +178,12 @@ our $cmddef = { lxc => $PVE::APIClient::Commands::lxc::cmddef, remote => $PVE::APIClient::Commands::remote::cmddef, + resume => [ 'PVE::APIClient::Commands::GuestStatus', 'resume', ['remote', 'vmid']], + shutdown => [ 'PVE::APIClient::Commands::GuestStatus', 'shutdown', ['remote', 'vmid']], spice => [ 'PVE::APIClient::Commands::GuestStatus', 'spice', ['remote', 'vmid']], start => [ 'PVE::APIClient::Commands::GuestStatus', 'start', ['remote', 'vmid']], stop => [ 'PVE::APIClient::Commands::GuestStatus', 'stop', ['remote', 'vmid']], + suspend => [ 'PVE::APIClient::Commands::GuestStatus', 'suspend', ['remote', 'vmid']], api => { get => [ __PACKAGE__, 'pveclient_get', ['remote', 'api_path'], {}, $format_result ],