1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

implement ability to override device driver

This commit is contained in:
checktheroads
2021-04-23 23:10:03 -07:00
parent 1e6cd7a388
commit 5217fcc2e5
6 changed files with 55 additions and 34 deletions

View File

@@ -5,10 +5,12 @@ import re
from typing import TypeVar
# Third Party
from pydantic import StrictInt, StrictFloat
from pydantic import StrictInt, StrictFloat, constr
IntFloat = TypeVar("IntFloat", StrictInt, StrictFloat)
SupportedDriver = constr(regex=r"(scrapli|netmiko|hyperglass_agent)")
class StrictBytes(bytes):
"""Custom data type for a strict byte string.