api: rename 'isOva' to 'is_ova' to adhere to style guide
see https://pve.proxmox.com/wiki/Perl_Style_Guide#Casing Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Link: https://lore.proxmox.com/20250407101310.3196974-2-d.csapak@proxmox.com Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
5a73bac343
commit
551bad9d47
@ -455,7 +455,7 @@ __PACKAGE__->register_method ({
|
|||||||
my $filename = PVE::Storage::normalize_content_filename($param->{filename});
|
my $filename = PVE::Storage::normalize_content_filename($param->{filename});
|
||||||
|
|
||||||
my $path;
|
my $path;
|
||||||
my $isOva = 0;
|
my $is_ova = 0;
|
||||||
|
|
||||||
if ($content eq 'iso') {
|
if ($content eq 'iso') {
|
||||||
if ($filename !~ m![^/]+$PVE::Storage::ISO_EXT_RE_0$!) {
|
if ($filename !~ m![^/]+$PVE::Storage::ISO_EXT_RE_0$!) {
|
||||||
@ -472,7 +472,7 @@ __PACKAGE__->register_method ({
|
|||||||
raise_param_exc({ filename => "invalid filename or wrong extension" });
|
raise_param_exc({ filename => "invalid filename or wrong extension" });
|
||||||
}
|
}
|
||||||
|
|
||||||
$isOva = 1;
|
$is_ova = 1;
|
||||||
$path = PVE::Storage::get_import_dir($cfg, $storage);
|
$path = PVE::Storage::get_import_dir($cfg, $storage);
|
||||||
} else {
|
} else {
|
||||||
raise_param_exc({ content => "upload content type '$content' not allowed" });
|
raise_param_exc({ content => "upload content type '$content' not allowed" });
|
||||||
@ -541,7 +541,7 @@ __PACKAGE__->register_method ({
|
|||||||
PVE::Storage::assert_iso_content($tmpfilename);
|
PVE::Storage::assert_iso_content($tmpfilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isOva) {
|
if ($is_ova) {
|
||||||
assert_ova_contents($tmpfilename);
|
assert_ova_contents($tmpfilename);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -666,7 +666,7 @@ __PACKAGE__->register_method({
|
|||||||
my $filename = PVE::Storage::normalize_content_filename($param->{filename});
|
my $filename = PVE::Storage::normalize_content_filename($param->{filename});
|
||||||
|
|
||||||
my $path;
|
my $path;
|
||||||
my $isOva = 0;
|
my $is_ova = 0;
|
||||||
|
|
||||||
if ($content eq 'iso') {
|
if ($content eq 'iso') {
|
||||||
if ($filename !~ m![^/]+$PVE::Storage::ISO_EXT_RE_0$!) {
|
if ($filename !~ m![^/]+$PVE::Storage::ISO_EXT_RE_0$!) {
|
||||||
@ -684,7 +684,7 @@ __PACKAGE__->register_method({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($filename =~ m/\.ova$/) {
|
if ($filename =~ m/\.ova$/) {
|
||||||
$isOva = 1;
|
$is_ova = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$path = PVE::Storage::get_import_dir($cfg, $storage);
|
$path = PVE::Storage::get_import_dir($cfg, $storage);
|
||||||
@ -716,7 +716,7 @@ __PACKAGE__->register_method({
|
|||||||
PVE::Storage::assert_iso_content($tmp_path);
|
PVE::Storage::assert_iso_content($tmp_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isOva) {
|
if ($is_ova) {
|
||||||
assert_ova_contents($tmp_path);
|
assert_ova_contents($tmp_path);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user