| Server IP : 3.96.16.70 / Your IP : 216.73.216.15 Web Server : Apache System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3.9/site-packages/cloudinit/reporting/__pycache__/ |
Upload File : |
a
�½b# � @ s� d Z ddlZddlZddlZddlmZmZ dZdZ dZ
G dd � d e�Zed
�Z
G dd� de�ZG d
d� de�Zddd�Ze
jdfdd�Zdd� ZG dd� de�Zdd� ZdS )z�
events for reporting.
The events here are designed to be used with reporting.
They can be published to registered handlers with report_event.
� N� )�available_handlers�instantiated_handler_registryZfinish�startZ cloudinitc @ s e Zd Zdd� ZdS )�_namesetc C s || v r|S t d| ��d S )Nz%s not a valid value)�AttributeError)�self�name� r
�>/usr/lib/python3.9/site-packages/cloudinit/reporting/events.py�__getattr__ s z_nameset.__getattr__N)�__name__�
__module__�__qualname__r r
r
r
r r s r )�SUCCESS�WARN�FAILc @ s. e Zd ZdZedfdd�Zdd� Zdd� ZdS ) �ReportingEventz"Encapsulation of event formatting.Nc C s2 || _ || _|| _|| _|d u r(t�� }|| _d S �N)�
event_typer �description�origin�time� timestamp)r r r r r r r
r
r �__init__$ s zReportingEvent.__init__c C s d� | j| j| j�S )z"The event represented as a string.z
{0}: {1}: {2})�formatr r r �r r
r
r � as_string4 s �zReportingEvent.as_stringc C s | j | j| j| j| jd�S )z&The event represented as a dictionary.�r r r r r r r r
r
r �as_dict: s �zReportingEvent.as_dict)r
r r �__doc__�DEFAULT_EVENT_ORIGINr r r r
r
r
r r ! s �
r c s8 e Zd Zejdf� fdd� Zdd� Z� fdd�Z� ZS )�FinishReportingEventNc sD t t| ��t||� || _|d u r&g }|| _|tvr@td| ��d S )NzInvalid result: %s)�superr"