예제 #1
0
파일: storage.py 프로젝트: aminmg/bcbb
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)
예제 #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)
예제 #3
0
파일: storage.py 프로젝트: hussius/bcbb
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)
예제 #4
0
파일: toplevel.py 프로젝트: aminmg/bcbb
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
예제 #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
예제 #6
0
파일: toplevel.py 프로젝트: hussius/bcbb
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