Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3.6 /
site-packages /
salt /
grains /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2022-10-11 05:09
__init__.py
32
B
-rw-r--r--
2022-05-16 09:16
chronos.py
535
B
-rw-r--r--
2022-05-16 09:16
cimc.py
635
B
-rw-r--r--
2022-05-16 09:16
core.py
111.98
KB
-rw-r--r--
2022-05-16 09:16
disks.py
5.62
KB
-rw-r--r--
2022-05-16 09:16
esxi.py
2.52
KB
-rw-r--r--
2022-05-16 09:16
extra.py
2.77
KB
-rw-r--r--
2022-05-16 09:16
fibre_channel.py
1.76
KB
-rw-r--r--
2022-05-16 09:16
fx2.py
3.06
KB
-rw-r--r--
2022-05-16 09:16
iscsi.py
2.35
KB
-rw-r--r--
2022-05-16 09:16
junos.py
1.51
KB
-rw-r--r--
2022-05-16 09:16
lvm.py
1.43
KB
-rw-r--r--
2022-05-16 09:16
marathon.py
928
B
-rw-r--r--
2022-05-16 09:16
mdadm.py
800
B
-rw-r--r--
2022-05-16 09:16
mdata.py
4.09
KB
-rw-r--r--
2022-05-16 09:16
metadata.py
2.7
KB
-rw-r--r--
2022-05-16 09:16
minion_process.py
988
B
-rw-r--r--
2022-05-16 09:16
napalm.py
11.2
KB
-rw-r--r--
2022-05-16 09:16
nvme.py
1.16
KB
-rw-r--r--
2022-05-16 09:16
nxos.py
901
B
-rw-r--r--
2022-05-16 09:16
opts.py
353
B
-rw-r--r--
2022-05-16 09:16
panos.py
640
B
-rw-r--r--
2022-05-16 09:16
pending_reboot.py
650
B
-rw-r--r--
2022-05-16 09:16
philips_hue.py
1.03
KB
-rw-r--r--
2022-05-16 09:16
rest_sample.py
1.03
KB
-rw-r--r--
2022-05-16 09:16
smartos.py
6.32
KB
-rw-r--r--
2022-05-16 09:16
ssh_sample.py
927
B
-rw-r--r--
2022-05-16 09:16
zfs.py
2.13
KB
-rw-r--r--
2022-05-16 09:16
Save
Rename
""" 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`` in the minion config. .. code-block:: yaml fibre_channel_grains: True """ import glob import logging import salt.modules.cmdmod import salt.utils.files import salt.utils.platform __virtualname__ = "fibre_channel" # Get logging started log = logging.getLogger(__name__) def __virtual__(): if __opts__.get("fibre_channel_grains", False) is False: return False else: return __virtualname__ def _linux_wwns(): """ Return Fibre Channel port WWNs from a Linux host. """ ret = [] for fc_file in glob.glob("/sys/class/fc_host/*/port_name"): with salt.utils.files.fopen(fc_file, "r") as _wwn: content = _wwn.read() for line in content.splitlines(): ret.append(line.rstrip()[2:]) return ret def _windows_wwns(): """ Return Fibre Channel port WWNs from a Windows host. """ ps_cmd = ( r"Get-WmiObject -ErrorAction Stop " r"-class MSFC_FibrePortHBAAttributes " r'-namespace "root\WMI" | ' r"Select -Expandproperty Attributes | " r'%{($_.PortWWN | % {"{0:x2}" -f $_}) -join ""}' ) ret = [] cmd_ret = salt.modules.cmdmod.powershell(ps_cmd) for line in cmd_ret: ret.append(line.rstrip()) return ret def fibre_channel_wwns(): """ Return list of fiber channel HBA WWNs """ grains = {"fc_wwn": False} if salt.utils.platform.is_linux(): grains["fc_wwn"] = _linux_wwns() elif salt.utils.platform.is_windows(): grains["fc_wwn"] = _windows_wwns() return grains