From 91de5e8a385178b58cfeeb702c005ec2f2c5068a Mon Sep 17 00:00:00 2001 From: Joel Wright Date: Thu, 23 Feb 2017 11:00:09 +0000 Subject: [PATCH] Expose --prefix as an option for st_delete The SwiftService and shell support the ability to limit deletions to only those objects that match a specified prefix, so let's expose that (really useful) behaviour in the command line help as well :) Change-Id: I9ef177aa96e4829196b5200dd8e9d0d2f7f89b63 --- swiftclient/shell.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swiftclient/shell.py b/swiftclient/shell.py index 6956a15..ceca592 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -59,6 +59,7 @@ st_delete_options = '''[--all] [--leave-segments] [--object-threads ] [--container-threads ] [--header ] + [--prefix ] [ [] [...]] ''' @@ -82,6 +83,7 @@ Optional arguments: --container-threads Number of threads to use for deleting containers. Default is 10. + --prefix Only delete objects beginning with . '''.strip("\n") @@ -91,7 +93,7 @@ def st_delete(parser, args, output_manager): default=False, help='Delete all containers and objects.') parser.add_argument( '-p', '--prefix', dest='prefix', - help='Only delete items beginning with the .') + help='Only delete items beginning with .') parser.add_argument( '-H', '--header', action='append', dest='header', default=[],