Remove obsolete utility modules after helper refactor
This commit is contained in:
@@ -1,21 +0,0 @@
|
|||||||
"""Utilities re-exported from config_file_service for cross-module usage."""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from app.services.config_file_service import (
|
|
||||||
_build_inactive_jail,
|
|
||||||
_get_active_jail_names,
|
|
||||||
_ordered_config_files,
|
|
||||||
_parse_jails_sync,
|
|
||||||
_validate_jail_config_sync,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"_ordered_config_files",
|
|
||||||
"_parse_jails_sync",
|
|
||||||
"_build_inactive_jail",
|
|
||||||
"_get_active_jail_names",
|
|
||||||
"_validate_jail_config_sync",
|
|
||||||
]
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
"""Jail helpers to decouple service layer dependencies."""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from collections.abc import Sequence
|
|
||||||
|
|
||||||
from app.services.jail_service import reload_all
|
|
||||||
|
|
||||||
|
|
||||||
async def reload_jails(
|
|
||||||
socket_path: str,
|
|
||||||
include_jails: Sequence[str] | None = None,
|
|
||||||
exclude_jails: Sequence[str] | None = None,
|
|
||||||
) -> None:
|
|
||||||
"""Reload fail2ban jails using shared jail service helper."""
|
|
||||||
await reload_all(
|
|
||||||
socket_path,
|
|
||||||
include_jails=list(include_jails) if include_jails is not None else None,
|
|
||||||
exclude_jails=list(exclude_jails) if exclude_jails is not None else None,
|
|
||||||
)
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
"""Log-related helpers to avoid direct service-to-service imports."""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from app.models.config import LogPreviewRequest, LogPreviewResponse, RegexTestRequest, RegexTestResponse
|
|
||||||
from app.services.log_service import preview_log as _preview_log, test_regex as _test_regex
|
|
||||||
|
|
||||||
|
|
||||||
async def preview_log(req: LogPreviewRequest) -> LogPreviewResponse:
|
|
||||||
return await _preview_log(req)
|
|
||||||
|
|
||||||
|
|
||||||
def test_regex(req: RegexTestRequest) -> RegexTestResponse:
|
|
||||||
return _test_regex(req)
|
|
||||||
Reference in New Issue
Block a user