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

added route for getting routers list locally

parent 3d000c87
No related branches found
No related tags found
No related merge requests found
import collections import collections
import json import json
import os
import re import re
from flask import Blueprint, Response, jsonify, current_app from flask import Blueprint, Response, jsonify, current_app
...@@ -219,6 +220,12 @@ def get_netconf(hostname): ...@@ -219,6 +220,12 @@ def get_netconf(hostname):
return msg return msg
@routes.route("routers-list", methods=['GET', 'POST'])
def routers_from_config_dir():
with open(os.environ['FAKE_ROUTERS_FILE']) as f:
return Response(f.read(), mimetype="text.plain")
@routes.route("latchdb", methods=['GET', 'POST']) @routes.route("latchdb", methods=['GET', 'POST'])
def latch_db(): def latch_db():
config = current_app.config["INVENTORY_PROVIDER_CONFIG"] config = current_app.config["INVENTORY_PROVIDER_CONFIG"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment