]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: work with RBD images v1 35712/head
authorErnesto Puerta <epuertat@redhat.com>
Mon, 11 May 2020 18:33:25 +0000 (20:33 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Fri, 10 Jul 2020 11:46:02 +0000 (13:46 +0200)
commit8340d19a67c65c0fc4c07a4daf3535621f295ce0
tree510b32414e986600dc927c07a043997ac57f3f04
parent07776d16666e90d42936967a1a08ac533338ba96
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>
qa/tasks/mgr/dashboard/test_rbd.py
src/pybind/mgr/dashboard/controllers/rbd.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-model.ts
src/pybind/mgr/dashboard/services/ceph_service.py
src/pybind/mgr/dashboard/tests/test_ceph_service.py