def get_package_file(name, version, username, channel, package_id, the_path, auth_user, revision, p_revision): pref = get_package_ref(name, version, username, channel, package_id, revision, p_revision) file_generator = conan_service.get_package_file( pref, the_path, auth_user) return file_generator
def upload_package_file(name, version, username, channel, package_id, the_path, auth_user, revision, p_revision): if "X-Checksum-Deploy" in request.headers: raise NotFoundException("Non checksum storage") pref = get_package_ref(name, version, username, channel, package_id, revision, p_revision) conan_service.upload_package_file(request.body, request.headers, pref, the_path, auth_user)
def get_package_revisions(name, version, username, channel, package_id, auth_user, revision): """ Get a JSON with the revisions for a specified RREV """ package_reference = get_package_ref(name, version, username, channel, package_id, revision, p_revision=None) conan_service = ConanServiceV2(app.authorizer, app.server_store) revs = conan_service.get_package_revisions(package_reference, auth_user) return _format_revs_return(revs)
def get_latest_package_revision(name, version, username, channel, package_id, auth_user, revision): """ Gets a JSON with the revisions for the specified recipe """ package_reference = get_package_ref(name, version, username, channel, package_id, revision, p_revision=None) conan_service = ConanServiceV2(app.authorizer, app.server_store) rev = conan_service.get_latest_package_revision( package_reference, auth_user) return _format_rev_return(rev)
def remove_package(name, version, username, channel, package_id, auth_user, revision=None, p_revision=None): """ - If both RRev and PRev are specified, it will remove the specific package revision of the specific recipe revision. - If PRev is NOT specified but RRev is specified (package_recipe_revision_url) it will remove all the package revisions """ pref = get_package_ref(name, version, username, channel, package_id, revision, p_revision) conan_service = ConanService(app.authorizer, app.server_store, auth_user) conan_service.remove_package(pref)
def get_package_file_list(name, version, username, channel, package_id, auth_user, revision, p_revision): pref = get_package_ref(name, version, username, channel, package_id, revision, p_revision) ret = conan_service.get_package_file_list(pref, auth_user) return ret