'Load the driver from the one specified in args, or from flags.'

def __init__(self, volume_driver=None, service_name=None, *args, **kwargs):

    super(VolumeManager, self).__init__(service_name='volume', *args, **kwargs)
    service_name = (service_name or 'backend_defaults')
    self.configuration = config.Configuration(volume_backend_opts, config_group=service_name)
    self.stats = {}
    if (not volume_driver):
        volume_driver = self.configuration.volume_driver
    if (volume_driver in MAPPING):
        LOG.warning('Driver    path    %s    is    deprecated,    update    your    configuration    to    the    new    path.', volume_driver)
        volume_driver = MAPPING[volume_driver]
    curr_active_backend_id = None
    svc_host = vol_utils.extract_host(self.host, 'backend')
    try:
        service = objects.Service.get_by_args(context.get_admin_context(), svc_host, constants.VOLUME_BINARY)
    except exception.ServiceNotFound:
        LOG.info('Service    not    found    for    updating    active_backend_id,    assuming    default    for    driver    init.')
    else:
        curr_active_backend_id = service.active_backend_id
    if self.configuration.suppress_requests_ssl_warnings:
        LOG.warning('Suppressing    requests    library    SSL    Warnings')
        requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)
        requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecurePlatformWarning)
    self.key_manager = key_manager.API(CONF)
    self.driver = importutils.import_object(volume_driver, configuration=self.configuration, db=self.db, host=self.host, cluster_name=self.cluster, active_backend_id=curr_active_backend_id)
    if (self.cluster and (not self.driver.SUPPORTS_ACTIVE_ACTIVE)):
        msg = (_('Active-Active    configuration    is    not    currently    supported    by    driver    %s.') % volume_driver)
        LOG.error(msg)
        raise exception.VolumeDriverException(message=msg)
    self.message_api = message_api.API()
    if (CONF.profiler.enabled and (profiler is not None)):
        self.driver = profiler.trace_cls('driver')(self.driver)
    try:
        self.extra_capabilities = jsonutils.loads(self.driver.configuration.extra_capabilities)
    except AttributeError:
        self.extra_capabilities = {}
    except Exception:
        with excutils.save_and_reraise_exception():
            LOG.error('Invalid    JSON:    %s', self.driver.configuration.extra_capabilities)
    backend_zone = self.driver.configuration.safe_get('backend_availability_zone')
    if backend_zone:
        self.availability_zone = backend_zone
    if self.driver.configuration.safe_get('image_volume_cache_enabled'):
        max_cache_size = self.driver.configuration.safe_get('image_volume_cache_max_size_gb')
        max_cache_entries = self.driver.configuration.safe_get('image_volume_cache_max_count')
        self.image_volume_cache = image_cache.ImageVolumeCache(self.db, cinder_volume.API(), max_cache_size, max_cache_entries)
        LOG.info('Image-volume    cache    enabled    for    host    %(host)s.', {'host': self.host})
    else:
        LOG.info('Image-volume    cache    disabled    for    host    %(host)s.', {'host': self.host})
        self.image_volume_cache = None
