2020-07-30 01:30:01 -07:00
|
|
|
"""Validate network configuration variables."""
|
|
|
|
|
|
|
|
|
|
# Third Party
|
|
|
|
|
from pydantic import Field, StrictStr
|
|
|
|
|
|
2020-10-11 13:14:07 -07:00
|
|
|
# Local
|
|
|
|
|
from ..main import HyperglassModel
|
2020-07-30 01:30:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Network(HyperglassModel):
|
|
|
|
|
"""Validation Model for per-network/asn config in devices.yaml."""
|
|
|
|
|
|
|
|
|
|
name: StrictStr = Field(
|
|
|
|
|
...,
|
|
|
|
|
title="Network Name",
|
|
|
|
|
description="Internal name of the device's primary network.",
|
|
|
|
|
)
|
|
|
|
|
display_name: StrictStr = Field(
|
|
|
|
|
...,
|
|
|
|
|
title="Network Display Name",
|
|
|
|
|
description="Display name of the device's primary network.",
|
|
|
|
|
)
|