summaryrefslogtreecommitdiff
path: root/oslo_middleware/healthcheck/pluginbase.py
diff options
context:
space:
mode:
Diffstat (limited to 'oslo_middleware/healthcheck/pluginbase.py')
-rw-r--r--oslo_middleware/healthcheck/pluginbase.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/oslo_middleware/healthcheck/pluginbase.py b/oslo_middleware/healthcheck/pluginbase.py
index e370967..eb8013d 100644
--- a/oslo_middleware/healthcheck/pluginbase.py
+++ b/oslo_middleware/healthcheck/pluginbase.py
@@ -29,7 +29,9 @@ class HealthcheckResult(object):
@six.add_metaclass(abc.ABCMeta)
class HealthcheckBaseExtension(object):
- def __init__(self, conf):
+
+ def __init__(self, oslo_conf, conf):
+ self.oslo_conf = oslo_conf
self.conf = conf
@abc.abstractmethod
@@ -38,3 +40,10 @@ class HealthcheckBaseExtension(object):
return: HealthcheckResult object
"""
+
+ def _conf_get(self, key, group='healthcheck'):
+ if key in self.conf:
+ # Validate value type
+ self.oslo_conf.set_override(key, self.conf[key], group=group,
+ enforce_type=True)
+ return getattr(getattr(self.oslo_conf, group), key)