def cluster_stop(r): """Stop a cluster which should be in running status currently. :param r: :return: """ cluster_id = request_get(r, "cluster_id") if not cluster_id: logger.warning("No cluster_id is given") return make_fail_resp("No cluster_id is given") if cluster_handler.stop(cluster_id): return make_ok_resp() return make_fail_resp("cluster stop failed")
def cluster_stop(r): """Stop a cluster which should be in running status currently. :param r: :return: """ cluster_id = request_get(r, "cluster_id") if not cluster_id: logger.warning("No cluster_id is given") return make_fail_response("No cluster_id is given") if cluster_handler.stop(cluster_id): return make_ok_response() return make_fail_response("cluster stop failed")