On 06/20/2017 10:50 AM, Dietmar Maurer wrote:
Signed-off-by: Dietmar Maurer <diet...@proxmox.com> --- PVE/ReplicationConfig.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PVE/ReplicationConfig.pm b/PVE/ReplicationConfig.pm index 845d9c3..1e813dd 100644 --- a/PVE/ReplicationConfig.pm +++ b/PVE/ReplicationConfig.pm @@ -209,6 +209,19 @@ sub check_for_existing_jobs { return undef; } +sub find_local_replication_job { + my ($cfg, $vmid, $target) = @_; + + foreach my $id (keys %{$cfg->{ids}}) { + my $data = $cfg->{ids}->{$id};
Here we lose the jobid information. What we use later in the run_replication
+ return $data if $data->{type} eq 'local' && + $data->{guest} == $vmid && $data->{target} eq $target; + } + + return undef; +} + sub delete_job { my ($jobid) = @_;
_______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel