ó
    x[h  ã                   óž   • S r SSKrSSKJr  SSKJrJr  \R                  " \5      r	 " S S\5      r
 " S S\5      rS	\S
\\
\\   4   4S jrg)z0Classes and functions related to event handling.é    N)ÚEnum)ÚDictÚSetc                   ó   • \ rS rSrSrS rSrg)Ú
EventScopeé   Únetworkc                 ó   • U R                   $ ©N©Úvalue©Úselfs    Ú1/usr/lib/python3/dist-packages/cloudinit/event.pyÚ__str__ÚEventScope.__str__   ó   € Ø�z‰zÐó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚNETWORKr   Ú__static_attributes__r   r   r   r   r      s   † ð €Gõr   r   c                   ó.   • \ rS rSrSrSrSrSrSrS r	Sr
g	)
Ú	EventTypeé   zCEvent types which can generate maintenance requests for cloud-init.Úbootzboot-new-instancezboot-legacyÚhotplugc                 ó   • U R                   $ r   r   r   s    r   r   ÚEventType.__str__"   r   r   r   N)r   r   r   r   Ú__doc__ÚBOOTÚBOOT_NEW_INSTANCEÚBOOT_LEGACYÚHOTPLUGr   r   r   r   r   r   r      s!   † ÙMð €DØ+ÐØ€KØ€Gõr   r   Úuser_configÚreturnc                 ó˜  • 0 nU R                  5        H=  u  p# [        U5      n US    Vs/ s H  n[        U5      PM     nn[        U5      X'   M?     U$ ! [         a+  n[        R	                  S[        U5      U5         SnAMs  SnAff = fs  snf ! [         a,  n[        R	                  S[        U5      U5        / n SnAN�SnAff = f)zøConvert 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' scopeNÚwhen)Úitemsr   Ú
ValueErrorÚLOGÚwarningÚstrr   Úset)r(   Úupdate_configÚscopeÚ
scope_listÚ	new_scopeÚeÚxÚ
new_valuess           r   Úuserdata_to_eventsr9   &   sÍ   € ð €MØ(×.Ñ.Ö0Ñˆð	Ü" 5Ó)ˆIð	Ø0:¸6Ò0BÓCÒ0B¨1œ) Až,Ñ0BˆJÐCô $' z£?ˆÓ ñ' 1ð* Ðøô% ó 	Ü�K‰KØ@Ü�A“Øôõ
 ûð	üò DøÜó 	Ü�K‰KØ@Ü�A“Øôð
 �Jûð	ús?   ™A¥B¬BÁBÁ
BÁ  BÂBÂBÂ
C	Â"CÃC	)r#   ÚloggingÚenumr   Útypingr   r   Ú	getLoggerr   r.   r   r   Údictr9   r   r   r   Ú<module>r?      sZ   ðá 6ã Ý ß à×Ò˜Ó!€ô�ô ô�ô ð"! Dð !¨T°*¸cÀ)¹nÐ2LÑ-Mõ !r   