qisys.remote – Network operations

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

qisys.remote.callback(total, done)

Called during download

qisys.remote.get_server_access(server_name)

Get server access for a remote site.

Parameters: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

Parameters: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

Returns:a file-like object
qisys.remote.download(url, output_dir, output_name=None, callback=<function callback at 0x1ea8aa0>, clobber=True, message=None)

Download a file from an url, and save it in output_dir.

Parameters:
  • output_name – The name of the file will be the basename of the url, unless output_name is given
  • 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.