qiBuild documentation

qisys.remote – Network operations

Set of tools to perform remote operations, downloading package or reading configs from URLs.

qisys.remote.progress_callback(total, done)

Called during download

qisys.remote.get_server_access(server_name)

Get server access for a remote site. :param server: A server node in

the global qibuild xml configuration file
Returns:A qibuild.config.Access instance
qisys.remote.get_ftp_access(server_name)

Get ftp password from the config file :param server: A server node in

the global qibuild xml configuration file
Returns:A qibuild.config.Access instance
qisys.remote.authenticated_urlopen(location)

A wrapper around urlopen adding authentication information if provided by the user.

qisys.remote.open_remote_location(location, timeout=10)

Open a file from an url :return: a file-like object

qisys.remote.download(url, output_dir, output_name=None, callback=<function progress_callback>, clobber=True, message=None)

Download a file from an url, and save it in output_dir. :param output_name: The name of the file will be the basename of the url,

unless output_name is given
Parameters:
  • callback – callback to use to show download progress. By default qisys.remote.callback() is called
  • message – a list of arguments for qisys.ui.info() Will be printed right before the progress bar.
  • clobber – If False, the file won’t be overwritten if it already exists (True by default)
Returns:

the path to the downloaded file

qisys.remote.deploy(local_directory, remote_url, filelist=None)

Deploy a local directory to a remote url.

exception qisys.remote.URLParseError

URLParseError Custom Exception

class qisys.remote.URL(url_as_string)

URL Class