%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zddl
ZdZeje
�Zd�Zd�Zd�Zd�ZdS(	u
Grains for Fibre Channel WWN's. On Windows this runs a PowerShell command that
queries WMI to get the Fibre Channel WWN's available.

.. versionadded:: 2018.3.0

To enable these grains set ``fibre_channel_grains: True``.

.. code-block:: yaml

    fibre_channel_grains: True
i(tabsolute_importtprint_functiontunicode_literalsNu
fibre_channelcC@s$tjdt�tkrtStSdS(Nufibre_channel_grains(t__opts__tgettFalset__virtualname__(((s=/usr/lib/python2.7/site-packages/salt/grains/fibre_channel.pyt__virtual__sc	C@sg}xrtjd�D]a}tjjj|d��A}|j�}x+|j�D]}|j|j�d�qPWWdQXqW|S(u;
    Return Fibre Channel port WWNs from a Linux host.
    u/sys/class/fc_host/*/port_nameuriN(	tglobtsalttutilstfilestfopentreadt
splitlinestappendtrstrip(trettfc_filet_wwntcontenttline((s=/usr/lib/python2.7/site-packages/salt/grains/fibre_channel.pyt_linux_wwns&s%cC@sId}g}tjjj|�}x!|D]}|j|j��q(W|S(u=
    Return Fibre Channel port WWNs from a Windows host.
    u�Get-WmiObject -ErrorAction Stop -class MSFC_FibrePortHBAAttributes -namespace "root\WMI" | Select -Expandproperty Attributes | %{($_.PortWWN | % {"{0:x2}" -f $_}) -join ""}(R	tmodulestcmdmodt
powershellRR(tps_cmdRtcmd_retR((s=/usr/lib/python2.7/site-packages/salt/grains/fibre_channel.pyt
_windows_wwns3s
cC@sUitd6}tjjj�r/t�|d<n"tjjj�rQt�|d<n|S(u/
    Return list of fiber channel HBA WWNs
    ufc_wwn(RR	R
tplatformtis_linuxRt
is_windowsR(tgrains((s=/usr/lib/python2.7/site-packages/salt/grains/fibre_channel.pytfibre_channel_wwnsCs
(t__doc__t
__future__RRRRtloggingtsalt.modules.cmdmodR	tsalt.utils.platformtsalt.utils.filesRt	getLoggert__name__tlogRRRR!(((s=/usr/lib/python2.7/site-packages/salt/grains/fibre_channel.pyt<module>
s		
	

Zerion Mini Shell 1.0