mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6996 Adding cluster to legacy zone failed
Lookup zone_id field in legacy_zones table to search the table for legacy zone. Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
parent
12e92e10ff
commit
71f76edf71
|
|
@ -27,7 +27,7 @@ public interface LegacyZoneDao extends GenericDao<LegacyZoneVO, Long> {
|
|||
* @param zoneId - id of zone
|
||||
* @return Object of legacy zone (LegacyZoneVO) identified by zoneId
|
||||
*/
|
||||
LegacyZoneVO findByZoneId(String zoneId);
|
||||
LegacyZoneVO findByZoneId(Long zoneId);
|
||||
|
||||
/**
|
||||
* Lists all legacy CloudStack zones
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class LegacyZoneDaoImpl extends GenericDaoBase<LegacyZoneVO, Long> implem
|
|||
}
|
||||
|
||||
@Override
|
||||
public LegacyZoneVO findByZoneId(String zoneId) {
|
||||
public LegacyZoneVO findByZoneId(Long zoneId) {
|
||||
SearchCriteria<LegacyZoneVO> sc = zoneSearch.create();
|
||||
sc.setParameters("zoneId", zoneId);
|
||||
return findOneBy(sc);
|
||||
|
|
|
|||
|
|
@ -1186,7 +1186,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
|||
@Override
|
||||
public boolean isLegacyZone(long dcId) {
|
||||
boolean isLegacyZone = false;
|
||||
LegacyZoneVO legacyZoneVo = _legacyZoneDao.findById(dcId);
|
||||
LegacyZoneVO legacyZoneVo = _legacyZoneDao.findByZoneId(dcId);
|
||||
if (legacyZoneVo != null) {
|
||||
isLegacyZone = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue