JSON Schema definitionsΒΆ

syslog.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://syslog.yaml#"
title: Syslog server
description: Syslog server configuration
type: object
required:
    - type
    - log
    - syslog_addr
    - ui_addr
    - db_path
    - db_low_size
    - db_high_size
    - db_enable_archive
    - db_disable_journal
properties:
    type:
        enum:
            - syslog
        description: configuration type identification
    version:
        type: string
        description: component version
    log:
        "$ref": "hat://logging.yaml#"
    syslog_addr:
        type: string
        description: |
            syslog listening address in form `<protocol>://<host>:<port>`
            where `<protocol>` can be `tcp`, `udp` or `ssl`
    syslog_pem:
        type: string
        description: |
            path to PEM file is mandatory if syslog address is ssl
    ui_addr:
        type: string
        description: |
            web server listening address in form `<protocol>://<host>:<port>`
            where `<protocol>` can be `http` or `https`
    ui_pem:
        type: string
        description: |
            path to PEM file is mandatory if ui address is https
    db_path:
        type: string
        description: |
            path to sqlite database file
    db_low_size:
        type: integer
        description: |
            number of messages kept in database after database cleanup
    db_high_size:
        type: integer
        description: |
            number of messages that will trigger database cleanup
    db_enable_archive:
        type: boolean
        description: |
            should messages, deleted during database cleanup, be kept in
            archive files
    db_disable_journal:
        type: boolean
        description: |
            disable sqlite jurnaling
...
orchestrator.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://orchestrator.yaml#"
title: Orchestrator
description: Orchestrators's configuration
type: object
required:
    - type
    - log
    - components
    - ui
properties:
    type:
        enum:
            - orchestrator
        description: configuration type identification
    version:
        type: string
        description: component version
    log:
        "$ref": "hat://logging.yaml#"
    components:
        title: Components
        type: array
        items:
            "$ref": "hat://orchestrator.yaml#/definitions/component"
    ui:
        "$ref": "hat://orchestrator.yaml#/definitions/ui"
definitions:
    component:
        title: Component
        type: object
        required:
            - name
            - args
            - delay
            - revive
        properties:
            name:
                title: Component name
                type: string
            args:
                title: Command line arguments
                description: |
                    Shell command executed by orchestrator from
                    orchestrator's current working directory
                type: array
                items:
                    type: string
            delay:
                title: Delay
                description: |
                    Startup delay applied only for first component's
                    startup. If value is 0, timeout is ignored.
                type: number
            revive:
                title: Revive
                description: |
                    If this property is set to true, orchestrator will start
                    component's process if process is stopped.
                type: boolean
    ui:
        title: Server
        type: object
        required:
            - address
        properties:
            address:
                title: UI address
                type: string
                default: "http://localhost:23021"
...
logging.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://logging.yaml#"
title: Logging
description: Logging configuration
type: object
required:
    - version
properties:
    version:
        title: Version
        type: integer
        default: 1
    formatters:
        title: Formatters
        type: object
        patternProperties:
            "(.)+":
                title: Formatter
                type: object
                properties:
                    format:
                        title: Format
                        type: string
                        default: null
                    datefmt:
                        title: Date format
                        type: string
                        default: null
    filters:
        title: Filters
        type: object
        patternProperties:
            "(.)+":
                title: Filter
                type: object
                properties:
                    name:
                        title: Logger name
                        type: string
                        default: ''
    handlers:
        title: Handlers
        type: object
        patternProperties:
            "(.)+":
                title: Handler
                type: object
                description: |
                    Additional properties are passed as keyword arguments to
                    constructor
                required:
                    - class
                properties:
                    class:
                        title: Class
                        type: string
                    level:
                        title: Level
                        type: string
                    formatter:
                        title: Formatter
                        type: string
                    filters:
                        title: Filters
                        type: array
                        items:
                            title: Filter id
                            type: string
    loggers:
        title: Loggers
        type: object
        patternProperties:
            "(.)+":
                title: Logger
                type: object
                properties:
                    level:
                        title: Level
                        type: string
                    propagate:
                        title: Propagate
                        type: boolean
                    filters:
                        title: Filters
                        type: array
                        items:
                            title: Filter id
                            type: string
                    handlers:
                        title: Handlers
                        type: array
                        items:
                            title: Handler id
                            type: string
    root:
        title: Root logger
        type: object
        properties:
            level:
                title: Level
                type: string
            filters:
                title: Filters
                type: array
                items:
                    title: Filter id
                    type: string
            handlers:
                title: Handlers
                type: array
                items:
                    title: Handler id
                    type: string
    incremental:
        title: Incremental configuration
        type: boolean
        default: false
    disable_existing_loggers:
        title: Disable existing loggers
        type: boolean
        default: true
