mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-07 07:02:09 +00:00
add 'passwd' to qm
this adds a command 'qm ga passwd' so that we can reuse 'qm ga' for future guest agent calls Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
b428fb63fa
commit
8593cbe41c
@ -681,9 +681,11 @@ sub param_mapping {
|
|||||||
return URI::Escape::uri_escape(PVE::Tools::file_get_contents($_[0]));
|
return URI::Escape::uri_escape(PVE::Tools::file_get_contents($_[0]));
|
||||||
}];
|
}];
|
||||||
my $cipassword_map = PVE::CLIHandler::get_standard_mapping('pve-password', { name => 'cipassword' });
|
my $cipassword_map = PVE::CLIHandler::get_standard_mapping('pve-password', { name => 'cipassword' });
|
||||||
|
my $password_map = PVE::CLIHandler::get_standard_mapping('pve-password');
|
||||||
my $mapping = {
|
my $mapping = {
|
||||||
'update_vm' => [$ssh_key_map, $cipassword_map],
|
'update_vm' => [$ssh_key_map, $cipassword_map],
|
||||||
'create_vm' => [$ssh_key_map, $cipassword_map],
|
'create_vm' => [$ssh_key_map, $cipassword_map],
|
||||||
|
'set-user-password' => [$password_map],
|
||||||
};
|
};
|
||||||
|
|
||||||
return $mapping->{$name};
|
return $mapping->{$name};
|
||||||
@ -816,6 +818,10 @@ our $cmddef = {
|
|||||||
agent => [ "PVE::API2::Qemu::Agent", 'agent', ['vmid', 'command'],
|
agent => [ "PVE::API2::Qemu::Agent", 'agent', ['vmid', 'command'],
|
||||||
{ node => $nodename }, $print_agent_result ],
|
{ node => $nodename }, $print_agent_result ],
|
||||||
|
|
||||||
|
ga => {
|
||||||
|
passwd => [ "PVE::API2::Qemu::Agent", 'set-user-password', [ 'vmid', 'username' ], { node => $nodename }],
|
||||||
|
},
|
||||||
|
|
||||||
mtunnel => [ __PACKAGE__, 'mtunnel', []],
|
mtunnel => [ __PACKAGE__, 'mtunnel', []],
|
||||||
|
|
||||||
nbdstop => [ __PACKAGE__, 'nbdstop', ['vmid']],
|
nbdstop => [ __PACKAGE__, 'nbdstop', ['vmid']],
|
||||||
|
Loading…
Reference in New Issue
Block a user