diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py index bcf80690874f15a21a40766d162f3f4e10997a5a..7cf5ae0c22eb0e4b0eaa1b833f8965b67aa41922 100644 --- a/inventory_provider/routes/classifier.py +++ b/inventory_provider/routes/classifier.py @@ -76,10 +76,11 @@ def get_trap_metadata(source_equipment, interface): def _related_services(): for related in related_interfaces(source_equipment, interface): - s = r.get('opsdb:interface_services:%s:%s' + rs = r.get('opsdb:interface_services:%s:%s' % (source_equipment, related)) - if s: - yield json.loads(s.decode('utf-8')) + if rs: + for s in json.loads(rs.decode('utf-8')): + yield s related_services = list(_related_services()) if related_services: