Ejemplo n.º 1
0
class DialogModel(Model):
    topic = DialogTopic

    answerfile_sections = fields.JSON()
    actor = fields.String()
    details = fields.Nullable(fields.String())
    key = fields.Nullable(fields.String())
Ejemplo n.º 2
0
class Report(Model):
    """
    Framework model used for reporting
    """

    __non_inheritable__ = True

    topic = ReportTopic

    report = fields.JSON()
Ejemplo n.º 3
0
class Report(Model):
    """
    Framework model used for reporting and presentation (see "renderers" field) purposes. The report can also carry
    a special meaning using "flags" field.
    """

    __non_inheritable__ = True

    topic = ReportTopic

    severity = fields.StringEnum(choices=['low', 'medium', 'high'])
    """
    Severity of the report entry
    """

    title = fields.String()
    """
    Title of the report entry
    """

    detail = fields.JSON()
    """
    Detail of the report entry as JSON data
    """

    renderers = fields.Model(Renderers)
    """
    :class:`Renderers` describe how to render this report entry
    """

    audience = fields.List(
        fields.StringEnum(choices=['developer', 'sysadmin']))
    """
    Who is the main audience of this report entry
    """

    flags = fields.List(fields.StringEnum(choices=['inhibitor']))
    """