JSON Schema definitions
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"
...
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
...
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
...
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/lmdb.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://event/backends/lmdb.yaml#"
title : LMDB backend
type : object
required :
- db_path
- max_db_size
- sync_period
- server_id
- conditions
- latest
- ordered
properties :
db_path :
type : string
max_db_size :
type : number
sync_period :
type : number
server_id :
type : integer
conditions :
type : array
items :
type : object
required :
- subscriptions
- condition
properties :
subscriptions :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/event_types"
condition :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/condition"
latest :
type : object
required :
- subscriptions :
properties :
subscriptions :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/event_types"
ordered :
type : array
items :
type : object
required :
- order_by
- subscriptions
properties :
order_by :
enum :
- TIMESTAMP
- SOURCE_TIMESTAMP
subscriptions :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/event_types"
limit :
type : number
description : |
limit for the persisted history based on keys expressed
as duration in seconds
definitions :
event_types :
type : array
items :
type : array
items :
type : string
condition :
oneOf :
- "$ref" : "hat://event/backends/lmdb.yaml#/definitions/conditions/all"
- "$ref" : "hat://event/backends/lmdb.yaml#/definitions/conditions/any"
- "$ref" : "hat://event/backends/lmdb.yaml#/definitions/conditions/json"
conditions :
all :
type : object
required :
- type
- conditions
properties :
type :
const : all
conditions :
type : array
items :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/condition"
any :
type : object
required :
- type
- conditions
properties :
type :
const : any
conditions :
type : array
items :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/condition"
json :
type : object
required :
- type
properties :
type :
const : json
data_path :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/path"
data_type :
enum :
- "null"
- boolean
- string
- number
- array
- object
data_value : {}
path :
oneOf :
- type : string
- type : integer
- type : array
items :
"$ref" : "hat://event/backends/lmdb.yaml#/definitions/path"
...
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
...
manager/iec104.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://manager/iec104.yaml#"
title : IEC104 devices
oneOf :
- type : object
properties :
type :
const : iec104_master
- type : object
properties :
type :
const : iec104_slave
...
manager/modbus.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://manager/modbus.yaml#"
title : Modbus devices
oneOf :
- type : object
properties :
type :
const : modbus_master
- type : object
properties :
type :
const : modbus_slave
...
manager/orchestrator.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://manager/orchestrator.yaml#"
title : Orchestrator device
required :
- address
properties :
type :
const : orchestrator
address :
type : string
...
manager/monitor.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://manager/monitor.yaml#"
title : Monitor device
required :
- address
properties :
type :
const : monitor
address :
type : string
...
manager/event.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://manager/event.yaml#"
title : Event device
required :
- address
properties :
type :
const : event
address :
type : string
...
manager/main.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://manager/main.yaml#"
title : Manger
description : Manager 's configuration
type : object
required :
- type
- log
- settings
- devices
properties :
type :
const : manager
description : configuration type identification
version :
type : string
description : component version
log :
"$ref" : "hat://logging.yaml#"
settings :
type : object
required :
- ui
- log
properties :
ui :
type : object
required :
- address
properties :
address :
type : string
log :
type : object
required :
- level
- syslog
- console
properties :
level :
type : string
syslog :
type : object
required :
- enabled
- host
- port
properties :
enabled :
type : boolean
host :
type : string
port :
type : integer
console :
type : object
required :
- enabled
properties :
enabled :
type : boolean
devices :
type : array
items :
allOf :
- type : object
required :
- type
- name
- auto_start
properties :
name :
type : string
auto_start :
type : boolean
- oneOf :
- "$ref" : "hat://manager/orchestrator.yaml#"
- "$ref" : "hat://manager/monitor.yaml#"
- "$ref" : "hat://manager/event.yaml#"
- "$ref" : "hat://manager/iec104.yaml#"
- "$ref" : "hat://manager/modbus.yaml#"
...
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
- address
- initial_view
- users
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 :
type : array
items :
type : object
required :
- name
- module
properties :
name :
type : string
module :
type : string
views :
type : array
items :
type : object
required :
- name
- view_path
- conf_path
properties :
name :
type : string
view_path :
type : string
conf_path :
type :
- string
- "null"
address :
type : string
default : "http://localhost:23023"
initial_view :
type :
- string
- "null"
users :
type : array
items :
type : object
required :
- name
- password
- roles
- view
properties :
name :
type : string
password :
type : object
required :
- hash
- salt
properties :
hash :
type : string
description : |
SHA256 ( salt + SHA256 ( password )) hash encoded as
hex string
salt :
type : string
decription : |
unique salt used for generating hash encoded as
hex string
roles :
type : array
items :
type : string
view :
type :
- string
- "null"
...
gui/adapters/latest.yaml ---
"$schema" : "http://json-schema.org/schema#"
id : "hat://gui/adapters/latest.yaml#"
title : Latest adapter
type : object
required :
- authorized_roles
- items
properties :
authorized_roles :
type : array
items :
type : string
items :
type : array
items :
type : object
required :
- key
- event_type
properties :
key :
type : string
event_type :
type : array
items :
type : string
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"
...
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
- slave
- 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"
slave :
"$ref" : "hat://monitor/main.yaml#/definitions/slave"
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://127.0.0.1:23010"
default_rank :
type : integer
master :
title : Master interface
type : object
required :
- address
- default_algorithm
- group_algorithms
properties :
address :
title : Listening address
type : string
default : "tcp+sbs://127.0.0.1:23011"
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"
slave :
type : object
required :
- parents
properties :
parents :
title : parent addresses
type : array
items :
type : string
ui :
title : UI Web Server
type : object
required :
- address
properties :
address :
title : UI address
type : string
default : "http://127.0.0.1:23022"
algorithm :
enum :
- BLESS_ALL
- BLESS_ONE
...
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
...