%PDF- %PDF-
| Direktori : /proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/grains/ |
| Current File : //proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/grains/esxi.pyo |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l m Z d d l Z d d l
Z d g Z d Z e j
e � Z i Z d � Z d � Z d � Z d � Z d
� Z d � Z d � Z d S(
uT
Generate baseline proxy minion grains for ESXi hosts.
.. versionadded:: 2015.8.4
i ( t absolute_importt print_functiont unicode_literalsN( t SaltSystemExitu esxic C@ sF y. t j j j � r- t d d d k r- t SWn t k
rA n Xt S( Nu proxyu proxytypeu esxi( t saltt utilst platformt is_proxyt __opts__t __virtualname__t KeyErrort False( ( ( s4 /usr/lib/python2.7/site-packages/salt/grains/esxi.pyt __virtual__ s &
c C@ s t � S( N( t _grains( ( ( s4 /usr/lib/python2.7/site-packages/salt/grains/esxi.pyt esxi% s c C@ s i d d 6S( Nu proxyu kernel( ( ( ( s4 /usr/lib/python2.7/site-packages/salt/grains/esxi.pyt kernel) s c C@ sQ t s t j t � � n y i t j d � d 6SWn t k
rL i d d 6SXd S( Nu fullNameu osu Unknown( t GRAINS_CACHEt updateR
t gett AttributeError( ( ( s4 /usr/lib/python2.7/site-packages/salt/grains/esxi.pyt os- s
c C@ s i d d 6S( Nu proxyu os_family( ( ( ( s4 /usr/lib/python2.7/site-packages/salt/grains/esxi.pyt os_family7 s c C@ s� t d j d d � g } t d d } xn | D]f } x] | D]U } y( t j j j d | d | d | � } Wn t k
r q; n X| r; | | f Sq; Wq. Wt d � � d S(
u]
Cycle through all the possible credentials and return the first one that
works.
u proxyu usernameu rootu passwordst hostt usernamet passwordu@ Cannot complete login due to an incorrect user name or password.N( t
__pillar__R R t modulest vspheret system_infoR ( R t
user_namest passwordst userR t ret( ( s4 /usr/lib/python2.7/site-packages/salt/grains/esxi.pyt _find_credentials; s
c C@ s� y� t d d } | r� t | � \ } } t d j d � } t d j d � } t j j j d | d | d | d | d | � } t j | � n Wn t k
r� n Xt S(
u1
Get the grains from the proxied device.
u proxyu hostu protocolu portR R R t protocolt port(
R R! R R R R R R R R
( R R R R"