

def file_copy(src=None, dest=None):
    "\n    Copies the file from the local device to the junos device.\n\n    Usage:\n\n    .. code-block:: bash\n\n        salt 'device_name' junos.file_copy /home/m2/info.txt info_copy.txt\n\n\n    Options\n      * src: The sorce path where the file is kept.\n      * dest: The destination path where the file will be copied.\n    "
    conn = __proxy__['junos.conn']()
    ret = dict()
    ret['out'] = True
    try:
        with SCP(conn, progress=True) as scp:
            scp.put(src, dest)
        ret['message'] = 'Successfully copied file from {0} to {1}'.format(src, dest)
    except Exception as exception:
        ret['message'] = 'Could not copy file : "{0}"'.format(exception)
        ret['out'] = False
    return ret

dataset/ETHPy150Open saltstack/salt/salt/modules/junos.py file_copy/original