%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/uaclient/clouds/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/uaclient/clouds/__pycache__/azure.cpython-312.pyc

�

��>fY����ddlZddlZddlmZmZddlmZmZmZm	Z	m
Z
ddlmZeje
je��ZdZdZedzezedzezd	�Zd
ZdZdZd
ZGd�de�Zy)�N)�Any�Dict)�
exceptions�http�secret_manager�system�util)�AutoAttachCloudInstancez http://169.254.169.254/metadata/z
2020-09-01zattested/document?api-version=zinstance/compute?api-version=)�pkcs7�computez#/sys/class/dmi/id/chassis_asset_tagz%/var/lib/cloud/seed/azure/ovf-env.xmlz 7783-7084-3265-9085-8269-3286-77�
UBUNTU_PROc��eZdZeej
ejgd���dee	e
ffd���Zede	fd��Zede
fd��Zde
fd�Zde
de
fd	�Zy
)�UAAutoAttachAzureInstance)�rr)�retry_sleeps�returnc��i}ttj��D]�\}}tj|ddid��}|j
dk7r+t
j|j
|j���|dk(r4|jd}|||<tjj|���|j||<��|S)	N�Metadata�truer)�headers�timeout��)�code�bodyr�	signature)
�sorted�	IMDS_URLS�itemsr�readurlrr�CloudMetadataErrorr�	json_dictr�secrets�
add_secret)�self�	responses�key�url�responsers      �7/usr/lib/python3/dist-packages/uaclient/clouds/azure.py�identity_docz&UAAutoAttachAzureInstance.identity_docs����	��y���0�1�
	4�H�C���|�|��j�&�1�1��H��}�}��#� �3�3�!���X�]�]����g�~�$�.�.�{�;�	�!*�	�#���&�&�1�1�)�<�!)�!3�!3�	�#��
	4���c��y)N�azure��r$s r)�
cloud_typez$UAAutoAttachAzureInstance.cloud_type/s��r+c���tjjt�r1t	j
t�}t|j�k(rytjjt�S)z&This machine is a viable AzureInstanceT)	�os�path�exists�DMI_CHASSIS_ASSET_TAGr�	load_file�AZURE_CHASSIS_ASSET_TAG�strip�AZURE_OVF_ENV_FILE)r$�chassis_asset_tags  r)�	is_viablez#UAAutoAttachAzureInstance.is_viable3sP���7�7�>�>�/�0� &� 0� 0�1F� G��&�*;�*A�*A�*C�C���w�w�~�~�0�1�1r+c��y)NTr.r/s r)�should_poll_for_pro_licensez5UAAutoAttachAzureInstance.should_poll_for_pro_license<s��r+�wait_for_changec���|rtj��tjdd�}	t	j
|ddi��}|jdk7r3tj|j�tj��|jjd�tk(S#t$r.}tj|�tj��d}~wwxYw)Nr�rr)rr�licenseType)
r�CancelProLicensePollingr�getrr�OSError�LOG�errorrrr!�AZURE_PRO_LICENSE_TYPE)r$r>r'r(�es     r)�is_pro_license_presentz0UAAutoAttachAzureInstance.is_pro_license_present@s�����4�4�6�6��m�m�I�r�*��	7��|�|�C�*�f�1E�F�H�
�=�=�C���I�I�h�m�m�$��4�4�6�6��!�!�%�%�m�4�8N�N�N���	7��I�I�a�L��4�4�6�6��	7�s�B+�+	C"�4)C�C"N)�__name__�
__module__�__qualname__�propertyr	�retryrr r�strrr*r0�boolr;r=rIr.r+r)rrs�����T�Z�Z�
�-�-�I�F��d�3��8�n��G���$��C�����2�4�2��2��T��O��O�$�Or+r)�loggingr2�typingrr�uaclientrrrrr	�uaclient.cloudsr
�	getLogger�replace_top_level_logger_namerJrE�
IMDS_BASE_URL�API_VERSIONrr5r9r7rGrr.r+r)�<module>rYs����	��C�C�3��g���:��:�:�8�D�E��2�
���
�=�
=��
K��>�>��L�
�	�
>��<��<��%��7O� 7�7Or+

Zerion Mini Shell 1.0