mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 21:14:21 +00:00
api: switch agent api call to 'array' type
we don't want to use the '-alist' formats anymore in favor of real arrays Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
2e4357c537
commit
1572afe8ed
@ -274,10 +274,12 @@ __PACKAGE__->register_method({
|
|||||||
vmid => get_standard_option('pve-vmid', {
|
vmid => get_standard_option('pve-vmid', {
|
||||||
completion => \&PVE::QemuServer::complete_vmid_running }),
|
completion => \&PVE::QemuServer::complete_vmid_running }),
|
||||||
command => {
|
command => {
|
||||||
type => 'string',
|
type => 'array',
|
||||||
format => 'string-alist',
|
description => 'The command as a list of program + arguments.',
|
||||||
description => 'The command as a list of program + arguments',
|
items => {
|
||||||
optional => 1,
|
format => 'string',
|
||||||
|
description => 'A single part of the program + arguments.',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
'input-data' => {
|
'input-data' => {
|
||||||
type => 'string',
|
type => 'string',
|
||||||
@ -300,10 +302,7 @@ __PACKAGE__->register_method({
|
|||||||
my ($param) = @_;
|
my ($param) = @_;
|
||||||
|
|
||||||
my $vmid = $param->{vmid};
|
my $vmid = $param->{vmid};
|
||||||
my $cmd = undef;
|
my $cmd = $param->{command};
|
||||||
if ($param->{command}) {
|
|
||||||
$cmd = [PVE::Tools::split_list($param->{command})];
|
|
||||||
}
|
|
||||||
|
|
||||||
my $res = PVE::QemuServer::Agent::qemu_exec($vmid, $param->{'input-data'}, $cmd);
|
my $res = PVE::QemuServer::Agent::qemu_exec($vmid, $param->{'input-data'}, $cmd);
|
||||||
return $res;
|
return $res;
|
||||||
|
Loading…
Reference in New Issue
Block a user