]> git.proxmox.com Git - pve-manager.git/commitdiff
add vmid parameter to replication status
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 2 Jun 2017 12:06:27 +0000 (14:06 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 2 Jun 2017 14:19:26 +0000 (16:19 +0200)
so that one can limit the status list for one vm/ct

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Replication.pm

index 192a61bbf605da1bf6d0f7f1b249d224a69d12df..43839c433de357cabe65a36bd54ef2e183f36d8a 100644 (file)
@@ -57,6 +57,10 @@ __PACKAGE__->register_method ({
        additionalProperties => 0,
        properties => {
            node => get_standard_option('pve-node'),
+           vmid => get_standard_option('pve-vmid', {
+               optional => 1,
+               description => "Only list replication jobs for this vmid.",
+           }),
        },
     },
     returns => {
@@ -80,6 +84,7 @@ __PACKAGE__->register_method ({
            my $d = $jobs->{$id};
            my $state = delete $d->{state};
            my $vmid = $d->{guest};
+           next if defined($param->{vmid}) && $vmid != $param->{vmid};
            next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ]);
            $d->{id} = $id;
            foreach my $k (qw(last_sync last_try fail_count error duration)) {