Skip to content

Commit

Permalink
[GH-7079] Added verbose param to h2o.init() and guarded h2o.conn.show…
Browse files Browse the repository at this point in the history
…_status() in h20.py #7079 [nocheck] (#15653)

* [GH-15687] Extract string comparators from Duke library (#15692)

* [GH-15680] Adding installation disclaimer in documentation (#15681)

* ht/adding disclaimer in docs

* ht/added flow & download page

* ht/updated download page

* ht/added security documentation section

* ht/user guide updates

* ht/uniformity

* ht/added additional note to welcome page

* callouts

* ht/banner color switch

* ht/rename callout

---------

Co-authored-by: Jeff Fohl <[email protected]>

* GH-15672: Tomas Fryda suggested instead of changing every test, the change should be made in standalone test.  He provides the code and I just copied and pasted. (#15675)

* Added verbose paramerter to init() in h2o.py also guarded h2oconn.cluster.show_status()

* changes verbose param position before ** kwargs

* final commit

* removed space, and made it in rel-3.42.0

* added space

---------

Co-authored-by: Marek Novotný <[email protected]>
Co-authored-by: Hannah <[email protected]>
Co-authored-by: Jeff Fohl <[email protected]>
Co-authored-by: wendycwong <[email protected]>
  • Loading branch information
5 people authored Oct 10, 2023
1 parent 75c20c3 commit 5406765
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions h2o-py/h2o/h2o.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -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):
"""
Expand Down

0 comments on commit 5406765

Please sign in to comment.