diff --git a/h2o-py/h2o/h2o.py b/h2o-py/h2o/h2o.py index 1611e6d908b6..01b7b21a8027 100644 --- a/h2o-py/h2o/h2o.py +++ b/h2o-py/h2o/h2o.py @@ -136,7 +136,7 @@ def connection(): def init(url=None, ip=None, port=None, name=None, https=None, cacert=None, insecure=None, username=None, password=None, cookies=None, proxy=None, start_h2o=True, nthreads=-1, ice_root=None, log_dir=None, log_level=None, max_log_file_size=None, enable_assertions=True, max_mem_size=None, min_mem_size=None, strict_version_check=None, - ignore_config=False, extra_classpath=None, jvm_custom_args=None, bind_to_localhost=True, **kwargs): + ignore_config=False, extra_classpath=None, jvm_custom_args=None, bind_to_localhost=True, verbose = True, **kwargs): """ Attempt to connect to a local server, or if not successful start a new server and connect to it. @@ -179,6 +179,7 @@ def init(url=None, ip=None, port=None, name=None, https=None, cacert=None, insec :param kwargs: (all other deprecated attributes) :param jvm_custom_args: Customer, user-defined argument's for the JVM H2O is instantiated in. Ignored if there is an instance of H2O already running and the client connects to it. :param bind_to_localhost: A flag indicating whether access to the H2O instance should be restricted to the local machine (default) or if it can be reached from other computers on the network. + :param verbose: Set to False to disable printing connection status and info messages. :examples: @@ -267,7 +268,7 @@ def get_mem_size(mmint, mmgb): try: h2oconn = H2OConnection.open(url=url, ip=ip, port=port, name=name, https=https, verify_ssl_certificates=verify_ssl_certificates, cacert=cacert, - auth=auth, proxy=proxy, cookies=cookies, verbose=True, + auth=auth, proxy=proxy, cookies=cookies, verbose=verbose, msgs=("Checking whether there is an H2O instance running at {url}", "connected.", "not found."), strict_version_check=svc) @@ -286,13 +287,13 @@ def get_mem_size(mmint, mmgb): min_mem_size=mmin, ice_root=ice_root, log_dir=log_dir, log_level=log_level, max_log_file_size=max_log_file_size, port=port, name=name, extra_classpath=extra_classpath, jvm_custom_args=jvm_custom_args, - bind_to_localhost=bind_to_localhost) + bind_to_localhost=bind_to_localhost,verbose=verbose) h2oconn = H2OConnection.open(server=hs, https=https, verify_ssl_certificates=verify_ssl_certificates, - cacert=cacert, auth=auth, proxy=proxy, cookies=cookies, verbose=True, + cacert=cacert, auth=auth, proxy=proxy, cookies=cookies, verbose=verbose, strict_version_check=svc) h2oconn.cluster.timezone = "UTC" - h2oconn.cluster.show_status() - + if verbose: + h2oconn.cluster.show_status() def resume(recovery_dir=None): """