예제 #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.", )
예제 #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.", )
예제 #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.", )
예제 #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.",
    )
예제 #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.",
    )
예제 #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.",
    )
예제 #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.",
    )
예제 #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.",
    )
예제 #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,
    )
예제 #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.",
    )
예제 #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.",
    )
예제 #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,
    )
예제 #13
0
class ConcreteHostTagGroup(DomainObject):
    domainType = fields.Constant(
        "host_tag_group",
        required=True,
        description="The domain type of the object.",
    )
예제 #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.")
예제 #15
0
class SiteState(Linkable):
    domainType = fields.Constant("site-state", required=True)
    members = fields.Nested(SiteStateMembers,
                            description="All the members of the host object.")
예제 #16
0
class Configuration(DomainObject):
    domainType = fields.Constant("config", required=True)
예제 #17
0
class ContactGroup(DomainObject):
    domainType = fields.Constant("contact_group",
                                 required=True,
                                 description="The domain type of the object.")
예제 #18
0
class ServiceGroup(DomainObject):
    domainType = fields.Constant("service_group",
                                 required=True,
                                 description="The domain type of the object.")
예제 #19
0
class RulesetCollection(response_schemas.DomainObjectCollection):
    domainType = fields.Constant(
        "ruleset",
        description="Domain type of this object.",
        example="ruleset",
    )