From c569cfef2c6d756ebc2a7095a8ac854c5a4440e3 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Sat, 12 Oct 2019 17:04:39 +0200
Subject: [PATCH] temporarily filter all but routers matching mx*

---
 inventory_provider/tasks/worker.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py
index 11d2c2e2..39832cb6 100644
--- a/inventory_provider/tasks/worker.py
+++ b/inventory_provider/tasks/worker.py
@@ -489,6 +489,11 @@ def launch_refresh_cache_all(config):
         update_equipment_locations.apply_async(),
     ]
     for hostname in _derive_router_hostnames(config):
+        # TODO: remove this filter when the qfx* switches are configured
+        if not hostname.startswith('mx'):
+            logger.error(
+                'TEMP TEMP!!! skipping loading of host: %r' % hostname)
+            continue
         logger.debug('queueing router refresh jobs for %r' % hostname)
         subtasks.append(reload_router_config.apply_async(args=[hostname]))
 
-- 
GitLab