Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
°‹EYc@sxdZddlZddlZddlZddlZddlZdZdefd„ƒYZdefd„ƒYZ	dS(s2
Configuration file (aka ``ssh_config``) support.
iÿÿÿÿNit	SSHConfigcBs\eZdZejdƒZd„Zd„Zd„Zd„Z	d„Z
d„Zd„ZRS(	sƒ
    Representation of config information as stored in the format used by
    OpenSSH. Queries can be made via `lookup`. The format is described in
    OpenSSH's ``ssh_config`` man page. This class is provided primarily as a
    convenience to posix users (since the OpenSSH format is a de-facto
    standard on posix) but should work fine on Windows too.

    .. versionadded:: 1.6
    s(\w+)(?:\s*=\s*|\s+)(.+)cCs
g|_dS(s5
        Create a new OpenSSH config object.
        N(t_config(tself((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyt__init__.scCs¸idgd6id6}xŠ|D]‚}|jƒ}|s|jdƒrLqntj|j|ƒ}|sztd|ƒ‚n|jdƒjƒ}|jdƒ}|dkrÚ|jj	|ƒi|j
|ƒd6id6}q|dkr	|jƒd	kr	d|d|<q|jd
ƒr7|jd
ƒr7|dd!}n|dkr||dkrk|d|j	|ƒq |g|d|<q||dkr||d|<qqW|jj	|ƒdS(sŽ
        Read an OpenSSH config from the given file object.

        :param file_obj: a file-like object to read the config file from
        t*thosttconfigt#sUnparsable line %siitproxycommandtnonet"iÿÿÿÿtidentityfiletlocalforwardt
remoteforwardN(RRR
(
tstript
startswithtretmatchtSETTINGS_REGEXt	ExceptiontgrouptlowerRtappendt
_get_hoststNonetendswith(Rtfile_objRtlineRtkeytvalue((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pytparse4s4

cCsòg|jD]"}|j|d|ƒr
|^q
}i}x{|D]s}xj|djƒD]X\}}||krŽ|dk	r|n|||<qV|dkrV||j|ƒqVqVWq?W|j||ƒ}d|krî|ddkrî|d=n|S(s‡
        Return a dict of config options for a given hostname.

        The host-matching rules of OpenSSH's ``ssh_config`` man page are used:
        For each parameter, the first obtained value will be used.  The
        configuration files contain sections separated by ``Host``
        specifications, and that section is only applied for hosts that match
        one of the patterns given in the specification.

        Since the first obtained value for each parameter is used, more host-
        specific declarations should be given near the beginning of the file,
        and general defaults at the end.

        The keys in the returned dict are all normalized to lowercase (look for
        ``"port"``, not ``"Port"``. The values are processed according to the
        rules for substitution variable expansion in ``ssh_config``.

        :param str hostname: the hostname to lookup
        RRRRN(Rt_allowedtitemsRtextendt_expand_variables(RthostnameRtmatchestretRRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pytlookupcs"
 
cCs2tƒ}x"|jD]}|j|dƒqW|S(s‡
        Return the set of literal hostnames defined in the SSH config (both
        explicit hostnames and wildcard entries).
        R(tsetRtupdate(Rthoststentry((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyt
get_hostnamess	cCs_t}xR|D]J}|jdƒr<tj||dƒr<tStj||ƒr
t}q
q
W|S(Nt!i(tFalseRtfnmatchtTrue(RR)R#RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyR—s
%
c	Csxd|kr)|djd|ƒ|d<n
||d<d|krL|d}nt}tjdƒ}d|krz|d}n|}tjƒjdƒd}t||ƒ}tjj	dƒ}id|dfd	|fd
|fd|fd|fd
|fd|fgd6d|fd|fd|dfd	|fd|fd
|fgd6d|fd|dfd|fd
|fgd6}	x÷|D]ï}
||
dkrqn|
|	krxÄ|	|
D]µ\}}t||
tƒr6x“t
t||
ƒƒD]E}
|||
|
krê||
|
j|t|ƒƒ||
|
<qêqêWq´|||
kr´||
j|t|ƒƒ||
<q´q´WqqW|S(sC
        Return a dict of config options with expanded substitutions
        for a given hostname.

        Please refer to man ``ssh_config`` for the parameters that
        are replaced.

        :param dict config: the config for the hostname
        :param str hostname: the hostname that the config belongs to
        R#s%htporttUSERtusert.it~s%ls%Ls%ns%ps%rs%utcontrolpaths%dRRN(treplacetSSH_PORTtostgetenvtsockettgethostnametsplittLazyFqdntpatht
expanduserRt
isinstancetlisttrangetlentstr(RRR#R0R2t
remoteuserRtfqdnthomedirtreplacementstktfindR6titem((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyR" sX



							
			
	
$.cCs9ytj|ƒSWn!tk
r4td|ƒ‚nXdS(s>
        Return a list of host_names from host value.
        sUnparsable host %sN(tshlexR<t
ValueErrorR(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyRës
(
t__name__t
__module__t__doc__RtcompileRRRR&R+RR"R(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyR!s			/	*	
			KR=cBs#eZdZdd„Zd„ZRS(s7
    Returns the host's fqdn on request as string.
    cCsd|_||_||_dS(N(RRFRR(RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyRús		cCs|jdkrd}|jjddƒjƒ}|dkråytj}|dkr^tjntj|j	d|tj
tjtjƒ}x?|D]7}|\}}}}	}
|	rd|	kr|	}PqqWWqåtj
k
ráqåXn|dkrtjƒ}n||_n|jS(Nt
addressfamilytanytinetR3(RFRRtgetRR:tAF_INET6tAF_INETtgetaddrinfoRt
SOCK_DGRAMt
IPPROTO_IPtAI_CANONNAMEtgaierrortgetfqdn(RRFtaddress_familytfamilytresultstrestaftsocktypetprotot	canonnametsa((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyt__str__ÿs4	

N(RNRORPRRRg(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyR=õs(
RPR.R8RRLR:R7tobjectRR=(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/paramiko/config.pyt<module>sÔ