File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/azurearm_compute.cpython-310.pyc
Back
o ;jS � @ sR d Z ddlZddlmZ ddlZdZzddlZddl m Z ddlmZ dZW n e y/ Y nw dZe�e�Zd d � Zdd� Zed d� �Zedd� �Zedd� �Zedd� �Zedd� �Ze d0dd��Zedd� �Zedd� �Zedd� �Zed d!� �Zed"d#� �Zed$d%� �Zed&d'� �Z ed(d)� �Z!ed*d+� �Z"ed,d-� �Z#ed.d/� �Z$dS )1a0 Azure (ARM) Compute Execution Module .. versionadded:: 2019.2.0 .. warning:: This cloud provider will be removed from Salt in version 3007 in favor of the `saltext.azurerm Salt Extension <https://github.com/salt-extensions/saltext-azurerm>`_ :maintainer: <devops@eitr.tech> :maturity: new :depends: * `azure <https://pypi.python.org/pypi/azure>`_ >= 2.0.0 * `azure-common <https://pypi.python.org/pypi/azure-common>`_ >= 1.1.8 * `azure-mgmt <https://pypi.python.org/pypi/azure-mgmt>`_ >= 1.0.0 * `azure-mgmt-compute <https://pypi.python.org/pypi/azure-mgmt-compute>`_ >= 1.0.0 * `azure-mgmt-network <https://pypi.python.org/pypi/azure-mgmt-network>`_ >= 1.7.1 * `azure-mgmt-resource <https://pypi.python.org/pypi/azure-mgmt-resource>`_ >= 1.1.0 * `azure-mgmt-storage <https://pypi.python.org/pypi/azure-mgmt-storage>`_ >= 1.0.0 * `azure-mgmt-web <https://pypi.python.org/pypi/azure-mgmt-web>`_ >= 0.32.0 * `azure-storage <https://pypi.python.org/pypi/azure-storage>`_ >= 0.34.3 * `msrestazure <https://pypi.python.org/pypi/msrestazure>`_ >= 0.4.21 :platform: linux :configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function in order to work properly. Required provider parameters: if using username and password: * ``subscription_id`` * ``username`` * ``password`` if using a service principal: * ``subscription_id`` * ``tenant`` * ``client_id`` * ``secret`` Optional provider parameters: **cloud_environment**: Used to point the cloud driver to different API endpoints, such as Azure GovCloud. Possible values: * ``AZURE_PUBLIC_CLOUD`` (default) * ``AZURE_CHINA_CLOUD`` * ``AZURE_US_GOV_CLOUD`` * ``AZURE_GERMAN_CLOUD`` � N��wrapsF)�SerializationError)� CloudErrorTZazurearm_computec C s t sdS tS )N)Fz�The following dependencies are required to use the AzureARM modules: Microsoft Azure SDK for Python >= 2.0rc6, MS REST Azure (msrestazure) >= 0.4)�HAS_LIBS�__virtualname__� r r �Q/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/azurearm_compute.py�__virtual__M s r c s t � �� fdd��}|S )z> Decorator wrapper to warn about azurearm deprecation c s6 t jjjddtd� � | i t jjjdi |����}|S )NZChlorinez�The 'azurearm' functionality in Salt has been deprecated and its functionality will be removed in version 3007 in favor of the saltext.azurerm Salt Extension. (https://github.com/salt-extensions/saltext-azurerm))�categoryr )�salt�utilsZversionsZ warn_until� FutureWarning�argsZclean_kwargs)r �kwargs�ret��functionr r �wrapped^ s �z%_deprecation_message.<locals>.wrappedr )r r r r r �_deprecation_messageY s r c K s� d|vrt d |fi |��}d|v rt�d� dS |d |d<