Skip to content

Instantly share code, notes, and snippets.

@hub-cap
Created January 29, 2013 19:37
Show Gist options
  • Select an option

  • Save hub-cap/4667002 to your computer and use it in GitHub Desktop.

Select an option

Save hub-cap/4667002 to your computer and use it in GitHub Desktop.
@@ -50,6 +50,7 @@ from cinder.openstack.common import log as logging
from cinder.openstack.common import timeutils
from cinder.openstack.common import uuidutils
from cinder import quota
+from cinder.volume.configuration import Configuration
from cinder.volume import utils as volume_utils
@@ -108,8 +109,12 @@ class VolumeManager(manager.SchedulerDependentManager):
def __init__(self, volume_driver=None, service_name=None,
*args, **kwargs):
"""Load the driver from the one specified in args, or from flags."""
+ self.configuration = Configuration(volume_opts,
+ config_group=service_name)
if not volume_driver:
- volume_driver = FLAGS.volume_driver
+ # Get from configuration, which will get the default
+ # if its not using the multi backend
+ volume_driver = self.configuration.volume_driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment