Your IP : 216.73.216.172


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

U

��g	�@sVddlZddlmZmZddlmZmZGdd�dejd�ZGdd�deejd�Z	dS)	�N)�Any�Dict)�config�contractc@sfeZdZeejed�dd���Zejej	e
d�dd��Zejed�dd��Zejeed	�d
d��Z
dS)
�AutoAttachInstance��returncCsdS)z?Return True if the machine is a viable AutoAttachCloudInstance.N���selfr	r	�:/usr/lib/python3/dist-packages/uaclient/clouds/__init__.py�	is_viableszAutoAttachInstance.is_viable��cfgrcCsdS)�{
        Cloud-specific implementation of acquiring the pro token using whatever
        method suits the platform
        Nr	)rrr	r	r�acquire_pro_tokensz$AutoAttachInstance.acquire_pro_tokencCsdS)zw
        Cloud-specific checks for whether the daemon should continously poll
        for Ubuntu Pro licenses.
        Nr	r
r	r	r�should_poll_for_pro_licensesz.AutoAttachInstance.should_poll_for_pro_license)�wait_for_changercCsdS)z1
        Check for an Ubuntu Pro license
        Nr	)rrr	r	r�is_pro_license_presentsz)AutoAttachInstance.is_pro_license_presentN)�__name__�
__module__�__qualname__�property�abc�abstractmethod�boolr
r�UAConfig�strrrrr	r	r	rrsr)�	metaclassc@sVeZdZeejeeefd�dd���Z	eejed�dd���Z
ejed�dd�Z
d	S)
�PublicCloudAutoAttachInstancercCsdS)z=Return the identity document representing this cloud instanceNr	r
r	r	r�identity_doc'sz*PublicCloudAutoAttachInstance.identity_doccCsdS)z=Return a string of the cloud type on which this instance runsNr	r
r	r	r�
cloud_type-sz(PublicCloudAutoAttachInstance.cloud_typercCs$t�|�}|j|j|jd�}|dS)r)r!�dataZ
contractToken)rZUAContractClientZ%get_contract_token_for_cloud_instancer!r )rrZcontract_clientZtoken_responser	r	rr3s
�z/PublicCloudAutoAttachInstance.acquire_pro_tokenN)rrrrrrrrrr r!rrrr	r	r	rr&sr)
r�typingrrZuaclientrr�ABCMetarrr	r	r	r�<module>s