{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "config_file":{ "desciption": "The list of the configuration files", "type": "array", "items": { "type": "string" } }, "items":{ "properties": { "name": { "type": "string" }, "stop_on_failure":{ "type": "boolean" }, "execute_on_stop":{ "type": "boolean" }, "skipped":{ "type": "boolean" }, "no_fail":{ "type": "boolean" }, "doc":{ "type": "string" }, "key":{ "type": "string" }, "report":{ "$ref": "#/$defs/report_export" }, "condition":{ "type": "string" }, "process_result":{ "type": "string" }, "expected_result":{ }, "store_result":{ "type": "string" } } }, "steps" : { "required": ["steps"], "properties": { "version": { "type": "string" }, "steps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties":{ "let": { "$ref": "#/$defs/let" }, "check": { "$ref": "#/$defs/check" }, "dialog_question": { "$ref": "#/$defs/dialog" }, "dialog_message": { "$ref": "#/$defs/dialog" }, "dialog_note": { "$ref": "#/$defs/dialog" }, "dialog_value": { "$ref": "#/$defs/dialog" }, "dialog_image": { "$ref": "#/$defs/dialog" }, "lua_func": { "$ref": "#/$defs/func" }, "py_func": { "$ref": "#/$defs/func" }, "console": { "$ref": "#/$defs/console" }, "sleep": { "$ref": "#/$defs/sleep" }, "json_rpc": { "$ref": "#/$defs/json_rpc" }, "group": { "$ref": "#/$defs/group" }, "sequence": { "$ref": "#/$defs/sequence" }, "report": { "$ref": "#/$defs/report" }, "loop": { "$ref": "#/$defs/loop" }, "git": { "$ref": "#/$defs/git" }, "unittest": { "$ref": "#/$defs/unittest" } } } } } }, "cons_open" : { "type":"object", "allOf": [ { "$ref": "#/$defs/items" }, { "properties": { "protocol" : { "enum": ["telnet", "ssh", "serial", "rawtcp", "terminal"] }, "telnet_host" : {"type": "string" }, "telnet_port" : {"type": "number" }, "ssh_host": {"type": "string" }, "ssh_user": {"type": "string" }, "ssh_pwd": {"type": "string" }, "serial_port": {"type": "string" }, "serial_baudrate": {"type": "integer" }, "buffered": {"type": "boolean" }, "tcp_host" : {"type": "string" }, "tcp_port" : {"type": "number" }, "terminal_path": {"type":"string" }, "shell": {"type":"string" } }, "required": ["protocol"] } ] }, "cons_read": { "type":"object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties": { "protocol" : { "enum": ["telnet", "ssh", "serial", "rawtcp", "terminal"] }, "expected" : {"type": "string" }, "timeout": {"type": "number" }, "mute": {"type": "boolean" } }, "required":["expected"] } ] }, "console" : { "description": "The let items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "required": ["steps", "console_name"], "properties":{ "console_name": {"type":"string" }, "steps": { "type": "array", "items": { "type": "object", "properties":{ "open": { "$ref": "#/$defs/cons_open" }, "write": { "type": "string" }, "writeln": { "type": "string" }, "read_until": { "$ref": "#/$defs/cons_read" }, "close": { "anyOf": [ {"type": "null"}, {"type": "string"} ] } }, "additionalProperties": false } } } } ] }, "json_rpc_console": { "type":"object", "properties": { "name" : {"type": "string" }, "prompt" : {"type": "string" } }, "required":["name"], "additionalProperties": false }, "json_rpc_udp": { "type":"object", "properties": { "server" : {"type": "string" }, "udp_snd_port" : {"type": "integer" }, "udp_rcv_port" : {"type": "integer" }, "bufsize" : {"type": "integer" } }, "required":["name"], "additionalProperties": false }, "json_rpc_query": { "type":"object", "properties": { "method" : { "type": "string" }, "params" : { "type": "array" }, "id" : {"type": "integer" }, "no_wait" : {"type": "boolean" } }, "required":["method"], "additionalProperties": false }, "json_rpc_receive": { "type":"object", "properties": { "id" : {"type": "integer" }, "timeout" : {"type": "number" } }, "required":["id"], "additionalProperties": false }, "json_rpc" : { "description": "The json_rpc items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "required": ["steps"], "properties":{ "udp" : { "$ref": "#/$defs/json_rpc_udp" }, "console" : { "$ref": "#/$defs/json_rpc_console" }, "timeout": {"type": "number" }, "version": {"enum": ["1.0", "2.0"]}, "steps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties":{ "open": { "type": "null" }, "query": { "$ref": "#/$defs/json_rpc_query" }, "receive": { "$ref": "#/$defs/json_rpc_receive" }, "writeln": { "type": "string" }, "read_until": { "$ref": "#/$defs/cons_read" }, "close": { "type": "null" } } } } } } ] }, "group" : { "description": "The group items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "$ref": "#/$defs/steps" } ] }, "sequence" : { "description": "The sequence items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "$ref": "#/$defs/steps" }, { "properties": { "filename": { "type": "string" } }, "required": ["filename"] } ] }, "loop" : { "description": "The loop items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "$ref": "#/$defs/steps" }, { "properties": { "iterator": { }, "exit_condition": { "description": "the posibility to stop the loop", "type": "object", "additionalProperties": false, "properties": { "time" : {"type":"number"}, "value" : {"type":"number"}, "file" : {"type":"string"}, "func_name" : {"type":"string"}, "eval" : {"type":"string"} }, "dependentRequired": { "file" : ["func_name"] } } } } ] }, "main" : { "description": "The Main items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "$ref": "#/$defs/steps" }, { "properties": { "version": { "type": "string" } } } ] }, "sleep" : { "description": "Sleep for X time [secondes", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "dialog": { "type": "boolean" }, "timeout": { "type": "number" } }, "required": ["timeout"] } ] }, "let" : { "description": "The let items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "values": { "anyOf": [ { "type": "array", "items": {"type": "object" } }, { "type":"object" } ] } }, "required": ["values"] } ] }, "check" : { "description": "The let items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "values": { "type": "array", "items": {"type": "string" } } }, "required": ["values"] } ] }, "git" : { "description": "The git items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "repo": { "type": "string" } }, "required": ["repo"] } ] }, "unittest" : { "description": "The unittest items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "test_file": { "type": "string" }, "test_method": { "anyOf": [ {"type":"string"}, { "type":"array", "items": {"type":"string"} } ] } }, "required": ["test_file"] } ] }, "dialog" : { "description": "The let items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "question": { "type": "string" }, "auto_result": { "type": "string" }, "auto_value": { "type": ["number", "string"] }, "filename" : {"type": "string"}, "reference" : { "type":"array", "items": { "type":"string"} } }, "required": ["question"] } ] }, "dialog_choice" : { "description": "The one choi items", "type": "object", "additionalProperties": false, "properties":{ "name": { "type": "string" }, "description": { "type": "string" }, "icon": { "type": "string"}, "choices": { "type":"array", "items": { "$ref": "#/$defs/dialog_choice" } } }, "required": ["name", "description"] }, "dialog_choices" : { "description": "The dialog choices items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "name": { "type": "string" }, "question": { "type": "string" }, "icon": { "type": "string"}, "choices": { "type":"array", "items": { "$ref": "#/$defs/dialog_choice" } } }, "required": ["question"] } ] }, "func" : { "description": "The py_fun and lua_func items", "type": "object", "unevaluatedProperties": false, "allOf": [ { "$ref": "#/$defs/items" }, { "properties":{ "file": { "type": "string" }, "func_name": { "type": "string" }, "context_id": { "type": "string" }, "param" : { "anyOf": [ {"type": "array"}, {"type": "object"} ] } }, "required": ["file", "func_name"] } ] }, "report_export": { "type": "object", "properties": { "path": {"type":"string" }, "file_name": {"type":"string" }, "pattern": {"type":"string" }, "key": {"type":"string" } } }, "report":{ "desciption": "The list of the configuration files", "type": "object", "additional_properties":false, "properties": { "enabled": {"type":"boolean" }, "log_stored": {"type":"boolean" }, "export": { "anyOf": [ { "type": "object", "properties":{ "html": { "$ref": "#/$defs/report_export" }, "sqlite": { "$ref": "#/$defs/report_export" }, "junit": { "$ref": "#/$defs/report_export" } } }, { "type": "array", "items": { "type":"object", "properties":{ "html": { "$ref": "#/$defs/report_export" }, "sqlite": { "$ref": "#/$defs/report_export" }, "junit": { "$ref": "#/$defs/report_export" } } } } ] } } } }, "type": "object", "properties": { "config_file" : { "$ref": "#/$defs/config_file" }, "main": { "$ref": "#/$defs/main" }, "report" : { "$ref": "#/$defs/report" } }, "required" : ["main"], "additionalProperties": false }