Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/uaclient/clouds/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/uaclient/clouds/__pycache__/lxd.cpython-310.pyc
o

�K�i,
�@sdddlZddlmZmZmZmZmZmZddlm	Z	e�
e�e��Z
dZdZdZGdd�de	�ZdS)	�N)�config�
exceptions�http�log�secret_manager�util)�AutoAttachInstancez
/dev/lxd/sockz/1.0/ubuntu-proz/1.0/ubuntu-pro/tokenc@sReZdZedefdd��Zdefdd�Zdedefdd�Zd	ej	de
fd
d�ZdS)
�LXDAutoAttachInstance�returncC�dS)NT���selfrr�5/usr/lib/python3/dist-packages/uaclient/clouds/lxd.py�	is_viableszLXDAutoAttachInstance.is_viablecCr)zSYes, but only once - is_pro_license_present doesn't
        support wait_for_changeTrr
rrr�should_poll_for_pro_licensesz1LXDAutoAttachInstance.should_poll_for_pro_license�wait_for_changecCsh|rt���t�tdt�}|jdkr"tjdt	j
|j|jd�d�dS|j�
dd�d	kr2t�d
�dSdS)N�GET��z4LXD instance API returned error for ubuntu-pro query)�code�body)�extraF�guest_attach�off�onzNguest_attach config is not turned on. The machine will not try to auto-attach.T)r�CancelProLicensePollingr�unix_socket_request�LXD_INSTANCE_API_SOCKET_PATH�$LXD_INSTANCE_API_ENDPOINT_UBUNTU_PROr�LOG�errorrrr�	json_dict�get�info)rr�resprrr�is_pro_license_presents&�
��z,LXDAutoAttachInstance.is_pro_license_present�cfgcCsvt�tdt�}|jdkrt���|jdkrt���|jdkr,tj|jd�	tt�|j
d��|j�dd�}t
j�|�|S)	z{
        Cloud-specific implementation of acquiring the pro token using whatever
        method suits the platform
        �POSTi�i�rzunix://{}{})r�urlr�guest_token�)rrr�0LXD_INSTANCE_API_ENDPOINT_UBUNTU_PRO_GUEST_TOKENrr�LXDAutoAttachNotAvailable�LXDAutoAttachNotAllowed�ExternalAPIError�formatrr!r"r�secrets�
add_secret)rr&r$r)rrr�acquire_pro_token1s*�


��z'LXDAutoAttachInstance.acquire_pro_tokenN)�__name__�
__module__�__qualname__�property�boolrrr%r�UAConfig�strr2rrrrr	
sr	)�logging�uaclientrrrrrr�uaclient.cloudsr�	getLogger�replace_top_level_logger_namer3rrrr+r	rrrr�<module>s 

Youez - 2016 - github.com/yon3zu
LinuXploit