Skip to content
Snippets Groups Projects
Commit fd405e1a authored by Robert Latta's avatar Robert Latta
Browse files

Added route for services mapped to interfaces (findAffectedCircuits)

parent 53e9731e
No related branches found
No related tags found
No related merge requests found
......@@ -177,3 +177,17 @@ def interface_statuses(hostname, interface):
status=404,
mimetype="text/html")
return jsonify({"status": result.decode('utf-8')})
@routes.route("/services/<hostname>/<path:interface>",
methods=['GET', 'POST'])
def services_for_interface(hostname, interface):
r = db.get_redis()
result = r.hget("interface_services",
"{}::{}".format(hostname, interface))
if not result:
return Response(
response="no available info for {} {}".format(hostname, interface),
status=404,
mimetype="text/html")
return jsonify(json.loads(result.decode('utf-8')))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment