%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/uaclient/cli/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/uaclient/cli/__pycache__/disable.cpython-312.pyc |
� �(�fw* � �� � d dl Z d dlZd dlZd dlmZmZ d dlmZmZm Z m Z mZmZm Z mZ d dlmZ d dlmZmZ d dlmZ d dlmZ d dlmZmZmZ d d lmZ d d lmZ e j@ � Z! ejD ejF e$� � Z%dejL de'd ee dee' de'de'fd�Z(dd�d�Z)ejT ejV ejX ejZ � ej\ d� d� � � � � Z/ edej` ejb e/ejd e edejf ji djk e jl ejL � �� � �� dd�� edejn ji d�� d �!� ed"ejp ji d#�$� dd#d%gd#�&� ed'ejr d �!� g�(� g�)� Z:y)*� N)�Dict�List)�config�contract�entitlements�event_logger� exceptions�messages�status�util)�ProgressWrapper)�ServiceWithDependencies� _dependencies)�_enabled_services)�cli_util)�ProArgument�ProArgumentGroup� ProCommand)�HelpCategory)�CanDisableFailure�cfg�service�all_dependencies�enabled_service_names�called_name� service_titlec � � g }|D ]\ }|j |k( s|j |vr�!|j D ]- }|j |k( s�|j |j � �/ �^ |D ]f } t j | | � } t j j || �� }t j |�� r�Qt j || �� � y )N)�service_being_disabled�dependent_service)�msg)�name� depends_on�appendr � get_titler �DEPENDENT_SERVICE�formatr �prompt_for_confirmationr �DependentServiceStopsDisable)r r r r r r �dependent_services�s�requirementr �dependent_service_title�user_msgs �6/usr/lib/python3/dist-packages/uaclient/cli/disable.py�prompt_for_dependency_handlingr/ s� � � �� � 2���6�6�W�����.C� C���<�<� 2�K����7�*�"�)�)�!�&�&�1� 2�2� 0� ��".�"8�"8��"�# �� �-�-�4�4�#0�5� 5� �� �+�+��9��9�9�'4�"9�� �� T)� update_statusc �z � | j }|�|} |rt � }nt t j |�� � }| j |� \ }}|s�t j | j � |��t |t � r�|j ��t j |j j � t j |j j |j j | j �� nt j | j � |rt j |�� |S )a Perform the disable action on a named entitlement. :param entitlement_name: the name of the entitlement to enable :param cfg: the UAConfig to pass to the entitlement :param json_output: output should be json only @return: True on success, False otherwise �� assume_yes)� error_msg� error_coder �r )�enabled_variantr r �CLIEnableDisableProgress�disable�event�service_failedr! � isinstancer �message�infor �error�service_processedr ) �entitlementr �json_outputr4 r1 �variant�progress�ret�reasons r. �perform_disablerH >