%PDF- %PDF-
Direktori : /lib/python3/dist-packages/cloudinit/__pycache__/ |
Current File : //lib/python3/dist-packages/cloudinit/__pycache__/cloud.cpython-312.pyc |
� �f� � � � d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm Z d dl mZ d dlm Z ej e� Z G d� d� Zy) � N)�Optional)�Distro)�Paths�Runners)�events)� DataSourcec � � e Zd Z ddedededededee j fd�Zed � � Z dd �Zd� Zdd�Zd � Zed� � Zd� Zd� Zdd�Zd� Zdd�Zdd�Zdd�Zy)�CloudN� datasource�paths�cfg�distro�runners�reporterc � � || _ || _ || _ || _ || _ |�t j ddd�� }|| _ y )Nzunnamed-cloud-reporterF)�name�description�reporting_enabled)r r r �_cfg�_runnersr �ReportEventStackr )�selfr r r r r r s �1/usr/lib/python3/dist-packages/cloudinit/cloud.py�__init__zCloud.__init__ sO � � %����� ������ ��� ����.�.�-�4�"'��H� !�� � c �@ � t j | j � S �N)�copy�deepcopyr �r s r r z Cloud.cfg6 s � � �}�}�T�Y�Y�'�'r c �@ � | j j |||||� 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)r r �functor�args�freq� clear_on_fails r r"