mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-04-18 05:48:27 +00:00
Expanded params config for rpki server URL and backend type for query switching and lookup handling. Initial support for routinator server API endpoint.
31 lines
816 B
Python
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()
|