]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/services/rbd.py
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / services / rbd.py
index 1734ca3bac7ac1b18569807a14da1c8337a15d00..4e628342282eb1ed5e92aa1ac3fe843f852c043f 100644 (file)
@@ -253,7 +253,15 @@ class RbdService(object):
 
             stat = img.stat()
             stat['name'] = image_name
-            stat['id'] = img.id()
+            if img.old_format():
+                stat['unique_id'] = get_image_spec(pool_name, namespace, stat['block_name_prefix'])
+                stat['id'] = stat['unique_id']
+                stat['image_format'] = 1
+            else:
+                stat['unique_id'] = get_image_spec(pool_name, namespace, img.id())
+                stat['id'] = img.id()
+                stat['image_format'] = 2
+
             stat['pool_name'] = pool_name
             stat['namespace'] = namespace
             features = img.features()