X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fplugins%2FOpenStack%2Fsettings.py;h=f0d19bf7c107e9488f906497eb8bf3ba5ed4f375;hb=e69fe6fd4fca96b7e3f771cfbe7664bc0e8d727d;hp=a4b0752ecb49c59e5b89783f62729218edcf530f;hpb=effeb7c52a650308e47ef3eb0ded8315f21f9cba;p=osm%2FMON.git diff --git a/osm_mon/plugins/OpenStack/settings.py b/osm_mon/plugins/OpenStack/settings.py index a4b0752..f0d19bf 100644 --- a/osm_mon/plugins/OpenStack/settings.py +++ b/osm_mon/plugins/OpenStack/settings.py @@ -59,11 +59,7 @@ class Config(object): """Plugin confguration.""" _configuration = [ - CfgParam('OS_AUTH_URL', None, six.text_type), - CfgParam('OS_IDENTITY_API_VERSION', "3", six.text_type), - 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} @@ -74,22 +70,12 @@ class Config(object): for cfg in self._configuration: setattr(self, cfg.key, cfg.default) - def read_environ(self, service): + def read_environ(self): """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"): - 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.") + log.warn("Failed to configure plugin: %s", exc) return