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

Use hold in place of blocked for state.

parent e4f66eed
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!130Use hold in place of blocked for state.
...@@ -14,7 +14,7 @@ parser = argparse.ArgumentParser(description = "Account management driver script ...@@ -14,7 +14,7 @@ parser = argparse.ArgumentParser(description = "Account management driver script
parser.add_argument( parser.add_argument(
"username", help="Username that should be locked/unlocked") "username", help="Username that should be locked/unlocked")
parser.add_argument( parser.add_argument(
"state", choices=['ok', 'blocked', 'certification'], help="Choose from states (ok,blocked,certification)") "state", choices=['ok', 'hold', 'certification'], help="Choose from states (ok,hold,certification)")
parser.add_argument( parser.add_argument(
"-s", "--service", nargs='+', default='all', choices=['ssh', 'newjobs', 'expiration', 'all'], help="List one or more services to be blocked (default: %(default)s)") "-s", "--service", nargs='+', default='all', choices=['ssh', 'newjobs', 'expiration', 'all'], help="List one or more services to be blocked (default: %(default)s)")
parser.add_argument( parser.add_argument(
......
...@@ -31,7 +31,7 @@ def manage_acct(ch, method, properties, body): ...@@ -31,7 +31,7 @@ def manage_acct(ch, method, properties, body):
current = tracking[username] = {} current = tracking[username] = {}
if op == 'request': if op == 'request':
if state == 'blocked' or state == 'certification': if state == 'hold' or state == 'certification':
msg["action"] = "lock" msg["action"] = "lock"
elif state == 'ok': elif state == 'ok':
msg["action"] = "unlock" msg["action"] = "unlock"
......
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