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

View differences:

src/scheduler/src/pool/VirtualMachineXML.cc
30 30
    int action;
31 31

  
32 32
    string automatic_requirements;
33
    string automatic_cluster_requirements;
33 34

  
34 35
    xpath(oid, "/VM/ID", -1);
35 36
    xpath(uid, "/VM/UID", -1);
......
92 93
        ds_requirements = automatic_requirements;
93 94
    }
94 95

  
96
    // ------------------- CLUSTER REQUIREMENTS --------------------------------
97

  
98
    xpath(automatic_cluster_requirements, "/VM/TEMPLATE/AUTOMATIC_CLUSTER_REQUIREMENTS", "");
99

  
100
    rc = xpath(cluster_requirements, "/VM/USER_TEMPLATE/SCHED_CLUSTER_REQUIREMENTS", "");
101

  
102
    if (rc == 0)
103
    {
104
        if ( !automatic_cluster_requirements.empty() )
105
        {
106
            ostringstream oss;
107

  
108
            oss << automatic_cluster_requirements << " & ( " << cluster_requirements << " )";
109

  
110
            cluster_requirements = oss.str();
111
        }
112
    }
113
    else if ( !automatic_cluster_requirements.empty() )
114
    {
115
        cluster_requirements = automatic_cluster_requirements;
116
    }
117

  
95 118
    // ---------------- HISTORY HID, DSID, RESCHED & TEMPLATE ------------------
96 119

  
97 120
    xpath(hid,  "/VM/HISTORY_RECORDS/HISTORY/HID", -1);

Also available in: Unified diff