]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: modified some commands' description into imperative sentence 16694/head
authorsongweibin <song.weibin@zte.com.cn>
Mon, 31 Jul 2017 12:25:30 +0000 (20:25 +0800)
committersongweibin <song.weibin@zte.com.cn>
Mon, 31 Jul 2017 12:25:30 +0000 (20:25 +0800)
Signed-off-by: songweibin <song.weibin@zte.com.cn>
doc/man/8/rbd.rst
src/pybind/rbd/rbd.pyx
src/test/cli/rbd/help.t
src/tools/rbd/action/Snap.cc
src/tools/rbd/action/Trash.cc

index e3b174d8b842dd617528db437d270f7a5994d862..c37ca44749815953cc098f78c69d14c5bd2da3b2 100644 (file)
@@ -217,20 +217,20 @@ Commands
   This requires image format 2.
 
 :command:`resize` (-s | --size *size-in-M/G/T*) [--allow-shrink] *image-spec*
-  Resizes rbd image. The size parameter also needs to be specified.
+  Resize rbd image. The size parameter also needs to be specified.
   The --allow-shrink option lets the size be reduced.
 
 :command:`rm` *image-spec*
-  Deletes an rbd image (including all data blocks). If the image has
+  Delete an rbd image (including all data blocks). If the image has
   snapshots, this fails and nothing is deleted.
 
 :command:`export` [--export-format *format (1 or 2)*] (*image-spec* | *snap-spec*) [*dest-path*]
-  Exports image to dest path (use - for stdout).
+  Export image to dest path (use - for stdout).
   The --export-format accepts '1' or '2' currently. Format 2 allow us to export not only the content
   of image, but also the snapshots and other properties, such as image_order, features.
 
 :command:`import` [--export-format *format (1 or 2)*] [--image-format *format-id*] [--object-size *size-in-B/K/M*] [--stripe-unit *size-in-B/K/M* --stripe-count *num*] [--image-feature *feature-name*]... [--image-shared] *src-path* [*image-spec*]
