mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 02:23:23 +00:00
PVE/API2/Replication.pm: change vmid => guest
This commit is contained in:
parent
c1b20fca93
commit
f5b53d4c31
@ -57,9 +57,9 @@ __PACKAGE__->register_method ({
|
|||||||
additionalProperties => 0,
|
additionalProperties => 0,
|
||||||
properties => {
|
properties => {
|
||||||
node => get_standard_option('pve-node'),
|
node => get_standard_option('pve-node'),
|
||||||
vmid => get_standard_option('pve-vmid', {
|
guest => get_standard_option('pve-vmid', {
|
||||||
optional => 1,
|
optional => 1,
|
||||||
description => "Only list replication jobs for this vmid.",
|
description => "Only list replication jobs for this guest.",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -83,9 +83,9 @@ __PACKAGE__->register_method ({
|
|||||||
foreach my $id (sort keys %$jobs) {
|
foreach my $id (sort keys %$jobs) {
|
||||||
my $d = $jobs->{$id};
|
my $d = $jobs->{$id};
|
||||||
my $state = delete $d->{state};
|
my $state = delete $d->{state};
|
||||||
my $vmid = $d->{guest};
|
my $guest = $d->{guest};
|
||||||
next if defined($param->{vmid}) && $vmid != $param->{vmid};
|
next if defined($param->{guest}) && $guest != $param->{guest};
|
||||||
next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ]);
|
next if !$rpcenv->check($authuser, "/vms/$guest", [ 'VM.Audit' ]);
|
||||||
$d->{id} = $id;
|
$d->{id} = $id;
|
||||||
foreach my $k (qw(last_sync last_try fail_count error duration)) {
|
foreach my $k (qw(last_sync last_try fail_count error duration)) {
|
||||||
$d->{$k} = $state->{$k} if defined($state->{$k});
|
$d->{$k} = $state->{$k} if defined($state->{$k});
|
||||||
|
Loading…
Reference in New Issue
Block a user