This is an effort to decouple some of the cinder backend specific
code (like nfs, scaleio) from the generic logic.
The purpose is to make the code modular and any change
for a particular cinder backend should not affect the code path
of other backends thereby reducing regression.
This is also required for another use case of supporting extend
of attached volumes added in [1].
Following are the major changes done in this patch:
1) Move cinder store to a new directory 'cinder' and rename
'cinder.py' to 'store.py' (similar to swift)
2) Create new files for nfs and scaleio backends for moving code
specific to these backends into their own separate file.
This also fixes one bug when using sparse files in nfs and
we wait for file size to be equal to volume size (initially done
for scaleio/powerflex backend) but this will never happen for
nfs sparse files. See bug: 2000584
3) Move cinder tests to 'tests/unit/cinder' directory and add tests
for base, nfs and scaleio files.
4) Modify/fix existing tests
Reviewed: https:/ /review. opendev. org/c/openstack /glance_ store/+ /843103 /opendev. org/openstack/ glance_ store/commit/ d0733a0f4f0c803 ca0333605a21552 dba1da931e
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit d0733a0f4f0c803 ca0333605a21552 dba1da931e
Author: whoami-rajat <email address hidden>
Date: Tue May 24 11:44:48 2022 +0530
Refactor/ restructure glance cinder store
This is an effort to decouple some of the cinder backend specific
code (like nfs, scaleio) from the generic logic.
The purpose is to make the code modular and any change
for a particular cinder backend should not affect the code path
of other backends thereby reducing regression.
This is also required for another use case of supporting extend
of attached volumes added in [1].
Following are the major changes done in this patch:
1) Move cinder store to a new directory 'cinder' and rename
'cinder.py' to 'store.py' (similar to swift)
2) Create new files for nfs and scaleio backends for moving code
specific to these backends into their own separate file.
This also fixes one bug when using sparse files in nfs and
we wait for file size to be equal to volume size (initially done
for scaleio/powerflex backend) but this will never happen for
nfs sparse files. See bug: 2000584
3) Move cinder tests to 'tests/unit/cinder' directory and add tests
for base, nfs and scaleio files.
4) Modify/fix existing tests
Closes-Bug: #2000584
[1] https:/ /review. opendev. org/c/openstack /glance_ store/+ /868742
Depends-On: https:/ /review. opendev. org/c/openstack /glance/ +/869021
Change-Id: I26c272b6c503e9 8fbbafca411d3ee c47283bd6fc