cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [2/3] git commit: DeployVm: when SG enabled network is passed to the command, but no SG list is defined in the request, add the vm to SG enabled network automatically
Date Wed, 14 Nov 2012 23:10:10 GMT
DeployVm: when SG enabled network is passed to the command, but no SG list is defined in the
request, add the vm to SG enabled network automatically

Conflicts:

	server/src/com/cloud/vm/UserVmManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/6d9cafbf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/6d9cafbf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/6d9cafbf

Branch: refs/heads/master
Commit: 6d9cafbf35e39ee8371c79722c6d2cb34dd36963
Parents: 74622a4
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Fri Nov 9 11:02:07 2012 -0800
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Nov 14 15:01:35 2012 -0800

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6d9cafbf/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 a2a548f..96f1a2d 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2145,8 +2145,13 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService,
Manager
                 }
 
                 boolean isSecurityGroupEnabled = _networkMgr.isSecurityGroupSupportedInNetwork(network);
-                if (isSecurityGroupEnabled && networkIdList.size() > 1) {
-                    throw new InvalidParameterValueException("Can't create a vm with multiple
networks one of which is Security Group enabled");
+                if (isSecurityGroupEnabled) {
+                    if (networkIdList.size() > 1) {
+                        throw new InvalidParameterValueException("Can't create a vm with
multiple networks one of" +
+                        		" which is Security Group enabled");
+                    }
+                    
+                    isSecurityGroupEnabledNetworkUsed = true;
                 }
 
                 if (network.getTrafficType() != TrafficType.Guest || network.getGuestType()
!= Network.GuestType.Shared || (network.getGuestType() == Network.GuestType.Shared &&
!isSecurityGroupEnabled)) {


Mime
View raw message