.. versionadded:: 2019.2.0

    Transfer files and directories to remote network device.

    .. note::
        This function is only available only when the underlying library
        `scp <https://github.com/jbardin/scp.py>`_
        is installed. See
        :mod:`scp module <salt.modules.scp_mod>` for
        more details.

    files
        A single path or a list of paths to be transferred.

    remote_path
        The path on the remote device where to store the files.

    recursive: ``True``
        Transfer files and directories recursively.

    preserve_times: ``False``
        Preserve ``mtime`` and ``atime`` of transferred files and directories.

    saltenv: ``base``
        The name of the Salt environment. Ignored when ``files`` is not a
        ``salt://`` URL.

    hostname
        The hostname of the remote device.

    port: ``22``
        The port of the remote device.

    username
        The username required for SSH authentication on the device.

    password
        Used for password authentication. It is also used for private key
        decryption if ``passphrase`` is not given.

    passphrase
        Used for decrypting private keys.

    pkey
        An optional private key to use for authentication.

    key_filename
        The filename, or list of filenames, of optional private key(s) and/or
        certificates to try for authentication.

    timeout
        An optional timeout (in seconds) for the TCP connect.

    socket_timeout: ``10``
        The channel socket timeout in seconds.

    buff_size: ``16384``
        The size of the SCP send buffer.

    allow_agent: ``True``
        Set to ``False`` to disable connecting to the SSH agent.

    look_for_keys: ``True``
        Set to ``False`` to disable searching for discoverable private key
        files in ``~/.ssh/``

    banner_timeout
        An optional timeout (in seconds) to wait for the SSH banner to be
        presented.

    auth_timeout
        An optional timeout (in seconds) to wait for an authentication
        response.

    auto_add_policy: ``False``
        Automatically add the host to the ``known_hosts``.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.scp_put /path/to/file /var/tmp/file auto_add_policy=True

def scp_put(files,
            remote_path=None,
            recursive=False,
            preserve_times=False,
            saltenv='base',
            **kwargs):
    '''
    .. versionadded:: 2019.2.0

    Transfer files and directories to remote network device.

    .. note::
        This function is only available only when the underlying library
        `scp <https://github.com/jbardin/scp.py>`_
        is installed. See
        :mod:`scp module <salt.modules.scp_mod>` for
        more details.

    files
        A single path or a list of paths to be transferred.

    remote_path
        The path on the remote device where to store the files.

    recursive: ``True``
        Transfer files and directories recursively.

    preserve_times: ``False``
        Preserve ``mtime`` and ``atime`` of transferred files and directories.

    saltenv: ``base``
        The name of the Salt environment. Ignored when ``files`` is not a
        ``salt://`` URL.

    hostname
        The hostname of the remote device.

    port: ``22``
        The port of the remote device.

    username
        The username required for SSH authentication on the device.

    password
        Used for password authentication. It is also used for private key
        decryption if ``passphrase`` is not given.

    passphrase
        Used for decrypting private keys.

    pkey
        An optional private key to use for authentication.

    key_filename
        The filename, or list of filenames, of optional private key(s) and/or
        certificates to try for authentication.

    timeout
        An optional timeout (in seconds) for the TCP connect.

    socket_timeout: ``10``
        The channel socket timeout in seconds.

    buff_size: ``16384``
        The size of the SCP send buffer.

    allow_agent: ``True``
        Set to ``False`` to disable connecting to the SSH agent.

    look_for_keys: ``True``
        Set to ``False`` to disable searching for discoverable private key
        files in ``~/.ssh/``

    banner_timeout
        An optional timeout (in seconds) to wait for the SSH banner to be
        presented.

    auth_timeout
        An optional timeout (in seconds) to wait for an authentication
        response.

    auto_add_policy: ``False``
        Automatically add the host to the ``known_hosts``.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.scp_put /path/to/file /var/tmp/file auto_add_policy=True
    '''
    conn_args = netmiko_args(**kwargs)
    conn_args['hostname'] = conn_args['host']
    kwargs.update(conn_args)
    return __salt__['scp.put'](files,
                               remote_path=remote_path,
                               recursive=recursive,
                               preserve_times=preserve_times,
                               saltenv=saltenv,
                               **kwargs)