Revert "Implement wait for node coordinator transition"

This reverts commit 0aefafa7f7.

This does not work since the API goes away during the transition.

References #72
This commit is contained in:
2020-02-19 10:50:21 -05:00
parent 0aefafa7f7
commit 8678dedfea
5 changed files with 15 additions and 48 deletions

View File

@ -26,7 +26,7 @@ from cli_lib.common import call_api
#
# Primary functions
#
def node_coordinator_state(config, node, action, wait):
def node_coordinator_state(config, node, action):
"""
Set node coordinator state state (primary/secondary)
@ -35,8 +35,7 @@ def node_coordinator_state(config, node, action, wait):
API schema: {"message": "{data}"}
"""
params={
'state': action,
'wait': str(wait).lower()
'state': action
}
response = call_api(config, 'post', '/node/{node}/coordinator-state'.format(node=node), params=params)

View File

@ -348,11 +348,7 @@ def cli_node():
@click.argument(
'node'
)
@click.option(
'-w', '--wait', 'wait', is_flag=True, default=False,
help='Wait for transition to complete before returning.'
)
def node_secondary(node, wait):
def node_secondary(node):
"""
Take NODE out of primary router mode.
"""
@ -364,7 +360,7 @@ def node_secondary(node, wait):
click.echo(" node returns to primary state.")
click.echo()
retcode, retmsg = pvc_node.node_coordinator_state(config, node, 'secondary', wait)
retcode, retmsg = pvc_node.node_coordinator_state(config, node, 'secondary')
cleanup(retcode, retmsg)
###############################################################################
@ -374,11 +370,7 @@ def node_secondary(node, wait):
@click.argument(
'node'
)
@click.option(
'-w', '--wait', 'wait', is_flag=True, default=False,
help='Wait for transition to complete before returning.'
)
def node_primary(node, wait):
def node_primary(node):
"""
Put NODE into primary router mode.
"""
@ -390,7 +382,7 @@ def node_primary(node, wait):
click.echo(" node returns to primary state.")
click.echo()
retcode, retmsg = pvc_node.node_coordinator_state(config, node, 'primary', wait)
retcode, retmsg = pvc_node.node_coordinator_state(config, node, 'primary')
cleanup(retcode, retmsg)
###############################################################################