summaryrefslogtreecommitdiffstats
path: root/nova/auth
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-02-03 00:50:58 +0000
committerMark McLoughlin <markmc@redhat.com>2012-02-10 06:31:56 +0000
commitd1888a3359345acffd8d0845c137eefd88072112 (patch)
tree9fc7502d4feefa603dbf7435b6f11599b255bcc1 /nova/auth
parent5ad971810aaedcf5c9efd1b56add0e23921899ae (diff)
Remove the last of the gflags shim layer
Make FLAGS a ConfigOpts instance and fix up all the places where we expected FlagValues behaviour. Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89
Diffstat (limited to 'nova/auth')
-rw-r--r--nova/auth/ldapdriver.py4
-rw-r--r--nova/auth/manager.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py
index 78b35cadc..4173ecbd9 100644
--- a/nova/auth/ldapdriver.py
+++ b/nova/auth/ldapdriver.py
@@ -88,7 +88,7 @@ ldap_opts = [
]
FLAGS = flags.FLAGS
-FLAGS.add_options(ldap_opts)
+FLAGS.register_opts(ldap_opts)
LOG = logging.getLogger("nova.ldapdriver")
@@ -573,7 +573,7 @@ class LdapDriver(object):
def __role_to_dn(self, role, project_id=None):
"""Convert role to corresponding dn"""
if project_id is None:
- return FLAGS.__getitem__("ldap_%s" % role).value
+ return FLAGS["ldap_%s" % role]
else:
project_dn = self.__project_to_dn(project_id)
return 'cn=%s,%s' % (role, project_dn)
diff --git a/nova/auth/manager.py b/nova/auth/manager.py
index 40f1fc842..fb49333b2 100644
--- a/nova/auth/manager.py
+++ b/nova/auth/manager.py
@@ -92,7 +92,7 @@ auth_opts = [
]
FLAGS = flags.FLAGS
-FLAGS.add_options(auth_opts)
+FLAGS.register_opts(auth_opts)
flags.DECLARE('osapi_compute_listen_port', 'nova.service')