These methods that handles block device mapping pass instance['name'] to attach/detach_volume(), but it should be instance itself.
def _attach_block_devices(self, instance, block_device_info): block_device_mapping = driver.\ block_device_info_get_mapping(block_device_info) for vol in block_device_mapping: connection_info = vol['connection_info'] mountpoint = vol['mount_device'] self.attach_volume( connection_info, instance['name'], mountpoint)
def _detach_block_devices(self, instance, block_device_info): block_device_mapping = driver.\ block_device_info_get_mapping(block_device_info) for vol in block_device_mapping: connection_info = vol['connection_info'] mountpoint = vol['mount_device'] self.detach_volume( connection_info, instance['name'], mountpoint)
These methods that handles block device mapping pass instance['name'] to attach/ detach_ volume( ), but it should be instance itself.
def _attach_ block_devices( self, instance, block_device_info):
block_ device_ mapping = driver.\
block_ device_ info_get_ mapping( block_device_ info) mapping:
connection _info = vol['connection _info']
mountpoint = vol['mount_device']
self. attach_ volume(
connectio n_info, instance['name'], mountpoint)
for vol in block_device_
def _detach_ block_devices( self, instance, block_device_info):
block_ device_ mapping = driver.\
block_ device_ info_get_ mapping( block_device_ info) mapping:
connection _info = vol['connection _info']
mountpoint = vol['mount_device']
self. detach_ volume(
connectio n_info, instance['name'], mountpoint)
for vol in block_device_