mirror of https://github.com/apache/cloudstack.git
Bug 8208 - bare metal provisioning
set pod to external dhcp server when adding external dhcp server
This commit is contained in:
parent
d5abb202ec
commit
617ef5c178
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue