Example #1
0
def host_unbind_get():
    host_id = request.args.get('host_id', '').strip()
    if not host_id:
        return jsonify(msg='host_id is blank')

    group_id = request.args.get('group_id', '').strip()
    if not group_id:
        return jsonify(msg='group_id is blank')

    GroupHost.unbind(int(group_id), host_id)
    return jsonify(msg='')
Example #2
0
def host_remove_post():
    group_id = int(request.form['grp_id'].strip())
    host_ids = request.form['host_ids'].strip()
    GroupHost.unbind(group_id, host_ids)
    return jsonify(msg='')