From d26b162ead111d594b23fdfcffe86c19d7d273aa Mon Sep 17 00:00:00 2001 From: Robert Latta <robert.latta@geant.org> Date: Wed, 8 May 2019 10:56:28 +0000 Subject: [PATCH] Excluded service results where equipment is missing --- inventory_provider/db/opsdb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inventory_provider/db/opsdb.py b/inventory_provider/db/opsdb.py index 392f2359..092d3486 100644 --- a/inventory_provider/db/opsdb.py +++ b/inventory_provider/db/opsdb.py @@ -129,7 +129,10 @@ retrieve_services_query = """SELECT * AND pp_b.port = cc.port_b WHERE c.status != 'terminated' AND is_circuit = 1) AS inner_query - WHERE circuit_type IN ('path', 'service', 'l2circuit') + WHERE + equipment IS NOT NULL + AND equipment != '' + AND circuit_type IN ('path', 'service', 'l2circuit') ORDER BY name, FIELD(status, -- GitLab