Provides the base report model
This module defines a class representing the basic report data model from which all data models should inherit (or at least implement similar functionality). Data models store unserialized data generated by generators during the report serialization process.
Bases: collections.abc.MutableMapping
A Report Data Model
A report data model contains data generated by some generator method or class. Data may be read or written using dictionary-style access, and may be read (but not written) using object-member-style access. Additionally, a data model may have an associated view. This view is used to serialize the model when str() is called on the model. An appropriate object for a view is callable with a single parameter: the model to be serialized.
If present, the object passed in as data will be transformed into a standard python dict. For mappings, this is fairly straightforward. For sequences, the indices become keys and the items become values.
data – a sequence or mapping of data to associate with the model
attached_view – a view object to attach to this model
Set the current view type
This method attempts to set the current view type for this model and all submodels by calling itself recursively on all values, traversing intervening sequences and mappings when possible, and ignoring all other objects.
tp – the type of the view (‘text’, ‘json’, ‘xml’, etc)
visited – a set of object ids for which the corresponding objects have already had their view type set
Provides OpenStack Configuration Model
This module defines a class representing the data
model for oslo_config
configuration options
Bases: oslo_reports.models.with_default_views.ModelWithDefaultViews
A Configuration Options Model
This model holds data about a set of configuration options
from oslo_config
. It supports both the default group
of options and named option groups.
conf_obj (oslo_config.cfg.ConfigOpts
) – a configuration object
Provides a process model
This module defines a class representing a process, potentially with subprocesses.
Bases: oslo_reports.models.with_default_views.ModelWithDefaultViews
A Process Model
This model holds data about a process, including references to any subprocesses
process – a psutil.Process
object
Provides threading and stack-trace models
This module defines classes representing thread, green thread, and stack trace data models
Bases: oslo_reports.models.with_default_views.ModelWithDefaultViews
A Green Thread Model
This model holds data for information about an individual thread. Unlike the thread model, it holds just a stack trace, since green threads do not have thread ids.
See also
Class StackTraceModel
stack – the python stack state for the green thread
Bases: oslo_reports.models.with_default_views.ModelWithDefaultViews
A Stack Trace Model
This model holds data from a python stack trace, commonly extracted from running thread information
stack_state – the python stack_state object
Bases: oslo_reports.models.with_default_views.ModelWithDefaultViews
A Thread Model
This model holds data for information about an individual thread. It holds both a thread id, as well as a stack trace for the thread
See also
Class StackTraceModel
thread_id (int) – the id of the thread
stack – the python stack state for the current thread
Provides OpenStack Version Info Model
This module defines a class representing the data model for OpenStack package and version information
Bases: oslo_reports.models.with_default_views.ModelWithDefaultViews
A Package Information Model
This model holds information about the current package. It contains vendor, product, and version information.
vendor (str) – the product vendor
product (str) – the product name
version (str) – the product version
Bases: oslo_reports.models.base.ReportModel
A Model With Default Views of Various Types
A model with default views has several predefined views, each associated with a given type. This is often used for when a submodel should have an attached view, but the view differs depending on the serialization format
Parameters are as the superclass, except for any parameters ending in ‘_view’: these parameters get stored as default views.
The default ‘default views’ are
(‘type’ is one of the ‘default views’ defined for this model) Serializes this model using the default view for ‘type’
str
this model serialized as ‘type’
Set the current view type
This method attempts to set the current view type for this model and all submodels by calling itself recursively on all values, traversing intervening sequences and mappings when possible, and ignoring all other objects.
tp – the type of the view (‘text’, ‘json’, ‘xml’, etc)
visited – a set of object ids for which the corresponding objects have already had their view type set
Provides data models
This module provides both the base data model, as well as several predefined specific data models to be used in reports.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.