Files
update/sw-patch/cgcs-patch/cgcs_patch/templates/query_hosts.xml
Jessica Castelino 117b8b9916 Debian: Patch current implementation
This commit fixes the patch current implementation
in Debian env. It checks the sysroot commit, feed
commit and active deployment commit to report if a node
is patch current or not.

Test:
- Build/ Bootstrap/ Unlock / Reboot and verify that
patching does not trigger a reboot loop.

Story: 2009969
Task: 45394
Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com>
Change-Id: I43c02af3c7f5b3b0430502b1c5992d6b7bcd1915
2022-05-17 19:34:16 +00:00

57 lines
1.4 KiB
XML

% if not data is UNDEFINED and len(data) > 0:
<data>
% for host in data:
${hostelem(host)}
% endfor
</data>
% endif
<%def name="hostelem(host)">\
<%h = host %>\
<host>
<hostname>
% if h["hostname"] != "":
${h["hostname"]}
% endif
</hostname>
<requires_reboot>
% if h["requires_reboot"] != "":
${h["requires_reboot"]}
% endif
</requires_reboot>
<nodetype>
% if h["nodetype"] != "":
${h["nodetype"]}
% endif
</nodetype>
<ip>
% if h["ip"] != "":
${h["ip"]}
% endif
</ip>
<latest_sysroot_commit>
% if h["latest_sysroot_commit"] != "":
${h["latest_sysroot_commit"]}
% endif
</latest_sysroot_commit>
<secs_since_ack>
% if h["secs_since_ack"] != "":
${h["secs_since_ack"]}
% endif
</secs_since_ack>
<patch_failed>
% if h["patch_failed"] != "":
${h["patch_failed"]}
% endif
</patch_failed>
<stale_details>
% if h["stale_details"] != "":
${h["stale_details"]}
% endif
</stale_details>
<patch_current>
% if h["patch_current"] != "":
${h["patch_current"]}
% endif
</patch_current>
</host></%def>