From ff119724eef3f0500ae14beffdaaf96701a5d749 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 18 Jun 2021 14:35:25 +0200 Subject: [PATCH] vdzump: whitespace/extra-lines clean up Signed-off-by: Thomas Lamprecht --- PVE/API2/VZDump.pm | 6 ++++-- PVE/VZDump.pm | 8 +------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm index 10847260..2c0df4c3 100644 --- a/PVE/API2/VZDump.pm +++ b/PVE/API2/VZDump.pm @@ -25,13 +25,15 @@ __PACKAGE__->register_method ({ method => 'POST', description => "Create backup.", permissions => { - description => "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage. The 'maxfiles', 'prune-backups', 'tmpdir', 'dumpdir', 'script', 'bwlimit' and 'ionice' parameters are restricted to the 'root\@pam' user.", + description => "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace'" + ." on the backup storage. The 'maxfiles', 'prune-backups', 'tmpdir', 'dumpdir', 'script'," + ." 'bwlimit' and 'ionice' parameters are restricted to the 'root\@pam' user.", user => 'all', }, protected => 1, proxyto => 'node', parameters => { - additionalProperties => 0, + additionalProperties => 0, properties => PVE::VZDump::Common::json_config_properties({ stdout => { type => 'boolean', diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 05644e1a..46cb9e6d 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -885,14 +885,10 @@ sub exec_backup_task { $task->{mode} = $mode; debugmsg ('info', "backup mode: $mode", $logfd); - - debugmsg ('info', "bandwidth limit: $opts->{bwlimit} KB/s", $logfd) - if $opts->{bwlimit}; - + debugmsg ('info', "bandwidth limit: $opts->{bwlimit} KB/s", $logfd) if $opts->{bwlimit}; debugmsg ('info', "ionice priority: $opts->{ionice}", $logfd); if ($mode eq 'stop') { - $plugin->prepare ($task, $vmid, $mode); $self->run_hook_script ('backup-start', $task, $logfd); @@ -907,7 +903,6 @@ sub exec_backup_task { } elsif ($mode eq 'suspend') { - $plugin->prepare ($task, $vmid, $mode); $self->run_hook_script ('backup-start', $task, $logfd); @@ -936,7 +931,6 @@ sub exec_backup_task { } } elsif ($mode eq 'snapshot') { - $self->run_hook_script ('backup-start', $task, $logfd); my $snapshot_count = $task->{snapshot_count} || 0;