From a879b9f001561bd67d6e5df54e212034ada65e16 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Thu, 11 Apr 2019 12:54:18 +0200
Subject: [PATCH] added coriant path name to response

---
 inventory_provider/db/opsdb.py | 2 ++
 test/test_opsdb_queries.py     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/inventory_provider/db/opsdb.py b/inventory_provider/db/opsdb.py
index 1c0b155c..e569325f 100644
--- a/inventory_provider/db/opsdb.py
+++ b/inventory_provider/db/opsdb.py
@@ -255,6 +255,7 @@ SELECT
     vcc.service_type,
     vcc.peering_type,
     vcc.status,
+    vcc.name,
     eq_a.name as equipment_name_a,
     eq_b.name as equipment_name_b,
     eqc_a.card_id as card_id_a,
@@ -289,6 +290,7 @@ SELECT
             'service_type': row['service_type'],
             'peering_type': row['peering_type'],
             'status': row['status'],
+            'name': row['name'],
             'a': {
                 'name': row['equipment_name_a'],
                 'card id': row['card_id_a'],
diff --git a/test/test_opsdb_queries.py b/test/test_opsdb_queries.py
index 9cbc752c..19f18e5e 100644
--- a/test/test_opsdb_queries.py
+++ b/test/test_opsdb_queries.py
@@ -75,6 +75,7 @@ CORIANT_PATH_METADATA = {
         'service_type': {"type": "string"},
         'peering_type': {"type": "string"},
         'status': {"type": "string"},
+        'name': {"type": "string"},
         'a': {"$ref": "#/definitions/endpoint"},
         'b': {"$ref": "#/definitions/endpoint"}
     },
-- 
GitLab