remove legacy fields

This commit is contained in:
checktheroads 2019-10-16 01:17:44 -07:00
parent 34356b4707
commit bb01709713
3 changed files with 5 additions and 12 deletions

View file

@ -18,7 +18,7 @@ from hyperglass.configuration.models._utils import HyperglassModel
class Branding(HyperglassModel):
"""Class model for params.branding"""
site_name: str = "hyperglass"
site_title: str = "hyperglass"
class Colors(HyperglassModel):
"""Class model for params.colors"""
@ -61,7 +61,7 @@ class Branding(HyperglassModel):
favicons: str = "ui/images/favicons/"
@validator("favicons")
def favicons_trailing_slash(value):
def favicons_trailing_slash(cls, value):
"""
If the favicons path does not end in a '/', append it.
"""
@ -89,6 +89,7 @@ class Branding(HyperglassModel):
query_location: str = "Location"
query_type: str = "Query Type"
query_target: str = "Target"
query_vrf: str = "Routing Table"
terms: str = "Terms"
info: str = "Help"
peeringdb = "PeeringDB"
@ -97,7 +98,6 @@ class Branding(HyperglassModel):
bgp_aspath: str = "BGP AS Path"
ping: str = "Ping"
traceroute: str = "Traceroute"
vrf: str = "Routing Table"
class Error404(HyperglassModel):
"""Class model for 404 Error Page"""
@ -113,14 +113,8 @@ class Branding(HyperglassModel):
subtitle: str = "Something Went Wrong"
button: str = "Home"
class Error504(HyperglassModel):
"""Class model for 504 Error Element"""
message: str = "Unable to reach {target}"
error404: Error404 = Error404()
error500: Error500 = Error500()
error504: Error504 = Error504()
colors: Colors = Colors()
credit: Credit = Credit()

View file

@ -32,5 +32,5 @@ class Messages(HyperglassModel):
authentication_error: str = "Authentication error occurred."
noresponse_error: str = "No response."
vrf_not_associated: str = "VRF {vrf_name} is not associated with {device_name}."
no_matching_vrfs: str = "No VRFs Match"
no_matching_vrfs: str = "No VRFs in Common"
no_output: str = "No output."

View file

@ -23,8 +23,7 @@ class Proxy(HyperglassModel):
address: str
port: int = 22
credential: Credential
nos: str
ssh_command: str = "ssh -l {username} {host}"
nos: str = "linux_ssh"
@validator("nos")
def supported_nos(cls, v): # noqa: N805