0823
This commit is contained in:
@@ -73,6 +73,15 @@ PRODUCT_TAG_SLUG = {
|
||||
# "fox200": "fox200-auto-upgrade-latest",
|
||||
}
|
||||
|
||||
# MACs to ignore completely when seen in registrations
|
||||
IGNORE_MACS_RAW = [
|
||||
"AA:BB:CC:DD:EE:FF",
|
||||
"D0:6C:37:00:D5:84",
|
||||
"44:D1:FA:7E:3F:65",
|
||||
"D0:6C:37:00:E6:D8",
|
||||
"C4:93:00:4E:92:7C",
|
||||
]
|
||||
|
||||
# Global counter for any NetBox-related problems
|
||||
NB_PROBLEM_COUNTER = 0
|
||||
NB_PROBLEM_LOCK = asyncio.Lock()
|
||||
@@ -173,6 +182,9 @@ def normalize_mac(mac: str) -> Optional[str]:
|
||||
return None
|
||||
|
||||
|
||||
IGNORE_MACS = {m for m in (normalize_mac(x) for x in IGNORE_MACS_RAW) if m}
|
||||
|
||||
|
||||
def http_get_json(url: str, params: Optional[Dict[str, str]] = None, headers: Optional[Dict[str, str]] = None, timeout: float = NB_TIMEOUT):
|
||||
if params:
|
||||
url = f"{url}?{urlencode(params)}"
|
||||
|
||||
Reference in New Issue
Block a user