Handle edge cases
All checks were successful
CI / ci (push) Successful in 55s

This commit is contained in:
Aloïs Micard 2025-02-19 11:48:43 +01:00
parent 40ab66b43d
commit f1617f6dd9

View file

@ -26,10 +26,11 @@ def fetch_netbox_host_overrides(nb_api: pynetbox.api) -> dict:
continue
host = nb_ip_address.dns_name.split('.')[0]
domain = '.'.join(nb_ip_address.dns_name.split('.')[1:])
nb_host_overrides[nb_ip_address.dns_name] = {
'host': host,
'domain': nb_ip_address.dns_name.replace(f'{host}.', ''),
'domain': domain,
'ip': [
nb_ip_address.address.split('/')[0],
],