404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.142.164.254: ~ $
3

\�me��@snddlZddlZddlmZmZmZmZddlmZej	e
�ZdZej
d�ZdZdZdZGd	d
�d
ej�ZdS)�N)�handlers�mergers�safeyaml�util)�
PER_ALWAYSz
Merge-Typezdict(replace)+list()+str()z
#cloud-configz#cloud-config-jsonpz*# Cloud-config part ignored SCHEMA_ERROR: c@sLeZdZeegZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�ZdS)�CloudConfigPartHandlercKsLtjj|tdd�d|_|jd�|_d|kr<|j|d�|_g|_g|_dS)N�)�versionZcloud_configZcloud_config_path)	r�Handler�__init__r�	cloud_bufZ	get_ipath�cloud_fn�
file_names�error_file_names)�self�pathsZ_kwargs�r�"/usr/lib/python3.6/cloud_config.pyr3szCloudConfigPartHandler.__init__cCs�|js
dSg}|jrX|jdt|j��x$|jD]}|s<d}|jd|�q0W|jd�x |jD]}|jt�|���q`W|jdk	r�tdg}|j|�|jt	j
|j��ng}tj|jdj
|�d�dS)Nz# from %s files�?z# %s��
i�)r
r�append�lenr�MERGED_PART_SCHEMA_ERROR_PREFIXr�CLOUD_PREFIX�extendr�dumpsrZ
write_file�join)rZ
file_lines�fnZ
error_file�linesrrr�_write_cloud_config<s&


z*CloudConfigPartHandler._write_cloud_configc
Cs�d}x*tdtgD]}|j|d�}|r|}PqWtj|�}|dkrJtd��tj|�}tj|�}g}	|	j|�|	j|�|	s~t	}	||	fS)NrzX-%szempty cloud config)
�MERGE_HEADER�getrZ	load_yaml�
ValueErrorrZdict_extract_mergers�string_extract_mergersr�DEF_MERGERS)
r�payload�headersZmerge_header_headers�hZtmp_h�payload_yamlZmergers_yamlZmergers_headerZall_mergersrrr�_extract_mergersVs"




z'CloudConfigPartHandler._extract_mergerscCsD|j�}tj|td�}tjj|�}tjd|�|j	|j
dd�|_
dS)N)�prefixz!Merging by applying json patch %sF)Zin_place)�lstriprZstrip_prefix_suffix�JSONP_PREFIX�	jsonpatchZ	JsonPatchZfrom_string�LOG�debugZapplyr)rr&Zpatchrrr�_merge_patchms
z#CloudConfigPartHandler._merge_patchcCs:|j||�\}}tjd|�tj|�}|j|j|�|_dS)NzMerging by applying %s)r*r/r0rZ	construct�merger)rr&r'r)Z
my_mergersZmergerrrr�_merge_partxs
z"CloudConfigPartHandler._merge_partcCsg|_d|_dS)N)rr)rrrr�_reset~szCloudConfigPartHandler._resetc	Cs|tjkr|j�dS|tjkr4|j�|j�dSyl|jdksH|jrNi|_|tjtkrh|j	|�n|j
||�xdD]}|j|d�}qzW|jj|j
��Wnbtk
r�}z$|jj|j
��tjd||�WYdd}~Xn$tk
�rtjtd|�YnXdS)Nr�
�	� z2Failed at merging in cloud config part from %s: %sz.Failed at merging in cloud config part from %s)rr5r6)rZ
CONTENT_STARTr4ZCONTENT_ENDr rrZINCLUSION_TYPES_MAPr-r1r3�replacer�stripr#rr/Zwarning�	ExceptionrZlogexc)	r�dataZctype�filenamer&Z	frequencyr'�i�errrrr�handle_part�s2


z"CloudConfigPartHandler.handle_partN)
�__name__�
__module__�__qualname__rr-�prefixesrr r*r1r3r4r?rrrrr.s	r)Zloggingr.Z	cloudinitrrrrZcloudinit.settingsrZ	getLoggerr@r/r!r$r%rr-rr
rrrrr�<module>s



Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 6.43 KB 0644
__init__.cpython-36.pyc File 6.43 KB 0644
boot_hook.cpython-36.opt-1.pyc File 1.74 KB 0644
boot_hook.cpython-36.pyc File 1.74 KB 0644
cloud_config.cpython-36.opt-1.pyc File 3.73 KB 0644
cloud_config.cpython-36.pyc File 3.73 KB 0644
jinja_template.cpython-36.opt-1.pyc File 6.19 KB 0644
jinja_template.cpython-36.pyc File 6.19 KB 0644
shell_script.cpython-36.opt-1.pyc File 1.03 KB 0644
shell_script.cpython-36.pyc File 1.03 KB 0644
shell_script_by_frequency.cpython-36.opt-1.pyc File 2.13 KB 0644
shell_script_by_frequency.cpython-36.pyc File 2.13 KB 0644