File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/__pycache__/msazure.cpython-310.pyc
Back
o ;j� � @ s& d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl Z ddlZ ddlZ ddl Z ddlZ ddlmZ dZz$ddlZddlZddlZddlmZmZmZ ddlZ ddlmZ dZW n eyg Y nw d Ze�e�Zd d� Z dd � Z!dd� Z"dd� Z#e"dd� �Z$e"dd� �Z%e"dd� �Z&e"d�dd��Z'e"d�dd��Z(e"d�dd��Z)e"d�dd��Z*e"d�d d!��Z+e"d�d"d#��Z,e"d�d$d%��Z-e"d�d&d'��Z.e"d(d)� �Z/e"d�d*d+��Z0e"d�d,d+��Z0d-d.� Z1e"d�d/d0��Z2e"d�d1d2��Z3e"d�d3d4��Z4e"d�d5d6��Z5e"d�d7d8��Z6e6Z7e"d�d9d:��Z8e8Z9e"d�d;d<��Z:e"d�d=d>��Z;e"d�d?d@��Z<e"d�dAdB��Z=e"d�dCdD��Z>e"d�dEdF��Z?e"d�dGdH��Z@e"d�dIdJ��ZAe"d�dKdL��ZBe"d�dMdN��ZCeCZDe"d�dOdP��ZEe"d�dQdR��ZFe"d�dSdT��ZGe"d�dUdV��ZHe"d�dWdX��ZIeIZJe"d�dYdZ��ZKe"d�d[d\��ZLe"d�d]d^��ZMe"d�d_d`��ZNeNZOe"d�dadb��ZPe"d�dcdd��ZQe"d�dedf��ZRe"d�dgdh��ZSe"d�didj��ZTeTZUe"d�dldm��ZVe"d�dndo��ZWe"d�dpdq��ZXe"d�drds��ZYeYZZe"d�dtdu��Z[e"d�dvdw��Z\e\Z]e"d�dxdy��Z^e"d�dzd{��Z_e"d�d|d}��Z`e"d�d~d��Zae"d�d�d���Zbe"d�d�d���Zce"d�d�d���Zde"d�d�d���ZeeeZfe"d�d�d���ZgegZhe"d�d�d���Zie"d�d�d���ZjejZke"d�d�d���Zle"d�d�d���Zme"d�d�d���Zne"d�d�d���Zoe"d�d�d���ZpepZqe"d�d�d���Zre"d�d�d���ZsesZte"d�d�d���Zue"d�d�d���Zve"d�d�d���Zwe"d�d�d���ZxdS )�a� Azure Cloud Module ================== The Azure cloud module is used to control access to Microsoft Azure .. warning:: This cloud provider will be removed from Salt in version 3007 due to the deprecation of the "Classic" API for Azure. Please migrate to `Azure Resource Manager by March 1, 2023 <https://docs.microsoft.com/en-us/azure/virtual-machines/classic-vm-deprecation>`_ :depends: * `Microsoft Azure SDK for Python <https://pypi.python.org/pypi/azure/1.0.2>`_ >= 1.0.2 * python-requests, for Python < 2.7.9 :configuration: Required provider parameters: * ``apikey`` * ``certificate_path`` * ``subscription_id`` * ``backend`` A Management Certificate (.pem and .crt files) must be created and the .pem file placed on the same machine that salt-cloud is run from. Information on creating the pem file to use, and uploading the associated cer file can be found at: http://www.windowsazure.com/en-us/develop/python/how-to-guides/service-management/ For users with Python < 2.7.9, ``backend`` must currently be set to ``requests``. Example ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/azure.conf`` configuration: .. code-block:: yaml my-azure-config: driver: azure subscription_id: 3287abc8-f98a-c678-3bde-326766fd3617 certificate_path: /etc/salt/azure.pem management_host: management.core.windows.net � N��wraps)�SaltCloudSystemExitF)�AzureConflictHttpError�AzureException�AzureMissingResourceHttpError)�object_to_dictT�azurec C s t � du rdS t� du rdS tS )z) Check for Azure configurations. F)�get_configured_provider�get_dependencies�__virtualname__� r r �M/opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/msazure.py�__virtual__X s r c C s"