Created
January 29, 2013 19:37
-
-
Save hub-cap/4667002 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -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