Add quiet option to CLI

Closes #99
This commit is contained in:
Joshua Boniface 2020-06-25 11:09:55 -04:00
parent 15e986c158
commit d74f68c904
1 changed files with 16 additions and 11 deletions

View File

@ -3492,7 +3492,11 @@ def init_cluster(confirm_flag):
'-v', '--debug', '_debug', envvar='PVC_DEBUG', is_flag=True, default=False, '-v', '--debug', '_debug', envvar='PVC_DEBUG', is_flag=True, default=False,
help='Additional debug details.' help='Additional debug details.'
) )
def cli(_cluster, _debug): @click.option(
'-q', '--quiet', '_quiet', envvar='PVC_QUIET', is_flag=True, default=False,
help='Suppress cluster connection information.'
)
def cli(_cluster, _debug, _quiet):
""" """
Parallel Virtual Cluster CLI management tool Parallel Virtual Cluster CLI management tool
@ -3510,6 +3514,7 @@ def cli(_cluster, _debug):
if not config.get('badcfg', None): if not config.get('badcfg', None):
config['debug'] = _debug config['debug'] = _debug
if not _quiet:
click.echo( click.echo(
'Using cluster "{}" - Host: "{}" Scheme: "{}" Prefix: "{}"'.format( 'Using cluster "{}" - Host: "{}" Scheme: "{}" Prefix: "{}"'.format(
config['cluster'], config['cluster'],