diff --git a/inventory_provider/routes/testing.py b/inventory_provider/routes/testing.py index 5362f4a9fe7737a850d8f1ca3d594b8c91c90a55..2ee9da12af9f66bdac83dae120855ec9fb4dd8d2 100644 --- a/inventory_provider/routes/testing.py +++ b/inventory_provider/routes/testing.py @@ -153,24 +153,8 @@ def bgp_configs(hostname): def snmp_ids(hostname): r = common.get_redis() ifc_data_string = r.get('snmp-interfaces:' + hostname) - if not ifc_data_string: - return Response( - response="no available info for '%s'" % hostname, - status=404, - mimetype="text/html") - - def _ifc_name(ifc): - if 'v4InterfaceName' in ifc: - return ifc['v4InterfaceName'] - if 'v6InterfaceName' in ifc: - return ifc['v6InterfaceName'] - assert False, "sanity failure: no interface name found" - ifc_data = json.loads(ifc_data_string.decode('utf-8')) - result = [ - {'index': i['index'], 'name': _ifc_name(i)} - for i in ifc_data] - return jsonify(result) + return jsonify(ifc_data) # TODO: remove all alarmsdb i/o, and then remove the following