Revision 1f571426 src/scheduler/src/pool/VirtualMachinePoolXML.cc

View differences:

src/scheduler/src/pool/VirtualMachinePoolXML.cc
26 26

  
27 27
    if ( rc == 0 )
28 28
    {
29
        map<int, ObjectXML*>::iterator it;
30

  
29 31
        if (objects.empty())
30 32
        {
31 33
            return -2;
32 34
        }
33 35

  
36
        vm_resources.clear();
37

  
38
        for ( it = objects.begin(); it != objects.end(); ++it )
39
        {
40
            vm_resources.add_resource(it->first);
41
        } 
42

  
34 43
        if (NebulaLog::log_level() >= Log::DDDEBUG)
35 44
        {
36
            map<int,ObjectXML*>::iterator it;
37 45

  
38 46
            oss << "Pending/rescheduling VM and capacity requirements:" << endl;
39 47

  

Also available in: Unified diff