Revision 4697f1ee src/scheduler/src/pool/HostPoolXML.cc

View differences:

src/scheduler/src/pool/HostPoolXML.cc
95 95

  
96 96
/* -------------------------------------------------------------------------- */
97 97
/* -------------------------------------------------------------------------- */
98

  
99
void HostPoolXML::merge_clusters(ClusterPoolXML * clpool)
100
{
101
    // TODO
102
    /*
103
    map<int,ObjectXML*>::iterator it;
104

  
105
    ClusterXML* cluster;
106
    HostXML*    host;
107

  
108
    int cluster_id;
109
    vector<xmlNodePtr> nodes;
110

  
111
    for (it=objects.begin(); it!=objects.end(); it++)
112
    {
113
        host = static_cast<HostXML*>(it->second);
114

  
115
        cluster_id = host->get_cid();
116

  
117
        if(cluster_id != -1) //ClusterPool::NONE_CLUSTER_ID
118
        {
119
            cluster = clpool->get(cluster_id);
120

  
121
            if(cluster != 0)
122
            {
123
                nodes.clear();
124

  
125
                cluster->get_nodes("/CLUSTER/TEMPLATE", nodes);
126

  
127
                if (!nodes.empty())
128
                {
129
                    host->add_node("/HOST", nodes[0], "CLUSTER_TEMPLATE");
130
                }
131

  
132
                cluster->free_nodes(nodes);
133
            }
134
        }
135
    }
136
    */
137
}
138

  
139
/* -------------------------------------------------------------------------- */
140
/* -------------------------------------------------------------------------- */

Also available in: Unified diff