if(s_logger.isDebugEnabled()){
s_logger.debug("Successfully loaded the DataCenter from the zone token passed in ");
}
long zoneId = zone.getId();
DcDetailVO maxHostsInZone = _zoneDetailsDao.findDetail(zoneId, ZoneConfig.MaxHosts.key());
if(maxHostsInZone != null){
long maxHosts = new Long(maxHostsInZone.getValue()).longValue();
long currentCountOfHosts = _hostDao.countRoutingHostsByDataCenter(zoneId);
if(s_logger.isDebugEnabled()){
s_logger.debug("Number of hosts in Zone:"+ currentCountOfHosts + ", max hosts limit: "+ maxHosts);
}
if(currentCountOfHosts >= maxHosts){