Revert "CLOUDSTACK-737"

This reverts commit d7201dfe1f.

Conflicts:
	server/src/com/cloud/network/NetworkManagerImpl.java
This commit is contained in:
Anthony Xu 2013-02-08 10:42:36 -08:00
parent b4f3f92607
commit 0a6c6bb254
3 changed files with 11 additions and 6 deletions

View File

@ -1854,6 +1854,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
} else if (zone.getNetworkType() == NetworkType.Advanced) {
if (zone.isSecurityGroupEnabled()) {
<<<<<<< HEAD
if (ipv6) {
throw new InvalidParameterValueException("IPv6 is not supported with security group!");
}
@ -1867,6 +1868,15 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
}
if ( ! _networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(), Service.SecurityGroup)) {
throw new InvalidParameterValueException("network must have SecurityGroup provider in security group enabled zone");
=======
// 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");
>>>>>>> parent of d7201df... CLOUDSTACK-737
}
}

View File

@ -427,12 +427,6 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
+ cmd.getHypervisor() + " to a supported ");
}
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());

View File

@ -373,6 +373,7 @@
var nonSupportedHypervisors = {};
if(args.context.zones[0]['network-model'] == "Advanced" && args.context.zones[0]['zone-advanced-sg-enabled'] == "on") {
firstOption = "KVM";
nonSupportedHypervisors["XenServer"] = 1; //to developers: comment this line if you need to test Advanced SG-enabled zone with XenServer hypervisor
nonSupportedHypervisors["VMware"] = 1;
nonSupportedHypervisors["BareMetal"] = 1;
nonSupportedHypervisors["Ovm"] = 1;