HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //usr/lib/python3/dist-packages/cloudinit/__pycache__/event.cpython-310.pyc
o

쑛h�@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

"