mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-15 05:57:23 +03:00
F #5761: Add error and sched messages to VM pool
(cherry picked from commit 2d640e88431d72a932e8abb6d01ace2bed93bb04)
This commit is contained in:
parent
62f5037915
commit
e921618e2f
@ -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 */
|
||||
/* - SCHED_MESSAGE */
|
||||
/* ------------------------------------------------------------------ */
|
||||
if (get("LABELS", labels))
|
||||
if (get("LABELS", labels) && !labels.empty())
|
||||
{
|
||||
oss << "<LABELS>" << one_util::escape_xml(labels) << "</LABELS>";
|
||||
}
|
||||
|
||||
if (get("ERROR", msg) && !msg.empty())
|
||||
{
|
||||
oss << "<ERROR>" << one_util::escape_xml(msg) << "</ERROR>";
|
||||
}
|
||||
|
||||
if (get("SCHED_MESSAGE", schd_msg) && !schd_msg.empty())
|
||||
{
|
||||
oss << "<SCHED_MESSAGE>" << one_util::escape_xml(schd_msg) << "</SCHED_MESSAGE>";
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* Attributes required by Scheduler */
|
||||
/* - SCHED_RANK (RANK - deprecated) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user