#2449 fix observation integration

This commit is contained in:
Marek Wolan
2024-04-03 15:58:01 +01:00
parent 985628f2da
commit a4caa3dfe4
6 changed files with 8 additions and 8 deletions

View File

@@ -205,7 +205,7 @@ class FolderObservation(AbstractObservation, identifier="FOLDER"):
:return: Constructed folder observation instance.
:rtype: FolderObservation
"""
where = parent_where + ["folders", config.folder_name]
where = parent_where + ["file_system", "folders", config.folder_name]
# pass down shared/common config items
for file_config in config.files:

View File

@@ -215,7 +215,7 @@ class FirewallObservation(AbstractObservation, identifier="FIREWALL"):
:rtype: FirewallObservation
"""
return cls(
where=parent_where + ["nodes", config.hostname],
where=parent_where + [config.hostname],
ip_list=config.ip_list,
wildcard_list=config.wildcard_list,
port_list=config.port_list,

View File

@@ -216,7 +216,7 @@ class HostObservation(AbstractObservation, identifier="HOST"):
if parent_where == []:
where = ["network", "nodes", config.hostname]
else:
where = parent_where + ["nodes", config.hostname]
where = parent_where + [config.hostname]
# Pass down shared/common config items
for folder_config in config.folders:

View File

@@ -164,7 +164,7 @@ class NodesObservation(AbstractObservation, identifier="NODES"):
:return: Constructed nodes observation instance.
:rtype: NodesObservation
"""
if parent_where is None:
if not parent_where:
where = ["network", "nodes"]
else:
where = parent_where + ["nodes"]

View File

@@ -124,7 +124,7 @@ class RouterObservation(AbstractObservation, identifier="ROUTER"):
:return: Constructed router observation instance.
:rtype: RouterObservation
"""
where = parent_where + ["nodes", config.hostname]
where = parent_where + [config.hostname]
if config.acl is None:
config.acl = ACLObservation.ConfigSchema()