SelfService: we agreed on aliases, as the new...

...parameters are also subject to mapping. Disabled installation, now the
script should run without asking any questions. Remaining task: eventually
ask whether and how to install the framework components. Setting names have
already been defined with this commit

refs #2147
This commit is contained in:
Thomas Gelf 2020-11-24 20:20:26 +01:00
parent e908306f79
commit 84610bf80d
3 changed files with 29 additions and 24 deletions

View File

@ -269,10 +269,15 @@ class SelfServiceController extends ActionController
'fetch_agent_fqdn' => $settings->get('self-service/agent_name') === 'fqdn',
'transform_hostname' => $transform,
'flush_api_directory' => $settings->get('self-service/flush_api_dir') === 'y',
// New params are CamelCase:
'ConvertEndpointIPConfig' => $settings->get('self-service/transform_parent_host'),
'InstallFrameworkService' => '0',
'InstallFrameworkPlugins' => '0',
// ConvertEndpointIPConfig:
'resolve_parent_host' => $settings->get('self-service/resolve_parent_host'),
// InstallFrameworkService:
'install_framework_service' => '0',
// ServiceDirectory => framework_service_directory
// FrameworkServiceUrl => framework_service_url
// InstallFrameworkPlugins:
'install_framework_plugins' => '0',
// PluginsUrl => framework_plugins_url
];
$username = $settings->get('self-service/icinga_service_user');
if (strlen($username)) {

View File

@ -39,7 +39,7 @@ class SelfServiceSettingsForm extends DirectorForm
],
'value' => $settings->getStoredOrDefaultValue('self-service/transform_hostname')
]);
$this->addElement('select', 'transform_parent_host', [
$this->addElement('select', 'resolve_parent_host', [
'label' => $this->translate('Transform Parent Host to IP'),
'description' => $this->translate(
'This is only important in case your master/satellite nodes do not'
@ -50,7 +50,7 @@ class SelfServiceSettingsForm extends DirectorForm
'0' => $this->translate("Don't care, my host settings are fine"),
'1' => $this->translate('My Agents should use DNS to look up Endpoint names'),
],
'value' => $settings->getStoredOrDefaultValue('self-service/transform_parent_host')
'value' => $settings->getStoredOrDefaultValue('self-service/resolve_parent_host')
]);
$this->addElement('extensibleSet', 'global_zones', [

View File

@ -11,25 +11,25 @@ class Settings
protected $cache;
protected $defaults = [
'default_global_zone' => 'director-global',
'icinga_package_name' => 'director',
'default_global_zone' => 'director-global',
'icinga_package_name' => 'director',
/* @deprecated to be removed in 1.8.0 #1850 #1851 */
'magic_apply_for' => '_director_apply_for',
'config_format' => 'v2',
'override_services_varname' => '_override_servicevars',
'override_services_templatename' => 'host var overrides (Director)',
'disable_all_jobs' => 'n', // 'y'
'enable_audit_log' => 'n',
'deployment_mode_v1' => 'active-passive',
'deployment_path_v1' => null,
'activation_script_v1' => null,
'self-service/agent_name' => 'fqdn',
'self-service/transform_hostname' => '0',
'self-service/transform_parent_host' => '0',
'self-service/global_zones' => ['director-global'],
'ignore_bug7530' => 'n',
// 'experimental_features' => null, // 'allow'
// 'master_zone' => null,
'magic_apply_for' => '_director_apply_for',
'config_format' => 'v2',
'override_services_varname' => '_override_servicevars',
'override_services_templatename' => 'host var overrides (Director)',
'disable_all_jobs' => 'n', // 'y'
'enable_audit_log' => 'n',
'deployment_mode_v1' => 'active-passive',
'deployment_path_v1' => null,
'activation_script_v1' => null,
'self-service/agent_name' => 'fqdn',
'self-service/transform_hostname' => '0',
'self-service/resolve_parent_host' => '0',
'self-service/global_zones' => ['director-global'],
'ignore_bug7530' => 'n',
// 'experimental_features' => null, // 'allow'
// 'master_zone' => null,
];
protected $jsonEncode = [