File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/esxdatacenter.cpython-310.pyc
Back
o ;j� � @ sZ d Z ddlZddlmZ ddlZe�e�Zi Z dd� Z dd� Zedd � �Zed d� �Z dS )a� Salt states to create and manage VMware vSphere datacenters (datacenters). :codeauthor: `Alexandru Bleotu <alexandru.bleotu@morganstaley.com>` .. 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 ESX data center 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. Dependencies ============ - pyVmomi Python Module States ====== datacenter_configured --------------------- Makes sure a datacenter exists and is correctly configured. If the state is run by an ``esxdatacenter`` minion, the name of the datacenter is retrieved from the proxy details, otherwise the datacenter has the same name as the state. Supported proxies: esxdatacenter Example: 1. Make sure that a datacenter named ``target_dc`` exists on the vCenter, using a ``esxdatacenter`` proxy: Proxy minion configuration (connects passthrough to the vCenter): .. code-block:: yaml proxy: proxytype: esxdatacenter datacenter: target_dc vcenter: vcenter.fake.com mechanism: sspi domain: fake.com principal: host State configuration: .. code-block:: yaml datacenter_state: esxdatacenter.datacenter_configured � N��wrapsc C � dS )N� esxdatacenter� r r r �M/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/esxdatacenter.py�__virtual__G 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 'esxdatacenter' 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 )�salt�utilsZversionsZ warn_until� FutureWarning�argsZclean_kwargs)r �kwargs�ret��functionr r �wrappedP s �z%_deprecation_message.<locals>.wrappedr )r r r r r �_deprecation_messageK s r c C r )NTr )�lowr r r �mod_init` s r c C s� t d � }|dkrt d � d }n| }t�d|� | i ddd�}g }d}zut d � }t d |g|d�}|sltd rC|�d |� d�� nt�d|� t d ||� |�d|� d�� t�|d � |d �dd|ii� n|�d|� d�� t�|d � t d |� d�|�|d<