HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //snap/core18/2956/usr/lib/python3/dist-packages/cloudinit/__pycache__/cloud.cpython-36.pyc
3

�Ad�
�@sxddlZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
ddlmZeje�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__cCstj�tj|j�dS)N)�loggingZresetLoggingZsetupLoggingr)rrrr�
cycle_logging9szCloud.cycle_loggingcCstj|j�S)N)�copy�deepcopyr)rrrrr=sz	Cloud.cfgFcCs|jj|||||�S)N)r�run)rrZfunctor�argsZfreqZ
clear_on_failrrrrBsz	Cloud.runcCs6|jj|}tjj|�s2tjdtjj|�|�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|jj|�S)N)r
�get_userdata)rZapply_filterrrrr%QszCloud.get_userdatacCs
|jj�S)N)r
�get_instance_id)rrrrr&TszCloud.get_instance_idcCs|jjS)N)r
�launch_index)rrrrr'WszCloud.launch_indexcCs
|jj�S)N)r
�get_public_ssh_keys)rrrrr([szCloud.get_public_ssh_keyscCs
|jj�S)N)r
�
get_locale)rrrrr)^szCloud.get_localecCs|jj||d�S)N)�fqdn�
metadata_only)r
�get_hostname)rr*r+rrrr,aszCloud.get_hostnamecCs|jj|�S)N)r
�device_name_to_device)rrrrrr-fszCloud.device_name_to_devicecCs|jj|�S)N)r�
get_ipath_cur)rrrrrr.iszCloud.get_ipath_curcCs|jj|�S)N)r�	get_cpath)rrrrrr/lszCloud.get_cpathcCs|jj|�S)N)r�	get_ipath)rrrrrr0oszCloud.get_ipath)N)NF)T)FF)N)N)N)�__name__�
__module__�__qualname__rr�dictrrrrrrr�propertyrrr$r%r&r'r(r)r,r-r.r/r0rrrrr	s 




r	)rrZtypingrZ	cloudinitrrZcloudinit.distrosrZcloudinit.helpersrrZcloudinit.reportingrZcloudinit.sourcesrZ	getLoggerr1r!r	rrrr�<module>s