Exemplo n.º 1
0
def _copy_for_storage(remote_info, config):
    import fabric.api as fabric
    import fabric.contrib.files as fabric_files
    try:
        protocol = config["transfer_protocol"]
    except KeyError:
        protocol = None
        pass
    base_dir = config["store_dir"]

    fabric.env.host_string = "%s@%s" % \
    (config["store_user"], config["store_host"])
    remote_copy(remote_info, base_dir, protocol)
Exemplo n.º 2
0
def _copy_for_storage(remote_info, config):
    import fabric.api as fabric
    import fabric.contrib.files as fabric_files
    try:
        protocol = config["transfer_protocol"]
    except KeyError:
        protocol = None
        pass
    base_dir = config["store_dir"]

    fabric.env.host_string = "%s@%s" % \
    (config["store_user"], config["store_host"])
    remote_copy(remote_info, base_dir, protocol)
Exemplo n.º 3
0
def _copy_for_storage(remote_info, config):
    """Securely copy files from remote directory to the storage server.

    This requires ssh public keys to be setup so that no password entry
    is necessary, Fabric is used to manage setting up copies on the remote
    storage server.
    """
    base_dir = config["store_dir"]
    try:
        protocol = config["transfer_protocol"]
    except KeyError:
        protocol = None
        pass

    fabric.env.host_string = "%s@%s" % \
    (config["store_user"], config["store_host"])
    remote_copy(remote_info, base_dir, protocol)
Exemplo n.º 4
0
def _copy_from_sequencer(remote_info, config):
    """Get local directory of flowcell info, or copy from sequencer.
    """
    if "fc_dir" in remote_info:
        fc_dir = remote_info["fc_dir"]
        assert os.path.exists(fc_dir)
    else:
        logger.debug("Remote host information: %s" % remote_info)
        c_host_str = _config_hosts(config)
        c_keyfile = config["analysis"].get("copy_keyfile", None)
        with fabric.settings(host_string=c_host_str, key_filename=c_keyfile):
            base_dir = config["store_dir"]
            protocol = config.get("transfer_protocol", None)

            fc_dir = remote_copy(remote_info, base_dir, protocol)

    return fc_dir
Exemplo n.º 5
0
def _copy_from_sequencer(remote_info, config):
    """Get local directory of flowcell info, or copy from sequencer.
    """
    if "fc_dir" in remote_info:
        fc_dir = remote_info["fc_dir"]
        assert os.path.exists(fc_dir)
    else:
        logger.debug("Remote host information: %s" % remote_info)
        c_host_str = _config_hosts(config)
        c_keyfile = config["analysis"].get("copy_keyfile", None)
        with fabric.settings(host_string=c_host_str, key_filename=c_keyfile):
            base_dir = config["store_dir"]
            protocol = config.get("transfer_protocol", None)

            fc_dir = remote_copy(remote_info, base_dir, protocol)

    return fc_dir
Exemplo n.º 6
0
def _copy_from_sequencer(remote_info, config):
    """Get local directory of flowcell info, or copy from sequencer.
    """
    if "fc_dir" in remote_info:
        fc_dir = remote_info["fc_dir"]
        assert os.path.exists(fc_dir)
    else:
        log.debug("Remote host information: %s" % remote_info)
        c_host_str = _config_hosts(config)
        with fabric.settings(host_string=c_host_str):
            base_dir = config["store_dir"]
            try:
                protocol = config["transfer_protocol"]
            except KeyError:
                protocol = None
                pass

            fc_dir = remote_copy(remote_info, base_dir, protocol)

    return fc_dir