Package entropy :: Package server :: Package interfaces :: Module mirrors :: Class Server

Class Server

source code

Instance Methods
 
__init__(self, ServerInstance, repo=None) source code
set
get_remote_branches(self, repo=None)
Returns a list of remotely available branches for the provided repository identifier.
source code
 
read_remote_file_in_branches(self, filename, repo=None, excluded_branches=None)
Reads a file remotely located in all the available branches.
source code
 
lock_mirrors(self, lock=True, mirrors=None, repo=None) source code
 
lock_mirrors_for_download(self, lock=True, mirrors=None, repo=None) source code
 
do_mirror_lock(self, uri, ftp_connection=None, dblock=True, repo=None) source code
 
do_mirror_unlock(self, uri, ftp_connection, dblock=True, repo=None) source code
 
get_database_lockfile(self, repo=None) source code
 
get_database_download_lockfile(self, repo=None) source code
 
create_local_database_download_lockfile(self, repo=None) source code
 
create_local_database_lockfile(self, repo=None) source code
 
remove_local_database_lockfile(self, repo=None) source code
 
remove_local_database_download_lockfile(self, repo=None) source code
 
download_package(self, uri, pkg_relative_path, repo=None) source code
 
get_remote_databases_status(self, repo=None, mirrors=None) source code
 
is_local_database_locked(self, repo=None) source code
 
get_mirrors_lock(self, repo=None) source code
 
download_notice_board(self, repo=None) source code
 
upload_notice_board(self, repo=None) source code
 
update_notice_board(self, title, notice_text, link=None, repo=None) source code
 
read_notice_board(self, do_download=True, repo=None) source code
 
remove_from_notice_board(self, identifier, repo=None) source code
 
update_rss_feed(self, repo=None) source code
 
dump_database_to_file(self, db_path, destination_path, opener, exclude_tables=None, repo=None) source code
 
create_file_checksum(self, file_path, checksum_path) source code
 
compress_file(self, file_path, destination_path, opener) source code
 
get_files_to_sync(self, cmethod, download=False, repo=None, disabled_eapis=None) source code
 
create_mirror_directories(self, ftp_connection, path_to_create) source code
 
mirror_lock_check(self, uri, repo=None) source code
 
shrink_database_and_close(self, repo=None) source code
 
update_repository_timestamp(self, repo=None) source code
 
sync_database_treeupdates(self, repo=None) source code
 
upload_database(self, uris, lock_check=False, pretend=False, repo=None) source code
 
download_database(self, uris, lock_check=False, pretend=False, repo=None) source code
 
calculate_database_sync_queues(self, repo=None) source code
 
sync_databases(self, no_upload=False, unlock_mirrors=False, repo=None) source code
 
calculate_local_upload_files(self, branch, repo=None) source code
 
calculate_local_package_files(self, branch, repo=None) source code
 
calculate_remote_package_files(self, uri, branch, ftp_connection=None, repo=None) source code
 
calculate_packages_to_sync(self, uri, branch, repo=None) source code
 
calculate_sync_queues(self, upload_packages, local_packages, remote_packages, remote_packages_data, branch, repo=None) source code
 
expand_queues(self, upload_queue, download_queue, removal_queue, remote_packages_data, branch, repo) source code
 
run_package_files_qa_checks(self, packages_list, repo=None) source code
 
sync_packages(self, ask=True, pretend=False, packages_check=False, repo=None) source code
 
remove_expiration_files(self, branch, repo=None) source code
 
is_package_expired(self, package_file, branch, repo=None) source code
 
create_expiration_file(self, package_file, branch, repo=None, gentle=False) source code
 
collect_expiring_packages(self, branch, repo=None) source code
 
tidy_mirrors(self, ask=True, pretend=False, repo=None) source code
Method Details

get_remote_branches(self, repo=None)

source code 

Returns a list of remotely available branches for the provided repository identifier.

Parameters:
  • repo (string) - repository identifier
Returns: set
list of valid, available remote branches

read_remote_file_in_branches(self, filename, repo=None, excluded_branches=None)

source code 

        Reads a file remotely located in all the available branches.

        @param filename: name of the file that should be located inside
            repository database directory
        @type filename: string
        @keyword repo: repository identifier
        @type repo: string
        @keyword excluded_branches: list of branch identifiers excluded or None
        @type excluded_branches: list or None
        @return: dictionary with branches as key and raw file content as value:
            {'4': 'abcd
', '5': 'defg
'}
        @rtype: dict