1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{
"name": "{{ name }}",
"files": {},
"timeout": {{ timeout }},
"limit": {{ limit }},
"template": {
"homing_template_version": "2018-02-01",
"parameters": {
"service_name": "{{ service_name }}",
"service_id": "{{ service_id }}",
"customer_lat": {{ latitude }},
"customer_long": {{ longitude }}
},
"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 %}
}
}
}
|