3
\me( @ sZ d Z ddlmZ ddlmZ ddlmZmZ dddiiZdd Z d
d Z
e Ze e dS )
z
cloud-init reporting framework
The reporting framework is intended to allow all parts of cloud-init to
report events in a structured manner.
)Type)DictRegistry)HandlerTypeavailable_handlersZloggingtypelogc C sf x`| j D ]T\}}|s&tj|dd q
|j }tj|jd }tj| |f |}tj|| q
W dS )zUpdate the instantiated_handler_registry.
:param config:
The dictionary containing changes to apply. If a key is given
with a False-ish value, the registered handler matching that name
will be unregistered.
T)forcer N)itemsinstantiated_handler_registryZunregister_itemcopyr registered_itemspopZ
register_item)configZhandler_nameZhandler_configclsinstance r /usr/lib/python3.6/__init__.pyupdate_configuration s
r c C s xt jj D ]} | j qW d S )N)r
r valuesflush)Zhandlerr r r flush_events- s r N)__doc__Ztypingr Zcloudinit.registryr Zcloudinit.reporting.handlersr r ZDEFAULT_CONFIGr r r
r r r r