summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Wright <joel.wright@sohonet.com>2017-02-23 11:00:09 +0000
committerJoel Wright <joel.wright@sohonet.com>2017-02-23 11:09:14 +0000
commit91de5e8a385178b58cfeeb702c005ec2f2c5068a (patch)
tree2e6afb706eb28019523270219a4567c3e16f4977
parent307d4c007afaccdcd70628d9fce44231115d62cd (diff)
downloadpython-swiftclient-91de5e8a385178b58cfeeb702c005ec2f2c5068a.tar.gz
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
-rwxr-xr-xswiftclient/shell.py4
1 files changed, 3 insertions, 1 deletions
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 <threads>]
[--container-threads <threads>]
[--header <header:value>]
+ [--prefix <prefix>]
[<container> [<object>] [...]]
'''
@@ -82,6 +83,7 @@ Optional arguments:
--container-threads <threads>
Number of threads to use for deleting containers.
Default is 10.
+ --prefix <prefix> Only delete objects beginning with <prefix>.
'''.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 <prefix>.')
+ help='Only delete items beginning with <prefix>.')
parser.add_argument(
'-H', '--header', action='append', dest='header',
default=[],