...
gui/main.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://gui/main.yaml#"
title: GUI Server
description: GUI Server's configuration
type: object
required:
    - type
    - log
    - monitor
    - event_server_group
    - adapters
    - views
    - server
properties:
    type:
        enum:
            - gui
        description: configuration type identification
    version:
        type: string
        description: component version
    log:
        "$ref": "hat://logging.yaml#"
    monitor:
        "$ref": "hat://monitor/client.yaml#"
    event_server_group:
        type: string
    adapters:
        "$ref": "hat://gui/main.yaml#/definitions/adapters"
    views:
        "$ref": "hat://gui/main.yaml#/definitions/views"
    server:
        "$ref": "hat://gui/main.yaml#/definitions/server"
definitions:
    adapters:
        type: array
        items:
            "$ref": "hat://gui/main.yaml#/definitions/adapter"
    views:
        type: array
        items:
            "$ref": "hat://gui/main.yaml#/definitions/view"
    server:
        type: object
        required:
            - address
            - initial_view
            - roles
            - users
        properties:
            address:
                type: string
                default: "http://localhost:23023"
            initial_view:
                type: string
            roles:
                type: array
                items:
                    "$ref": "hat://gui/main.yaml#/definitions/role"
            users:
                type: array
                items:
                    "$ref": "hat://gui/main.yaml#/definitions/user"
    view:
        type: object
        required:
            - name
            - view_path
            - conf_path
        properties:
            name:
                type: string
            view_path:
                type: string
            conf_path:
                type:
                    - string
                    - "null"
    adapter:
        type: object
        required:
            - name
            - module
        properties:
            name:
                type: string
            module:
                type: string
    user:
        type: object
        required:
            - name
            - password
            - roles
        properties:
            name:
                type: string
            password:
                type: object
                required:
                    - hash
                    - salt
                properties:
                    hash:
                        type: string
                        description: |
                            SHA-256 (salt + password) hash encoded as hex string
                    salt:
                        type: string
                        decription: |
                            unique salt used for generating hash encoded as
                            hex string
            roles:
                type: array
                description: |
                    user can use all adapters associated with all roles and
                    is provided with view associated with first role from this
                    list
                items:
                    type: string
    role:
        type: object
        required:
            - name
            - view
            - adapters
        properties:
            name:
                type: string
            view:
                type: string
            adapters:
                type: array
                items:
                    type: string
...
gateway/main.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://gateway/main.yaml#"
title: Gateway
description: Gateway's configuration
type: object
required:
    - type
    - log
    - monitor
    - event_server_group
    - gateway_name
    - devices
properties:
    type:
        enum:
            - gateway
        description: configuration type identification
    version:
        type: string
        description: component version
    log:
        "$ref": "hat://logging.yaml#"
    monitor:
        "$ref": "hat://monitor/client.yaml#"
    event_server_group:
        type: string
    gateway_name:
        type: string
    devices:
        type: array
        items:
            "$ref": "hat://gateway/main.yaml#/definitions/device"
definitions:
    device:
        type: object
        description: |
            structure of device configuration depends on device type
        required:
            - module
            - name
        properties:
            module:
                type: string
                description: |
                    full python module name that implements device
            name:
                type: string
