From 3915194719876e693b054d595ba8c4bd373946ca Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Fri, 28 May 2021 17:08:26 +0200
Subject: [PATCH] exclude interfaces with no addresses (?)

---
 inventory_provider/routes/lnetd.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/inventory_provider/routes/lnetd.py b/inventory_provider/routes/lnetd.py
index 8edd6d4a..18b1d772 100644
--- a/inventory_provider/routes/lnetd.py
+++ b/inventory_provider/routes/lnetd.py
@@ -101,6 +101,9 @@ def _load_router_interfaces(hostname):
             for ifc in juniper.list_interfaces(doc['value']):
                 if not ifc['description']:
                     continue
+                # seems we're only interested in interfaces with addresses?
+                if not ifc['ipv4'] and not ifc['ipv6']:
+                    continue
 
                 yield {
                     'hostname': router,
-- 
GitLab