Exemple #1
0
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    try:
        docker_interface.file_rm(session['user_container_name'], path, True)
        return get_pkg_tree()
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete file. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")
Exemple #2
0
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    try:
        docker_interface.file_rm(session['user_container_name'], path, True)
        return get_pkg_tree()
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete file. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")
Exemple #3
0
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None: pkgName = session['pkg']

    try:
        docker_interface.file_rm(session['user_container_name'], pkgName, True)
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete package. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")

    return jsonify(success=1)
Exemple #4
0
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None: pkgName = session['pkg']
    
    try:
        docker_interface.file_rm(session['user_container_name'], pkgName, True)
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete package. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")
    
    return jsonify(success=1)
Exemple #5
0
def delete_pkg(package_name=None):
    pkg_name = _check_pkg_name_and_if_none_get_pkg_name_from_session(
        package_name)

    try:
        docker_interface.file_rm(session['user_container_name'], pkg_name,
                                 True)
    except Exception:  # catch *all* exceptions
        _log_unable_to_delete_pkg_error()
        raise PackageError("An internal error occurred.")

    return jsonify(success=1)
Exemple #6
0
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None:
        pkgName = session['pkg']
    docker_interface.file_rm(session['user_container_name'], pkgName, True)
    return jsonify(result=None)
Exemple #7
0
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    docker_interface.file_rm(session['user_container_name'], path, True)
    
    return get_pkg_tree()
Exemple #8
0
def _remove_file_from_user_container(path):
    docker_interface.file_rm(session['user_container_name'], path, True)
Exemple #9
0
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None:
        pkgName = session['pkg']
    docker_interface.file_rm(session['user_container_name'], pkgName, True)
    return jsonify(result=None)
Exemple #10
0
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    docker_interface.file_rm(session['user_container_name'], path, True)

    return get_pkg_tree()