Current Dir: /snap/core22/2955/usr/lib/python3/dist-packages/cloudinit/__pycache__/

[FILE] apport.cpython-310.pyc [ edit | delete | rename ]
[FILE] atomic_helper.cpython-310.pyc [ edit | delete | rename ]
[FILE] cloud.cpython-310.pyc [ edit | delete | rename ]
[FILE] dmi.cpython-310.pyc [ edit | delete | rename ]
[FILE] event.cpython-310.pyc [ edit | delete | rename ]
[FILE] features.cpython-310.pyc [ edit | delete | rename ]
[FILE] gpg.cpython-310.pyc [ edit | delete | rename ]
[FILE] helpers.cpython-310.pyc [ edit | delete | rename ]
[FILE] importer.cpython-310.pyc [ edit | delete | rename ]
[FILE] lifecycle.cpython-310.pyc [ edit | delete | rename ]
[FILE] netinfo.cpython-310.pyc [ edit | delete | rename ]
[FILE] performance.cpython-310.pyc [ edit | delete | rename ]
[FILE] persistence.cpython-310.pyc [ edit | delete | rename ]
[FILE] registry.cpython-310.pyc [ edit | delete | rename ]
[FILE] safeyaml.cpython-310.pyc [ edit | delete | rename ]
[FILE] settings.cpython-310.pyc [ edit | delete | rename ]
[FILE] signal_handler.cpython-310.pyc [ edit | delete | rename ]
[FILE] simpletable.cpython-310.pyc [ edit | delete | rename ]
[FILE] socket.cpython-310.pyc [ edit | delete | rename ]
[FILE] ssh_util.cpython-310.pyc [ edit | delete | rename ]
[FILE] stages.cpython-310.pyc [ edit | delete | rename ]
[FILE] subp.cpython-310.pyc [ edit | delete | rename ]
[FILE] templater.cpython-310.pyc [ edit | delete | rename ]
[FILE] temp_utils.cpython-310.pyc [ edit | delete | rename ]
[FILE] type_utils.cpython-310.pyc [ edit | delete | rename ]
[FILE] url_helper.cpython-310.pyc [ edit | delete | rename ]
[FILE] user_data.cpython-310.pyc [ edit | delete | rename ]
[FILE] util.cpython-310.pyc [ edit | delete | rename ]
[FILE] version.cpython-310.pyc [ edit | delete | rename ]
[FILE] warnings.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]

Viewing: /snap/core22/2955/usr/lib/python3/dist-packages/cloudinit/__pycache__/event.cpython-310.pyc

o

��i�@stdZddlZddlmZddlmZmZe�e�Z	Gdd�de�Z
Gdd�de�Zd	ed
ee
eeffdd�Z
dS)
z0Classes and functions related to event handling.�N)�Enum)�Dict�Setc@seZdZdZdd�ZdS)�
EventScope�networkcC�|jS�N��value��self�r
�1/usr/lib/python3/dist-packages/cloudinit/event.py�__str__�zEventScope.__str__N)�__name__�
__module__�__qualname__�NETWORKrr
r
r
rrsrc@s(eZdZdZdZdZdZdZdd�ZdS)	�	EventTypezCEvent types which can generate maintenance requests for cloud-init.�bootzboot-new-instancezboot-legacy�hotplugcCrrr	rr
r
rr"rzEventType.__str__N)	rrr�__doc__�BOOT�BOOT_NEW_INSTANCE�BOOT_LEGACY�HOTPLUGrr
r
r
rrsr�user_config�returncCs�i}|��D]U\}}zt|�}Wnty+}zt�dt|�|�WYd}~qd}~wwzdd�|dD�}WntyT}zt�dt|�|�g}WYd}~nd}~wwt|�||<q|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' scopeNcSsg|]}t|��qSr
)r)�.0�xr
r
r�
<listcomp>=sz&userdata_to_events.<locals>.<listcomp>�when)�itemsr�
ValueError�LOG�warning�str�set)r�
update_config�scope�
scope_list�	new_scope�e�
new_valuesr
r
r�userdata_to_events&s4������r/)r�logging�enumr�typingrr�	getLoggerrr%rr�dictr/r
r
r
r�<module>s

"
Upload File: