| Server IP : 39.108.156.168 / Your IP : 216.73.216.104 Web Server : nginx/1.24.0 System : Linux e2.ksyuki.com 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/3434157/root/lib/python3/dist-packages/cloudinit/__pycache__/ |
Upload File : |
�
��i� � � � 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"