Return updated volume object to the caller of _attach_volume()
Currently, migrate volume between two back-ends using LIO scsi
target fails due to the error of "Unable to terminate volume
connection: 'NoneType' object has no attribute 'split'".
The root cause of this error is _detach_volume() during volume
migration does not use updated volume object which is updated
during _attach_volume() by create_export().
As a result terminate_connection() which is called from
_detach_volume() tries to split volume['provider_location']
even if the entry is None and causes above error.
Also same error would be happened following methods.
- copy_volume_data(-> volume migration)
- backup_volume
- restore_backup
- copy_image_to_volume
- copy_volume_to_image
This change adds updated volume as an additional return value
for _attach_volume().
Change-Id: I7b76941d8b2e761c2c0147b13a201583d7e0a1c4
Closes-Bug: #
1433360