oslo_reports.models.with_default_views Module¶oslo_reports.models.with_default_views.ModelWithDefaultViews(*args, **kwargs)¶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
oslo_reports.views.text.generic.KeyValueViewoslo_reports.views.xml.generic.KeyValueViewoslo_reports.views.json.generic.KeyValueViewto_type()¶(‘type’ is one of the ‘default views’ defined for this model) Serializes this model using the default view for ‘type’
| Return type: | str |
|---|---|
| Returns: | this model serialized as ‘type’ |
set_current_view_type(tp, visited=None)¶
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.