From 11c5e39029def0d74b77d3f07d8222301724b606 Mon Sep 17 00:00:00 2001
From: Robert Latta <robert.latta@geant.org>
Date: Thu, 20 Jun 2019 13:50:02 +0000
Subject: [PATCH] Added interface bundle information

---
 inventory_provider/routes/poller.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/inventory_provider/routes/poller.py b/inventory_provider/routes/poller.py
index 93179717..a48de48b 100644
--- a/inventory_provider/routes/poller.py
+++ b/inventory_provider/routes/poller.py
@@ -62,8 +62,14 @@ def poller_interface_oids(hostname):
         if not snmp_index:
             continue
 
+        bundle_parents = r.get('netconf-interface-bundles:%s:%s' % (
+            hostname, ifc['name'].split('.')[0]))
+
         ifc_data = {
             'name': ifc['name'],
+            'bundle': ifc['bundle'],
+            'bundle-parents':
+                json.loads(bundle_parents) if bundle_parents else [],
             'snmp-index': snmp_index,
             'description': ifc['description'],
             'circuits': []
-- 
GitLab