Revision 5c54e1c5 src/rm/RequestManagerAllocate.cc

View differences:

src/rm/RequestManagerAllocate.cc
273 273
    VirtualNetworkTemplate * vtmpl=static_cast<VirtualNetworkTemplate *>(tmpl);
274 274

  
275 275
    set<int> cluster_ids;
276
    cluster_ids.insert(cluster_id);
276

  
277
    if (cluster_id != ClusterPool::NONE_CLUSTER_ID)
278
    {
279
        cluster_ids.insert(cluster_id);
280
    }
277 281

  
278 282
    return vpool->allocate(att.uid, att.gid, att.uname, att.gname, att.umask,-1,
279 283
            vtmpl, &id, cluster_ids, att.resp_msg);
......
630 634
    HostPool * hpool = static_cast<HostPool *>(pool);
631 635

  
632 636
    set<int> cluster_ids;
633
    cluster_ids.insert(cluster_id);
637

  
638
    if (cluster_id != ClusterPool::NONE_CLUSTER_ID)
639
    {
640
        cluster_ids.insert(cluster_id);
641
    }
634 642

  
635 643
    return hpool->allocate(&id, host, im_mad, vmm_mad, vnm_mad,
636 644
                           cluster_ids, att.resp_msg);
......
718 726
    DatastoreTemplate * ds_tmpl = static_cast<DatastoreTemplate *>(tmpl);
719 727

  
720 728
    set<int> cluster_ids;
721
    cluster_ids.insert(cluster_id);
729

  
730
    if (cluster_id != ClusterPool::NONE_CLUSTER_ID)
731
    {
732
        cluster_ids.insert(cluster_id);
733
    }
722 734

  
723 735
    return dspool->allocate(att.uid, att.gid, att.uname, att.gname, att.umask,
724 736
            ds_tmpl, &id, cluster_ids, att.resp_msg);

Also available in: Unified diff