%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/transport/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/transport/raet.pyo

�
���^c@@s�dZddlmZmZmZddlZddlZddljj	Z	ddl
mZeje
�Zy:ddlmZmZddlmZddlmZWneefk
r�nXdaiZdZdZdefd	��YZdS(
u
RAET transport classes
i(tabsolute_importtprint_functiontunicode_literalsN(t
ReqChannel(traetingtnacling(t	LaneStack(t
RemoteYardtRAETReqChannelcB@sSeZdZd	d�Zd�Zdd�Zd	ddd�Zdded�Z	RS(
u�
    Build the communication framework to communicate over the local process
    uxd socket and send messages forwarded to the master. then wait for the
    relative return message.

    Two use cases:
        mininion to master communication, normal use case
           Minion is communicating via yard through minion Road to master
           The destination route needs the estate name of the associated master
        master call via runner, special use case
           In the special case the master call external process is communicating
           via a yard with the master manor yard
           The destination route estate is None to indicate local estate

        The difference between the two is how the destination route
        is assigned.
    cK@s^||_d|_|dkr*d|_ntp3dtp<ddf|_d|_d|_dS(Nuraetumaster_callu	local_cmdu
remote_cmdumanor(NNu	local_cmd(toptstttypetNonetdsttjobber_estate_nametjobber_yard_nametstacktryn(tselfR	tusagetkwargs((s7/usr/lib/python2.7/site-packages/salt/transport/raet.pyt__init__:s					cC@sT|js:trt|_q:|jd|j�|_antjd|jj�dS(u+
        Prepare the stack objects
        Ru*RAETReqChannel Using Jobber Stack at = %s
N(Rtjobber_stackt_setup_stackRtlogtdebugtha(R((s7/usr/lib/python2.7/site-packages/salt/transport/raet.pyt__prep_stackFs
	umanorcC@s�|jjd�}|s>d}tj|d�t|��n|jjd�}|tjkr�dj|�}tj|d�t|��n|tjtj	j
tjtj	jgkr�d}nm|tjtj	jtjtj	j
gkrdj||�}n,dj|�}tj|d�t|��d	tjd
d�}td|d
|d|jd�}tjj|_|jtd|d|d
|d|jd��tjd|j�|S(u�
        Setup and return the LaneStack and Yard used by by channel when global
        not already setup such as in salt-call to communicate to-from the minion

        uidu4Missing role('id') required to setup RAETReqChannel.u
u__roleu4Invalid application kind = '{0}' for RAETReqChannel.umasteru{0}_{1}u6Unsupported application kind '{0}' for RAETReqChannel.uchanneltsizeitnametlanenametsockdirpathusock_dirRtdirpathu Created Channel Jobber Stack %s
(R	tgetRterrort
ValueErrortkindst
APPL_KINDStformattAPPL_KIND_NAMESt	applKindstmastertsyndictminiontcallerRtuuidRRtPackKindtpacktPkt	addRemoteRRR(RRtroletemsgtkindRRR((s7/usr/lib/python2.7/site-packages/salt/transport/raet.pyRRs<	ii<cC@s|j|||�S(uu
        We don't need to do the crypted_transfer_decode_dictentry routine for
        raet, just wrap send.
        (tsend(Rtloadtdictkeyttriesttimeout((s7/usr/lib/python2.7/site-packages/salt/transport/raet.pyt!crypted_transfer_decode_dictentry{scC@s�|j�d}tj�}tjd�}d|jjj|f}i|d6|jd6|_	i|j	d6|d6}	|jj
|	|jj|jj
�x�|tkr�|jj�xA|jjr�|jjj�\}	}
|	t|	ddd<q�q�W|tkrPntj�||kr}||krPtdj|||j	||���n|jj
|	|jjd	j
�|d7}ntjd
�q�Wtj|�jdi�S(
u[
        Send a message load and wait for a relative reply
        One shot wonder
        iiusrcudsturouteuloadiuOMessage send timed out after '{0} * {1}' secs. route = {2} track = {3} load={4}umanorg{�G�z�?ureturnN(t_RAETReqChannel__prep_stackttimeRR,RRtlocalRRtroutettransmittnameRemotesRtuidt
jobber_rxMsgst
serviceAlltrxMsgstpopleftR"R%tsleeptpopR (RR5R7R8trawttriedtstartttracktsrctmsgtsender((s7/usr/lib/python2.7/site-packages/salt/transport/raet.pyR4�s8
#
	 
N(
t__name__t
__module__t__doc__RRR:RR9tFalseR4(((s7/usr/lib/python2.7/site-packages/salt/transport/raet.pyR's	)(RPt
__future__RRRR;tloggingtsalt.utils.kindstutilsR#tsalt.transport.clientRt	getLoggerRNRtraetRRtraet.lane.stackingRtraet.lane.yardingRtImportErrortOSErrorRRRAR
RR(((s7/usr/lib/python2.7/site-packages/salt/transport/raet.pyt<module>s"


Zerion Mini Shell 1.0