cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject [09/25] git commit: updated refs/heads/advancedsg-leaseweb to c5383c8
Date Wed, 26 Jun 2013 09:30:19 GMT
CLOUDSTACK-737
     add xenserver support in UI
     only XenServer and KVM clusters are allowed in security enabled zone.
     only shared security enabled networks are allowed in security enabled zone.


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

Branch: refs/heads/advancedsg-leaseweb
Commit: 9edfd4b350558ba3c8b6a3bfb589350cd904e336
Parents: 5280a69
Author: anthony <anthony@cloud.com>
Authored: Thu Jan 24 17:26:51 2013 -0800
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Tue Jun 11 11:50:07 2013 +0200

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkManagerImpl.java   | 13 ++++++++-----
 server/src/com/cloud/resource/ResourceManagerImpl.java |  6 ++++++
 2 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9edfd4b3/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 72f5613..41f64ed 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -1884,11 +1884,14 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
             	}
                 // Only Account specific Isolated network with sourceNat service disabled
are allowed in security group
                 // enabled zone
-                boolean allowCreation = (ntwkOff.getGuestType() == GuestType.Isolated 
-                        && !_networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(),
Service.SourceNat));
-                if (!allowCreation) {
-                    throw new InvalidParameterValueException("Only Account specific Isolated
network with sourceNat " +
-                            "service disabled are allowed in security group enabled zone");
+                if ( ntwkOff.getGuestType() != GuestType.Shared ){
+                    throw new InvalidParameterValueException("Only shared guest network can
be created in security group enabled zone");
+                }
+                if ( _networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(),
Service.SourceNat)) {
+                    throw new InvalidParameterValueException("Service SourceNat is not allowed
in security group enabled zone");
+                }
+                if ( _networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(),
Service.SecurityGroup)) {
+                    throw new InvalidParameterValueException("network must have SecurityGroup
provider in security group enabled zone");
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9edfd4b3/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java
index b84373c..3a01ac8 100755
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -445,6 +445,12 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
             }
         }
 
+        if (zone.isSecurityGroupEnabled()) {
+            if( hypervisorType != HypervisorType.KVM && hypervisorType != HypervisorType.XenServer
) {
+                throw new InvalidParameterValueException("Don't support hypervisor type "
+ hypervisorType + " in advanced security enabled zone");
+            }
+        }
+
         Cluster.ClusterType clusterType = null;
         if (cmd.getClusterType() != null && !cmd.getClusterType().isEmpty()) {
             clusterType = Cluster.ClusterType.valueOf(cmd.getClusterType());


Mime
View raw message