% if not contents is UNDEFINED and len(contents) > 0:
% for patch_id in sorted(contents.keys()):
% for pkg in sorted(contents[patch_id]):
${pkg}
% endfor
% endfor
% endif
% if not error is UNDEFINED and len(error) > 0:
${error}
% endif
% if not metadata is UNDEFINED and len(metadata) > 0:
% for patch_id in sorted(metadata.keys()):
${showpatch(patch_id)}
% endfor
% endif
<%def name="showpatch(patch_id)">\
<% p = metadata[patch_id] %>\
${patch_id}
% if p["status"] != "":
${p["status"]}
% endif
% if p["unremovable"] != "":
${p["unremovable"]}
% endif
% if p["reboot_required"] != "":
${p["reboot_required"]}
% endif
% if p["sw_version"] != "":
${p["sw_version"]}
% endif
% if p["repostate"] != "":
${p["repostate"]}
% endif
% if p["patchstate"] != "":
${p["patchstate"]}
% endif
% if p["status"] != "":
${p["status"]}
% endif
% if p["summary"] != "":
${p["summary"]}
% endif
% if p["description"] != "":
${p["description"]}
% endif
% if p["install_instructions"] != "":
${p["install_instructions"]}
% endif
% if p["warnings"] != "":
${p["warnings"]}
% endif
% if "requires" in p and len(p["requires"]) > 0:
% for req in sorted(p["requires"]):
${req}
% endfor
% endif
%def>