whitespace and formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -579,7 +579,8 @@ __PACKAGE__->register_method({
|
|||||||
optional => 1,
|
optional => 1,
|
||||||
},
|
},
|
||||||
compression => {
|
compression => {
|
||||||
description => "Decompress the downloaded file using specified compression algorithm",
|
description =>
|
||||||
|
"Decompress the downloaded file using the specified compression algorithm.",
|
||||||
type => 'string',
|
type => 'string',
|
||||||
enum => $PVE::Storage::Plugin::KNOWN_COMPRESSION_FORMATS,
|
enum => $PVE::Storage::Plugin::KNOWN_COMPRESSION_FORMATS,
|
||||||
optional => 1,
|
optional => 1,
|
||||||
@ -610,7 +611,7 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
my $cfg = PVE::Storage::config();
|
my $cfg = PVE::Storage::config();
|
||||||
|
|
||||||
my ($node, $storage, $compression) = $param->@{'node', 'storage','compression'};
|
my ($node, $storage, $compression) = $param->@{qw(node storage compression)};
|
||||||
my $scfg = PVE::Storage::storage_check_enabled($cfg, $storage, $node);
|
my $scfg = PVE::Storage::storage_check_enabled($cfg, $storage, $node);
|
||||||
|
|
||||||
die "can't upload to storage type '$scfg->{type}', not a file based storage!\n"
|
die "can't upload to storage type '$scfg->{type}', not a file based storage!\n"
|
||||||
@ -658,7 +659,7 @@ __PACKAGE__->register_method({
|
|||||||
if ($compression) {
|
if ($compression) {
|
||||||
die "decompression not supported for $content\n" if $content ne 'iso';
|
die "decompression not supported for $content\n" if $content ne 'iso';
|
||||||
my $info = PVE::Storage::decompressor_info('iso', $compression);
|
my $info = PVE::Storage::decompressor_info('iso', $compression);
|
||||||
die "no decompression method found\n" if (! $info->{decompressor});
|
die "no decompression method found\n" if !$info->{decompressor};
|
||||||
$opts->{decompression_command} = $info->{decompressor};
|
$opts->{decompression_command} = $info->{decompressor};
|
||||||
}
|
}
|
||||||
PVE::Tools::download_file_from_url("$path/$filename", $url, $opts);
|
PVE::Tools::download_file_from_url("$path/$filename", $url, $opts);
|
||||||
|
|||||||
@ -19,8 +19,8 @@ use JSON;
|
|||||||
|
|
||||||
use base qw(PVE::SectionConfig);
|
use base qw(PVE::SectionConfig);
|
||||||
|
|
||||||
use constant KNOWN_COMPRESSION_FORMATS => ( 'gz', 'lzo', 'zst');
|
use constant KNOWN_COMPRESSION_FORMATS => ('gz', 'lzo', 'zst');
|
||||||
use constant COMPRESSOR_RE => join( '|', KNOWN_COMPRESSION_FORMATS);
|
use constant COMPRESSOR_RE => join('|', KNOWN_COMPRESSION_FORMATS);
|
||||||
|
|
||||||
use constant LOG_EXT => ".log";
|
use constant LOG_EXT => ".log";
|
||||||
use constant NOTES_EXT => ".notes";
|
use constant NOTES_EXT => ".notes";
|
||||||
|
|||||||
Reference in New Issue
Block a user