HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/esxi.cpython-310.pyc
o

�N�g)�@s`dZddlZddlmZddlZe�e�ZdgZ	dZ
dd�Zdd�Zed	d
��Z
edd��ZdS)
a�
Glues the VMware vSphere Execution Module to the VMware ESXi Proxy Minions to the
:mod:`esxi proxymodule <salt.proxy.esxi>`.

.. Warning::
    This module will be deprecated in a future release of Salt. VMware strongly
    recommends using the
    `VMware Salt extensions <https://docs.saltproject.io/salt/extensions/salt-ext-modules-vmware/en/latest/all.html>`_
    instead of the ESXi module. Because the Salt extensions are newer and
    actively supported by VMware, they are more compatible with current versions
    of ESXi and they work well with the latest features in the VMware product
    line.


Depends: :mod:`vSphere Remote Execution Module (salt.modules.vsphere)
<salt.modules.vsphere>`

For documentation on commands that you can direct to an ESXi host via proxy,
look in the documentation for :mod:`salt.modules.vsphere <salt.modules.vsphere>`.

This execution module calls through to a function in the ESXi proxy module
called ``ch_config``, which looks up the function passed in the ``command``
parameter in :mod:`salt.modules.vsphere <salt.modules.vsphere>` and calls it.

To execute commands with an ESXi Proxy Minion using the vSphere Execution Module,
use the ``esxi.cmd <vsphere-function-name>`` syntax. Both args and kwargs needed
for various vsphere execution module functions must be passed through in a kwarg-
type manor.

.. code-block:: bash

    salt 'esxi-proxy' esxi.cmd system_info
    salt 'exsi-proxy' esxi.cmd get_service_policy service_name='ssh'

�N��wrapsZesxicCstjj��rtSdS)z
    Only work on proxy
    )FzJThe esxi execution module failed to load: only available on proxy minions.)�salt�utils�platformZis_proxy�__virtualname__�rr�E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/esxi.py�__virtual__0sr
cst���fdd��}|S)z>
    Decorator wrapper to warn about azurearm deprecation
    cs6tjjjddtd��|itjjjdi|����}|S)NZArgonz�The 'esxi' functionality in Salt has been deprecated and its functionality will be removed in version 3008 in favor of the saltext.vmware Salt Extension. (https://github.com/saltstack/salt-ext-modules-vmware))�categoryr)rrZversionsZ
warn_until�
FutureWarning�argsZclean_kwargs)r
�kwargs�ret��functionrr	�wrappedAs�z%_deprecation_message.<locals>.wrappedr)rrrrr	�_deprecation_message<srcOs.tdd}|d}t||g|�Ri|��S)N�proxyZ	proxytypez
.ch_config)Z__opts__�	__proxy__)Zcommandr
rZproxy_prefixZ	proxy_cmdrrr	�cmdQsrcCs
td�S)Nzesxi.get_details)rrrrr	�get_detailsYs
r)�__doc__�logging�	functoolsrZsalt.utils.platformr�	getLogger�__name__�logZ__proxyenabled__rr
rrrrrrr	�<module>s$