Add cinder's new attachment support

Cinder introduced new attachment API flow in microversion 3.27
(also attachment_complete added in mv 3.44 and support for passing
mode added in mv 3.54) which provides a clean interface to
interact with cinder for attachments and is also required for
multiattach volume support (Related future work).
Nova uses it since a long time and is proven to be stable,
this patch implements the same for glance.
The create volume and delete volume calls are also moved to
cinder_utils file to use the generic exception handler
and keep similar code together for consistency.

Partially Implements: blueprint attachment-api-and-multiattach-support

Change-Id: I2758ed1d5b8e0981faa3eff6f83e1ce5975a01d2
This commit is contained in:
Rajat Dhasmana
2021-03-22 07:43:24 -04:00
parent 98b4a0d4e7
commit 1178f113c4
8 changed files with 458 additions and 74 deletions

View File

@@ -95,4 +95,9 @@ latex_documents = [
# It would never happen in a real scenario as it is only imported
# from cinder store after the config are loaded but to handle doc
# failures, we mock it here.
autodoc_mock_imports = ['glance_store.common.fs_mount']
# The cinder_utils module imports external dependencies like
# cinderclient, retrying etc which are not recognized by
# autodoc, hence, are mocked here. These dependencies are installed
# during an actual deployment and won't cause any issue during usage.
autodoc_mock_imports = ['glance_store.common.fs_mount',
'glance_store.common.cinder_utils']