(monitor, index=None)
| 72 | |
| 73 | |
| 74 | def validate_monitor(monitor, index=None): |
| 75 | if not isinstance(monitor, dict): |
| 76 | raise ApiError(400, "monitor must be an object", {"index": index}) |
| 77 | normalized = normalize_required_strings(monitor, ["name", "host", "type"], "monitor", index=index) |
| 78 | normalized["interval"] = normalize_int(normalized.get("interval"), "interval", index=index, default=600, min_value=1) |
| 79 | return normalized |
| 80 | |
| 81 | |
| 82 | def validate_sslcert(sslcert, index=None): |
nothing calls this directly
no test coverage detected