-  Creates a new image and imports its data from path (use - for
+  Create a new image and imports its data from path (use - for
   stdin).  The import operation will try to create sparse rbd images 
   if possible.  For import from stdin, the sparsification unit is
   the data block size of the destination image (object size).
@@ -242,7 +242,7 @@ Commands
   of image, but also the snapshots and other properties, such as image_order, features.
 
 :command:`export-diff` [--from-snap *snap-name*] [--whole-object] (*image-spec* | *snap-spec*) *dest-path*
-  Exports an incremental diff for an image to dest path (use - for stdout).  If
+  Export an incremental diff for an image to dest path (use - for stdout).  If
   an initial snapshot is specified, only changes since that snapshot are included; otherwise,
   any regions of the image that contain data are included.  The end snapshot is specified
   using the standard --snap option or @snap syntax (see below).  The image diff format includes
@@ -258,7 +258,7 @@ Commands
   currently only support the source incremental diff with stripe_count == 1
 
 :command:`import-diff` *src-path* *image-spec*
-  Imports an incremental diff of an image and applies it to the current image.  If the diff
+  Import an incremental diff of an image and applies it to the current image.  If the diff
   was generated relative to a start snapshot, we verify that snapshot already exists before
   continuing.  If there was an end snapshot we verify it does not already exist before
   applying the changes, and create the snapshot when we are done.
@@ -270,11 +270,11 @@ Commands
   whether the region is known to be zeros or may contain other data.
 
 :command:`cp` (*src-image-spec* | *src-snap-spec*) *dest-image-spec*
-  Copies the content of a src-image into the newly created dest-image.
+  Copy the content of a src-image into the newly created dest-image.
   dest-image will have the same size, object size, and image format as src-image.
 
 :command:`mv` *src-image-spec* *dest-image-spec*
-  Renames an image.  Note: rename across pools is not supported.
+  Rename an image.  Note: rename across pools is not supported.
 
 :command:`image-meta list` *image-spec*
   Show metadata held on the image. The first column is the key
@@ -290,24 +290,24 @@ Commands
   Remove metadata key with the value.
 
 :command:`object-map rebuild` *image-spec* | *snap-spec*
-  Rebuilds an invalid object map for the specified image. An image snapshot can be
+  Rebuild an invalid object map for the specified image. An image snapshot can be
   specified to rebuild an invalid object map for a snapshot.
 
 :command:`snap ls` *image-spec*
-  Dumps the list of snapshots inside a specific image.
+  Dump the list of snapshots inside a specific image.
 
 :command:`snap create` *snap-spec*
-  Creates a new snapshot. Requires the snapshot name parameter specified.
+  Create a new snapshot. Requires the snapshot name parameter specified.
 
 :command:`snap rollback` *snap-spec*
   Rollback image content to snapshot. This will iterate through the entire blocks
   array and update the data head content to the snapshotted version.
 
 :command:`snap rm` [--force] *snap-spec*
-  Removes the specified snapshot.
+  Remove the specified snapshot.
 
 :command:`snap purge` *image-spec*
-  Removes all snapshots from an image.
+  Remove all snapshots from an image.
 
 :command:`snap protect` *snap-spec*
   Protect a snapshot from deletion, so that clones can be made of it
@@ -333,19 +333,19 @@ Commands
   an image.
 
 :command:`map` [-o | --options *krbd-options* ] [--read-only] *image-spec* | *snap-spec*
-  Maps the specified image to a block device via the rbd kernel module.
+  Map the specified image to a block device via the rbd kernel module.
 
 :command:`unmap` [-o | --options *krbd-options* ] *image-spec* | *snap-spec* | *device-path*
-  Unmaps the block device that was mapped via the rbd kernel module.
+  Unmap the block device that was mapped via the rbd kernel module.
 
 :command:`showmapped`
   Show the rbd images that are mapped via the rbd kernel module.
 
 :command:`nbd map` [--device *device-path*] [--read-only] *image-spec* | *snap-spec*
-  Maps the specified image to a block device via the rbd-nbd tool.
+  Map the specified image to a block device via the rbd-nbd tool.
 
 :command:`nbd unmap` *device-path*
-  Unmaps the block device that was mapped via the rbd-nbd tool.
+  Unmap the block device that was mapped via the rbd-nbd tool.
 
 :command:`nbd list`
   Show the list of used nbd devices via the rbd-nbd tool.
@@ -354,11 +354,11 @@ Commands
   Show the status of the image, including which clients have it open.
 
 :command:`feature disable` *image-spec* *feature-name*...
-  Disables the specified feature on the specified image. Multiple features can
+  Disable the specified feature on the specified image. Multiple features can
   be specified.
 
 :command:`feature enable` *image-spec* *feature-name*...
-  Enables the specified feature on the specified image. Multiple features can
+  Enable the specified feature on the specified image. Multiple features can
   be specified.
 
 :command:`lock list` *image-spec*
index f0f52f3cf1b19db1ba094d26257af013da6b1f8b..1d6376b7faf1d7d255a40839a75fc92ef9570348 100644 (file)
@@ -897,7 +897,7 @@ class RBD(object):
 
     def trash_move(self, ioctx, name, delay=0):
         """
-        Moves an RBD image to the trash.
+        Move an RBD image to the trash.
         :param ioctx: determines which RADOS pool the image is in
         :type ioctx: :class:`rados.Ioctx`
         :param name: the name of the image to remove
@@ -919,7 +919,7 @@ class RBD(object):
 
     def trash_remove(self, ioctx, image_id, force=False):
         """
-        Deletes an RBD image from trash. If image deferment time has not
+        Delete an RBD image from trash. If image deferment time has not
         expired :class:`PermissionError` is raised.
         :param ioctx: determines which RADOS pool the image is in
         :type ioctx: :class:`rados.Ioctx`
@@ -984,7 +984,7 @@ class RBD(object):
 
     def trash_list(self, ioctx):
         """
-        Lists all entries from trash.
+        List all entries from trash.
         :param ioctx: determines which RADOS pool the image is in
         :type ioctx: :class:`rados.Ioctx`
         :returns: :class:`TrashIterator`
@@ -993,7 +993,7 @@ class RBD(object):
 
     def trash_restore(self, ioctx, image_id, name):
         """
-        Restores an RBD image from trash.
+        Restore an RBD image from trash.
         :param ioctx: determines which RADOS pool the image is in
         :type ioctx: :class:`rados.Ioctx`
         :param image_id: the id of the image to restore
@@ -1637,7 +1637,7 @@ cdef class Image(object):
 
     def features(self):
         """
-        Gets the features bitmask of the image.
+        Get the features bitmask of the image.
 
         :returns: int - the features bitmask of the image
         """
@@ -1650,7 +1650,7 @@ cdef class Image(object):
 
     def update_features(self, features, enabled):
         """
-        Updates the features bitmask of the image by enabling/disabling
+        Update the features bitmask of the image by enabling/disabling
         a single feature.  The feature must support the ability to be
         dynamically enabled/disabled.
 
@@ -1671,7 +1671,7 @@ cdef class Image(object):
 
     def overlap(self):
         """
-        Gets the number of overlapping bytes between the image and its parent
+        Get the number of overlapping bytes between the image and its parent
         image. If open to a snapshot, returns the overlap between the snapshot
         and the parent image.
 
@@ -1687,7 +1687,7 @@ cdef class Image(object):
 
     def flags(self):
         """
-        Gets the flags bitmask of the image.
+        Get the flags bitmask of the image.
 
         :returns: int - the flags bitmask of the image
         """
@@ -1700,7 +1700,7 @@ cdef class Image(object):
 
     def is_exclusive_lock_owner(self):
         """
-        Gets the status of the image exclusive lock.
+        Get the status of the image exclusive lock.
 
         :returns: bool - true if the image is exclusively locked
         """
@@ -2150,7 +2150,7 @@ written." % (self.name, ret, length))
 
     def stripe_unit(self):
         """
-        Returns the stripe unit used for the image.
+        Return the stripe unit used for the image.
         """
         cdef uint64_t stripe_unit
         with nogil:
@@ -2161,7 +2161,7 @@ written." % (self.name, ret, length))
 
     def stripe_count(self):
         """
-        Returns the stripe count used for the image.
+        Return the stripe count used for the image.
         """
         cdef uint64_t stripe_count
         with nogil:
@@ -2172,7 +2172,7 @@ written." % (self.name, ret, length))
 
     def create_timestamp(self):
         """
-        Returns the create timestamp for the image.
+        Return the create timestamp for the image.
         """
         cdef:
             timespec timestamp
@@ -2193,7 +2193,7 @@ written." % (self.name, ret, length))
 
     def rebuild_object_map(self):
         """
-        Rebuilds the object map for the image HEAD or currently set snapshot
+        Rebuild the object map for the image HEAD or currently set snapshot
         """
         cdef librbd_progress_fn_t prog_cb = &no_op_progress_callback
         with nogil:
index e1d99d82695ec8e929846d4c1e274d390c6b91de..7c38ae6025505964dcf163d31365448033dd5183 100644 (file)
       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                  Deletes all snapshots.
-      snap remove (snap rm)       Deletes a snapshot.
+      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)       Moves an image to the trash.
-      trash remove (trash rm)     Removes an image from trash.
-      trash restore               Restores an image from trash.
+      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.
   
                         [--image-id <image-id>] [--no-progress] 
                         <image-spec> 
   
