From 7c9137dd0f27713303e254fef45fde44fe38d341 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Fri, 19 Jul 2019 12:14:40 +0200
Subject: [PATCH] move latchdb to testing routes

---
 inventory_provider/routes/jobs.py    | 6 ------
 inventory_provider/routes/testing.py | 8 ++++++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/inventory_provider/routes/jobs.py b/inventory_provider/routes/jobs.py
index 1782218a..4674a99e 100644
--- a/inventory_provider/routes/jobs.py
+++ b/inventory_provider/routes/jobs.py
@@ -39,9 +39,3 @@ def check_task_status(task_id):
     return jsonify(worker.check_task_status(task_id))
 
 
-@routes.route("latchdb", methods=['GET', 'POST'])
-def latch_db():
-    config = current_app.config["INVENTORY_PROVIDER_CONFIG"]
-    worker_common.latch_db(config)
-    r = worker_common.get_current_redis(config)
-    return jsonify(worker_common.get_latch(r))
diff --git a/inventory_provider/routes/testing.py b/inventory_provider/routes/testing.py
index 66d38912..49b3ccb9 100644
--- a/inventory_provider/routes/testing.py
+++ b/inventory_provider/routes/testing.py
@@ -157,6 +157,14 @@ def snmp_ids(hostname):
     return jsonify(ifc_data)
 
 
+@routes.route("latchdb", methods=['GET', 'POST'])
+def latch_db():
+    config = current_app.config["INVENTORY_PROVIDER_CONFIG"]
+    worker_common.latch_db(config)
+    r = worker_common.get_current_redis(config)
+    return jsonify(worker_common.get_latch(r))
+
+
 # TODO: remove all alarmsdb i/o, and then remove the following
 # @routes.route("/interfaces/status/<hostname>/<path:interface>",
 #               methods=['GET', 'POST'])
-- 
GitLab