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
/
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
""" Generate baseline proxy minion grains for ESXi hosts. .. versionadded:: 2015.8.4 """ import logging import salt.utils.proxy from salt.exceptions import SaltSystemExit __proxyenabled__ = ["esxi"] __virtualname__ = "esxi" log = logging.getLogger(__file__) GRAINS_CACHE = {} def __virtual__(): # import salt.utils.proxy again # so it is available for tests. import salt.utils.proxy try: if salt.utils.proxy.is_proxytype(__opts__, "esxi"): import salt.modules.vsphere return __virtualname__ except KeyError: pass return False def esxi(): return _grains() def kernel(): return {"kernel": "proxy"} def os(): if not GRAINS_CACHE: GRAINS_CACHE.update(_grains()) try: return {"os": GRAINS_CACHE.get("fullName")} except AttributeError: return {"os": "Unknown"} def os_family(): return {"os_family": "proxy"} def _find_credentials(host): """ Cycle through all the possible credentials and return the first one that works. """ user_names = [__pillar__["proxy"].get("username", "root")] passwords = __pillar__["proxy"]["passwords"] for user in user_names: for password in passwords: try: # Try to authenticate with the given user/password combination ret = salt.modules.vsphere.system_info( host=host, username=user, password=password ) except SaltSystemExit: # If we can't authenticate, continue on to try the next password. continue # If we have data returned from above, we've successfully authenticated. if ret: return user, password # We've reached the end of the list without successfully authenticating. raise SaltSystemExit( "Cannot complete login due to an incorrect user name or password." ) def _grains(): """ Get the grains from the proxied device. """ try: host = __pillar__["proxy"]["host"] if host: username, password = _find_credentials(host) protocol = __pillar__["proxy"].get("protocol") port = __pillar__["proxy"].get("port") ret = salt.modules.vsphere.system_info( host=host, username=username, password=password, protocol=protocol, port=port, ) GRAINS_CACHE.update(ret) except KeyError: pass return GRAINS_CACHE