cli: subscription: simplify printing output in get command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-05 13:27:01 +02:00
parent fc3e061bd0
commit 75d1eb55ae

View File

@ -51,12 +51,9 @@ __PACKAGE__->register_method({
our $cmddef = {
update => [ 'PVE::API2::Subscription', 'update', undef, { node => $nodename } ],
get => [ 'PVE::API2::Subscription', 'get', undef, { node => $nodename },
sub {
get => [ 'PVE::API2::Subscription', 'get', undef, { node => $nodename }, sub {
my $info = shift;
foreach my $k (sort keys %$info) {
print "$k: $info->{$k}\n";
}
print "$_: $info->{$_}\n" for sort keys %$info;
}],
set => [ 'PVE::API2::Subscription', 'set', ['key'], { node => $nodename } ],
"set-offline-key" => [ __PACKAGE__, 'set_offline_key', ['data'] ],