pyats.aereport.tims package¶
tims
– Tims¶
This module implements TIMS section used by TestSuite.
- class pyats.aereport.tims.Tims¶
Bases:
pyats.aereport.toplevel.aereportelement.AEReportElement
This module implement Tims section used by TestSuite. If tims posting is enabled, this will contain result status of tims importer
Class based on the following schema definition
<xs:element name="tims"> <xs:complexType> <xs:sequence> <xs:element name="dnsname"></xs:element> <xs:element name="attribute" maxOccurs="unbounded"></xs:element> <xs:element name="post" type="TimsPostType"></xs:element> </xs:sequence> <xs:attribute name="bgPost" type="xs:boolean"></xs:attribute> </xs:complexType> </xs:element>
- attrs¶
Default value is None. This is to ensure that all elements contain an attrs dictionary.
attrs
is expanded as attributes in the xml start tag.- Type
- attributes¶
TIMS global attributes
- Type
- post¶
Status of ATS TIMS importer (if invoked) including the number of tests that were successfully posted to TIMS
- Type
TimsPostType
- set_args(**kwargs)¶
Set attributes for tims
- Parameters
dnsname (str) – TIMS token id
attributes (list) – TIMS global attributes
post (dict) – Status of ATS TIMS importer (if invoked) including the number of tests that were successfully posted to TIMS
bgPost (bool) – The attribute tracks is the posting to TIMS is done actively or is posted as an independent background task
Submodules¶
timsattribute
– TimsAttributes Class¶
Module author: Jean-Benoit <jeaubin@cisco.com>
This module TimsAttributes class used by Testsuite Tims
- class pyats.aereport.tims.timsattributes.TimsAttribute(**kwargs)¶
Bases:
pyats.aereport.toplevel.aereportelement.AEReportElement
TimsAttributes TIMS global attributes Class based on the following schema definition
- ::
- <xs:element name=”attribute” maxOccurs=”unbounded”>
- <xs:annotation>
<xs:documentation>TIMS global attributes</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 timsattribute 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
timspost
–TimsPosts¶
This module implements TimsPost section used by Tims.
- class pyats.aereport.tims.timspost.TimsPost(**kwargs)¶
Bases:
pyats.aereport.toplevel.aereportelement.AEReportElement
This module implement TimsPost section used by Tims. Structure for posting test result record to tims (one test record only) Class based on the following schema definition
<xs:complexType name="TimsPostType"> <xs:sequence> <xs:element name="status"></xs:element> <xs:element name="cmd"/> <xs:element name="error" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType>