MCPcopy Create free account
hub / github.com/cppla/ServerStatus / validate_sslcert

Function validate_sslcert

server/manage_api.py:82–89  ·  view source on GitHub ↗
(sslcert, index=None)

Source from the content-addressed store, hash-verified

80
81
82def validate_sslcert(sslcert, index=None):
83 if not isinstance(sslcert, dict):
84 raise ApiError(400, "sslcert must be an object", {"index": index})
85 normalized = normalize_required_strings(sslcert, ["name", "domain"], "sslcert", index=index)
86 normalized["port"] = normalize_int(normalized.get("port"), "port", index=index, default=443, min_value=1, max_value=65535)
87 normalized["interval"] = normalize_int(normalized.get("interval"), "interval", index=index, default=7200, min_value=1)
88 normalize_optional_string(normalized, "callback")
89 return normalized
90
91
92def validate_watchdog(watchdog, index=None):

Callers

nothing calls this directly

Calls 4

ApiErrorClass · 0.85
normalize_intFunction · 0.85

Tested by

no test coverage detected