pyats.aereport.runinfo package¶
runinfo
– RunInfo¶
This module contains the RunInfo class that is used by several AEReport elements such as TestScript, TestSection, TestResult, etc.
- class pyats.aereport.runinfo.RunInfo¶
Bases:
pyats.aereport.toplevel.aereportelement.AEReportElement
Class based on the following schema definition
<xs:complexType name="runinfoType"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="comment" minOccurs="0" /> <xs:element name="diag" minOccurs="0" /> <xs:element name="error" type="xrefType" minOccurs="0" /> <xs:element name="pause" minOccurs="0"></xs:element> <xs:element name="abort" minOccurs="0"></xs:element> <xs:element name="device" minOccurs="0"></xs:element> <xs:element ref="userDef" minOccurs="0" /> </xs:sequence> </xs:complexType>
Submodules¶
abort
– Abort Base Class¶
This module implements the Abort class used by RunInfo entries.
- class pyats.aereport.runinfo.abort.Abort(**kwargs)¶
Bases:
pyats.aereport.toplevel.aereportelement.AEReportElement
Aborting a section when a given condition is met.
Class based on the following schema definition
<xs:element name="abort" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="starttime"/> <xs:element name="condition"/> <xs:element name="abortfile"/> </xs:sequence> </xs:complexType> </xs:element>
- starttime¶
starttime
- Type
datetime
device
– Device Class¶
This module implements the Device Class used in RunInfo entries.
- class pyats.aereport.runinfo.device.Device¶
Bases:
pyats.aereport.toplevel.aereportelement.AEReportElement
Commands sent to the device (such as ios cmds)
Class based on the following schema definition
<xs:complexType> <xs:sequence> <xs:element name="starttime" type="xs:dateTime"/> <xs:element name="subcmd"></xs:element> <xs:element name="name"></xs:element> <xs:element name="libref"></xs:element> <xs:element name="transmit"></xs:element> <xs:element name="receive" type="LogFileType"></xs:element> <xs:element name="crash" minOccurs="0"/> <xs:element name="reload" minOccurs="0"/> <xs:element name="traceback" minOccurs="0"/> <xs:element name="stoptime" type="xs:dateTime"/> <xs:element name="runtime"></xs:element> </xs:sequence> </xs:complexType> </xs:element>
- starttime¶
Start time
- Type
datetime
- libref¶
Name of ATS library used to communicate (CSCcon, CATlib, SSCON; see CSCcon doc pages for complete list)
- Type
- stoptime¶
Stop time
- Type
datetime
- runtime¶
The time elapsed between the starttime and the stoptime
- Type
timedelta
userdef
– UserDef Class¶
This module UserDef class used by RunInfoEntry
- class pyats.aereport.runinfo.userdef.UserDef(**kwargs)¶
Bases:
pyats.aereport.toplevel.aereportelement.AEReportElement
UserDef provides users with the flexibility of adding custom elements that are not defined in the XSD.
Class based on the following schema definition
<xs:element name="userDef"> <xs:annotation> <xs:documentation>User defined element will saved here where the name of the element is the attribute and its value is the value for UserDef.</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element>
- attrs¶
The only key in this dictionary should be ‘name’ which is the name attribute of the userDef tag.
- Type
- generate_dom(parent)¶
Override the default behavior of AEReportElement.generate_dom
- Parameters
parent (AEReportElement) – The xml element that should be used as a parent for this userdef