Skip to content
Snippets Groups Projects
Commit 1769b818 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Add workflow for pre_certification state for a user

parent ba9cc23e
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!133Add workflow for pre_certification state for a user
......@@ -14,7 +14,7 @@ parser = argparse.ArgumentParser(description = "Account management driver script
parser.add_argument(
"username", help="Username that should be locked/unlocked")
parser.add_argument(
"state", choices=['ok', 'hold', 'certification'], help="Choose from states (ok,hold,certification)")
"state", choices=['ok', 'hold', 'certification', 'pre_certification'], help="Choose from states (ok,hold,certification,pre_certification)")
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)")
parser.add_argument(
......
......@@ -34,7 +34,7 @@ def manage_acct(ch, method, properties, body):
if op == 'request':
if state == 'hold' or state == 'certification':
msg["action"] = "lock"
elif state == 'ok':
elif state == 'ok' or state == 'pre_certification':
msg["action"] = "unlock"
else:
print("Invalid state provided. Check the help menu.")
......
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