Updated Branches: refs/heads/disk_io_throttling f2e5591b7 -> 8b8a0d397
Allow account to have multiple networks with customer defined cidrs as we already let it happen when the cidr is taken from the physical network config Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f4a1a2ff Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f4a1a2ff Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f4a1a2ff Branch: refs/heads/disk_io_throttling Commit: f4a1a2ff380478fcd23319f0fd2678c50b971e36 Parents: 9a175f9 Author: Alena Prokharchyk <alena.prokharc...@citrix.com> Authored: Thu Jun 6 11:52:15 2013 -0700 Committer: Alena Prokharchyk <alena.prokharc...@citrix.com> Committed: Thu Jun 6 11:52:15 2013 -0700 ---------------------------------------------------------------------- .../src/com/cloud/network/NetworkManagerImpl.java | 17 ----------------- 1 file changed, 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4a1a2ff/server/src/com/cloud/network/NetworkManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index b92ef4b..cae4e8a 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -1490,23 +1490,6 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L return configs; } } - } else if (predefined != null && predefined.getCidr() != null && predefined.getBroadcastUri() == null && vpcId == null) { - // don't allow to have 2 networks with the same cidr in the same zone for the account - List<NetworkVO> configs = _networksDao.listBy(owner.getId(), plan.getDataCenterId(), predefined.getCidr(), true); - if (configs.size() > 0) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Found existing network configuration for offering " + offering + ": " + configs.get(0)); - } - - if (errorIfAlreadySetup) { - InvalidParameterValueException ex = new InvalidParameterValueException("Found existing network configuration (with specified id) for offering (with specified id)"); - ex.addProxyObject(offering.getUuid(), "offeringId"); - ex.addProxyObject(configs.get(0).getUuid(), "networkConfigId"); - throw ex; - } else { - return configs; - } - } } List<NetworkVO> networks = new ArrayList<NetworkVO>();