mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
fix model type annotations to make flake8 happy
This commit is contained in:
@@ -9,18 +9,21 @@ from pydantic import StrictStr, constr
|
||||
# Project
|
||||
from hyperglass.models import HyperglassModel
|
||||
|
||||
StructuredCommunityMode = constr(regex=r"(permit|deny)")
|
||||
StructuredRPKIMode = constr(regex=r"(router|external)")
|
||||
|
||||
|
||||
class StructuredCommunities(HyperglassModel):
|
||||
"""Control structured data response for BGP communties."""
|
||||
|
||||
mode: constr(regex=r"(permit|deny)") = "deny"
|
||||
mode: StructuredCommunityMode = "deny"
|
||||
items: List[StrictStr] = []
|
||||
|
||||
|
||||
class StructuredRpki(HyperglassModel):
|
||||
"""Control structured data response for RPKI state."""
|
||||
|
||||
mode: constr(regex=r"(router|external)") = "router"
|
||||
mode: StructuredRPKIMode = "router"
|
||||
|
||||
|
||||
class Structured(HyperglassModel):
|
||||
|
||||
Reference in New Issue
Block a user