diff --git a/ibm/mas_devops/common_tasks/templates/backup_restore/restore.yml.j2 b/ibm/mas_devops/common_tasks/templates/backup_restore/restore.yml.j2 new file mode 100644 index 000000000..8ad544b40 --- /dev/null +++ b/ibm/mas_devops/common_tasks/templates/backup_restore/restore.yml.j2 @@ -0,0 +1,36 @@ +--- +kind: Restore +name: "{{ masbr_job_name }}" +version: "{{ masbr_job_version }}" +from: "{{ masbr_restore_from }}" +target: + domain: "{{ masbr_cluster_domain }}" +{% if masbr_job_component is defined and masbr_job_component.items() %} +component: +{% for key, value in masbr_job_component.items() %} + {{ key }}: "{{ value }}" +{% endfor %} +{% endif %} +{% if masbr_job_data_list is defined and masbr_job_data_list | length > 0 %} +data: +{% for job_data in masbr_job_data_list %} + - seq: {{ job_data.seq }} + type: "{{ job_data.type }}" + phase: "{{ job_data.phase | default('New', true) }}" +{% endfor %} +{% endif %} +status: + phase: "{{ masbr_job_status.phase | default('New', true) }}" + startTimestamp: "{{ masbr_job_status.startTimestamp | default('', true) }}" + completionTimestamp: "{{ masbr_job_status.completionTimestamp | default('', true) }}" +{% if masbr_job_status is defined + and masbr_job_status.sentNotifications is defined + and masbr_job_status.sentNotifications | length > 0 %} + sentNotifications: +{% for notification in masbr_job_status.sentNotifications %} + - type: "{{ notification.type }}" + channel: "{{ notification.channel }}" + timestamp: "{{ notification.timestamp }}" + phase: "{{ notification.phase }}" +{% endfor %} +{% endif %}