diff --git a/hyperglass/configuration/models/general.py b/hyperglass/configuration/models/general.py index 6952096..cee50c1 100644 --- a/hyperglass/configuration/models/general.py +++ b/hyperglass/configuration/models/general.py @@ -2,6 +2,13 @@ # Standard Library Imports from typing import List +from typing import Union + +# Third Party Imports +from pydantic import IPvAnyAddress +from pydantic import StrictBool +from pydantic import StrictInt +from pydantic import StrictStr # Project Imports from hyperglass.configuration.models._utils import HyperglassModel @@ -10,11 +17,13 @@ from hyperglass.configuration.models._utils import HyperglassModel class General(HyperglassModel): """Validation model for params.general.""" - debug: bool = False - primary_asn: str = "65001" - org_name: str = "The Company" - google_analytics: str = "" - redis_host: str = "localhost" - redis_port: int = 6379 - requires_ipv6_cidr: List[str] = ["cisco_ios", "cisco_nxos"] - request_timeout: int = 30 + debug: StrictBool = False + primary_asn: StrictStr = "65001" + org_name: StrictStr = "The Company" + google_analytics: StrictStr = "" + redis_host: StrictStr = "localhost" + redis_port: StrictInt = 6379 + requires_ipv6_cidr: List[StrictStr] = ["cisco_ios", "cisco_nxos"] + request_timeout: StrictInt = 30 + listen_address: Union[IPvAnyAddress, StrictStr] = "localhost" + listen_port: StrictInt = 8001