]> git.proxmox.com Git - qemu-server.git/commitdiff
api: cleanup code format of clone_disk call
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 20 Nov 2020 11:40:19 +0000 (12:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 25 Nov 2020 13:18:23 +0000 (14:18 +0100)
showing off it's monstrosity of a method signature, needs to be
cleaned up in a followup commit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Qemu.pm

index 09c15f46b3698d30e8394c1df50198be706f487c..00d98ab8c7bcfcdf2579c6f26e9296e353212512 100644 (file)
@@ -3091,9 +3091,24 @@ __PACKAGE__->register_method({
                        push @$storage_list, $storage if defined($storage);
                        my $clonelimit = PVE::Storage::get_bandwidth_limit('clone', $storage_list, $bwlimit);
 
-                       my $newdrive = PVE::QemuServer::clone_disk($storecfg, $vmid, $running, $opt, $drive, $snapname,
-                                                                  $newid, $storage, $format, $fullclone->{$opt}, $newvollist,
-                                                                  $jobs, $completion, $oldconf->{agent}, $clonelimit, $oldconf);
+                       my $newdrive = PVE::QemuServer::clone_disk(
+                           $storecfg,
+                           $vmid,
+                           $running,
+                           $opt,
+                           $drive,
+                           $snapname,
+                           $newid,
+                           $storage,
+                           $format,
+                           $fullclone->{$opt},
+                           $newvollist,
+                           $jobs,
+                           $completion,
+                           $oldconf->{agent},
+                           $clonelimit,
+                           $oldconf
+                       );
 
                        $newconf->{$opt} = PVE::QemuServer::print_drive($newdrive);
 
@@ -3285,9 +3300,24 @@ __PACKAGE__->register_method({
                    my $bwlimit = extract_param($param, 'bwlimit');
                    my $movelimit = PVE::Storage::get_bandwidth_limit('move', [$oldstoreid, $storeid], $bwlimit);
 
-                   my $newdrive = PVE::QemuServer::clone_disk($storecfg, $vmid, $running, $disk, $drive, undef,
-                                                              $vmid, $storeid, $format, 1, $newvollist, undef, undef, undef, $movelimit, $conf);
-
+                   my $newdrive = PVE::QemuServer::clone_disk(
+                       $storecfg,
+                       $vmid,
+                       $running,
+                       $disk,
+                       $drive,
+                       undef,
+                       $vmid,
+                       $storeid,
+                       $format,
+                       1,
+                       $newvollist,
+                       undef,
+                       undef,
+                       undef,
+                       $movelimit,
+                       $conf,
+                   );
                    $conf->{$disk} = PVE::QemuServer::print_drive($newdrive);
 
                    PVE::QemuConfig->add_unused_volume($conf, $old_volid) if !$param->{delete};