Skip to content
Snippets Groups Projects
Commit 1a4db32a authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Add argparse

parent 0524864c
No related branches found
No related tags found
6 merge requests!147Merge previous default branch feat-cod-rmq into main,!85kill nginx process running under user from login node,!51Fix acct create wait,!39WIP:Feat cod rmq,!38WIP: Feat cod rmq,!21Feat git commit agent
......@@ -2,6 +2,7 @@
import sh
import sys
import json
import argparse
from rc_rmq import RCRMQ
task = 'git_commit'
......@@ -13,6 +14,12 @@ repo_location = '~/git/rc-users'
cheaha_ldif = repo_location + '/users/cheaha-openldap.ldif'
cheaha_ldapsearch_ldif = repo_location + '/users/cheaha-openldap-ldapsearch.ldif'
# Parse arguments
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--verbose', action='store_true', help='verbose output')
parser.add_argument('-n', '--dry-run', action='store_true', help='enable dry run mode')
args = parser.parse_args()
git = sh.git.bake(repo_location)
slapcat = sh.Command('/cm/local/apps/openldap/sbin/slapcat')
ldapsearch = sh.Command('ldapsearch')
......
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