Skip to content

Commit

Permalink
chore: RuleModuleYamlSpec placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
niliayu committed Sep 27, 2024
1 parent f7b1d7e commit e20b58e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lib/sift_py/ingestion/config/yaml/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ChannelEnumTypeYamlSpec,
FlowYamlSpec,
RuleYamlSpec,
RuleModuleYamlSpec,
TelemetryConfigYamlSpec,
)
from sift_py.ingestion.rule.config import RuleActionAnnotationKind
Expand Down Expand Up @@ -167,7 +168,7 @@ def _validate_yaml(raw_config: Dict[Any, Any]) -> TelemetryConfigYamlSpec:
raise YamlConfigError._invalid_property(
rules,
"rules",
f"List[{_type_fqn(RuleYamlSpec)}]",
f"List[{_type_fqn(RuleYamlSpec)}] or List[{_type_fqn(RuleModuleYamlSpec)}]",
None,
)

Expand Down
9 changes: 9 additions & 0 deletions python/lib/sift_py/ingestion/config/yaml/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ class FlowYamlSpec(TypedDict):
channels: List[ChannelConfigYamlSpec]


class RuleModuleYamlSpec(TypedDict):
"""
TODO: A nice docstring
"""
name: str
namespace: str
channel_references: NotRequired[List[Dict[str, ChannelConfigYamlSpec]]]


class RuleYamlSpec(TypedDict):
"""
The formal definition of what a single rule looks like in YAML.
Expand Down

0 comments on commit e20b58e

Please sign in to comment.