@mod.route('/api/v1/containers/', methods=['PUT'])
@api_auth()
def add_container():
    data = request.get_json(force=True)
    if data is None:
        return jsonify(status="error", error="Bad request"), 400

    if (not(('template' in data) or ('clone' in data)) or (data not in 'name')):
        return jsonify(status="error", error="Bad request"), 402

    if 'template' in data:
        # we want a new container
        if 'store' not in data:
            data['store'] = ""
        if 'xargs' not in data:
            data['xargs'] = ""

        try:
            lxc.create(data['name'], data['template'], data['store'], data['xargs'])
        except lxc.ContainerAlreadyExists:
            return jsonify(status="error", error="Container yet exists"), 409
    else:
        # we want to clone a container
        try:
            lxc.clone(data['clone'], data['name'])
        except lxc.ContainerAlreadyExists:
            return jsonify(status="error", error="Container yet exists"), 409
    return jsonify(status="ok"), 200
dataset/ETHPy150Open claudyus/LXC-Web-Panel/lwp/views/api.py/add_container/swapped operands of `not in`