Module: check_mk
Branch: master
Commit: 32fce15364c1102da0cd927207e951b8cb695ea0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=32fce15364c110…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 4 09:01:50 2017 +0200
Cleaned up some more config domains default settings
Change-Id: I29b4a61e010014dbfa21eaa016fb54ecc764a779
---
web/htdocs/watolib.py | 20 ++++++++++++++------
web/plugins/wato/check_mk_configuration.py | 2 --
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 8f06f87..0ac6b72 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -361,15 +361,14 @@ class ConfigDomain(object):
def default_globals(self):
- settings = {}
- for varname, var in configvars().items():
- domain, valuespec = var[:2]
- if domain == self.__class__:
- settings[varname] = valuespec.default_value()
- return settings
+ """Returns a dictionary that contains the default settings
+ of all configuration variables of this config domain."""
+ raise NotImplementedError()
def _get_global_config_var_names(self):
+ """Returns a list of all global config variable names
+ associated with this config domain."""
return [ varname for (varname, var) in configvars().items() if var[0] ==
self.__class__ ]
@@ -541,6 +540,15 @@ class ConfigDomainCACertificates(ConfigDomain):
raise
+ def default_globals(self):
+ return {
+ "trusted_certificate_authorities": {
+ "use_system_wide_cas": True,
+ "trusted_cas": [],
+ }
+ }
+
+
#.
# .--Hosts & Folders-----------------------------------------------------.
# | _ _ _ ___ _____ _ _ |
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index ed26313..7cd1983 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -875,12 +875,10 @@ register_configvar(_("Site Management"),
"these directories for system wide CAs: %s") %
",
".join(ConfigDomainCACertificates.system_wide_trusted_ca_search_paths),
label = _("Trust system wide configured CAs"),
- default_value = True,
)),
("trusted_cas", ListOfCAs(
title = _("Check_MK specific"),
allow_empty = True,
- default_value = [],
)),
],
optional_keys = False,