| Server IP : 138.197.176.125 / Your IP : 216.73.217.55 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/uaclient/clouds/__pycache__/ |
Upload File : |
U
��g,
� @ sd d dl Z d dlmZmZmZmZmZmZ d dlm Z e �
e�e��Z
dZdZdZG dd� de �ZdS ) � N)�config�
exceptions�http�log�secret_manager�util)�AutoAttachInstancez
/dev/lxd/sockz/1.0/ubuntu-proz/1.0/ubuntu-pro/tokenc @ sN e Zd Zeed�dd��Zed�dd�Zeed�dd�Zej e
d �d
d�ZdS )
�LXDAutoAttachInstance)�returnc C s dS )NT� ��selfr r �5/usr/lib/python3/dist-packages/uaclient/clouds/lxd.py� is_viable s zLXDAutoAttachInstance.is_viablec C s dS )zSYes, but only once - is_pro_license_present doesn't
support wait_for_changeTr r r r r �should_poll_for_pro_license s z1LXDAutoAttachInstance.should_poll_for_pro_license)�wait_for_changer
c C sh |rt �� �t�tdt�}|jdkrDtjdt j
|j|jd�d� dS |j�
dd�d krdt�d
� dS dS )NZGET�� z4LXD instance API returned error for ubuntu-pro query)�code�body)�extraFZguest_attachZoffZonzNguest_attach config is not turned on. The machine will not try to auto-attach.T)r ZCancelProLicensePollingr �unix_socket_request�LXD_INSTANCE_API_SOCKET_PATH�$LXD_INSTANCE_API_ENDPOINT_UBUNTU_PROr �LOG�errorr r r � json_dict�get�info)r
r �respr r r �is_pro_license_present s&