All checks were successful
Build and Push Docker Images / build (push) Successful in 36s
Signed-off-by: UdoChudo <stream@udochudo.ru>
15 lines
259 B
Python
15 lines
259 B
Python
# parser.py
|
|
|
|
def parse_region_id(hostgroups: str | None) -> str:
|
|
if not hostgroups:
|
|
return "0"
|
|
|
|
if hostgroups == "p00rtmis":
|
|
return "0"
|
|
|
|
parts = hostgroups.split("_")
|
|
if len(parts) >= 2:
|
|
return parts[1]
|
|
|
|
return "0"
|