diff --git a/hyperglass/configuration/models/routers.py b/hyperglass/configuration/models/routers.py index eb5f227..793d93f 100644 --- a/hyperglass/configuration/models/routers.py +++ b/hyperglass/configuration/models/routers.py @@ -16,7 +16,8 @@ from hyperglass.configuration.models.commands import Command from hyperglass.configuration.models.credentials import Credential from hyperglass.configuration.models.networks import Network from hyperglass.configuration.models.proxies import Proxy -from hyperglass.configuration.models.vrfs import DefaultVrf, Vrf +from hyperglass.configuration.models.vrfs import DefaultVrf +from hyperglass.configuration.models.vrfs import Vrf from hyperglass.constants import Supported from hyperglass.exceptions import ConfigError from hyperglass.exceptions import UnsupportedDevice @@ -115,6 +116,7 @@ class Router(HyperglassModel): f'Field "display_name" for VRF "{vrf["name"]}" was not set. ' f'Generated "display_name" {vrf["display_name"]}' ) + # Validate the non-default VRF against the standard # Vrf() class. vrf = Vrf(**vrf) diff --git a/hyperglass/constants.py b/hyperglass/constants.py index 6997044..84e0f58 100644 --- a/hyperglass/constants.py +++ b/hyperglass/constants.py @@ -1,4 +1,5 @@ """Constant definitions used throughout the application.""" +# Standard Library Imports import sys protocol_map = {80: "http", 8080: "http", 443: "https", 8443: "https"} diff --git a/hyperglass/exceptions.py b/hyperglass/exceptions.py index 5843afc..aa9fd6b 100644 --- a/hyperglass/exceptions.py +++ b/hyperglass/exceptions.py @@ -1,6 +1,9 @@ """Custom exceptions for hyperglass.""" +# Standard Library Imports import json as _json + +# Project Imports from hyperglass.util import log