Add default value for verbose and fix the type in main parameters
This commit is contained in:
parent
ba687b0e32
commit
e18ce97d66
|
@ -109,6 +109,7 @@ def configure(ctx: click.Context, param: str, filename: str) -> None:
|
||||||
"--verbose",
|
"--verbose",
|
||||||
"verbose",
|
"verbose",
|
||||||
count=True,
|
count=True,
|
||||||
|
default=0,
|
||||||
help="Increase verbosity -v (info)/-vv (warning)/-vvv (debug)",
|
help="Increase verbosity -v (info)/-vv (warning)/-vvv (debug)",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
|
@ -129,12 +130,11 @@ def main(
|
||||||
cert_file: str,
|
cert_file: str,
|
||||||
key_file: str,
|
key_file: str,
|
||||||
ca_file: str,
|
ca_file: str,
|
||||||
verbose: bool,
|
verbose: int,
|
||||||
timeout: int,
|
timeout: int,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Nagios plugin for patroni."""
|
"""Nagios plugin for patroni."""
|
||||||
ctx.obj = ConnectionInfo(endpoints, cert_file, key_file, ca_file)
|
ctx.obj = ConnectionInfo(endpoints, cert_file, key_file, ca_file)
|
||||||
|
|
||||||
# FIXME Not all "is/has" services have the same return code for ok. Check if it's ok
|
# FIXME Not all "is/has" services have the same return code for ok. Check if it's ok
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue