def __init__(self, execute=utils.execute, *args, **kwargs):
# NOTE(vish): db is set by Manager
- self.db = None
+ self.db = kwargs.get('db')
self.configuration = kwargs.get('configuration', None)
if self.configuration:
self.configuration.append_config_values(volume_opts)
def __init__(self, volume_driver=None, service_name=None,
*args, **kwargs):
"""Load the driver from the one specified in args, or from flags."""
+ # update_service_capabilities needs service_name to be volume
+ super(VolumeManager, self).__init__(service_name='volume',
+ *args, **kwargs)
self.configuration = Configuration(volume_manager_opts,
config_group=service_name)
if not volume_driver:
volume_driver = MAPPING[volume_driver]
self.driver = importutils.import_object(
volume_driver,
- configuration=self.configuration)
- # update_service_capabilities needs service_name to be volume
- super(VolumeManager, self).__init__(service_name='volume',
- *args, **kwargs)
- # NOTE(vish): Implementation specific db handling is done
- # by the driver.
- self.driver.db = self.db
+ configuration=self.configuration,
+ db=self.db)
def init_host(self):
"""Do any initialization that needs to be run if this is a