Your IP : 216.73.216.218


Current Path : /usr/lib/python3/dist-packages/uaclient/clouds/__pycache__/
Upload File :
Current File : //usr/lib/python3/dist-packages/uaclient/clouds/__pycache__/azure.cpython-38.pyc

U

8�-d��@s�ddlZddlmZmZddlmZddlmZmZm	Z	ddl
mZdZdZ
ede
ed	e
d
�ZdZdZd
ZGdd�de�ZdS)�N)�Any�Dict)�	HTTPError)�
exceptions�system�util)�AutoAttachCloudInstancez http://169.254.169.254/metadata/z
2020-09-01zattested/document?api-version=zinstance/compute?api-version=)�pkcs7Zcomputez#/sys/class/dmi/id/chassis_asset_tagz%/var/lib/cloud/seed/azure/ovf-env.xmlz 7783-7084-3265-9085-8269-3286-77c@s|eZdZeejedddgd�eee	fd�dd���Z
eed�dd��Zeed�dd	��Z
ed�d
d�Zeed�d
d�ZdS)�UAAutoAttachAzureInstance�)Zretry_sleeps)�returncCsTi}tt���D]>\}}tj|ddidd�\}}|dkrF|d||<q|||<q|S)NZMetadata�truer)ZheadersZtimeoutr	Z	signature)�sorted�	IMDS_URLS�itemsrZreadurl)�selfZ	responses�keyZurlZurl_responseZ_headers�r�7/usr/lib/python3/dist-packages/uaclient/clouds/azure.py�identity_docs�

z&UAAutoAttachAzureInstance.identity_doccCsdS)NZazurer�rrrr�
cloud_type'sz$UAAutoAttachAzureInstance.cloud_typecCs2tj�t�r&t�t�}t|��kr&dStj�t�S)z&This machine is a viable AzureInstanceT)	�os�path�exists�DMI_CHASSIS_ASSET_TAGrZ	load_file�AZURE_CHASSIS_ASSET_TAG�strip�AZURE_OVF_ENV_FILE)rZchassis_asset_tagrrr�	is_viable+s

z#UAAutoAttachAzureInstance.is_viablecCsdS)ZUnsupportedFrrrrr�should_poll_for_pro_license4sz5UAAutoAttachAzureInstance.should_poll_for_pro_license)�wait_for_changercCst���dS)N)rZInPlaceUpgradeNotSupportedError)rr!rrr�is_pro_license_present8sz0UAAutoAttachAzureInstance.is_pro_license_presentN)�__name__�
__module__�__qualname__�propertyrZretryrr�strrrr�boolrr r"rrrrr
sr
)r�typingrrZurllib.errorrZuaclientrrrZuaclient.cloudsrZ
IMDS_BASE_URLZAPI_VERSIONrrrrr
rrrr�<module>s

