aboutsummaryrefslogtreecommitdiffstats
path: root/keystonemiddleware-moon
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2016-05-23 19:28:39 +0200
committerasteroide <thomas.duval@orange.com>2016-05-23 19:28:39 +0200
commit8f9cc03d2104287fa8d307df421b35130727d252 (patch)
treea2b6d60ca997aa57e6d3c890458ee9259198bd2f /keystonemiddleware-moon
parentfe8cb3471df875e04a9eddf8aa0eb304f676c9ff (diff)
Fix configuration names.
Change-Id: I63408fbc8334593bd45ae4084c4b2da6c0332cdc
Diffstat (limited to 'keystonemiddleware-moon')
-rw-r--r--keystonemiddleware-moon/keystonemiddleware/moon_agent.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/keystonemiddleware-moon/keystonemiddleware/moon_agent.py b/keystonemiddleware-moon/keystonemiddleware/moon_agent.py
index b21d9dbe..7e196ef6 100644
--- a/keystonemiddleware-moon/keystonemiddleware/moon_agent.py
+++ b/keystonemiddleware-moon/keystonemiddleware/moon_agent.py
@@ -21,8 +21,14 @@ _OPTS = [
cfg.StrOpt('auth_version',
default=None,
help='API version of the admin Identity API endpoint.'),
- cfg.StrOpt('keystonemiddleware_agent_logfile', # TODO: update in the paste.ini
- default="/tmp/moon_keystonemiddleware_agent.log",
+ cfg.StrOpt('authz_login',
+ default="admin",
+ help='Name of the administrator who will connect to the Keystone Moon backends.'),
+ cfg.StrOpt('authz_password',
+ default="nomoresecrete",
+ help='Password of the administrator who will connect to the Keystone Moon backends.'),
+ cfg.StrOpt('logfile',
+ default="/tmp/authz.log",
help='File where logs goes.'),
]
@@ -68,14 +74,6 @@ class MoonAgentKeystoneMiddleware(object):
"password": "nomoresecrete"
}
}
- },
- "scope": {
- "project": {
- "domain": {
- "id": "Default"
- },
- "name": "demo"
- }
}
}
}
@@ -84,7 +82,7 @@ class MoonAgentKeystoneMiddleware(object):
self.conf = conf
self._LOG = logging.getLogger(conf.get('log_name', __name__))
# FIXME: events are duplicated in log file
- moon_agent_fh = logging.FileHandler(CONF.moon_keystonemiddleware_agent["keystonemiddleware_agent_logfile"])
+ moon_agent_fh = logging.FileHandler(CONF.moon_keystonemiddleware_agent["logfile"])
self._LOG.setLevel(logging.DEBUG)
self._LOG.addHandler(moon_agent_fh)
self._LOG.info(_LI('Starting Moon KeystoneMiddleware Agent'))
@@ -118,6 +116,8 @@ class MoonAgentKeystoneMiddleware(object):
self.local_registered_mgr_dict["authz_mgr"] = AuthzMgr(self._conf)
def __set_token(self):
+ self.post_data["auth"]["identity"]["password"]["user"]["name"] = self.conf.get('authz_login', "admin")
+ self.post_data["auth"]["identity"]["password"]["user"]["password"] = self.conf.get('authz_password', "nomoresecrete")
data = self.get_url("/v3/auth/tokens", post_data=self.post_data)
if "token" not in data:
raise Exception("Authentication problem ({})".format(data))