src/lsi/lsi.py
def _copy_to(entries, remote_path, local_path, profile):
    """
    Performs an SCP command where the remote_path is the target and the
    local_path is the source.

    :param entries: A list of entries.
    :type entries: ``list`` of :py:class:`HostEntry`
    :param remote_path: The target path on the remote machine(s).
    :type remote_path: ``str``
    :param local_path: The source path on the local machine.
    :type local_path: ``str``
    :param profile: The profile, holding username/idfile info, etc.
    :type profile: :py:class:`Profile`
    """
    commands = []
    for entry in entries:
        hname = entry.hostname or entry.public_ip
        cmd = _build_scp_command(hname, profile.username,
                                 profile.identity_file,
                                 is_get=False,
                                 local_path=local_path,
                                 remote_path=remote_path)
        print('Command:', cmd)
        commands.append({
            'command': cmd,
            'description': entry.display()
        })
    stream_commands(commands)
    print(green('Finished copying'))
def _copy_to(entries, remote_path, local_path, profile):
    commands = []
    for entry in entries:
        hname = entry.hostname or entry.public_ip
        cmd = _build_scp_command(hname, profile.username,
                                 profile.identity_file,
                                 is_get=False,
                                 local_path=local_path,
                                 remote_path=remote_path)
        print('Command:', cmd)
        commands.append({
            'command': cmd,
            'description': entry.display()
        })
    stream_commands(commands)
    print(green('Finished copying'))
def _copy_to ( entries , remote_path , local_path , profile ) : commands = [ ] for entry in entries : hname = entry . hostname or entry . public_ip cmd = _build_scp_command ( hname , profile . username , profile . identity_file , is_get = False , local_path = local_path , remote_path = remote_path ) print ( 'Command:' , cmd ) commands . append ( { 'command' : cmd , 'description' : entry . display ( ) } ) stream_commands ( commands ) print ( green ( 'Finished copying' ) )
Performs an SCP command where the remote_path is the target and the
    local_path is the source.

    :param entries: A list of entries.
    :type entries: ``list`` of :py:class:`HostEntry`
    :param remote_path: The target path on the remote machine(s).
    :type remote_path: ``str``
    :param local_path: The source path on the local machine.
    :type local_path: ``str``
    :param profile: The profile, holding username/idfile info, etc.
    :type profile: :py:class:`Profile`
Performs an SCP command where the remote_path is the target and the local_path is the source .