Improve handling of init
This commit is contained in:
parent
c63b5a8056
commit
93d2e0da6f
|
@ -1499,12 +1499,18 @@ def init_cluster():
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
@click.command(name='init', short_help='Initialize a new cluster.')
|
@click.command(name='init', short_help='Initialize a new cluster.')
|
||||||
def init_cluster():
|
@click.option(
|
||||||
|
'--yes', 'yes',
|
||||||
|
is_flag=True, default_value=False,
|
||||||
|
help='Pre-confirm the initialization.'
|
||||||
|
)
|
||||||
|
def init_cluster(yes):
|
||||||
"""
|
"""
|
||||||
Perform initialization of a new PVC cluster.
|
Perform initialization of a new PVC cluster.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
click.echo('DANGER: This will remove any existing cluster on these coordinators and create a new cluster. Any existing resources on the old cluster will be left abandoned.'.format(name))
|
if not yes:
|
||||||
|
click.echo('DANGER: This will remove any existing cluster on these coordinators and create a new cluster. Any existing resources on the old cluster will be left abandoned.')
|
||||||
choice = input('Are you sure you want to do this? (y/N) ')
|
choice = input('Are you sure you want to do this? (y/N) ')
|
||||||
if choice == 'y' or choice == 'Y':
|
if choice == 'y' or choice == 'Y':
|
||||||
import pvc_init
|
import pvc_init
|
||||||
|
|
Loading…
Reference in New Issue