Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4035B104E9 for ; Tue, 11 Mar 2014 14:35:30 +0000 (UTC) Received: (qmail 2188 invoked by uid 500); 11 Mar 2014 14:35:29 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 2132 invoked by uid 500); 11 Mar 2014 14:35:29 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 2125 invoked by uid 99); 11 Mar 2014 14:35:29 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2014 14:35:29 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D4F4E93EE05; Tue, 11 Mar 2014 14:35:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: muralireddy@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/regionvpc to 5f4bebf Date: Tue, 11 Mar 2014 14:35:28 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/regionvpc edf12ebc1 -> 5f4bebf35 permit VM's to be created in different zone that in which network is created if the network support streched L2 subnet Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5f4bebf3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5f4bebf3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5f4bebf3 Branch: refs/heads/regionvpc Commit: 5f4bebf35ca9bd0ea52b3178ab289077cc6a5c97 Parents: edf12eb Author: Murali Reddy Authored: Tue Mar 11 20:04:45 2014 +0530 Committer: Murali Reddy Committed: Tue Mar 11 20:04:45 2014 +0530 ---------------------------------------------------------------------- server/src/com/cloud/vm/UserVmManagerImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f4bebf3/server/src/com/cloud/vm/UserVmManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index be00aa8..9983cfe 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2420,7 +2420,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } s_logger.debug("Creating network for account " + owner + " from the network offering id=" + requiredOfferings.get(0).getId() + " as a part of deployVM process"); Network newNetwork = _networkMgr.createGuestNetwork(requiredOfferings.get(0).getId(), owner.getAccountName() + "-network", owner.getAccountName() + "-network", - null, null, null, null, owner, null, physicalNetwork, zone.getId(), ACLType.Account, null, null, null, null, true, null); + null, null, null, null, owner, null, physicalNetwork, zone.getId(), ACLType.Account, null, null, null, null, true, null, requiredOfferings.get(0).getSupportsStrechedL2()); defaultNetwork = _networkDao.findById(newNetwork.getId()); } else if (virtualNetworks.size() > 1) { throw new InvalidParameterValueException("More than 1 default Isolated networks are found for account " + owner + "; please specify networkIds"); @@ -2644,7 +2644,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir boolean securityGroupEnabled = false; boolean vpcNetwork = false; for (NetworkVO network : networkList) { - if (network.getDataCenterId() != zone.getId()) { + if ((network.getDataCenterId() != zone.getId()) && !network.isStrechedL2Network()) { throw new InvalidParameterValueException("Network id=" + network.getId() + " doesn't belong to zone " + zone.getId()); } @@ -4543,7 +4543,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir + " as a part of deployVM process"); Network newNetwork = _networkMgr.createGuestNetwork(requiredOfferings.get(0).getId(), newAccount.getAccountName() + "-network", newAccount.getAccountName() + "-network", null, null, null, null, newAccount, null, physicalNetwork, zone.getId(), ACLType.Account, null, null, - null, null, true, null); + null, null, true, null, requiredOfferings.get(0).getSupportsStrechedL2()); // if the network offering has persistent set to true, implement the network if (requiredOfferings.get(0).getIsPersistent()) { DeployDestination dest = new DeployDestination(zone, null, null, null);