%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/grains/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/grains/fx2.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zddl
ZdgZdZej
e�ZiZd�Zd�Zd�Zd�Zd	�Zd
�Zd�Zd�ZdS(
u

Generate baseline proxy minion grains for Dell FX2 chassis.
The challenge is that most of Salt isn't bootstrapped yet,
so we need to repeat a bunch of things that would normally happen
in proxy/fx2.py--just enough to get data from the chassis to include
in grains.
i(tabsolute_importtprint_functiontunicode_literalsNufx2cC@s?tjjj�r;dtkr;tdjd�dkr;tStS(Nuproxyu	proxytypeufx2(tsalttutilstplatformtis_proxyt__opts__tgett__virtualname__tFalse(((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pyt__virtual__s7c	C@s5g}|jtdjdd��dtjd�krU|jtdjd��nx�|D]�}x�tddD]�}tjjjdtddd|d	|�}yB|jd
d�dkr�|tdd<|tdd<||fSWqqt	k
r|tdd<|tdd<||fSXqqWq\Wt
jd�dS(u\
    Cycle through all the possible credentials and return the first one that
    works
    uproxyuadmin_usernameurootufallback_admin_usernameu	passwordsthostuhosttadmin_usernametadmin_passworduretcodeuadmin_passworduJgrains fx2.find_credentials found no valid credentials, using Dell defaultucalvinN(urootucalvin(tappendt
__pillar__RRtmodulestdracrtget_chassis_nametNoneRtAttributeErrortloggertdebug(t	usernamestusertpwdtr((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pyt_find_credentials s*
	

cC@s�t�\}}tjjjdtddd|d|�}|jdd�dkr\|}ni}|jtjjjdtddd|d|��|S(u0
    Get the grains from the proxied device
    RuproxyuhostR
Ruretcodei(	RRRRtsystem_infoRRtupdatet	inventory(tusernametpasswordRtGRAINS_CACHE((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pyt_grainsAs		#
cC@st�S(N(R#(((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pytfx2VscC@sidd6S(Nuproxyukernel((((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pytkernelZscC@sZtstjt��ny!itjd�jd�d6SWntk
rUidd6SXdS(NuChassis InformationuChassis LocationulocationuUnknown(R"RR#RR(((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pytlocation^s!
cC@sidd6S(Nuproxyu	os_family((((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pyt	os_familyhscC@sidd6S(NuUnknownuos_data((((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pytos_datals(t__doc__t
__future__RRRtloggingtsalt.proxy.fx2Rtsalt.modules.cmdmodtsalt.modules.dracrtsalt.utils.platformt__proxyenabled__R	t	getLoggert__file__RR"RRR#R$R%R&R'R((((s3/usr/lib/python2.7/site-packages/salt/grains/fx2.pyt<module>s$			!				
	

Zerion Mini Shell 1.0