X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fplugins%2FOpenStack%2Fsettings.py;h=1e8f54f7e931c673c902bab1bb38550a2734f10b;hb=0215787170470859168d861b666c4e92b37e3743;hp=fe8064132cd1a30000b4780e1b3a7f31193fa183;hpb=c7397b95dbaeebd7d872779eec809daed9e487cc;p=osm%2FMON.git diff --git a/osm_mon/plugins/OpenStack/settings.py b/osm_mon/plugins/OpenStack/settings.py index fe80641..1e8f54f 100644 --- a/osm_mon/plugins/OpenStack/settings.py +++ b/osm_mon/plugins/OpenStack/settings.py @@ -26,7 +26,7 @@ import os from collections import namedtuple -from plugins.OpenStack.singleton import Singleton +from osm_mon.plugins.OpenStack.singleton import Singleton import six @@ -64,6 +64,7 @@ class Config(object): CfgParam('OS_USERNAME', None, six.text_type), CfgParam('OS_PASSWORD', "password", six.text_type), CfgParam('OS_TENANT_NAME', "service", six.text_type), + CfgParam('OS_NOTIFIER_URI', "http://localhost:8662", six.text_type), ] _config_dict = {cfg.key: cfg for cfg in _configuration} @@ -78,17 +79,12 @@ class Config(object): """Check the appropriate environment variables and update defaults.""" for key in self._config_keys: try: - if (key == "OS_IDENTITY_API_VERSION" or key == "OS_PASSWORD"): - val = str(os.environ[key]) - setattr(self, key, val) - elif (key == "OS_AUTH_URL"): + if key == "OS_AUTH_URL": val = str(os.environ[key]) + "/v3" setattr(self, key, val) else: - # Default username for a service is it's name - setattr(self, 'OS_USERNAME', service) - log.info("Configuration complete!") - return + val = str(os.environ[key]) + setattr(self, key, val) except KeyError as exc: log.warn("Falied to configure plugin: %s", exc) log.warn("Try re-authenticating your OpenStack deployment.")