Fix issues with wait on node flush/ready
Ensure that the strings are converted to booleans on the API side, and that we're sending a lowercase true/false (for consistency).
This commit is contained in:
parent
0892e4c842
commit
27e73fc6a9
|
@ -710,9 +710,9 @@ class API_Node_DomainState(Resource):
|
|||
id: Message
|
||||
"""
|
||||
if reqargs['state'] == 'flush':
|
||||
return api_helper.node_flush(node, reqargs.get('wait', False))
|
||||
return api_helper.node_flush(node, strtobool(reqargs.get('wait', 'false')))
|
||||
if reqargs['state'] == 'ready':
|
||||
return api_helper.node_ready(node, reqargs.get('wait', False))
|
||||
return api_helper.node_ready(node, strtobool(reqargs.get('wait', 'false')))
|
||||
abort(400)
|
||||
api.add_resource(API_Node_DomainState, '/node/<node>/domain-state')
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ def node_domain_state(config, node, action, wait):
|
|||
"""
|
||||
params={
|
||||
'state': action,
|
||||
'wait': wait
|
||||
'wait': str(wait).lower()
|
||||
}
|
||||
response = call_api(config, 'post', '/node/{node}/domain-state'.format(node=node), params=params)
|
||||
|
||||
|
|
Loading…
Reference in New Issue