Argument parsing util
Common args used for the scripts.
- connection_parser(description)
Return an argument parser with support for host, port and timeout arguments.
The address is specified by either
the PASD_ADDRESS environment variable; for example
> PASD_ADDRESS=127.0.0.1:5000 > get-fncc-fw-version 953
command line arguments for host (-H / –host) and port (-P / –port); for example:
> get-fncc-fw-version --host 127.0.0.1 --port 5000 953
If both are provided, the latter takes precedence.
- Parameters:
description (
str) – the description of what the script does.- Return type:
- Returns:
an argparse ArgumentParser with host, port and timeout arguments already set up.