...
monitor/main.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://monitor/main.yaml#"
title: Monitor Server
description: Monitor Server's configuration
type: object
required:
    - type
    - log
    - server
    - master
    - ui
properties:
    type:
        enum:
            - monitor
        description: configuration type identification
    version:
        type: string
        description: component version
    log:
        "$ref": "hat://logging.yaml#"
    server:
        "$ref": "hat://monitor/main.yaml#/definitions/server"
    master:
        "$ref": "hat://monitor/main.yaml#/definitions/master"
    ui:
        "$ref": "hat://monitor/main.yaml#/definitions/ui"
definitions:
    server:
        title: Local monitor server
        type: object
        required:
            - address
            - default_rank
        properties:
            address:
                title: Listening address
                type: string
                default: "tcp+sbs://localhost:23010"
            default_rank:
                type: integer
    master:
        title: Master interface
        type: object
        required:
            - address
            - parents
            - default_algorithm
            - group_algorithms
        properties:
            address:
                title: Listening address
                type: string
                default: "tcp+sbs://localhost:23011"
            parents:
                title: parent addresses
                type: array
                items:
                    type: string
            default_algorithm:
                "$ref": "hat://monitor/main.yaml#/definitions/algorithm"
            group_algorithms:
                description: |
                    keys represent group names
                type: object
                patternProperties:
                    "(.)+":
                        "$ref": "hat://monitor/main.yaml#/definitions/algorithm"
    ui:
        title: UI Web Server
        type: object
        required:
            - address
        properties:
            address:
                title: UI address
                type: string
                default: "http://localhost:23022"
    algorithm:
        enum:
            - BLESS_ALL
            - BLESS_ONE
...
monitor/client.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://monitor/client.yaml#"
title: Monitor client
description: Monitor client's configuration
type: object
required:
    - name
    - group
    - monitor_address
    - component_address
properties:
    name:
        type: string
    group:
        type: string
    monitor_address:
        type: string
    component_address:
        type:
            - string
            - "null"
...
event/main.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://event/main.yaml#"
title: Event Server
description: Event Server's configuration
type: object
required:
    - type
    - log
    - monitor
    - backend_engine
    - module_engine
    - communication
properties:
    type:
        enum:
            - event
        description: configuration type identification
    version:
        type: string
        description: component version
    log:
        "$ref": "hat://logging.yaml#"
    monitor:
        "$ref": "hat://monitor/client.yaml#"
    backend_engine:
        "$ref": "hat://event/main.yaml#/definitions/backend_engine"
    module_engine:
        "$ref": "hat://event/main.yaml#/definitions/module_engine"
    communication:
        "$ref": "hat://event/main.yaml#/definitions/communication"
definitions:
    backend_engine:
        type: object
        required:
            - server_id
            - backend
        properties:
            server_id:
                type: integer
            backend:
                "$ref": "hat://event/main.yaml#/definitions/backend"
    module_engine:
        type: object
        required:
            - modules
        properties:
            modules:
                type: array
                items:
                    "$ref": "hat://event/main.yaml#/definitions/module"
    communication:
        type: object
        required:
            - address
        properties:
            address:
                type: string
                default: "tcp+sbs://localhost:23012"
    backend:
        type: object
        description: |
            structure of backend configuration depends on backend type
        required:
            - module
        properties:
            module:
                type: string
                description: |
                    full python module name that implements backend
    module:
        type: object
        description: |
            structure of module configuration depends on module type
        required:
            - module
        properties:
            module:
                type: string
                description: |
                    full python module name that implements module
...
event/backends/sqlite.yaml
---
"$schema": "http://json-schema.org/schema#"
id: "hat://event/backends/sqlite.yaml#"
title: Sqlite backend
description: Sqlite backend configuration
type: object
required:
    - db_path
    - query_pool_size
properties:
    db_path:
        type: string
        description: path to sqlite database file
    query_pool_size:
        type: integer
        description: |
            number of connections in a pool used for querying
...