Revision 4697f1ee src/vm/VirtualMachine.cc

View differences:

src/vm/VirtualMachine.cc
1462 1462

  
1463 1463
    if ( !cluster_ids.empty() )
1464 1464
    {
1465
        // TODO: create a separate cluster automatic requirements
1466
        oss << "CLUSTER_IDS = " << one_util::join(cluster_ids, ',')
1467
            << " & !(PUBLIC_CLOUD = YES)";
1468
    }
1469
    else
1470
    {
1471
        oss << "!(PUBLIC_CLOUD = YES)";
1465
        set<int>::iterator i = cluster_ids.begin();
1466

  
1467
        oss << "(ID = " << *i;
1468

  
1469
        for (++i; i != cluster_ids.end(); i++)
1470
        {
1471
            oss << " | ID = " << *i;
1472
        }
1473

  
1474
        oss << ")";
1475

  
1476
        obj_template->add("AUTOMATIC_CLUSTER_REQUIREMENTS", oss.str());
1472 1477
    }
1473 1478

  
1479
    oss.str("");
1480
    oss << "!(PUBLIC_CLOUD = YES)";
1481

  
1474 1482
    if (num_public != 0)
1475 1483
    {
1476 1484
        set<string>::iterator it = clouds.begin();

Also available in: Unified diff