aboutsummaryrefslogtreecommitdiffstats
path: root/apps/templates/cms_opt_request_1702.jsont
diff options
context:
space:
mode:
Diffstat (limited to 'apps/templates/cms_opt_request_1702.jsont')
-rwxr-xr-xapps/templates/cms_opt_request_1702.jsont63
1 files changed, 63 insertions, 0 deletions
diff --git a/apps/templates/cms_opt_request_1702.jsont b/apps/templates/cms_opt_request_1702.jsont
new file mode 100755
index 0000000..bcafa45
--- /dev/null
+++ b/apps/templates/cms_opt_request_1702.jsont
@@ -0,0 +1,63 @@
+{
+ "request_id": "{{ request_id }}",
+ "startdate" : "{{ start_time }}",
+ "enddate" : "{{ end_time }}",
+
+ "change_elements" : [
+{% set comma = joiner(",") -%}
+{% for element in all_upgrades -%} {{ comma() }}
+ { "id" : "{{ element.id }}",
+ {% if element.scheduled -%} "scheduled_on": "{{ element.scheduled }}", {% endif -%}
+ "duration": {{ element.duration }}, {# duration in seconds #}
+ "failback_duration": {{ element.failback_duration }}, {# duration in seconds #}
+ "group_id": {{ element.group_id }}, {# duration in seconds #}
+ }{% endfor -%}
+ ],
+
+ "constraints" : [
+ {
+ "type" : "general_concurrency_limit",
+ "parameters" : [ {{ general_concurrency_limit }} ]
+ },
+
+ {
+ "type" : "allowed_forbidden_periods",
+ "parameters" : [
+{% set comma = joiner(",") -%}
+{% for idx in all_pending -%} {{ comma() }}
+ { "id" : "{{ idx.id }}",
+ "allowed_periods": [ {% set comma2 = joiner(",") -%}
+ {% for period in allowed_periods -%} {{ comma2() }} [{{ json.dumps(period[0]) }}, {{ json.dumps(period[1]) }}]
+ {% endfor -%} ] }{% endfor -%}
+ ]
+ }
+
+{% if p_v_conflict is defined and p_v_conflict|length > 0 %}
+ ,
+ {
+ "type" : "critical_periods",
+ "description" : "Simultaneous upgrades",
+ "parameters" : [
+{% set comma2 = joiner(",") -%}
+{% for element in p_v_conflict -%} {{ comma2() }}
+ {
+ "id" : "{{ element[0] }}",
+ "periods" : [{{ json.dumps(element[0]) }}, {{ json.dumps(element[1]) }}]
+ }
+{% endfor -%}
+{% endif %}
+
+{% for pserver, vce_group in grouped_vces.items() -%} {{ comma() }}
+ ,
+ {
+ "id" : "{{ pserver }}",
+ "name" : "VCE's on pserver {{ pserver }}",
+ "description": "Only some VCEs on a pserver can be upgraded at a time",
+ "max_num_upgrades" : {{ max_num_upgrades(vce_group) }},
+ "upgrades" : {{ json.dumps(vce_group) }}
+ }
+{% endfor -%}
+ ]
+ }
+ ]
+}