Server IP : 23.254.227.96 / Your IP : 216.73.216.7 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/cloudinit/reporting/__pycache__/ |
Upload File : |
3 ��b# � @ s� d Z ddlZddlZddlZddlmZmZ dZdZ dZ G dd � d e�Zed�Z G d d� de�ZG dd� 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 || kr|S t d| ��d S )Nz%s not a valid value)�AttributeError)�self�name� r �/usr/lib/python3.6/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 kr(tj� }|| _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 dj | 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 )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| �jt||� || _|d kr&g }|| _|tkr@td| ��d S )NzInvalid result: %s)�superr r �FINISH_EVENT_TYPE�result� post_files�status� ValueError)r r r r"