disk management api: comment how storages are added and cleanup style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2023-06-17 14:51:20 +02:00
parent c61e609eb6
commit b89854ad46
4 changed files with 12 additions and 44 deletions

View File

@ -221,13 +221,9 @@ __PACKAGE__->register_method ({
my $verify_params = [qw(path)];
if ($param->{add_storage}) {
# reserve the name and add as disabled, will be enabled below if creation works out
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
1,
);
$name, $node, $storage_params, $verify_params, 1);
}
my $mounted = PVE::Diskmanage::mounted_paths();
@ -306,11 +302,7 @@ __PACKAGE__->register_method ({
if ($param->{add_storage}) {
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
);
$name, $node, $storage_params, $verify_params);
}
});
};

View File

@ -162,13 +162,9 @@ __PACKAGE__->register_method ({
my $verify_params = [qw(vgname)];
if ($param->{add_storage}) {
# reserve the name and add as disabled, will be enabled below if creation works out
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
1,
);
$name, $node, $storage_params, $verify_params, 1);
}
my $worker = sub {
@ -188,11 +184,7 @@ __PACKAGE__->register_method ({
if ($param->{add_storage}) {
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
);
$name, $node, $storage_params, $verify_params);
}
});
};

View File

@ -120,13 +120,9 @@ __PACKAGE__->register_method ({
my $verify_params = [qw(vgname thinpool)];
if ($param->{add_storage}) {
# reserve the name and add as disabled, will be enabled below if creation works out
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
1,
);
$name, $node, $storage_params, $verify_params, 1);
}
my $worker = sub {
@ -167,11 +163,7 @@ __PACKAGE__->register_method ({
if ($param->{add_storage}) {
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
);
$name, $node, $storage_params, $verify_params);
}
});
};

View File

@ -383,13 +383,9 @@ __PACKAGE__->register_method ({
my $verify_params = [qw(pool)];
if ($param->{add_storage}) {
# reserve the name and add as disabled, will be enabled below if creation works out
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
1,
);
$name, $node, $storage_params, $verify_params, 1);
}
my $pools = get_pool_data();
@ -495,11 +491,7 @@ __PACKAGE__->register_method ({
if ($param->{add_storage}) {
PVE::API2::Storage::Config->create_or_update(
$name,
$node,
$storage_params,
$verify_params,
);
$name, $node, $storage_params, $verify_params);
}
};