mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-06 17:47:31 +00:00
qm importovf: --dryrun: use json output format
This commit is contained in:
parent
b533b99534
commit
0f80f1ab6d
@ -23,7 +23,6 @@ use PVE::API2::Qemu;
|
|||||||
use JSON;
|
use JSON;
|
||||||
use PVE::JSONSchema qw(get_standard_option);
|
use PVE::JSONSchema qw(get_standard_option);
|
||||||
use Term::ReadLine;
|
use Term::ReadLine;
|
||||||
use Data::Dumper;
|
|
||||||
|
|
||||||
use PVE::CLIHandler;
|
use PVE::CLIHandler;
|
||||||
|
|
||||||
@ -558,8 +557,8 @@ __PACKAGE__->register_method ({
|
|||||||
my $parsed = PVE::QemuServer::OVF::parse_ovf($ovf_file);
|
my $parsed = PVE::QemuServer::OVF::parse_ovf($ovf_file);
|
||||||
|
|
||||||
if ($dryrun) {
|
if ($dryrun) {
|
||||||
print Dumper($parsed);
|
print to_json($parsed, { pretty => 1, canonical => 1});
|
||||||
exit(0);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$param->{name} = $parsed->{qm}->{name} if defined($parsed->{qm}->{name});
|
$param->{name} = $parsed->{qm}->{name} if defined($parsed->{qm}->{name});
|
||||||
|
Loading…
Reference in New Issue
Block a user