Пример #1
0
class HostExtensions(BaseSchema):
    folder = gui_fields.FolderField(
        description="The folder, in which this host resides.",
    )
    attributes = gui_fields.attributes_field(
        "host",
        "view",
        description="Attributes of this host.",
        example={"ipaddress": "192.168.0.123"},
    )
    effective_attributes = fields.Dict(
        description="All attributes of this host and all parent folders. Format may change!",
        allow_none=True,
        example={"tag_snmp_ds": None},
    )
    is_cluster = fields.Boolean(
        description="If this is a cluster host, i.e. a container for other hosts.",
    )
    is_offline = fields.Boolean(
        description="Whether the host is offline",
    )
    cluster_nodes = fields.List(
        gui_fields.HostField(),
        allow_none=True,
        load_default=None,
        description="In the case this is a cluster host, these are the cluster nodes.",
    )
Пример #2
0
class FolderExtensions(BaseSchema):
    path = fields.String(
        description="The full path of this folder, slash delimited.", )
    attributes = fields.attributes_field(
        "folder",
        "update",
        description=(
            "The folder's attributes. Hosts placed in this folder will inherit "
            "these attributes."),
    )