Your IP : 216.73.217.13


Current Path : /proc/thread-self/root/lib/python3/dist-packages/cloudinit/__pycache__/
Upload File :
Current File : //proc/thread-self/root/lib/python3/dist-packages/cloudinit/__pycache__/cloud.cpython-38.pyc

U

�Ad�
�@sxddlZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
ddlmZe�e�ZGdd	�d	�ZdS)
�N)�Optional)�log)�Distro)�Paths�Runners)�events)�
DataSourcec@s�eZdZd#eeeeeee	j
d�dd�Zdd�Ze
dd��Zd$d
d�Zdd
�Zd%dd�Zdd�Ze
dd��Zdd�Zdd�Zd&dd�Zdd�Zd'dd�Zd(dd �Zd)d!d"�ZdS)*�CloudN)�
datasource�paths�cfg�distro�runners�reportercCs@||_||_||_||_||_|dkr6tjdddd�}||_dS)Nzunnamed-cloud-reporterF)�nameZdescriptionZreporting_enabled)r
rr
�_cfg�_runnersr�ReportEventStackr)�selfr
rrr
rr�r�1/usr/lib/python3/dist-packages/cloudinit/cloud.py�__init__ s	�zCloud.__init__cCst��t�|j�dS�N)�loggingZresetLoggingZsetupLoggingr�rrrr�
cycle_logging9szCloud.cycle_loggingcCst�|j�Sr)�copy�deepcopyrrrrrr=sz	Cloud.cfgFcCs|j�|||||�Sr)r�run)rrZfunctor�argsZfreqZ
clear_on_failrrrrBsz	Cloud.runcCs6|jj|}tj�|�s2t�dtj�|�|�dS|S)Nz-No template found in %s for template named %s)rZtemplate_tpl�os�path�isfile�LOGZwarning�dirname)rr�fnrrr�get_template_filenameEs
�zCloud.get_template_filenameTcCs|j�|�Sr)r
�get_userdata)rZapply_filterrrrr'QszCloud.get_userdatacCs
|j��Sr)r
�get_instance_idrrrrr(TszCloud.get_instance_idcCs|jjSr)r
�launch_indexrrrrr)WszCloud.launch_indexcCs
|j��Sr)r
�get_public_ssh_keysrrrrr*[szCloud.get_public_ssh_keyscCs
|j��Sr)r
�
get_localerrrrr+^szCloud.get_localecCs|jj||d�S)N)�fqdn�
metadata_only)r
�get_hostname)rr,r-rrrr.as�zCloud.get_hostnamecCs|j�|�Sr)r
�device_name_to_device�rrrrrr/fszCloud.device_name_to_devicecCs|j�|�Sr)r�
get_ipath_curr0rrrr1iszCloud.get_ipath_curcCs|j�|�Sr)r�	get_cpathr0rrrr2lszCloud.get_cpathcCs|j�|�Sr)r�	get_ipathr0rrrr3oszCloud.get_ipath)N)NF)T)FF)N)N)N)�__name__�
__module__�__qualname__rr�dictrrrrrrr�propertyrrr&r'r(r)r*r+r.r/r1r2r3rrrrr	s2��






r	)rr �typingrZ	cloudinitrrZcloudinit.distrosrZcloudinit.helpersrrZcloudinit.reportingrZcloudinit.sourcesrZ	getLoggerr4r#r	rrrr�<module>s