Skip to content

Commit

Permalink
[patch] Add back restore.yml.j2 (#1572)
Browse files Browse the repository at this point in the history
Co-authored-by: Sanjay Prabhakar <[email protected]>
  • Loading branch information
sanjayprab and Sanjay Prabhakar authored Nov 22, 2024
1 parent 739c4d0 commit 0f60c61
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 %}

0 comments on commit 0f60c61

Please sign in to comment.