try:
parser = argparse.ArgumentParser(description='Note: -un is not mandatory',
usage='use "python %(prog)s -h" for help\nNote: *** Astericks represent mandatory fields',
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('-re',
'--regard',
required=True,
# choices=['Prod', 'Dev', 'Test'],
type=str,
help='* Rancher Environment Pass')
parser.add_argument('-g',
'--group_names',
# required=False,
type=str,
help='* Group Name(s) - Specify the group names using comma separated values (no spaces permitted) - ex: group1, group2, group3')
parser.add_argument('-un',
'--user_names',
type=str,
help='Username(s) - Specify the group names using comma separated values (no spaces permitted) - ex: user1, user2, user3')
args = parser.parse_args()
sys.exit()
except:
parser = argparse.ArgumentParser(description='Note: -un is not mandatory',
usage='use "python %(prog)s -h" for help\nNote: *** Astericks represent mandatory fields',
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('-u',
'--env',
required=True,
choices=['Prod', 'Dev', 'Test'],
help='* Rancher Environment --> Prod/Dev/Test')
parser.add_argument('-b',
'--business_unit',
required=True,
type=str,
help='* The Business Unit you choose to use --> "PFE Business Unit, ex: FBO, R&D, PGS, PCH"')
parser.add_argument('-p',
'--project_name',
required=True,
type=str,
help='* The Project Name you choose to use --> Project Name')
parser.add_argument('-e',
'--app_environment_name',
required=True,
type=str,
help='* The Application Environment Name you choose to use --> Application Environment, ex Prod, Dev, DR, Test, Staging')
parser.add_argument('-g',
'--group_names',
required=True,
type=str,
help='* Group Name(s) - Specify the group names using comma separated values (no spaces permitted) - ex: group1, group2, group3')
parser.add_argument('-un',
'--user_names',
type=str,
help='Username(s) - Specify the group names using comma separated values (no spaces permitted) - ex: user1, user2, user3')
parser.add_argument('-s',
'--app_sc_id',
required=True,
type=str,
help='* Please specify App_SC_ID')
parser.add_argument('-d',
'--description',
required=True,
type=str,
help='* Please specify a brief description in quotes - ex: "My Brief Description"')
args = parser.parse_args()
# # re_pass()
if args.regard:
pass
#program goes here
##################
sys.exit()
else:
re_pass()