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;
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') {
my $format_result = sub {
my ($data) = @_;
- my $format = PVE::APIClient::Helpers::get_output_format();
-
- return if $path_returns->{type} eq 'null';
-
- # TODO: implement different output formats ($format)
- print to_json($data, {utf8 => 1, allow_nonref => 1, canonical => 1, pretty => 1 });
+ PVE::APIClient::Helpers::print_result($data, $path_returns);
};
__PACKAGE__->register_method ({
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 ],