From 8ac4a106f9d2d1bd7cb1c36cf5e3710eabc4df1e Mon Sep 17 00:00:00 2001 From: gardlt Date: Fri, 1 Dec 2017 18:47:53 +0000 Subject: [PATCH] fix(logging): ensuring loading default without dup - updated load of default logging values in cli/api Closes #148 Change-Id: I758d70a8175d4f96f919e0e79238b1a16c1025ba --- armada/api/__init__.py | 4 ++-- armada/cli/__init__.py | 2 ++ armada/conf/__init__.py | 1 - etc/armada/armada.conf.sample | 4 ++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/armada/api/__init__.py b/armada/api/__init__.py index f055aeb1..a71b8731 100644 --- a/armada/api/__init__.py +++ b/armada/api/__init__.py @@ -23,6 +23,7 @@ from oslo_config import cfg from oslo_log import log as logging from armada import const +from armada.conf import set_default_for_default_log_levels CONF = cfg.CONF @@ -31,8 +32,7 @@ class BaseResource(object): def __init__(self): if not (os.path.exists(const.CONFIG_PATH)): - logging.register_options(CONF) - logging.set_defaults(default_log_levels=CONF.default_log_levels) + set_default_for_default_log_levels() logging.setup(CONF, 'armada') self.logger = logging.getLogger(__name__) diff --git a/armada/cli/__init__.py b/armada/cli/__init__.py index 3f0ab7aa..b50dc9d8 100644 --- a/armada/cli/__init__.py +++ b/armada/cli/__init__.py @@ -17,7 +17,9 @@ from oslo_log import log as logging from armada import conf + conf.set_app_default_configs() +conf.set_default_for_default_log_levels() CONF = cfg.CONF diff --git a/armada/conf/__init__.py b/armada/conf/__init__.py index 56e1c2a0..77693d22 100644 --- a/armada/conf/__init__.py +++ b/armada/conf/__init__.py @@ -28,7 +28,6 @@ if (os.path.exists(const.CONFIG_PATH)): def set_app_default_configs(): - set_default_for_default_log_levels() default.register_opts(CONF) diff --git a/etc/armada/armada.conf.sample b/etc/armada/armada.conf.sample index ff2326e4..c9fd2e8f 100644 --- a/etc/armada/armada.conf.sample +++ b/etc/armada/armada.conf.sample @@ -10,6 +10,10 @@ # The default Keystone authentication url. (string value) #auth_url = http://0.0.0.0/v3 +# Absolute path to the certificate file to use for chart registries (string +# value) +#certs = + # Path to Kubernetes configurations. (string value) #kubernetes_config_path = /home/user/.kube/