Skip to content

Commit

Permalink
change '--verify-ssl-certs' option for chadmin
Browse files Browse the repository at this point in the history
  • Loading branch information
ianton-ru committed Dec 25, 2023
1 parent a10c227 commit 00073d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions ch_tools/chadmin/cli/zookeeper_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
@option("--host", help="ZooKeeper host.", type=str)
@option("--secure", help="Use secure connection.", default=False, is_flag=True)
@option(
"--no-verify-ssl-certs",
help="Do not check SSL Certificates in secure connection.",
default=False,
is_flag=True,
"--verify-ssl-certs/--no-verify-ssl-certs",
help="Check or not SSL Certificates in secure connection.",
default=True,
)
@option("--timeout", help="ZooKeeper timeout.", default=10)
@option(
Expand Down Expand Up @@ -62,7 +61,7 @@ def zookeeper_group(
ctx,
host,
secure,
no_verify_ssl_certs,
verify_ssl_certs,
port,
timeout,
zkcli_identity,
Expand All @@ -81,7 +80,7 @@ def zookeeper_group(
"port": port,
"host": host,
"use_ssl": secure,
"no_verify_ssl_certs": no_verify_ssl_certs,
"verify_ssl_certs": verify_ssl_certs,
"timeout": timeout,
"zkcli_identity": zkcli_identity,
"no_chroot": no_chroot,
Expand Down
4 changes: 2 additions & 2 deletions ch_tools/chadmin/internal/zookeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def _get_zk_client(ctx):
host = args.get("host")
port = args.get("port", 2181)
use_ssl = args.get("use_ssl", False)
no_verify_ssl_certs = args.get("no_verify_ssl_certs", False)
verify_ssl_certs = args.get("verify_ssl_certs", True)
timeout = args.get("timeout", 10)
zkcli_identity = args.get("zkcli_identity")
no_chroot = args.get("no_chroot", False)
Expand Down Expand Up @@ -341,5 +341,5 @@ def _get_zk_client(ctx):
timeout=timeout,
logger=logging.getLogger(),
use_ssl=use_ssl,
verify_certs=not no_verify_ssl_certs,
verify_certs=verify_ssl_certs,
)

0 comments on commit 00073d9

Please sign in to comment.