From 2d640e88431d72a932e8abb6d01ace2bed93bb04 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Tue, 8 Mar 2022 19:18:02 +0100 Subject: [PATCH] F #5761: Add error and sched messages to VM pool --- src/vm/VirtualMachineTemplate.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/vm/VirtualMachineTemplate.cc b/src/vm/VirtualMachineTemplate.cc index 0a017278ee..12e30308a4 100644 --- a/src/vm/VirtualMachineTemplate.cc +++ b/src/vm/VirtualMachineTemplate.cc @@ -90,6 +90,7 @@ string& VirtualMachineTemplate::to_xml_short(string& xml) const { ostringstream oss; string labels; + string msg, schd_msg; string schd_rank, schd_ds_rank; string schd_req, schd_ds_req; @@ -109,12 +110,24 @@ string& VirtualMachineTemplate::to_xml_short(string& xml) const /* ------------------------------------------------------------------ */ /* Attributes required by Sunstone */ /* - LABELS */ + /* - ERROR */ + /* - SHCED_MESSAGE */ /* ------------------------------------------------------------------ */ - if (get("LABELS", labels)) + if (get("LABELS", labels) && !labels.empty()) { oss << "" << one_util::escape_xml(labels) << ""; } + if (get("ERROR", msg) && !msg.empty()) + { + oss << "" << one_util::escape_xml(msg) << ""; + } + + if (get("SCHED_MESSAGE", schd_msg) && !schd_msg.empty()) + { + oss << "" << one_util::escape_xml(schd_msg) << ""; + } + /* ------------------------------------------------------------------ */ /* Attributes required by Scheduler */ /* - SCHED_RANK (RANK - deprecated) */