Add local Windows Server inventory collection and validation; include core package

This commit is contained in:
2026-10-30 11:24:40 -07:00
parent 967b2bd46a
commit f65ade9fff
35 changed files with 2200 additions and 56 deletions

View File

@@ -0,0 +1,10 @@
import re
def validate_hostname(value):
value = value.strip().rstrip(".")
if len(value) > 253 or not value or any(
not re.fullmatch(r"[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?", label)
for label in value.split(".")
):
raise ValueError("Enter a hostname or FQDN using letters, digits, hyphens and dots (no URLs or commands).")
return value.lower()