diff options
author | vrvarma <vv8305@att.com> | 2019-12-13 10:24:55 -0500 |
---|---|---|
committer | vrvarma <vv8305@att.com> | 2019-12-13 10:29:45 -0500 |
commit | 430153e1a9489a86cf0ff7942eceb0bf5f1c170c (patch) | |
tree | b22090b80d11761a24d9cbeaa6348704cce2de83 /apps/templates/cms_opt_request_1702.jsont | |
parent | 34ba229b31758c38a299a163de0007848b5921be (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/templates/cms_opt_request_1702.jsont')
-rwxr-xr-x | apps/templates/cms_opt_request_1702.jsont | 63 |
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 -%} + ] + } + ] +} |