%PDF- %PDF-
| Direktori : /proc/self/root/lib/python2.7/site-packages/salt/client/ssh/wrapper/ |
| Current File : //proc/self/root/lib/python2.7/site-packages/salt/client/ssh/wrapper/__init__.pyo |
�
���^c @@ s� d Z d d l m Z m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l
m Z d e f d � � YZ
d S( s
The ssh client wrapper system contains the routines that are used to alter
how executions are run in the salt-ssh system, this allows for state routines
to be easily rewritten to execute in a way that makes them do the same tasks
as ZeroMQ salt, but via ssh.
i ( t absolute_importt print_functionN( t sixt FunctionWrapperc B@ sM e Z d Z d d d d d d d � Z d � Z d � Z d � Z d � Z RS( s
Create an object that acts like the salt function dict and makes function
calls remotely via the SSH shell system
c
K@ s� t t | � j � | | _ t | t � r1 | n i | _ | | _ t | t � rX | n i | _ i | d 6| d 6| _ | | _
| j j |
� | | _ | j d k r� i | _ n | | _ d S( Nt id_t host( t superR t __init__t
cmd_prefixt
isinstancet dictt wfuncst optst modst kwargst fsclientt updatet aliasest Nonet minion_opts( t selfR R R R R
R R R R R ( ( sD /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/__init__.pyR s
c C@ s) y | | t SWn t k
r$ t SXd S( s�
We need to implement a __contains__ method, othwerwise when someone
does a contains comparison python assumes this is a sequence, and does
__getitem__ keys 0 and up until IndexError
N( t Truet KeyErrort False( R t key( ( sD /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/__init__.pyt __contains__6 s
c @ s� d � k r� � j r� t j � j � } | j d � } | j d � } t � j | | d � j d � j d � j d � d � j
d � j | �S� j r� d
j � j � � � n � � j k r� � j � S� � j
k r� � j
� S� � f d � } | S( sS
Return the function call to simulate the salt local lookup system
t .R R R R
R R R R s {0}.{1}c @ s� � g } | j g | D] } t j j j | � ^ q � | j g t j | � D]<