From 1769b81895a58fbfb892172a59912074b01fab95 Mon Sep 17 00:00:00 2001 From: Ravi Tripathi <ravi89@uab.edu> Date: Thu, 2 Jun 2022 22:56:46 -0500 Subject: [PATCH] Add workflow for pre_certification state for a user --- account_manager.py | 2 +- prod_rmq_agents/acct_mgmt_workflow.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account_manager.py b/account_manager.py index a4b7017..109a516 100755 --- a/account_manager.py +++ b/account_manager.py @@ -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( diff --git a/prod_rmq_agents/acct_mgmt_workflow.py b/prod_rmq_agents/acct_mgmt_workflow.py index 6d0f6c8..9463aa9 100755 --- a/prod_rmq_agents/acct_mgmt_workflow.py +++ b/prod_rmq_agents/acct_mgmt_workflow.py @@ -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.") -- GitLab