plainbox.impl.exporter.json
– JSON exporter¶
Warning
THIS MODULE DOES NOT HAVE STABLE PUBLIC API
-
class
plainbox.impl.exporter.json.
JSONSessionStateExporter
(option_list=None, exporter_unit=None)[source]¶ Bases:
plainbox.impl.exporter.SessionStateExporterBase
Session state exporter creating JSON documents
-
OPTION_FLATTEN_IO_LOG
= 'flatten-io-log'¶
-
OPTION_MACHINE_JSON
= 'machine-json'¶
-
OPTION_SQUASH_IO_LOG
= 'squash-io-log'¶
-
OPTION_WITH_ATTACHMENTS
= 'with-attachments'¶
-
OPTION_WITH_CATEGORY_MAP
= 'with-category-map'¶
-
OPTION_WITH_CERTIFICATION_STATUS
= 'with-certification-status'¶
-
OPTION_WITH_COMMENTS
= 'with-comments'¶
-
OPTION_WITH_DESIRED_JOB_LIST
= 'with-job-list'¶
-
OPTION_WITH_IO_LOG
= 'with-io-log'¶
-
OPTION_WITH_JOB_DEFS
= 'with-job-defs'¶
-
OPTION_WITH_JOB_HASH
= 'with-job-hash'¶
-
OPTION_WITH_JOB_LIST
= 'with-job-list'¶
-
OPTION_WITH_JOB_VIA
= 'with-job-via'¶
-
OPTION_WITH_RESOURCE_MAP
= 'with-resource-map'¶
-
OPTION_WITH_RUN_LIST
= 'with-run-list'¶
-
SUPPORTED_OPTION_LIST
= ('with-io-log', 'squash-io-log', 'flatten-io-log', 'with-run-list', 'with-job-list', 'with-resource-map', 'with-job-defs', 'with-attachments', 'with-comments', 'with-job-via', 'with-job-hash', 'with-category-map', 'with-certification-status', 'machine-json')¶
-
dump_from_session_manager
(session_manager, stream)¶ Dump session information pulled from session manager to stream.
This method takes session manager instance, extracts session information from it, and dumps it to a stream.
-
get_option_value
(option)¶ Returns the value assigned to an option.
-
get_session_data_subset
(session_manager)¶ Compute a subset of session data.
The subset of the data that should be saved may depend on a particular saver class and options selected by the user.
Must return a collection that can be handled by
dump()
. Special care must be taken when processing io_log (and in the future, attachments) as those can be arbitrarily large.Deprecated since version 0.21: use .dump_from_session_manager instead
-
set_option_value
(option, value=True)¶ assigns a value to an option. If no value is given, it just “sets” the option to True
-
supported_option_list
= ('with-io-log', 'squash-io-log', 'flatten-io-log', 'with-run-list', 'with-job-list', 'with-resource-map', 'with-job-defs', 'with-attachments', 'with-comments', 'with-job-via', 'with-job-hash', 'with-category-map', 'with-certification-status', 'machine-json')¶
-
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.
-