mgr/dashboard: work with RBD images v1
Add support for RBD Image Format v1:
- This format lacks ID field, required for dashboard. Instead,
RBD image `block_name_prefix` is used as unique ID (together with pool
id and namespace)
- Additionally, `image_format` is now exposed.
- In the front-end side:
- Copy action on a v1 image will cause the image to be copied to v2
format.
- List doesn't allow Move to Trash on v1 images,
- Details section now shows `image_format` for images,
- Edit Form disables flags not supported for v1 (`deep-flatten`,
`layering`, `exclusive-lock`).
- Protect does not work on v1 images or v2 images created from v1
ones.
Fixes: https://tracker.ceph.com/issues/36354
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit
119851ec89745026c273334efbcbf2d50128c99d)
Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.html: add row
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts: add imports
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-model.ts: add new fields
src/pybind/mgr/dashboard/services/ceph_service.py: just add get_pool_name_from_id
src/pybind/mgr/dashboard/services/rbd.py: discard changes
src/pybind/mgr/dashboard/controllers/rbd.py: bring and adapt code from services/rbd.py
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>