![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/cloudinit/reporting/__pycache__/ |
o }��f�# � @ s� d Z ddlZddlZddlZddlmZ ddlmZm Z ddl mZ dZdZ dZG d d � d e�Zed�ZG dd � d �ZG dd� de�Zddd�Zejdfdd�Zdd� ZG dd� d�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)�List)�available_handlers�instantiated_handler_registry)�ReportingHandler�finish�start� cloudinitc @ s e Zd Zdd� ZdS )�_namesetc C s || v r|S t d| ��)Nz%s not a valid value)�AttributeError)�self�name� r �</usr/lib/python3/dist-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 rt�� }|| _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_string9 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"