1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00
This commit is contained in:
checktheroads
2019-12-30 09:47:31 -07:00
parent 296ff0e202
commit 4ab94c7a6a
3 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -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"}

View File

@ -1,6 +1,9 @@
"""Custom exceptions for hyperglass."""
# Standard Library Imports
import json as _json
# Project Imports
from hyperglass.util import log