common.py
add function
get_volume
get_snapshot
get_all_snapshot
get_volume_from_snapshot
utils.py
add function
generate_volume_id_from_freenas_volume_name
generate_snapshot_id_from_freenas_snapshot_name
Additional notes:
change cinder volume name to truenas zvol name mapping from uuid aaa-bbb-ccc-ddd-eee -> volume-aaa to volume-aaa-bbb-ccc-ddd-eee (this is ensure 1 to 1 mapping so no extra meta storage is required when manage/unmanage two system cinder vs truenas)
change cinder snapshot name to truenas zvol name mapping from uuid aaa-bbb-ccc-ddd-eee -> snap-aaa to snap-aaa-bbb-ccc-ddd-eee
manage_existing depends on renaming volume from old to new name, use replication api as workaround
manage_existing_snapshot depends on renaming snapshot from old name to new name, no api available at this moment, leave for future implementation once rename snapshot name api available or use zfs native command zfs rename instead
42 Issue descriptions:
Driver feature manage/unmanage volume/snapshot from Truenas internal reference not yet supported
Failed tempest ci test case https://docs.openstack.org/tempest/latest/_modules/volume/admin/test_snapshot_manage.html#SnapshotManageAdminTest https://docs.openstack.org/tempest/latest/_modules/volume/admin/test_volume_manage.html#VolumeManageAdminTest.test_unmanage_manage_volume
Solution: Adding driver implementation method to to support cinder manage/unmanage volume/snapshot
Changes: iscsi.py add functions: manage_existing manage_existing_snapshot manage_existing_get_size manage_existing_snapshot_get_size get_manageable_volumes get_manageable_snapshots
common.py add function get_volume get_snapshot get_all_snapshot get_volume_from_snapshot
utils.py add function generate_volume_id_from_freenas_volume_name generate_snapshot_id_from_freenas_snapshot_name
Additional notes: