def get_arg_parser():
"""Create the parser for the command-line args."""
parser = configargparse.getArgumentParser()
parser.add_argument("--longhelp",
help="Print out configuration details",
action="store_true")
parser.add_argument("--marathon", "-m",
nargs="+",
env_var='MARATHON_URL',
help="[required] Marathon endpoint, eg. -m " +
"http://marathon1:8080 http://marathon2:8080")
parser.add_argument("--hostname",
env_var='F5_CC_BIGIP_HOSTNAME',
help="F5 BIG-IP hostname")
parser.add_argument("--username",
env_var='F5_CC_BIGIP_USERNAME',
help="F5 BIG-IP username")
parser.add_argument("--password",
env_var='F5_CC_BIGIP_PASSWORD',
help="F5 BIG-IP password")
parser.add_argument("--partition",
env_var='F5_CC_PARTITIONS',
help="[required] Only generate config for apps which"
" match the specified partition."
" Can use this arg multiple times to"
" specify multiple partitions",
action="append",
default=list())
parser.add_argument("--health-check", "-H",
env_var='F5_CC_USE_HEALTHCHECK',
help="If set, respect Marathon's health check "
"statuses before adding the app instance into "
"the backend pool.",
action="store_true")
parser.add_argument("--marathon-ca-cert",
env_var='F5_CC_MARATHON_CA_CERT',
help="CA certificate for Marathon HTTPS connections")
parser.add_argument('--sse-timeout', "-t", type=int,
env_var='F5_CC_SSE_TIMEOUT',
default=30, help='Marathon event stream timeout')
parser.add_argument('--verify-interval', "-v", type=int,
env_var='F5_CC_VERIFY_INTERVAL',
default=30, help="Interval at which to verify "
"the BIG-IP configuration.")
parser.add_argument("--version",
help="Print out version information and exit",
action="store_true")
parser = set_logging_args(parser)
parser = set_marathon_auth_args(parser)
return parser
marathon-bigip-ctlr.py 文件源码
python
阅读 36
收藏 0
点赞 0
评论 0
评论列表
文章目录