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/api/auth.py | 2 +- nova/api/ec2/__init__.py | 2 +- nova/api/openstack/compute/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nova/api') diff --git a/nova/api/auth.py b/nova/api/auth.py index a1a375d7c..518647ae1 100644 --- a/nova/api/auth.py +++ b/nova/api/auth.py @@ -34,7 +34,7 @@ use_forwarded_for_opt = cfg.BoolOpt('use_forwarded_for', 'Only enable this if you have a sanitizing proxy.') FLAGS = flags.FLAGS -FLAGS.add_option(use_forwarded_for_opt) +FLAGS.register_opt(use_forwarded_for_opt) class InjectContext(wsgi.Middleware): diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index bcd7b239e..bbce2c0d4 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -59,7 +59,7 @@ ec2_opts = [ ] FLAGS = flags.FLAGS -FLAGS.add_options(ec2_opts) +FLAGS.register_opts(ec2_opts) flags.DECLARE('use_forwarded_for', 'nova.api.auth') diff --git a/nova/api/openstack/compute/__init__.py b/nova/api/openstack/compute/__init__.py index 3884ffbad..e23fe7b87 100644 --- a/nova/api/openstack/compute/__init__.py +++ b/nova/api/openstack/compute/__init__.py @@ -44,7 +44,7 @@ allow_instance_snapshots_opt = \ help='Permit instance snapshot operations.') FLAGS = flags.FLAGS -FLAGS.add_option(allow_instance_snapshots_opt) +FLAGS.register_opt(allow_instance_snapshots_opt) class APIRouter(nova.api.openstack.APIRouter): -- cgit