def _get_binds(self, context, requested_volumes): binds = {} for volume in requested_volumes: volume_driver = vol_driver.driver(provider=volume.volume_provider, context=context) source, destination = volume_driver.bind_mount(volume) binds[source] = {'bind': destination} return binds
def __init__(self): super(DockerDriver, self).__init__() self._host = host.Host() self._get_host_storage_info() self.volume_driver = vol_driver.driver() self.image_drivers = {} for driver_name in CONF.image_driver_list: driver = img_driver.load_image_driver(driver_name) self.image_drivers[driver_name] = driver
def __init__(self): self.volume_drivers = {} for driver_name in CONF.volume.driver_list: driver = vol_driver.driver(driver_name) self.volume_drivers[driver_name] = driver
def is_volume_available(self, context, volume_mapping): volume_driver = vol_driver.driver( provider=volume_mapping.volume_provider, context=context) return volume_driver.is_volume_available(volume_mapping)
def delete_volume(self, context, volume_mapping): volume_driver = vol_driver.driver( provider=volume_mapping.volume_provider, context=context) volume_driver.delete(volume_mapping)
def attach_volume(self, context, volume_mapping): volume_driver = vol_driver.driver( provider=volume_mapping.volume_provider, context=context) volume_driver.attach(volume_mapping)