]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove references to FLAGS from volume/manager.py
authorOllie Leahy <oliver.leahy@hp.com>
Mon, 18 Mar 2013 18:05:02 +0000 (18:05 +0000)
committerOllie Leahy <oliver.leahy@hp.com>
Mon, 18 Mar 2013 18:05:02 +0000 (18:05 +0000)
Note that we still must import flags.py because volume_topic is defined
in the list global_opts in flags.py.

Fixes bug #1153551

Change-Id: I3d37bde4ba895c110390cea92385344ff94cb7d1

cinder/volume/manager.py

index c317d4e65179323d5a1dd12a6a8832eb953fa0c2..9a9c234b221b1903a6cc579e58d20360f0e57cb7 100644 (file)
@@ -69,8 +69,8 @@ volume_manager_opts = [
                help='Driver to use for volume creation'),
 ]
 
-FLAGS = flags.FLAGS
-FLAGS.register_opts(volume_manager_opts)
+CONF = cfg.CONF
+CONF.register_opts(volume_manager_opts)
 
 MAPPING = {
     'cinder.volume.driver.RBDDriver': 'cinder.volume.drivers.rbd.RBDDriver',
@@ -332,7 +332,7 @@ class VolumeManager(manager.SchedulerDependentManager):
         rescheduled = False
 
         try:
-            method_args = (FLAGS.volume_topic, volume_id, snapshot_id,
+            method_args = (CONF.volume_topic, volume_id, snapshot_id,
                            image_id, request_spec, filter_properties)
 
             rescheduled = self._reschedule(context, request_spec,