%PDF- %PDF-
Direktori : /proc/self/root/lib/python3/dist-packages/uaclient/cli/__pycache__/ |
Current File : //proc/self/root/lib/python3/dist-packages/uaclient/cli/__pycache__/disable.cpython-312.pyc |
� ��Jh�* � �� � d dl Z d dlZd dlZd dlmZmZmZ d dlmZm Z m Z mZmZm Z mZmZ d dlmZ d dlmZmZ d dlmZ d dlmZ d dlmZmZmZ d d lmZ d d lm Z ejB � Z" ejF ejH e%� � Z&dejN de(d ee dee( de(de(fd�Z)dd�d�Z*ejV ejX ejZ ej\ � ej^ d� d� � � � � Z0 ede jb e jd e0ejf e ede jh jk djm e jn ejN � �� � �� dd�� ede jp jk d�� d �!� ed"e jr jk d#�$� dd#d%gd#�&� ed'e jt d �!� g�(� g�)� Z;y)*� N)�Any�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_handlingr0 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"