Bug 8208 - bare metal provisioning

set pod to external dhcp server when adding external dhcp server
This commit is contained in:
Frank 2011-03-21 16:39:49 -07:00
parent d5abb202ec
commit 617ef5c178
3 changed files with 6 additions and 2 deletions

View File

@ -141,6 +141,10 @@ public class HostPodVO implements Pod {
return externalDhcp;
}
public void setExternalDhcp(boolean use) {
externalDhcp = use;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof HostPodVO) {

View File

@ -58,7 +58,7 @@ public class ClusterDaoImpl extends GenericDaoBase<ClusterVO, Long> implements C
ZoneHyTypeSearch = createSearchBuilder();
ZoneHyTypeSearch.and("hypervisorType", ZoneHyTypeSearch.entity().getHypervisorType(), SearchCriteria.Op.EQ);
ZoneHyTypeSearch.and("dataCenterId", ZoneHyTypeSearch.entity().getPodId(), SearchCriteria.Op.EQ);
ZoneHyTypeSearch.and("dataCenterId", ZoneHyTypeSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
ZoneHyTypeSearch.done();
PodSearch = createSearchBuilder();

View File

@ -52,7 +52,7 @@ public class BareMetalPlanner implements DeploymentPlanner {
}
}
List<ClusterVO> clusters = _clusterDao.listByHyTypeWithoutGuid(HypervisorType.BareMetal.name());
List<ClusterVO> clusters = _clusterDao.listByDcHyType(vm.getDataCenterId(), HypervisorType.BareMetal.toString());
if (clusters.size() != 1) {
throw new CloudRuntimeException("Invaild baremetal cluster number " + clusters.size());
}