Revision dc075e09 src/scheduler/src/pool/VirtualMachineXML.cc

View differences:

src/scheduler/src/pool/VirtualMachineXML.cc
73 73
        }
74 74
    }
75 75

  
76
    result = ((*this)["/VM/USER_TEMPLATE/SCHED_REQUIREMENTS"]);
76
    result = ((*this)["/VM/TEMPLATE/AUTOMATIC_REQUIREMENTS"]);
77 77

  
78 78
    if (result.size() > 0)
79 79
    {
80 80
        requirements = result[0];
81 81
    }
82
    else
82

  
83
    result = ((*this)["/VM/USER_TEMPLATE/SCHED_REQUIREMENTS"]);
84

  
85
    if (result.size() > 0)
83 86
    {
84
        requirements = "";
87
        if ( !requirements.empty() )
88
        {
89
            ostringstream oss;
90

  
91
            oss << requirements << " & ( " << result[0] << " )";
92

  
93
            requirements = oss.str();
94
        }
95
        else
96
        {
97
            requirements = result[0];
98
        }
85 99
    }
86 100

  
87 101
    result = ((*this)["/VM/HISTORY_RECORDS/HISTORY/HID"]);

Also available in: Unified diff