%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__/landscape.cpython-312.pyc

�

�Hcf�
����ddlZddlmZmZmZmZddlmZmZm	Z	m
Z
mZmZddl
mZddlmZej"ej$e��Zej*�ZGd�de�Zy)�N)�Any�Dict�Optional�Tuple)�api�event_logger�
exceptions�messages�system�util)�
UAEntitlement)�ApplicationStatusc	���eZdZdZej
ZejZejjZejZ
defd�Zdefd�Zdej$defd�Zdej$defd�Zdeeeej2ffd�Zdeeeej2ffd	�Z	dd
eeefdeeefdedef�fd
�
Z�xZ S)�LandscapeEntitlement�	landscape�returnc��y�N����selfs �A/usr/lib/python3/dist-packages/uaclient/entitlements/landscape.py�enable_stepsz!LandscapeEntitlement.enable_steps����c��yrrrs r�
disable_stepsz"LandscapeEntitlement.disable_stepsrr�progressc	���dg|jz}|jr
d|vr|dgz
}tjd|�|j	tjtjjdj|�����	tj||j��y
#tj$r�}tj|�|jrq|j!d|j"j%��tj&|j(j%�|j"j%����Yd}~y	d}~wwxYw)N�landscape-config�--silentz
Executing: %r� ��command)�pipe_stdouterr�info)�stdout�stderrFT)�
extra_args�
assume_yes�LOG�debugrr�redact_sensitive_logsr
�EXECUTING_COMMAND�format�joinr�subpr	�ProcessExecutionError�	exception�emitr)�strip�LandscapeConfigFailedr(�rr�cmd�es    r�_perform_enablez$LandscapeEntitlement._perform_enables	��!�"�T�_�_�4���?�?�z��4��J�<��C��	�	�/�3�'�����&�&��*�*�1�1�#�(�(�3�-�1�H�
�	
�
		��K�K��D�O�O�<����/�/�	��M�M�!������
�
�f�a�h�h�n�n�&6�7� �6�6��8�8�>�>�+�A�H�H�N�N�4D�����	�s�!B1�1E �BE�E c��ddg}|jtjjdj	|����	tj|�|jdtj�y#tj$rH}tj|�|jdt|�j��Yd}~�wd}~wwxYw)Nr!z	--disabler#r$r'T)rr
r/r0r1rr2r	r3r,�errorr5�strr6�LANDSCAPE_CONFIG_REMAINSr8s    r�_perform_disablez%LandscapeEntitlement._perform_disable0s���!�;�/������&�&�-�-�c�h�h�s�m�-�D�	
�	2��K�K���
	�
�
�f�h�?�?�@���
�/�/�	2��I�I�a�L��M�M�&�#�a�&�,�,�.�1�1��	2�s�A:�:C�
>C�Cc��|j�r'tjd�rtjdfStj
tjfS)Nzlandscape-client)�are_required_packages_installedr�is_systemd_unit_activer�ENABLED�DISABLEDr
�LANDSCAPE_SERVICE_NOT_ACTIVErs r�application_statusz'LandscapeEntitlement.application_status?sN��
�0�0�2��-�-�.@�A�%�-�-�t�4�4�"�*�*��5�5��
rc��tj�r	tjgd��yy#tj
$rdtjfcYSwxYw)N)r!z--is-registeredr"T)FN)r�we_are_currently_rootrr2r	r3r
�LANDSCAPE_NOT_REGISTEREDrs r�enabled_warning_statusz+LandscapeEntitlement.enabled_warning_statusMsV��
�%�%�'�
����G����
�3�3�
���5�5���
�s�/�%A�A�orig_access�deltas�allow_enablec�(��t�|�||d��S)NF)rN)�super�process_contract_deltas)rrLrMrN�	__class__s    �rrQz,LandscapeEntitlement.process_contract_deltas_s#����w�.���e�/�
�	
r)F)!�__name__�
__module__�__qualname__�namer
�LANDSCAPE_TITLE�title�LANDSCAPE_DESCRIPTION�description�urls�LANDSCAPE_HOME_PAGE�help_doc_url�LANDSCAPE_HELP_TEXT�	help_text�intrrr�ProgressWrapper�boolr;r@rrr�NamedMessagerGrKrr>rrQ�
__classcell__)rRs@rrrs����D��$�$�E��0�0�K��=�=�4�4�L��,�,�I��c���s����(;�(;����.
��)<�)<�
��
��	� �(�8�+@�+@�"A�A�	B���	�t�X�h�3�3�4�4�	5��,#�	

��#�s�(�^�

��S�#�X��

��	

�

�

�

rr)�logging�typingrrrr�uaclientrrr	r
rr�uaclient.entitlements.baser
�(uaclient.entitlements.entitlement_statusr�	getLogger�replace_top_level_logger_namerSr,�get_event_logger�eventrrrr�<module>rnsX���-�-�J�J�4�F��g���:��:�:�8�D�E��%��%�%�'��]
�=�]
r

Zerion Mini Shell 1.0