Initial model changes and api changes for pci-opt
[optf/osdf.git] / osdf / templates / cms_opt_request.jsont_1707_v1
1 {
2   "transaction_id": "{{ transaction_id }}",
3   "request_id": "{{ request_id }}",
4   "start_date" : "{{ start_time }}",
5   "end_date" : "{{ end_time }}",
6
7   "change_elements" : [
8   {% set comma = joiner(",") -%}
9   {% for element in all_upgrades -%} {{ comma() }}
10     {
11       "id" : "{{ element.id }}",
12       "failback_duration": {{ element.failback_duration }},
13       {% if element.group_id -%}
14         "group_id": "{{ element.group_id }}",
15       {% endif %}
16       {% if element.scheduled_on -%}
17         "scheduled_on": "{{ element.scheduled_on }}",
18       {% endif %}
19       "duration": {{ element.duration }}
20     }
21   {% endfor -%}
22   ],
23
24   "constraints" : [
25     {
26       "type" : "general_concurrency_limit",
27       "parameters": [{{ concurrency_limit }}]
28     },
29
30     {
31       "type" : "allowed_forbidden_periods",
32       "parameters" : [
33       {% set comma = joiner(",") -%}
34       {% for idx in all_pending -%} {{ comma() }}
35         { "id" : "{{ idx.id }}",
36           "allowed_periods": [ {{ allowed_periods }}]
37         }
38       {% endfor -%}
39       ]
40     },
41     {
42       "type" : "spatial_conflict",
43       "parameters": [
44       {% set comma = joiner(",") -%}
45       {% for pserver, vce_list in vce_pserver_mapping.items() -%} {{ comma() }}
46         {
47           "spatial_entity": "{{ pserver }}",
48           "affected_entities": {{ vce_list }}
49         }
50       {% endfor -%}
51       ]
52     },
53
54     {
55       "type" : "critical_periods",
56       "parameters": [
57       {% set comma = joiner(",") -%}
58       {% for element, conflict_period in conflict_interval.items() -%} {{ comma() }}
59         {
60           "id" : "{{ element }}",
61           "periods": [{{ conflict_period }}]
62         }
63       {% endfor -%}
64       ]
65     }
66   ]
67 }