[pve-devel] [PATCH v1 qemu-server 6/9] api: move-disk: cleanup very long lines

Fabian Ebner f.ebner at proxmox.com
Tue Aug 3 09:37:59 CEST 2021


Am 19.07.21 um 16:52 schrieb Aaron Lauterer:
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
>   PVE/API2/Qemu.pm | 25 ++++++++++++++++++++-----
>   1 file changed, 20 insertions(+), 5 deletions(-)
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index ed1179b..0529c1b 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -3301,13 +3301,15 @@ __PACKAGE__->register_method({
>               },
>   	    delete => {
>   		type => 'boolean',
> -		description => "Delete the original disk after successful copy. By default the original disk is kept as unused disk.",
> +		description => "Delete the original disk after successful copy. By default the " .
> +		    "original disk is kept as unused disk.",
>   		optional => 1,
>   		default => 0,
>   	    },
>   	    digest => {
>   		type => 'string',
> -		description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.',
> +		description => 'Prevent changes if current configuration file has different SHA1 " .
> +		    "digest. This can be used to prevent concurrent modifications.',
>   		maxLength => 40,
>   		optional => 1,
>   	    },
> @@ -3386,11 +3388,20 @@ __PACKAGE__->register_method({
>                   (!$format || !$oldfmt || $oldfmt eq $format);
>   
>   	    # this only checks snapshots because $disk is passed!
> -	    my $snapshotted = PVE::QemuServer::Drive::is_volume_in_use($storecfg, $conf, $disk, $old_volid);
> +	    my $snapshotted = PVE::QemuServer::Drive::is_volume_in_use(
> +		$storecfg,
> +		$conf,
> +		$disk,
> +		$old_volid

style nit: missing trailing comma (also below and for the last container 
patch)

> +	    );
>   	    die "you can't move a disk with snapshots and delete the source\n"
>   		if $snapshotted && $param->{delete};
>   
> -	    PVE::Cluster::log_msg('info', $authuser, "move disk VM $vmid: move --disk $disk --storage $storeid");
> +	    PVE::Cluster::log_msg(
> +		'info',
> +		$authuser,
> +		"move disk VM $vmid: move --disk $disk --storage $storeid"
> +	    );
>   
>   	    my $running = PVE::QemuServer::check_running($vmid);
>   
> @@ -3409,7 +3420,11 @@ __PACKAGE__->register_method({
>   			if $snapshotted;
>   
>   		    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,
> 





More information about the pve-devel mailing list