From 5161d315817b93f851f49ef10299a1f9483208b9 Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Sat, 13 Apr 2019 12:58:25 +0200 Subject: [PATCH] clarification changes to coriant path response --- inventory_provider/db/opsdb.py | 4 +--- test/test_opsdb_queries.py | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/inventory_provider/db/opsdb.py b/inventory_provider/db/opsdb.py index 00ce299b..ab3a6443 100644 --- a/inventory_provider/db/opsdb.py +++ b/inventory_provider/db/opsdb.py @@ -296,11 +296,10 @@ SELECT def _pop(r, suffix): return { - 'name': r['equipment_name' + suffix], + 'equipment name': r['equipment_name' + suffix], 'card id': r['card_id' + suffix], 'port number': r['port' + suffix], 'pop': { - 'absid': r['pop_absid' + suffix], 'name': r['pop_name' + suffix], 'city': r['pop_city' + suffix], 'country': r['pop_country' + suffix], @@ -311,7 +310,6 @@ SELECT } return { - 'absid': row['absid'], 'category': row['category'], 'circuit_type': row['circuit_type'], 'service_type': row['service_type'], diff --git a/test/test_opsdb_queries.py b/test/test_opsdb_queries.py index e44e9597..69261691 100644 --- a/test/test_opsdb_queries.py +++ b/test/test_opsdb_queries.py @@ -89,7 +89,6 @@ CORIANT_PATH_METADATA = { "pop-info": { "type": "object", "properties": { - "absid": {"type": "integer"}, "name": {"type": "string"}, "abbreviation": {"type": "string"}, "country": {"type": "string"}, @@ -98,7 +97,6 @@ CORIANT_PATH_METADATA = { "latitude": {"type": "number"} }, "required": [ - "absid", "name", "abbreviation", "country", @@ -111,19 +109,18 @@ CORIANT_PATH_METADATA = { "endpoint": { "type": "object", "properties": { - "name": {"type": "string"}, + "equipment name": {"type": "string"}, "card id": {"type": "string"}, "port number": {"type": "string"}, "pop": {"$ref": "#/definitions/pop-info"} }, - "required": ["name", "port number", "pop"], + "required": ["equipment name", "card id", "port number", "pop"], "additionalProperties": False } }, "type": "object", "properties": { - 'absid': {"type": "integer"}, 'category': {"type": "string"}, 'circuit_type': {"type": "string"}, 'service_type': {"type": "string"}, @@ -134,7 +131,6 @@ CORIANT_PATH_METADATA = { 'b': {"$ref": "#/definitions/endpoint"} }, "required": [ - "absid", "category", "circuit_type", "service_type", -- GitLab