From 637e805634b5179ffacad57ee26d4175449537f5 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Sun, 4 Nov 2012 21:32:45 +0000 Subject: Switch from FLAGS to CONF in misc modules Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65 --- tools/xenserver/destroy_cached_images.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/xenserver/destroy_cached_images.py b/tools/xenserver/destroy_cached_images.py index a9045cd61..01d68b4f6 100644 --- a/tools/xenserver/destroy_cached_images.py +++ b/tools/xenserver/destroy_cached_images.py @@ -33,7 +33,6 @@ from nova import utils from nova.virt.xenapi import driver as xenapi_driver from nova.virt.xenapi import vm_utils -FLAGS = flags.FLAGS destroy_opts = [ cfg.BoolOpt('all_cached', default=False, @@ -44,7 +43,8 @@ destroy_opts = [ help='Don\'t actually delete the VDIs.') ] -FLAGS.register_cli_opts(destroy_opts) +CONF = config.CONF +CONF.register_cli_opts(destroy_opts) def main(): @@ -56,8 +56,8 @@ def main(): sr_ref = vm_utils.safe_find_sr(session) destroyed = vm_utils.destroy_cached_images( - session, sr_ref, all_cached=FLAGS.all_cached, - dry_run=FLAGS.dry_run) + session, sr_ref, all_cached=CONF.all_cached, + dry_run=CONF.dry_run) if '--verbose' in sys.argv: print '\n'.join(destroyed) -- cgit