%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pyc

�
���^c@@s�dZddlmZmZddlZddlZddlZddlZddl	Zddl
ZddlmZej
e�Zdeddd�Zdd�Zdd�Zdd	�Zdd
d�Zdd
d�Zdd
d
�Zd�ZdS(s<
Wrap the cp module allowing for managed ssh file transfers
i(tabsolute_importtprint_functionN(tCommandExecutionErrortbasec	C@s�|dk	rtjd�n|dk	rFt||||�\}}ntdj||dtjjdt	j
d��}tjj
jtdt	j
�}|jj|||�}|dS(	s�
    Send a file from the master to the location in specified

    .. note::

        gzip compression is not supported in the salt-ssh version of
        cp.get_file. The argument is only accepted for interface compatibility.
    s;The gzip argument to cp.get_file in salt-ssh is unsupportedt
fileclienttcachedirssalt-sshtid_tiN(tNonetlogtwarningt_render_filenamest__context__t
cache_filetostpathtjoint__salt__tkwargstsalttclienttsshtSinglet__opts__tshelltsend(	Rtdesttsaltenvtmakedirsttemplatetgziptsrctsingletret((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pytget_files
cC@s}tdj||dtjjdtjd��}dj|�}tjj	j
tdtj�}|jj
||�}|dS(s#
    Transfer a directory down
    RRssalt-sshRt Ri(Rt	cache_dirRRRRRRRRRRRR(RRRRR R!((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pytget_dir5s
cC@sntdj||dtjjdtjd��}tjj	j
tdtj�}|jj
||�}|dS(s
    retrieve a URL
    RRssalt-sshRRi(RR
RRRRRRRRRRRR(RRRRR R!((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pytget_urlFs
cC@stdj|�S(s@
    List all the available state modules in an environment
    R(Rtlist_states(R((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pyR'VsRcC@stdj||�S(s4
    List all of the files stored on the master
    R(Rt	file_list(Rtprefix((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pytlist_master]scC@stdj||�S(s:
    List all of the directories stored on the master
    R(Rtdir_list(RR)((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pytlist_master_dirsdscC@stdj||�S(s7
    List all of the symlinks stored on the master
    R(Rtsymlink_list(RR)((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pytlist_master_symlinksksc@s��s||fS�tjjjkr=tdj����ni�t�d<t�d<t�d<t	�d<|�d<��fd�}||�}||�}||fS(s�
    Process markup in the :param:`path` and :param:`dest` variables (NOT the
    files under the paths they ultimately point to) according to the markup
    format provided by :param:`template`.
    s:Attempted to render file paths with unavailable engine {0}RtpillartgrainstoptsRc@s�tjjj�}tjjj|d��#}|jtjjj|��WdQXtjjj	�|dt
��}tjjj|�|ds�tdj
|d���n|dSdS(s�
        Render :param:`contents` into a literal pathname by writing it to a
        temp file, rendering that file, and returning the result.
        sw+Ntto_strtresults*Failed to render file path with error: {0}tdata(RtutilstfilestmkstemptfopentwritetstringutilsR2t	templatestTEMPLATE_REGISTRYtTruetsafe_rmRtformat(tcontentsttmp_path_fntfp_R4(RR(s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pyt_render�s"	
(
RR5R;R<RR?Rt
__pillar__t
__grains__R(RRRRRC((RRs>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pyRrs 





(t__doc__t
__future__RRtloggingRtsalt.client.sshRtsalt.utils.filestsalt.utils.stringutilstsalt.utils.templatestsalt.exceptionsRt	getLoggert__name__R	tFalseRR"R%R&R'R*R,R.R(((s>/usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/cp.pyt<module>s(

Zerion Mini Shell 1.0