HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/cloudinit/config/__pycache__/cc_final_message.cpython-38.pyc
U

Ӈg
�@s�UdZddlZddlmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZeZd
e
gegd�Zeed<e�e�Zd
Zee	eedd�dd�ZdS)z@Final Message: Output final message when cloud-init has finished�N)�	templater�util�version)�Cloud)�Config)�
MetaSchema)�ALL_DISTROS)�log_util)�
PER_ALWAYSZcc_final_message)�idZdistros�	frequencyZactivate_by_schema_keys�metazy## template: jinja
Cloud-init v. {{version}} finished at {{timestamp}}. Datasource {{datasource}}.  Up {{uptime}} seconds)�name�cfg�cloud�args�returnc
Cs~d}t|�dkrt|d�}nt�|dd�}|��}|s<t}t��}t��}t�	�}zR|||t|j
�d�}|�tdd�|�
�D���tjdt�||�dd	td
�WnTtjk
r�}	zt�tdt|	��W5d}	~	XYn tk
r�t�td�YnX|jj}
z"d
|||f}tj|
|dd�Wn$tk
�rJt�td|
�YnX|j
jdk�rz|j
j�d�dgk�rzt�d�dS)N�rZ
final_message)�uptimeZ	timestampr�
datasourcecSsg|]\}}|��|f�qS�)�upper)�.0�k�vrr�C/usr/lib/python3/dist-packages/cloudinit/config/cc_final_message.py�
<listcomp><szhandle.<locals>.<listcomp>z%s
FT)Zconsole�stderr�logz,Failed to render templated final message: %sz'Failed to render final message templatez%s - %s - v. %s
)Zensure_dir_existsz%Failed to write boot finished file %s�NoneZdatasource_listzUsed fallback datasource)�len�strrZget_cfg_option_str�strip�FINAL_MESSAGE_DEFrZtime_rfc2822rZversion_stringr�update�dict�itemsr	Z	multi_logrZ
render_string�LOGZJinjaSyntaxParsingExceptionZlogexc�	Exception�pathsZ
boot_finishedZ
write_fileZdsnameZsys_cfg�getZwarning)rrrrZmsg_inrZtsZcverZsubs�eZboot_fin_fn�contentsrrr�handle&sP��
�r-)�__doc__ZloggingZ	cloudinitrrrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarZcloudinit.distrosrZ
cloudinit.logr	Zcloudinit.settingsr
rr
�__annotations__Z	getLogger�__name__r'r#r!�listr-rrrr�<module>s$�
