From: Mike Perez Date: Sat, 9 Mar 2013 07:46:33 +0000 (-0800) Subject: Removing flags in RBD in favor of configuration X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9f801f3f300347fcfece5882c1ea56925dc3f077;p=openstack-build%2Fcinder-build.git Removing flags in RBD in favor of configuration Not needed since we're using configuration for multi-backend support. Change-Id: I9634fca5d09ca84ef793e330def13176265dac31 --- diff --git a/cinder/tests/test_rbd.py b/cinder/tests/test_rbd.py index f0f126651..8db544555 100644 --- a/cinder/tests/test_rbd.py +++ b/cinder/tests/test_rbd.py @@ -80,15 +80,15 @@ class RBDTestCase(test.TestCase): def fake_execute(*args, **kwargs): return '', '' self._mox = mox.Mox() - configuration = mox.MockObject(conf.Configuration) - configuration.volume_tmp_dir = None - configuration.rbd_pool = 'rbd' - configuration.rbd_secret_uuid = None - configuration.rbd_user = None - configuration.append_config_values(mox.IgnoreArg()) + self.configuration = mox.MockObject(conf.Configuration) + self.configuration.volume_tmp_dir = None + self.configuration.rbd_pool = 'rbd' + self.configuration.rbd_secret_uuid = None + self.configuration.rbd_user = None + self.configuration.append_config_values(mox.IgnoreArg()) self.driver = RBDDriver(execute=fake_execute, - configuration=configuration) + configuration=self.configuration) self._mox.ReplayAll() def test_good_locations(self): @@ -143,11 +143,11 @@ class RBDTestCase(test.TestCase): FakeImageService(), None) def test_copy_image_no_volume_tmp(self): - self.flags(volume_tmp_dir=None) + self.configuration.volume_tmp_dir = None self._copy_image() def test_copy_image_volume_tmp(self): - self.flags(volume_tmp_dir='/var/run/cinder/tmp') + self.configuration.volume_tmp_dir = '/var/run/cinder/tmp' self._copy_image() def test_update_volume_stats(self): diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 0fb355915..c9016bf8b 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -23,7 +23,6 @@ import urllib from oslo.config import cfg from cinder import exception -from cinder import flags from cinder.image import image_utils from cinder.openstack.common import log as logging from cinder import utils @@ -47,9 +46,6 @@ rbd_opts = [ help='where to store temporary image files if the volume ' 'driver does not write them directly to the volume'), ] -FLAGS = flags.FLAGS -FLAGS.register_opts(rbd_opts) - VERSION = '1.0'