mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-4326 Adding VMware DC to legacy zone should not be allowed by API
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
parent
b0c67a3cc5
commit
b0e06981c1
@ -1162,9 +1162,15 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
||||
// Check if zone with specified id exists
|
||||
DataCenterVO zone = _dcDao.findById(zoneId);
|
||||
if (zone == null) {
|
||||
InvalidParameterValueException ex = new InvalidParameterValueException(
|
||||
"Can't find zone by the id specified.");
|
||||
throw ex;
|
||||
throw new InvalidParameterValueException("Can't find zone by the id specified.");
|
||||
}
|
||||
// Check if zone is legacy zone
|
||||
if (isLegacyZone(zoneId)) {
|
||||
throw new InvalidParameterValueException("The specified zone is legacy zone. Adding VMware datacenter to legacy zone is not supported.");
|
||||
} else {
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("The specified zone is not legacy zone.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user