plainbox.impl.exporter.jinja2 – exporter using jinja2 templates

Warning

THIS MODULE DOES NOT HAVE A STABLE PUBLIC API

plainbox.impl.exporter.jinja2.CERTIFICATION_NS = '2013.com.canonical.certification::'

Name-space prefix for Canonical Certification

class plainbox.impl.exporter.jinja2.Jinja2SessionStateExporter(option_list=None, system_id='', timestamp=None, client_version=None, client_name='plainbox', exporter_unit=None)[source]

Bases: plainbox.abc.ISessionStateExporter

Session state exporter that renders output using jinja2 template.

customize_environment(env)[source]

Register filters and tests custom to the HEXR exporter.

dump(data, stream)[source]

Render report using jinja2 and dump it to stream.

Parameters:
  • data – Dict to be used when rendering template instance
  • stream – Byte stream to write to.
dump_from_session_manager(session_manager, stream)[source]

Extract data from session_manager and dump it into the stream.

Parameters:
  • session_manager – SessionManager instance that manages session to be exported by this exporter
  • stream – Byte stream to write to.
get_session_data_subset(session_manager)[source]

Compute a subset of session data.

supported_option_list = ()
unit

Exporter unit this exporter was created with.

The exporter unit holds additional information that may be of use to applications, such as typical file name extension.

plainbox.impl.exporter.jinja2.do_is_name(text)[source]

A filter for checking if something is equal to “name”.

plainbox.impl.exporter.jinja2.do_sorted_xmlattr(_environment, d, autospace=True)[source]

A version of xmlattr filter that sorts attributes.

plainbox.impl.exporter.jinja2.do_strip_ns(_environment, unit_id, ns='2013.com.canonical.certification::')[source]

Remove the namespace part of the identifier.

comments powered by Disqus