コード例 #1
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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.",
    )
コード例 #2
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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.",
    )
コード例 #4
0
ファイル: response_schemas.py プロジェクト: m3rlinux/checkmk
class UserObject(DomainObject):
    domainType = fields.Constant(
        "user_config",
        description="The domain type of the object.",
    )
    extensions = fields.Nested(UserAttributes,
                               description="The attributes of the user")
コード例 #5
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class DiscoveryBackgroundJobStatusObject(DomainObject):
    domainType = fields.Constant(
        "discovery_run",
        description="The domain type of the object",
    )
    extensions = fields.Nested(
        BackgroundJobStatus, description="The attributes of the background job"
    )
コード例 #6
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class HostConfigSchema(DomainObject):
    domainType = fields.Constant(
        "host_config", required=True, description="The domain type of the object."
    )
    members = fields.Nested(HostMembers, description="All the members of the host object.")
    extensions = fields.Nested(
        HostExtensions,
        description="All the data and metadata of this host.",
    )
コード例 #7
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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.",
    )
コード例 #8
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class UserCollection(DomainObjectCollection):
    domainType = fields.Constant(
        "user_config",
        description="The domain type of the objects in the collection.",
    )
    value = fields.List(
        fields.Nested(UserObject),
        description="A list of user objects.",
    )
コード例 #9
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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.",
    )
コード例 #10
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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.",
    )
コード例 #11
0
class RuleCollection(response_schemas.DomainObjectCollection):
    domainType = fields.Constant(
        "rule",
        description="Domain type of this object.",
    )
    value: gui_fields.Field = fields.Nested(
        RuleObject,
        description="The collection itself. Each entry in here is part of the collection.",
        many=True,
    )
コード例 #12
0
ファイル: fields.py プロジェクト: tribe29/checkmk
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.",
    )
コード例 #13
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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.",
    )
コード例 #14
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.",
    )
コード例 #15
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
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,
    )
コード例 #16
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class Configuration(DomainObject):
    domainType = fields.Constant("config", required=True)
コード例 #17
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class ServiceGroup(DomainObject):
    domainType = fields.Constant(
        "service_group", required=True, description="The domain type of the object."
    )
コード例 #18
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class ContactGroup(DomainObject):
    domainType = fields.Constant(
        "contact_group", required=True, description="The domain type of the object."
    )
コード例 #19
0
ファイル: fields.py プロジェクト: tribe29/checkmk
class RulesetCollection(response_schemas.DomainObjectCollection):
    domainType = fields.Constant(
        "ruleset",
        description="Domain type of this object.",
        example="ruleset",
    )
コード例 #20
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class SiteState(Linkable):
    domainType = fields.Constant("site-state", required=True)
    members = fields.Nested(SiteStateMembers, description="All the members of the host object.")
コード例 #21
0
ファイル: response_schemas.py プロジェクト: LinuxHaus/checkmk
class ConcreteHostTagGroup(DomainObject):
    domainType = fields.Constant(
        "host_tag_group",
        required=True,
        description="The domain type of the object.",
    )