]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: introduce commands of "image-meta ls/rm" 16591/head
authorPCzhangPC <pengcheng.zhang@easystack.cn>
Mon, 7 Aug 2017 06:00:59 +0000 (14:00 +0800)
committerPCzhangPC <pengcheng.zhang@easystack.cn>
Mon, 7 Aug 2017 06:00:59 +0000 (14:00 +0800)
Introduce commands of "image-meta ls/rm" as alias of command "image-meta list/remove"
Signed-off-by: PCzhangPC <pengcheng.zhang@easystack.cn>
src/test/cli/rbd/help.t
src/tools/rbd/action/ImageMeta.cc

index 7c38ae6025505964dcf163d31365448033dd5183..a26d8f5c15d1542d84c6f18e1384f25c6f04fc8a 100644 (file)
   
   Positional arguments:
     <command>
-      bench                       Simple benchmark.
-      children                    Display children of snapshot.
-      clone                       Clone a snapshot into a COW child image.
-      copy (cp)                   Copy src image to dest.
-      create                      Create an empty image.
-      diff                        Print extents that differ since a previous
-                                  snap, or image creation.
-      disk-usage (du)             Show disk usage stats for pool, image or
-                                  snapshot
-      export                      Export image to file.
-      export-diff                 Export incremental diff to file.
-      feature disable             Disable the specified image feature.
-      feature enable              Enable the specified image feature.
-      flatten                     Fill clone with parent data (make it
-                                  independent).
-      group create                Create a consistency group.
-      group image add             Add an image to a consistency group.
-      group image list            List images in a consistency group.
-      group image remove          Remove an image from a consistency group.
-      group list (group ls)       List rbd consistency groups.
-      group remove (group rm)     Delete a consistency group.
-      image-meta get              Image metadata get the value associated with
-                                  the key.
-      image-meta list             Image metadata list keys with values.
-      image-meta remove           Image metadata remove the key and value
-                                  associated.
-      image-meta set              Image metadata set key with value.
-      import                      Import image from file.
-      import-diff                 Import an incremental diff.
-      info                        Show information about image size, striping,
-                                  etc.
-      journal client disconnect   Flag image journal client as disconnected.
-      journal export              Export image journal.
-      journal import              Import image journal.
-      journal info                Show information about image journal.
-      journal inspect             Inspect image journal for structural errors.
-      journal reset               Reset image journal.
-      journal status              Show status of image journal.
-      list (ls)                   List rbd images.
-      lock add                    Take a lock on an image.
-      lock list (lock ls)         Show locks held on an image.
-      lock remove (lock rm)       Release a lock on an image.
-      map                         Map image to a block device using the kernel.
-      merge-diff                  Merge two diff exports together.
-      mirror image demote         Demote an image to non-primary for RBD
-                                  mirroring.
-      mirror image disable        Disable RBD mirroring for an image.
-      mirror image enable         Enable RBD mirroring for an image.
-      mirror image promote        Promote an image to primary for RBD mirroring.
-      mirror image resync         Force resync to primary image for RBD mirroring.
-      mirror image status         Show RDB mirroring status for an image.
-      mirror pool demote          Demote all primary images in the pool.
-      mirror pool disable         Disable RBD mirroring by default within a pool.
-      mirror pool enable          Enable RBD mirroring by default within a pool.
-      mirror pool info            Show information about the pool mirroring
-                                  configuration.
-      mirror pool peer add        Add a mirroring peer to a pool.
-      mirror pool peer remove     Remove a mirroring peer from a pool.
-      mirror pool peer set        Update mirroring peer settings.
-      mirror pool promote         Promote all non-primary images in the pool.
-      mirror pool status          Show status for all mirrored images in the pool.
-      nbd list (nbd ls)           List the nbd devices already used.
-      nbd map                     Map image to a nbd device.
-      nbd unmap                   Unmap a nbd device.
-      object-map check            Verify the object map is correct.
-      object-map rebuild          Rebuild an invalid object map.
-      pool init                   Initialize pool for use by RBD.
-      remove (rm)                 Delete an image.
-      rename (mv)                 Rename image within pool.
-      resize                      Resize (expand or shrink) image.
-      showmapped                  Show the rbd images mapped by the kernel.
-      snap create (snap add)      Create a snapshot.
-      snap limit clear            Remove snapshot limit.
-      snap limit set              Limit the number of snapshots.
-      snap list (snap ls)         Dump list of image snapshots.
-      snap protect                Prevent a snapshot from being deleted.
-      snap purge                  Delete all snapshots.
-      snap remove (snap rm)       Delete a snapshot.
-      snap rename                 Rename a snapshot.
-      snap rollback (snap revert) Rollback image to snapshot.
-      snap unprotect              Allow a snapshot to be deleted.
-      status                      Show the status of this image.
-      trash list (trash ls)       List trash images.
-      trash move (trash mv)       Move an image to the trash.
-      trash remove (trash rm)     Remove an image from trash.
-      trash restore               Restore an image from trash.
-      unmap                       Unmap a rbd device that was used by the kernel.
-      watch                       Watch events on image.
+      bench                             Simple benchmark.
+      children                          Display children of snapshot.
+      clone                             Clone a snapshot into a COW child image.
+      copy (cp)                         Copy src image to dest.
+      create                            Create an empty image.
+      diff                              Print extents that differ since a
+                                        previous snap, or image creation.
+      disk-usage (du)                   Show disk usage stats for pool, image or
+                                        snapshot
+      export                            Export image to file.
+      export-diff                       Export incremental diff to file.
+      feature disable                   Disable the specified image feature.
+      feature enable                    Enable the specified image feature.
+      flatten                           Fill clone with parent data (make it
+                                        independent).
+      group create                      Create a consistency group.
+      group image add                   Add an image to a consistency group.
+      group image list                  List images in a consistency group.
+      group image remove                Remove an image from a consistency group.
+      group list (group ls)             List rbd consistency groups.
+      group remove (group rm)           Delete a consistency group.
+      image-meta get                    Image metadata get the value associated
+                                        with the key.
+      image-meta list (image-meta ls)   Image metadata list keys with values.
+      image-meta remove (image-meta rm) Image metadata remove the key and value
+                                        associated.
+      image-meta set                    Image metadata set key with value.
+      import                            Import image from file.
+      import-diff                       Import an incremental diff.
+      info                              Show information about image size,
+                                        striping, etc.
+      journal client disconnect         Flag image journal client as disconnected.
+      journal export                    Export image journal.
+      journal import                    Import image journal.
+      journal info                      Show information about image journal.
+      journal inspect                   Inspect image journal for structural
+                                        errors.
+      journal reset                     Reset image journal.
+      journal status                    Show status of image journal.
+      list (ls)                         List rbd images.
+      lock add                          Take a lock on an image.
+      lock list (lock ls)               Show locks held on an image.
+      lock remove (lock rm)             Release a lock on an image.
+      map                               Map image to a block device using the
+                                        kernel.
+      merge-diff                        Merge two diff exports together.
+      mirror image demote               Demote an image to non-primary for RBD
+                                        mirroring.
+      mirror image disable              Disable RBD mirroring for an image.
+      mirror image enable               Enable RBD mirroring for an image.
+      mirror image promote              Promote an image to primary for RBD
+                                        mirroring.
+      mirror image resync               Force resync to primary image for RBD
+                                        mirroring.
+      mirror image status               Show RDB mirroring status for an image.
+      mirror pool demote                Demote all primary images in the pool.
+      mirror pool disable               Disable RBD mirroring by default within a
+                                        pool.
+      mirror pool enable                Enable RBD mirroring by default within a
+                                        pool.
+      mirror pool info                  Show information about the pool mirroring
+                                        configuration.
+      mirror pool peer add              Add a mirroring peer to a pool.
+      mirror pool peer remove           Remove a mirroring peer from a pool.
+      mirror pool peer set              Update mirroring peer settings.
+      mirror pool promote               Promote all non-primary images in the
+                                        pool.
+      mirror pool status                Show status for all mirrored images in
+                                        the pool.
+      nbd list (nbd ls)                 List the nbd devices already used.
+      nbd map                           Map image to a nbd device.
+      nbd unmap                         Unmap a nbd device.
+      object-map check                  Verify the object map is correct.
+      object-map rebuild                Rebuild an invalid object map.
+      pool init                         Initialize pool for use by RBD.
+      remove (rm)                       Delete an image.
+      rename (mv)                       Rename image within pool.
+      resize                            Resize (expand or shrink) image.
+      showmapped                        Show the rbd images mapped by the kernel.
+      snap create (snap add)            Create a snapshot.
+      snap limit clear                  Remove snapshot limit.
+      snap limit set                    Limit the number of snapshots.
+      snap list (snap ls)               Dump list of image snapshots.
+      snap protect                      Prevent a snapshot from being deleted.
+      snap purge                        Delete all snapshots.
+      snap remove (snap rm)             Delete a snapshot.
+      snap rename                       Rename a snapshot.
+      snap rollback (snap revert)       Rollback image to snapshot.
+      snap unprotect                    Allow a snapshot to be deleted.
+      status                            Show the status of this image.
+      trash list (trash ls)             List trash images.
+      trash move (trash mv)             Move an image to the trash.
+      trash remove (trash rm)           Remove an image from trash.
+      trash restore                     Restore an image from trash.
+      unmap                             Unmap a rbd device that was used by the
+                                        kernel.
+      watch                             Watch events on image.
   
   Optional arguments:
     -c [ --conf ] arg     path to cluster configuration
index d3147ab0e9ca95b7a622798f11a7133cc73d5363..68192b52cf3aed1df0a8e3f063ea7b35c0ed7c1b 100644 (file)
@@ -294,7 +294,7 @@ int execute_remove(const po::variables_map &vm) {
 }
 
 Shell::Action action_list(
-  {"image-meta", "list"}, {}, "Image metadata list keys with values.", "",
+  {"image-meta", "list"}, {"image-meta", "ls"}, "Image metadata list keys with values.", "",
   &get_list_arguments, &execute_list);
 Shell::Action action_get(
   {"image-meta", "get"}, {},
@@ -304,7 +304,7 @@ Shell::Action action_set(
   {"image-meta", "set"}, {}, "Image metadata set key with value.", "",
   &get_set_arguments, &execute_set);
 Shell::Action action_remove(
-  {"image-meta", "remove"}, {},
+  {"image-meta", "remove"}, {"image-meta", "rm"},
   "Image metadata remove the key and value associated.", "",
   &get_remove_arguments, &execute_remove);