Skip to content
Snippets Groups Projects
Commit c39f329c authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Modify the service arg to show more robust help/usage msg.

With this change the argument only allows one of the 3 choices
It also takes a default value in case the arg is not given
parent b5acba3b
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!119Feat account management
......@@ -12,7 +12,7 @@ import rabbit_config as rcfg
parser = argparse.ArgumentParser(description = "Account management driver script")
parser.add_argument("username", help="Username that should be locked/unlocked")
parser.add_argument("state", help="Choose from states (ok,block,certify) to put the user in")
parser.add_argument("service", nargs='*', help="List one or more services to be blocked")
parser.add_argument("-s", "--service", nargs='+', default='all', choices=['ssh', 'newjobs', 'all'], help="List one or more services to be blocked (default: %(default)s)")
parser.add_argument(
"-a", "--all", help="Block all services")
parser.add_argument(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment