In the case the interface has no ipv4 address, but has ipv6, the onboarding fails with "ipv4" error message.
Diff to fix this:
diff --git a/netbox_onboarding/onboard.py b/netbox_onboarding/onboard.py
index d646af1..3b1c3e2 100644
--- a/netbox_onboarding/onboard.py
+++ b/netbox_onboarding/onboard.py
@@ -354,7 +354,7 @@ class NetdevKeeper:
def get_mgmt_info():
"""Get the interface name and prefix length for the management interface."""
for if_name, if_data in ip_ifs.items():
for if_addr, if_addr_data in if_data["ipv4"].items():
for if_addr, if_addr_data in if_data.get("ipv4",{}).items()::
if if_addr == mgmt_ipaddr:
return (if_name, if_addr_data["prefix_length"])
return (default_mgmt_if, default_mgmt_pfxlen)
Currently the onboarding plugin has been tested only on IPV4 so I guess it's expected
Please can you open a new feature request using the template to track it. I agree it would be great to support both
In the case the interface has no ipv4 address, but has ipv6, the onboarding fails with "ipv4" error message.
Diff to fix this: diff --git a/netbox_onboarding/onboard.py b/netbox_onboarding/onboard.py index d646af1..3b1c3e2 100644 --- a/netbox_onboarding/onboard.py +++ b/netbox_onboarding/onboard.py @@ -354,7 +354,7 @@ class NetdevKeeper: def get_mgmt_info(): """Get the interface name and prefix length for the management interface.""" for if_name, if_data in ip_ifs.items():