summaryrefslogtreecommitdiffstats
path: root/apps/placement/templates/conductor_interface.json
diff options
context:
space:
mode:
authorvrvarma <vv8305@att.com>2019-12-13 10:24:55 -0500
committervrvarma <vv8305@att.com>2019-12-13 10:29:45 -0500
commit430153e1a9489a86cf0ff7942eceb0bf5f1c170c (patch)
treeb22090b80d11761a24d9cbeaa6348704cce2de83 /apps/placement/templates/conductor_interface.json
parent34ba229b31758c38a299a163de0007848b5921be (diff)
osdf rearchitecture into apps and libs
Change-Id: I2db2f8e252bd5e60807b2ffabf5a5b193a789f7a Signed-off-by: vrvarma <vv8305@att.com> Issue-ID: OPTFRA-637
Diffstat (limited to 'apps/placement/templates/conductor_interface.json')
-rwxr-xr-xapps/placement/templates/conductor_interface.json39
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/placement/templates/conductor_interface.json b/apps/placement/templates/conductor_interface.json
new file mode 100755
index 0000000..030d6a0
--- /dev/null
+++ b/apps/placement/templates/conductor_interface.json
@@ -0,0 +1,39 @@
+{
+ "name": "{{ name }}",
+ "files": {},
+ "timeout": {{ timeout }},
+ "num_solution": "{{ limit }}",
+ "template": {
+ "homing_template_version": "2017-10-10",
+ "parameters": {
+ {% set comma=joiner(",") %}
+ {% for key, value in request_params.items() %} {{ comma() }}
+ "{{key}}": {{ json.dumps(value) }}
+ {% endfor %}
+ },
+ "locations": {
+ "customer_loc": {
+ "latitude": { "get_param": "customer_lat" },
+ "longitude": { "get_param": "customer_long" }
+ }
+ },
+ "demands": {{ json.dumps(demand_list) }},
+ {% set comma_main = joiner(",") %}
+ "constraints": {
+ {% set comma=joiner(",") %}
+ {% for elem in policy_groups %} {{ comma() }}
+ {% for key, value in elem.items() %}
+ "{{key}}": {{ json.dumps(value) }}
+ {% endfor %}
+ {% endfor %}
+ },
+ "optimization": {
+ {% set comma=joiner(",") %}
+ {% for elem in optimization_policies %} {{ comma() }}
+ {% for key, value in elem.items() %}
+ "{{key}}": {{ json.dumps(value) }}
+ {% endfor %}
+ {% endfor %}
+ }
+ }
+}