From d1888a3359345acffd8d0845c137eefd88072112 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 3 Feb 2012 00:50:58 +0000 Subject: 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 --- nova/auth/ldapdriver.py | 4 ++-- nova/auth/manager.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nova/auth') 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') -- cgit