I want to implement parameters, options, and flags for the service when starting it e.g. specify the path to the config with -c path/to/config.ini or the server list with -s server1 server1 ....
To achieve this I want to implement this through the python argparse lib.
Parameters and flags to implement:
[ ] -c or --config to specify the path to a config file
[ ] -t to validate the config file
[ ] -s or --server list of servers
[ ] -i or --interval to set the measure interval
[ ] --type type of the database been used
[ ] --dbhost DNS name or IP of the database
[ ] --dbuser db username
[ ] --dbpassword db password of the specified (--dbuser and --dbhost are required)
I want to implement parameters, options, and flags for the service when starting it e.g. specify the path to the config with
-c path/to/config.ini
or the server list with-s server1 server1 ...
.To achieve this I want to implement this through the python argparse lib.
Parameters and flags to implement:
-c
or--config
to specify the path to a config file-t
to validate the config file-s
or--server
list of servers-i
or--interval
to set the measure interval--type
type of the database been used--dbhost
DNS name or IP of the database--dbuser
db username--dbpassword
db password of the specified (--dbuser
and--dbhost
are required)-v
or--verbose
for debug output