From 565c0db311d185c7de634401c87d2886d65f8c03 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Mon, 15 Jul 2019 15:41:44 +0200
Subject: [PATCH] log invalid/inconsistent coriant requests

---
 inventory_provider/routes/classifier.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py
index ccd0ac12..6cc274b0 100644
--- a/inventory_provider/routes/classifier.py
+++ b/inventory_provider/routes/classifier.py
@@ -306,7 +306,7 @@ def get_coriant_info(equipment_name, entity_string):
 
         m = re.match(r'^(\d+\-\d+)\.(\d+)', entity_string)
         if not m:
-            logger.warning(
+            logger.error(
                 'invalid coriant entity string format: %r' % entity_string)
             return Response(
                 response="no available info for '{}' '{}'".format(
@@ -327,6 +327,9 @@ def get_coriant_info(equipment_name, entity_string):
 
         if path:
             result['path'] = path
+        else:
+            logger.error('no path found for {}:{}'.format(
+                equipment_name, entity_string))
 
         # cache this data for the next call
         result = json.dumps(result).encode('utf-8')
-- 
GitLab