aboutsummaryrefslogtreecommitdiffstats
path: root/test/functest/simulators/oof_dependencies_simulators.py
diff options
context:
space:
mode:
authorVarma, Vikas <vv8305@att.com>2018-09-19 00:39:03 -0400
committerVikas Varma <vv8305@att.com>2018-09-19 05:00:05 +0000
commit276119f2d54b2e8f49b8595ecfcc6545aeb77fef (patch)
treefd39c9b061e00a79d867e860a030020f7b0af571 /test/functest/simulators/oof_dependencies_simulators.py
parentce6ac9833b9d91dfe9fdd4a0346a641c0c246d90 (diff)
Initial checkin for pci optimization code
Change-Id: I6fe8ad471f8ad68a964664b910f02bd8a9766639 Signed-off-by: Varma, Vikas <vv8305@att.com> Issue-ID: OPTFRA-342
Diffstat (limited to 'test/functest/simulators/oof_dependencies_simulators.py')
-rwxr-xr-xtest/functest/simulators/oof_dependencies_simulators.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/functest/simulators/oof_dependencies_simulators.py b/test/functest/simulators/oof_dependencies_simulators.py
index bdb552d..9c20e79 100755
--- a/test/functest/simulators/oof_dependencies_simulators.py
+++ b/test/functest/simulators/oof_dependencies_simulators.py
@@ -20,9 +20,9 @@
Simulators for dependencies of OSDF (e.g. HAS-API, Policy, SO-callback, etc.)
"""
import glob
+from flask import Flask, jsonify, request
from osdf.utils.interfaces import json_from_file
-from flask import Flask, jsonify, request
app = Flask(__name__)
@@ -80,5 +80,22 @@ def get_policies(sub_component):
return jsonify([json_from_file(x) for x in files])
+@app.route("/simulated/configdb/getCellList", methods=["GET"])
+def get_cell_list():
+ data, status = get_payload_for_simulated_component('configdb',
+ 'getCellList-' + request.args.get('networkId') + '.json')
+ if not status:
+ return jsonify(data)
+ return jsonify(data), 503
+
+
+@app.route("/simulated/configdb/getNbrList", methods=["GET"])
+def get_nbr_list():
+ data, status = get_payload_for_simulated_component('configdb', 'getNbrList-' + request.args.get('cellId') + '.json')
+ if not status:
+ return jsonify(data)
+ return jsonify(data), 503
+
+
if __name__ == "__main__":
app.run(debug=True)