path: root/gluster/swift/common/middleware/gswauth/bin/gswauth-delete-user
diff options
authorThiago da Silva <>2013-12-20 13:23:35 -0500
committerLuis Pabon <>2014-01-08 04:11:20 -0800
commita2381549c729cd3aa26a23e16afdbb52b9e49d7e (patch)
tree0973ae7df76ffe51dd53157bf52a78babd49b805 /gluster/swift/common/middleware/gswauth/bin/gswauth-delete-user
parentc3c46d6188015cd5f75e7a6f754fd032ab30ac21 (diff)
fixed gswauth cmd tools to require admin key argument
All tools were changed to display the usage help text in case the admin key is not provided as an argument Bug 1261677: Change-Id: I37fa8518be970364b81955644931f6e416bcdc42 Signed-off-by: Thiago da Silva <> Reviewed-on: Reviewed-by: Prashanth Pai <> Tested-by: Prashanth Pai <> Reviewed-by: pushpesh sharma <> Tested-by: pushpesh sharma <> Reviewed-by: Luis Pabon <> Reviewed-on: Tested-by: Luis Pabon <>
Diffstat (limited to 'gluster/swift/common/middleware/gswauth/bin/gswauth-delete-user')
1 files changed, 6 insertions, 2 deletions
diff --git a/gluster/swift/common/middleware/gswauth/bin/gswauth-delete-user b/gluster/swift/common/middleware/gswauth/bin/gswauth-delete-user
index 2b4f4fe..f778603 100755
--- a/gluster/swift/common/middleware/gswauth/bin/gswauth-delete-user
+++ b/gluster/swift/common/middleware/gswauth/bin/gswauth-delete-user
@@ -30,16 +30,20 @@ if __name__ == '__main__':
default='', help='The URL to the auth '
'subsystem (default:')
parser.add_option('-U', '--admin-user', dest='admin_user',
- default='.super_admin', help='The user with admin rights to add users '
+ default='.super_admin',
+ help='The user with admin rights to delete users '
'(default: .super_admin).')
parser.add_option('-K', '--admin-key', dest='admin_key',
- help='The key for the user with admin rights to add users.')
+ help='The key for the user with admin rights to delete '
+ 'users is required.')
args = argv[1:]
if not args:
(options, args) = parser.parse_args(args)
if len(args) != 2:
+ if options.admin_key is None:
+ parser.parse_args(['-h'])
account, user = args
parsed = urlparse(options.admin_url)
if parsed.scheme not in ('http', 'https'):