mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-25 23:19:20 +00:00
pveceph: factor out supported/default ceph version to single source
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ef25743f04
commit
983921b9a1
@ -106,6 +106,9 @@ __PACKAGE__->register_method ({
|
|||||||
return undef;
|
return undef;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
my $supported_ceph_versions = ['octopus', 'pacific', 'quincy'];
|
||||||
|
my $default_ceph_version = 'pacific';
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
name => 'install',
|
name => 'install',
|
||||||
path => 'install',
|
path => 'install',
|
||||||
@ -116,8 +119,8 @@ __PACKAGE__->register_method ({
|
|||||||
properties => {
|
properties => {
|
||||||
version => {
|
version => {
|
||||||
type => 'string',
|
type => 'string',
|
||||||
enum => ['octopus', 'pacific', 'quincy'],
|
enum => $supported_ceph_versions,
|
||||||
default => 'pacific',
|
default => $default_ceph_version,
|
||||||
description => "Ceph version to install.",
|
description => "Ceph version to install.",
|
||||||
optional => 1,
|
optional => 1,
|
||||||
},
|
},
|
||||||
@ -139,7 +142,7 @@ __PACKAGE__->register_method ({
|
|||||||
code => sub {
|
code => sub {
|
||||||
my ($param) = @_;
|
my ($param) = @_;
|
||||||
|
|
||||||
my $cephver = $param->{version} || 'pacific'; # NOTE: always change default here too!
|
my $cephver = $param->{version} || $default_ceph_version;
|
||||||
|
|
||||||
my $repo = $param->{'test-repository'} ? 'test' : 'main';
|
my $repo = $param->{'test-repository'} ? 'test' : 'main';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user