You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2013/02/08 00:20:02 UTC

[4/5] git commit: refs/heads/master - CLOUDSTACK-737 Security Group script assume there is only one nic per VM, it is a big task to support multiple NICs, may seperate that as another project

CLOUDSTACK-737
         Security Group script assume there is only one nic per VM, it is a big task to support multiple NICs, may seperate that as another project


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

Branch: refs/heads/master
Commit: 8a86d08fe307719e50d28d61d8e9025e56ab27da
Parents: 65210f4
Author: Anthony Xu <anthony@anthony-dev.(none)>
Authored: Mon Feb 4 17:09:06 2013 -0800
Committer: Anthony Xu <anthony@anthony-dev.(none)>
Committed: Mon Feb 4 17:09:06 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8a86d08f/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 8ceee38..7a139f4 100644
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2058,6 +2058,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
         if (networkIdList == null || networkIdList.isEmpty()) {
             throw new InvalidParameterValueException("need to specify networkIDs");
         }
+        if (networkIdList.size() > 1 ) {
+            throw new InvalidParameterValueException("VM can only be on one network in Zone with Security group enabled zone");
+        }
         // Verify that all the networks are Shared/Guest; can't create combination of SG enabled and disabled networks 
         for (Long networkId : networkIdList) {
             NetworkVO network = _networkDao.findById(networkId);