Revision 621a1869 src/scheduler/src/pool/HostXML.cc

View differences:

src/scheduler/src/pool/HostXML.cc
22 22
#include "HostXML.h"
23 23
#include "NebulaUtil.h"
24 24
#include "NebulaLog.h"
25
#include "ObjectCollection.h"
25 26

  
26 27
/* -------------------------------------------------------------------------- */
27 28
/* -------------------------------------------------------------------------- */
......
39 40
void HostXML::init_attributes()
40 41
{
41 42
    xpath(oid,         "/HOST/ID",                     -1);
42
    xpath(cluster_id,  "/HOST/CLUSTER_ID",             -1);
43

  
44
    ObjectCollection cluster_collection("CLUSTERS");
45
    cluster_collection.from_xml(this, "/HOST/");
46

  
47
    cluster_ids = cluster_collection.clone();
48

  
43 49
    xpath<long long>(mem_usage, "/HOST/HOST_SHARE/MEM_USAGE",   0);
44 50
    xpath<long long>(cpu_usage, "/HOST/HOST_SHARE/CPU_USAGE",   0);
45 51
    xpath<long long>(max_mem,   "/HOST/HOST_SHARE/MAX_MEM",     0);
......
172 178
    map<int, long long>::const_iterator it;
173 179

  
174 180
    o << "ID          : " << p.oid          << endl;
175
    o << "CLUSTER_ID  : " << p.cluster_id   << endl;
181
    o << "CLUSTER_IDS : " << one_util::join(p.cluster_ids, ',') << endl;
176 182
    o << "MEM_USAGE   : " << p.mem_usage    << endl;
177 183
    o << "CPU_USAGE   : " << p.cpu_usage    << endl;
178 184
    o << "MAX_MEM     : " << p.max_mem      << endl;

Also available in: Unified diff