0 !+ˆ ƒšoÌa–ß=¿JJj"Tâ‚ ÆÁq°)‹FÿÑÅ+ Index of /FSS-BCZ/root/usr/lib/python3.9/site-packages/cloudinit/cmd/devel

Index of /FSS-BCZ/root/usr/lib/python3.9/site-packages/cloudinit/cmd/devel

 NameLast modifiedSizeDescription

 Parent Directory   -  
 __init__.py 2024-11-25 11:09 899  
 __pycache__/ 2026-06-30 08:11 -  
 hotplug_hook.py 2024-11-25 11:09 11K 
 logs.py 2024-11-25 11:09 14K 
 make_mime.py 2024-11-25 11:09 4.1K 
 net_convert.py 2024-11-25 11:09 5.6K 
 parser.py 2024-11-25 11:09 1.4K 
 render.py 2024-11-25 11:09 3.7K 

#-ˆl–Ðz¾”ji?u4 \¸î*bѿРƒ|MÏ¿Ò$-# Copyright (C) 2015 Canonical Ltd. # # This file is part of cloud-init. See LICENSE file for license information. """ events for reporting. The events here are designed to be used with reporting. They can be published to registered handlers with report_event. """ import base64 import logging import os.path import time from typing import List from cloudinit import performance from cloudinit.reporting import ( available_handlers, instantiated_handler_registry, ) from cloudinit.reporting.handlers import ReportingHandler FINISH_EVENT_TYPE = "finish" START_EVENT_TYPE = "start" DEFAULT_EVENT_ORIGIN = "cloudinit" LOG = logging.getLogger(__name__) class _nameset(set): def __getattr__(self, name): if name in self: return name raise AttributeError("%s not a valid value" % name) status = _nameset(("SUCCESS", "WARN", "FAIL")) class ReportingEvent: """Encapsulation of event formatting.""" def __init__( self, event_type, name, description, origin=DEFAULT_EVENT_ORIGIN, timestamp=None, ): self.event_type = event_type self.name = name self.description = description self.origin = origin if timestamp is None: timestamp = time.time() self.timestamp = timestamp def as_string(self): """The event represented as a string.""" return "{0}: {1}: {2}".format( self.event_type, self.name, self.description ) def as_dict(self): """The event represented as a dictionary.""" return { "name": self.name, "description": self.description, "event_type": self.event_type, "origin