%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�Hcf.���ddlmZmZmZmZddlmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZddlmZmZddlmZej*�ZGd�de�Zy	)
�)�Any�Dict�Optional�Tuple)�api�contract�event_logger�messages�system)�CanEnableFailure�CanEnableFailureReason)�RepoEntitlement)�AnboxCloudData�anbox_cloud_credentials_file)�MessagingOperationsDictc�F��eZdZdZej
ZejZejjZejZ
dZdZdZdZdZedefd��Zdeeeeff�fd�Zd	ej8def�fd
�Zd	ej8f�fd�Zdee e!fd
ee defd�Z"�xZ#S)�AnboxEntitlementzanbox-cloudzubuntu-pro-anbox-cloud.gpgz{}T�Anbox�returnc�D�|jsdtjgiSiS)N�post_enable)�access_onlyr
�ANBOX_RUN_INIT_CMD)�selfs �=/usr/lib/python3/dist-packages/uaclient/entitlements/anbox.py�	messagingzAnboxEntitlement.messagings$�����!�H�$?�$?�#@�A�A��I�c����t�|��\}}|s||fStj�r6|js*dttjtj�fSy)NF)TN)
�super�
can_enabler�is_containerrrr
�ONLY_ACCESS_ONLY_SUPPORTEDr
�!ANBOX_FAIL_TO_ENABLE_ON_CONTAINER)r�ret�reason�	__class__s   �rr zAnboxEntitlement.can_enable%sa����g�(�*���V����;����� ��)9�)9�� �*�E�E��>�>���
�r�progressc	� ��t�|�|�}|s|S|jjdi�jdi�}|jj
d}t
j|j�}|j|d�}t|jdi�jdi�jdd�|jdd�|jdd�|jd	d��
�}tj|�y)N�entitlement�
directives�machineTokenzanbox-images�url��
resourceToken�aptURL�aptKey)�anbox_images_url�anbox_images_resource_token�anbox_cloud_apt_url�anbox_cloud_apt_tokenT)r�_perform_enable�entitlement_cfg�get�cfg�
machine_tokenr�UAContractClient�get_resource_machine_accessrr�write)	rr'r$r*r9�client�anbox_images_machine_access�anbox_cloud_datar&s	        �rr5z AnboxEntitlement._perform_enable6s�����g�%�h�/����J��)�)�-�-�m�R�@�D�D��"�
�
����.�.�~�>�
��*�*�4�8�8�4��&,�&H�&H��>�'
�#�*�8�<�<�]�B�O�
�S��r�
"�
�S���^�(C�(G�(G���)�!+���x�� <�",�.�.��2�">�	
��	%�*�*�+;�<�rc�L��t�|�|�tj�y)NT)r�_perform_disabler�delete)rr'r&s  �rrAz!AnboxEntitlement._perform_disableTs���
�� ��*�$�+�+�-�r�obligationsr.c��y)NF�)rrCr.s   r�_should_enable_by_defaultz*AnboxEntitlement._should_enable_by_default]s��r)$�__name__�
__module__�__qualname__�namer
�ANBOX_TITLE�title�ANBOX_DESCRIPTION�description�urls�ANBOX_HOME_PAGE�help_doc_url�ANBOX_HELP_TEXT�	help_text�
repo_key_file�
repo_url_tmpl�affordance_check_series�supports_access_only�origin�propertyrrr�boolrrr r�ProgressWrapperr5rAr�strrrF�
__classcell__)r&s@rrrs�����D�� � �E��,�,�K��=�=�0�0�L��(�(�I�0�M��M�"����
�F�
��2�����E�$��1A�(B�"B�C��"��(;�(;����<��)<�)<�����S��>��:B�3�-��	
�rrN)�typingrrrr�uaclientrrr	r
r�(uaclient.entitlements.entitlement_statusrr
�uaclient.entitlements.repor�uaclient.files.state_filesrr�uaclient.typesr�get_event_logger�eventrrErr�<module>rfsC��-�-�B�B��7��3�%��%�%�'��N��Nr

Zerion Mini Shell 1.0