1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-04-18 05:48:27 +00:00
thatmattlove-hyperglass/hyperglass/models/config/structured.py
Wilhelm Schonfeldt de6875c683 Added broader support for external RPKI validation.
Expanded params config for rpki server URL and backend type for query switching and lookup handling.
Initial support for routinator server API endpoint.
2025-09-25 20:02:01 +02:00

31 lines
816 B
Python

"""Structured data configuration variables."""
# Standard Library
import typing as t
# Local
from ..main import HyperglassModel
StructuredCommunityMode = t.Literal["permit", "deny"]
StructuredRPKIMode = t.Literal["router", "external"]
class StructuredCommunities(HyperglassModel):
"""Control structured data response for BGP communities."""
mode: StructuredCommunityMode = "deny"
items: t.List[str] = []
class StructuredRpki(HyperglassModel):
"""Control structured data response for RPKI state."""
mode: StructuredRPKIMode = "router"
backend: str = "cloudflare"
rpki_server_url: str = ""
class Structured(HyperglassModel):
"""Control structured data responses."""
communities: StructuredCommunities = StructuredCommunities()
rpki: StructuredRpki = StructuredRpki()