Example #1
0
class ObjectCollectionMember(ObjectMemberBase):
    memberType = fields.Constant("collection")
    value = fields.List(fields.Nested(LinkSchema()))
    name = fields.String(example="important_values")
    title = fields.String(
        description="A human readable title of this object. Can be used for "
        "user interfaces.", )
Example #2
0
class ObjectActionMember(ObjectMemberBase):
    memberType = fields.Constant("action")
    parameters = fields.Dict()
    name = fields.String(example="frobnicate_foo")
    title = fields.String(
        description="A human readable title of this object. Can be used for "
        "user interfaces.", )
Example #3
0
class ObjectPropertyMember(ObjectMemberBase):
    memberType = fields.Constant("property")
    name = fields.String(example="important")
    value = fields.String(example="the value")
    title = fields.String(
        description="A human readable title of this object. Can be used for "
        "user interfaces.", )
Example #4
0
class HostObject(DomainObject):
    domainType = fields.Constant("host_config",
                                 required=True,
                                 description="The domain type of the object.")
    extensions = fields.Nested(
        HostExtensions,
        description="All the data and metadata of this host.",
    )
Example #5
0
class HostConfigCollection(DomainObjectCollection):
    domainType = fields.Constant(
        "host_config",
        description="The domain type of the objects in the collection.",
    )
    value = fields.List(
        fields.Nested(HostConfigSchema()),
        description="A list of host objects.",
    )
Example #6
0
class FolderCollection(DomainObjectCollection):
    domainType = fields.Constant(
        "folder_config",
        description="The domain type of the objects in the collection.",
    )
    value = fields.List(
        fields.Nested(FolderSchema()),
        description="A list of folder objects.",
    )
Example #7
0
class PasswordObject(DomainObject):
    domainType = fields.Constant(
        "password",
        description="The type of the domain-object.",
    )
    extensions = fields.Nested(
        PasswordExtension,
        description="All the attributes of the domain object.",
    )
Example #8
0
class RulesetObject(response_schemas.DomainObject):
    domainType = fields.Constant(
        "ruleset",
        description="Domain type of this object.",
        example="ruleset",
    )
    extensions = fields.Nested(
        RulesetExtensions,
        description="Specific attributes related to rulesets.",
    )
Example #9
0
class RuleCollection(response_schemas.DomainObjectCollection):
    domainType = fields.Constant(
        "rule",
        description="Domain type of this object.",
    )
    value: fields.Field = fields.Nested(
        RuleObject,
        description="The collection itself. Each entry in here is part of the collection.",
        many=True,
    )
Example #10
0
class FolderSchema(Linkable):
    domainType = fields.Constant("folder_config", description="The domain type of the object.")
    id = fields.String(description="The full path of the folder, tilde-separated.")
    title = fields.String(description="The human readable title for this folder.")
    members = fields.Nested(
        FolderMembers(),
        description="Specific collections or actions applicable to this object.",
    )
    extensions = fields.Nested(
        FolderExtensions(),
        description="Data and Meta-Data of this object.",
    )
Example #11
0
class RuleObject(response_schemas.DomainObject):
    """The schema for sending data TO the API client.

    For the schema responsible for receiving data, see `InputRuleObject`.
    """

    domainType = fields.Constant(
        "rule",
        description="Domain type of this object.",
        example="rule",
    )
    extensions = fields.Nested(
        RuleExtensions,
        description="Attributes specific to rule objects.",
    )
Example #12
0
class LinkSchema(BaseSchema):
    """A Link representation according to A-24 (2.7)"""

    domainType = fields.Constant("link", required=True)
    rel = fields.String(
        description=(
            "Indicates the nature of the relationship of the related resource to the "
            "resource that generated this representation"
        ),
        required=True,
        example="self",
    )
    href = fields.String(
        description=(
            "The (absolute) address of the related resource. Any characters that are "
            "invalid in URLs must be URL encoded."
        ),
        required=True,
        example="https://.../api_resource",
    )
    method = fields.String(
        description="The HTTP method to use to traverse the link (get, post, put or delete)",
        required=True,
        pattern="GET|PUT|POST|DELETE",
        example="GET",
    )
    type = fields.String(
        description="The content-type that the linked resource will return",
        required=True,
        example="application/json",
    )
    title = fields.String(
        description=(
            "string that the consuming application may use to render the link without "
            "having to traverse the link in advance"
        ),
        allow_none=True,
        example="The object itself",
    )
    body_params = fields.Dict(
        description=(
            "A map of values that shall be sent in the request body. If this is present,"
            "the request has to be sent with a content-type of 'application/json'."
        ),
        required=False,
    )
Example #13
0
class ConcreteHostTagGroup(DomainObject):
    domainType = fields.Constant(
        "host_tag_group",
        required=True,
        description="The domain type of the object.",
    )
Example #14
0
class HostConfigSchema(Linkable):
    domainType = fields.Constant("host_config", required=True)
    id = fields.String()
    title = fields.String()
    members = fields.Nested(HostMembers,
                            description="All the members of the host object.")
Example #15
0
class SiteState(Linkable):
    domainType = fields.Constant("site-state", required=True)
    members = fields.Nested(SiteStateMembers,
                            description="All the members of the host object.")
Example #16
0
class Configuration(DomainObject):
    domainType = fields.Constant("config", required=True)
Example #17
0
class ContactGroup(DomainObject):
    domainType = fields.Constant("contact_group",
                                 required=True,
                                 description="The domain type of the object.")
Example #18
0
class ServiceGroup(DomainObject):
    domainType = fields.Constant("service_group",
                                 required=True,
                                 description="The domain type of the object.")
Example #19
0
class RulesetCollection(response_schemas.DomainObjectCollection):
    domainType = fields.Constant(
        "ruleset",
        description="Domain type of this object.",
        example="ruleset",
    )