HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991111/root/usr/lib/python3/dist-packages/cloudinit/__pycache__/
Upload File :
Current File : //proc/1991111/root/usr/lib/python3/dist-packages/cloudinit/__pycache__/event.cpython-311.pyc
�

܍~c1���dZddlmZddlmZmZddlmZej	e
��ZGd�de��ZGd�de��Z
d	ed
eeee
ffd�ZdS)
z0Classes and functions related to event handling.�)�Enum)�Dict�Set)�logc��eZdZdZd�ZdS)�
EventScope�networkc��|jS�N��value��selfs �1/usr/lib/python3/dist-packages/cloudinit/event.py�__str__zEventScope.__str__�
���z��N)�__name__�
__module__�__qualname__�NETWORKr�rrrrs*�������G�����rrc�(�eZdZdZdZdZdZdZd�ZdS)�	EventTypezCEvent types which can generate maintenance requests for cloud-init.�bootzboot-new-instancezboot-legacy�hotplugc��|jSrrrs rrzEventType.__str__#rrN)	rrr�__doc__�BOOT�BOOT_NEW_INSTANCE�BOOT_LEGACY�HOTPLUGrrrrrrs@������M�M��D�+���K��G�����rr�user_config�returnc��i}|���D]�\}}	t|��}n@#t$r3}t�dt|��|��Yd}~�Nd}~wwxYw	d�|dD��}nB#t$r5}t�dt|��|��g}Yd}~nd}~wwxYwt
|��||<��|S)aConvert userdata into update config format defined on datasource.

    Userdata is in the form of (e.g):
    {'network': {'when': ['boot']}}

    DataSource config is in the form of:
    {EventScope.Network: {EventType.BOOT}}

    Take the first and return the second
    z.%s! Update data will be ignored for '%s' scopeNc�,�g|]}t|����Sr)r)�.0�xs  r�
<listcomp>z&userdata_to_events.<locals>.<listcomp>>s��C�C�C�1�)�A�,�,�C�C�Cr�when)�itemsr�
ValueError�LOG�warning�str�set)r#�
update_config�scope�
scope_list�	new_scope�e�
new_valuess       r�userdata_to_eventsr7's���M�(�.�.�0�0�3�3���z�	�"�5�)�)�I�I���	�	�	��K�K�@��A����
�
�
�

�H�H�H�H�����
	����	�C�C�
�6�0B�C�C�C�J�J���	�	�	��K�K�@��A����
�
�
�
�J�J�J�J�J�J�����
	����$'�z�?�?�
�i� � ��s,�-�
A*�)A%�%A*�.B�
C�+B;�;CN)r�enumr�typingrr�	cloudinitr�logging�	getLoggerrr-rr�dictr7rrr�<module>r>s���6�6���������������$�$�$�$�$�$��g���!�!��������������������"!�D�!�T�*�c�)�n�2L�-M�!�!�!�!�!�!r