cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/internallb to 7680e1c
Date Thu, 25 Apr 2013 00:24:17 GMT
Updated Branches:
  refs/heads/internallb d73ca7ef7 -> 7680e1cc1


Internallb:

1) InternalLb and PublicLb can't be enabled on the same network offering
2) Can have internalLb only on VPC tier


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

Branch: refs/heads/internallb
Commit: 7680e1cc10b4e48be78668b31ba1af44d1528a67
Parents: d73ca7e
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Wed Apr 24 17:08:08 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Apr 24 17:24:06 2013 -0700

----------------------------------------------------------------------
 .../configuration/ConfigurationManagerImpl.java    |   16 ++++++++++++++-
 .../src/com/cloud/network/NetworkServiceImpl.java  |    4 +++
 2 files changed, 19 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7680e1cc/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 1d17462..144c48e 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -39,7 +39,6 @@ import javax.naming.NamingException;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 
-import com.cloud.dc.dao.*;
 import org.apache.cloudstack.acl.SecurityChecker;
 import org.apache.cloudstack.api.ApiConstants.LDAPParams;
 import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
@@ -86,6 +85,15 @@ import com.cloud.dc.PodVlanMapVO;
 import com.cloud.dc.Vlan;
 import com.cloud.dc.Vlan.VlanType;
 import com.cloud.dc.VlanVO;
+import com.cloud.dc.dao.AccountVlanMapDao;
+import com.cloud.dc.dao.ClusterDao;
+import com.cloud.dc.dao.DataCenterDao;
+import com.cloud.dc.dao.DataCenterIpAddressDao;
+import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDao;
+import com.cloud.dc.dao.DcDetailsDao;
+import com.cloud.dc.dao.HostPodDao;
+import com.cloud.dc.dao.PodVlanMapDao;
+import com.cloud.dc.dao.VlanDao;
 import com.cloud.deploy.DataCenterDeployment;
 import com.cloud.domain.Domain;
 import com.cloud.domain.DomainVO;
@@ -3633,6 +3641,11 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
                     }
                 }
             }
+            
+            //in the current version of the code, publicLb and specificLb can't both be set
to true for the same network offering
+            if (publicLb && internalLb) {
+                throw new InvalidParameterValueException("Public lb and internal lb can't
be enabled at the same time on the offering");
+            }
 
             Map<Capability, String> sourceNatServiceCapabilityMap = serviceCapabilityMap.get(Service.SourceNat);
             if ((sourceNatServiceCapabilityMap != null) && (!sourceNatServiceCapabilityMap.isEmpty()))
{
@@ -3977,6 +3990,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
     public boolean isOfferingForVpc(NetworkOffering offering) {
         boolean vpcProvider = _ntwkOffServiceMapDao.isProviderForNetworkOffering(offering.getId(),
                 Provider.VPCVirtualRouter);
+        boolean internalLb = offering.getInternalLb();
         return vpcProvider;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7680e1cc/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 2fbd172..9f222a3 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -1166,6 +1166,10 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService
{
             if (_configMgr.isOfferingForVpc(ntwkOff)){
                 throw new InvalidParameterValueException("Network offering can be used for
VPC networks only");
             }
+            if (ntwkOff.getInternalLb()) {
+                throw new InvalidParameterValueException("Internal Lb can be enabled on vpc
networks only");
+            }
+
             network = _networkMgr.createGuestNetwork(networkOfferingId, name, displayText,
gateway, cidr, vlanId, 
             		networkDomain, owner, sharedDomainId, pNtwk, zoneId, aclType, subdomainAccess,
vpcId, ip6Gateway, ip6Cidr);
         }  


Mime
View raw message