]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/volumes/module.py
import 15.2.2 octopus source
[ceph.git] / ceph / src / pybind / mgr / volumes / module.py
index 0d8015bf48f4d1b09deaebd628ba64711e6ed197..bbb1896e0c73ae1534f71d31d5519d3dcf625bed 100644 (file)
@@ -101,6 +101,15 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
                     "and optionally, in a specific subvolume group",
             'perm': 'rw'
         },
+        {
+            'cmd': 'fs subvolume info '
+                   'name=vol_name,type=CephString '
+                   'name=sub_name,type=CephString '
+                   'name=group_name,type=CephString,req=false ',
+            'desc': "Get the metadata of a CephFS subvolume in a volume, "
+                    "and optionally, in a specific subvolume group",
+            'perm': 'r'
+        },
         {
             'cmd': 'fs subvolumegroup snapshot ls '
                    'name=vol_name,type=CephString '
@@ -317,6 +326,11 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
                                          sub_name=cmd['sub_name'],
                                          group_name=cmd.get('group_name', None))
 
+    def _cmd_fs_subvolume_info(self, inbuf, cmd):
+        return self.vc.subvolume_info(vol_name=cmd['vol_name'],
+                                      sub_name=cmd['sub_name'],
+                                      group_name=cmd.get('group_name', None))
+
     def _cmd_fs_subvolumegroup_snapshot_create(self, inbuf, cmd):
         return self.vc.create_subvolume_group_snapshot(vol_name=cmd['vol_name'],
                                                        group_name=cmd['group_name'],