use PVE::Tools;
use PVE::Cluster;
+my $crs_format = {
+ ha => {
+ type => 'string',
+ enum => ['basic', 'static'],
+ description => "Use this resource scheduler mode for HA.",
+ default => 'basic',
+ verbose_description => "Configures how the HA manager should select nodes to start or ".
+ "recover services. With 'basic', only the number of services is used, with 'static', ".
+ "static CPU and memory configuration of services is considered.",
+ },
+};
+
my $migration_format = {
type => {
default_key => 1,
type => "object",
additionalProperties => 0,
properties => {
+ crs => {
+ optional => 1,
+ type => 'string', format => $crs_format,
+ description => "Cluster resource scheduling settings.",
+ },
keyboard => {
optional => 1,
type => 'string',
$res->{description} = $comment;
+ if (my $crs = $res->{crs}) {
+ $res->{crs} = parse_property_string($crs_format, $crs);
+ }
+
if (my $migration = $res->{migration}) {
$res->{migration} = parse_property_string($migration_format, $migration);
}
$cfg->{console} = 'html5';
}
+ if (ref(my $crs = $cfg->{crs})) {
+ $cfg->{crs} = PVE::JSONSchema::print_property_string($crs, $crs_format);
+ }
+
if (ref(my $migration = $cfg->{migration})) {
$cfg->{migration} = PVE::JSONSchema::print_property_string($migration, $migration_format);
}