-  Deletes all snapshots.
+  Delete all snapshots.
   
   Positional arguments
     <image-spec>         image specification
                          [--no-progress] [--image-id <image-id>] [--force] 
                          <snap-spec> 
   
-  Deletes a snapshot.
+  Delete a snapshot.
   
   Positional arguments
     <snap-spec>          snapshot specification
   usage: rbd trash move [--pool <pool>] [--image <image>] [--delay <delay>] 
                         <image-spec> 
   
-  Moves an image to the trash.
+  Move an image to the trash.
   
   Positional arguments
     <image-spec>         image specification
                           [--no-progress] [--force] 
                           <image-id> 
   
-  Removes an image from trash.
+  Remove an image from trash.
   
   Positional arguments
     <image-id>           image id
                            [--image <image>] 
                            <image-id> 
   
-  Restores an image from trash.
+  Restore an image from trash.
   
   Positional arguments
     <image-id>           image id
index 6324e8023914c8faf9235c696add11ef6019325e..2513cebd8210ae6c8553c51e29c1b0c1c45f56ce 100644 (file)
@@ -742,10 +742,10 @@ Shell::Action action_create(
   {"snap", "create"}, {"snap", "add"}, "Create a snapshot.", "",
   &get_create_arguments, &execute_create);
 Shell::Action action_remove(
-  {"snap", "remove"}, {"snap", "rm"}, "Deletes a snapshot.", "",
+  {"snap", "remove"}, {"snap", "rm"}, "Delete a snapshot.", "",
   &get_remove_arguments, &execute_remove);
 Shell::Action action_purge(
-  {"snap", "purge"}, {}, "Deletes all snapshots.", "",
+  {"snap", "purge"}, {}, "Delete all snapshots.", "",
   &get_purge_arguments, &execute_purge);
 Shell::Action action_rollback(
   {"snap", "rollback"}, {"snap", "revert"}, "Rollback image to snapshot.", "",
index 47d4808d0db50754ac61024b15d3eabdd0ede1d9..136ebfacda21eecc0234ff8a01a14196020da002 100644 (file)
@@ -351,11 +351,11 @@ int execute_restore(const po::variables_map &vm) {
 
 
 Shell::Action action_move(
-    {"trash", "move"}, {"trash", "mv"}, "Moves an image to the trash.", "",
+    {"trash", "move"}, {"trash", "mv"}, "Move an image to the trash.", "",
     &get_move_arguments, &execute_move);
 
 Shell::Action action_remove(
-  {"trash", "remove"}, {"trash", "rm"}, "Removes an image from trash.", "",
+  {"trash", "remove"}, {"trash", "rm"}, "Remove an image from trash.", "",
   &get_remove_arguments, &execute_remove);
 
 Shell::SwitchArguments switched_arguments({"long", "l"});
@@ -364,7 +364,7 @@ Shell::Action action_list(
   &get_list_arguments, &execute_list);
 
 Shell::Action action_restore(
-    {"trash", "restore"}, {}, "Restores an image from trash.", "",
+    {"trash", "restore"}, {}, "Restore an image from trash.", "",
     &get_restore_arguments, &execute_restore);
 
 } // namespace trash