[issue-1] [res]

This commit is contained in:
Christian Fraß 2023-03-04 15:30:52 +01:00
commit c410cac952
6 changed files with 7 additions and 27 deletions

View file

@ -1,7 +1,7 @@
{
"checks": [
{
"name": "test",
"name": "test1",
"kind": "file_state",
"parameters": {
"path": "/tmp/test",

View file

@ -14,8 +14,8 @@
]
},
"includes": [
"test-1.hmdl.json",
"test-2.hmdl.json",
"test-3.hmdl.json"
"script.hmdl.json",
"file_state.hmdl.json",
"generic_remote.hmdl.json"
]
}

View file

@ -1,7 +1,7 @@
{
"checks": [
{
"name": "test",
"name": "test1",
"kind": "script",
"parameters": {
"path": "/tmp/script",

View file

@ -321,24 +321,6 @@ def conf_normalize_check(
if True:
node__["parameters"] = check_kind_implementations[node_["kind"]].normalize_conf_node(node_["parameters"])
return node__
'''
return {
"name": node_["name"],
"title": node_["title"],
"active": node_["active"],
"threshold": node_["threshold"],
"annoy": node_["annoy"],
"schedule": conf_normalize_schedule(node_["schedule"]),
"notifications": list(
map(
lambda x: conf_normalize_notification(notification_channel_implementations, x),
node_["notifications"]
)
),
"kind": node_["kind"],
"parameters": check_kind_implementations[node_["kind"]].normalize_conf_node(node_["parameters"]),
}
'''
def conf_normalize_root(
@ -455,9 +437,9 @@ def conf_load(
check,
{
"name": string_coin(
"x{{number}}.{{original_name}}",
"{{prefix}}.{{original_name}}",
{
"number": ("%u" % (index + 1)),
"prefix": _os.path.basename(path_).split(".")[0],
"original_name": check["name"],
}
),

View file

@ -47,7 +47,6 @@ def main():
_os.path.join(dir_source, "logic", "checks", "script.py"),
_os.path.join(dir_source, "logic", "checks", "file_state.py"),
_os.path.join(dir_source, "logic", "checks", "http_request.py"),
_os.path.join(dir_source, "logic", "checks", "generic_remote.py"),
_os.path.join(dir_source, "logic", "channels", "_interface.py"),
_os.path.join(dir_source, "logic", "channels", "console.py"),
_os.path.join(dir_source, "logic", "channels", "email.py"),
@ -67,7 +66,6 @@ def main():
_os.path.join(dir_source, "logic", "checks", "script.py"),
_os.path.join(dir_source, "logic", "checks", "file_state.py"),
_os.path.join(dir_source, "logic", "checks", "http_request.py"),
_os.path.join(dir_source, "logic", "checks", "generic_remote.py"),
_os.path.join(dir_source, "logic", "channels", "_interface.py"),
_os.path.join(dir_source, "logic", "channels", "console.py"),
_os.path.join(dir_source, "logic", "channels", "email.py"),