File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/esxi.cpython-310.pyc
o
�N�g) � @ s` d Z ddlZddlmZ ddlZe�e�ZdgZ dZ
dd� Zdd� Zed d
� �Z
edd� �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��wrapsZesxic C s t jj�� rtS dS )z
Only work on proxy
)FzJThe esxi execution module failed to load: only available on proxy minions.)�salt�utils�platformZis_proxy�__virtualname__� r r �E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/esxi.py�__virtual__0 s r
c s t � �� fdd��}|S )z>
Decorator wrapper to warn about azurearm deprecation
c s6 t jjjddtd� � | i t jjjdi |����}|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 )r r ZversionsZ
warn_until�
FutureWarning�argsZclean_kwargs)r
�kwargs�ret��functionr r �wrappedA s �z%_deprecation_message.<locals>.wrappedr )r r r r r �_deprecation_message<