mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-11 12:33:16 +00:00
api: cleanup code format of clone_disk call
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>
This commit is contained in:
parent
a2af1bbe89
commit
1b987638a8
@ -3091,9 +3091,24 @@ __PACKAGE__->register_method({
|
|||||||
push @$storage_list, $storage if defined($storage);
|
push @$storage_list, $storage if defined($storage);
|
||||||
my $clonelimit = PVE::Storage::get_bandwidth_limit('clone', $storage_list, $bwlimit);
|
my $clonelimit = PVE::Storage::get_bandwidth_limit('clone', $storage_list, $bwlimit);
|
||||||
|
|
||||||
my $newdrive = PVE::QemuServer::clone_disk($storecfg, $vmid, $running, $opt, $drive, $snapname,
|
my $newdrive = PVE::QemuServer::clone_disk(
|
||||||
$newid, $storage, $format, $fullclone->{$opt}, $newvollist,
|
$storecfg,
|
||||||
$jobs, $completion, $oldconf->{agent}, $clonelimit, $oldconf);
|
$vmid,
|
||||||
|
$running,
|
||||||
|
$opt,
|
||||||
|
$drive,
|
||||||
|
$snapname,
|
||||||
|
$newid,
|
||||||
|
$storage,
|
||||||
|
$format,
|
||||||
|
$fullclone->{$opt},
|
||||||
|
$newvollist,
|
||||||
|
$jobs,
|
||||||
|
$completion,
|
||||||
|
$oldconf->{agent},
|
||||||
|
$clonelimit,
|
||||||
|
$oldconf
|
||||||
|
);
|
||||||
|
|
||||||
$newconf->{$opt} = PVE::QemuServer::print_drive($newdrive);
|
$newconf->{$opt} = PVE::QemuServer::print_drive($newdrive);
|
||||||
|
|
||||||
@ -3285,9 +3300,24 @@ __PACKAGE__->register_method({
|
|||||||
my $bwlimit = extract_param($param, 'bwlimit');
|
my $bwlimit = extract_param($param, 'bwlimit');
|
||||||
my $movelimit = PVE::Storage::get_bandwidth_limit('move', [$oldstoreid, $storeid], $bwlimit);
|
my $movelimit = PVE::Storage::get_bandwidth_limit('move', [$oldstoreid, $storeid], $bwlimit);
|
||||||
|
|
||||||
my $newdrive = PVE::QemuServer::clone_disk($storecfg, $vmid, $running, $disk, $drive, undef,
|
my $newdrive = PVE::QemuServer::clone_disk(
|
||||||
$vmid, $storeid, $format, 1, $newvollist, undef, undef, undef, $movelimit, $conf);
|
$storecfg,
|
||||||
|
$vmid,
|
||||||
|
$running,
|
||||||
|
$disk,
|
||||||
|
$drive,
|
||||||
|
undef,
|
||||||
|
$vmid,
|
||||||
|
$storeid,
|
||||||
|
$format,
|
||||||
|
1,
|
||||||
|
$newvollist,
|
||||||
|
undef,
|
||||||
|
undef,
|
||||||
|
undef,
|
||||||
|
$movelimit,
|
||||||
|
$conf,
|
||||||
|
);
|
||||||
$conf->{$disk} = PVE::QemuServer::print_drive($newdrive);
|
$conf->{$disk} = PVE::QemuServer::print_drive($newdrive);
|
||||||
|
|
||||||
PVE::QemuConfig->add_unused_volume($conf, $old_volid) if !$param->{delete};
|
PVE::QemuConfig->add_unused_volume($conf, $old_volid) if !$param->{delete};
|
||||||
|
Loading…
Reference in New Issue
Block a user