pyats.easypy.reporter package¶
- pyats.easypy.reporter.report_func(name, *report_args, condition=None, **report_kwargs)¶
Submodules¶
- class pyats.easypy.reporter.ae.AEJobReporter(parent=None)¶
Bases:
pyats.easypy.reporter.context.ContextReporter
- child()¶
- start(job)¶
- stop()¶
- class pyats.easypy.reporter.ae.AEPluginContext(name, client, suppress=False, passx_on_fail=False, type_='PluginSection')¶
Bases:
object
- errored(reason=None, data=None)¶
- failed(reason=None, data=None)¶
- skipped(reason=None, data=None)¶
- class pyats.easypy.reporter.ae.AEPluginReporter(*args, plugin, obj, **kwargs)¶
Bases:
pyats.easypy.reporter.context.ContextReporter
- child(section)¶
- report(name, *args, **kwargs)¶
- classmethod report_func(name, suppress=None, type_=None)¶
- start()¶
- stop()¶
- class pyats.easypy.reporter.ae.AEPluginSectionReporter(section, *args, **kwargs)¶
Bases:
pyats.easypy.reporter.context.ContextReporter
- child(section)¶
- start()¶
- stop(type_=None, val=None, tb=None)¶
- class pyats.easypy.reporter.ae.AEReporter(*args, **kwargs)¶
Bases:
pyats.easypy.reporter.base.Reporter
Easypy default reporter that calls AEClient to start and stop job/task reporting contexts. At the end of jobfile execution, this class also generates:
corresponding jobfile results and email report contents.
Result yaml file
ResultDetails/ResultSummary xml files
- child()¶
- classmethod configure_parser(parser, legacy_cli=True)¶
- details()¶
- plugin(plugin, obj)¶
- start()¶
- stop()¶
- class pyats.easypy.reporter.base.Reporter(*args, **kwargs)¶
Bases:
pyats.easypy.base.Component
,pyats.easypy.reporter.context.ContextReporter
- classmethod configure_parser(parser, legacy_cli=True)¶
- class pyats.easypy.reporter.context.ContextReporter(parent=None)¶
Bases:
object
A context reporter is a reporter that can be used as a context manager. It automatically registers/reports/logs the start and end of content running within it, and is naturally used to report on events, activities and results of this content.
A context reporter is designed as a nested chain of parent-child relationship. Each reporter could have a parent, and each children is instantiated through the the parent’s child() api. This api is essentially an injection point allowing subclasses to implement their own parent/child relationship.
When a context reporter has a parent, it automatically gain the ability to access its parent’s (and subsequently, all parent’s parents) attribute as its own attributes without having to explicitly state self.parent.<attr>.
- child()¶
- property parent¶
- property parents¶
- start()¶
- stop()¶