summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
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/utils.py
parent5ad971810aaedcf5c9efd1b56add0e23921899ae (diff)
downloadnova-d1888a3359345acffd8d0845c137eefd88072112.tar.gz
nova-d1888a3359345acffd8d0845c137eefd88072112.tar.xz
nova-d1888a3359345acffd8d0845c137eefd88072112.zip
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/utils.py')
-rw-r--r--nova/utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 674be4a04..7bbfed1e0 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -57,8 +57,7 @@ ISO_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
PERFECT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f"
FLAGS = flags.FLAGS
-
-FLAGS.add_option(
+FLAGS.register_opt(
cfg.BoolOpt('disable_process_locking', default=False,
help='Whether to disable inter-process locks'))
@@ -572,7 +571,7 @@ class LazyPluggable(object):
def __get_backend(self):
if not self.__backend:
- backend_name = self.__pivot.value
+ backend_name = FLAGS[self.__pivot]
if backend_name not in self.__backends:
raise exception.Error(_('Invalid backend: %s') % backend_name)