cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: updated refs/heads/master to c7a1dbb
Date Wed, 31 Jul 2013 10:01:45 GMT
Updated Branches:
  refs/heads/master 9939d0945 -> c7a1dbb17


Cloudstack-2997 unable to update concurrent_conncetions feild in network_offerin.

Signed-off-by: Abhinandan Prateek <aprateek@apache.org>


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

Branch: refs/heads/master
Commit: c7a1dbb176743af591f4a9b1dc336ba306a258f0
Parents: 9939d09
Author: Bharat Kumar <bharat.kumar@citrix.com>
Authored: Mon Jul 29 15:27:11 2013 +0530
Committer: Abhinandan Prateek <aprateek@apache.org>
Committed: Wed Jul 31 15:31:42 2013 +0530

----------------------------------------------------------------------
 .../cloudstack/api/response/NetworkOfferingResponse.java    | 6 ++++++
 .../schema/src/com/cloud/offerings/NetworkOfferingVO.java   | 7 ++++---
 server/src/com/cloud/api/ApiResponseHelper.java             | 1 +
 .../com/cloud/configuration/ConfigurationManagerImpl.java   | 9 +++++----
 4 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c7a1dbb1/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
index 6b35d7b..a593ae6 100644
--- a/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
@@ -91,6 +91,8 @@ public class NetworkOfferingResponse extends BaseResponse {
     @SerializedName(ApiConstants.EGRESS_DEFAULT_POLICY) @Param(description="true if network
offering supports persistent networks, false otherwise")
     private Boolean egressDefaultPolicy;
 
+    @SerializedName(ApiConstants.MAX_CONNECTIONS) @Param(description = "maximum number of
concurrents connections to be handled by lb")
+    private Integer concurrentConnections;
 
     public void setId(String id) {
         this.id = id;
@@ -173,4 +175,8 @@ public class NetworkOfferingResponse extends BaseResponse {
         this.egressDefaultPolicy = egressDefaultPolicy;
     }
 
+    public  void setConcurrentConnections(Integer concurrentConnections) {
+       this.concurrentConnections = concurrentConnections;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c7a1dbb1/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java b/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java
index b0cb85d..eefdc94 100755
--- a/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java
+++ b/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java
@@ -134,7 +134,8 @@ public class NetworkOfferingVO implements NetworkOffering {
     boolean egressdefaultpolicy;
 
     @Column(name = "concurrent_connections")
-    Integer concurrent_connections;
+    Integer concurrentConnections;
+
 
     @Override
     public String getDisplayText() {
@@ -430,11 +431,11 @@ public class NetworkOfferingVO implements NetworkOffering {
     }
 
     public Integer getConcurrentConnections() {
-        return  this.concurrent_connections;
+        return  this.concurrentConnections;
     }
 
     public void setConcurrentConnections(Integer concurrent_connections) {
-        this.concurrent_connections = concurrent_connections;
+        this.concurrentConnections = concurrent_connections;
     }
 
     public void setPublicLb(boolean publicLb) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c7a1dbb1/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index c1ae7d0..a7ddbf1 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -2016,6 +2016,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         response.setIsPersistent(offering.getIsPersistent());
         response.setNetworkRate(ApiDBUtils.getNetworkRate(offering.getId()));
         response.setEgressDefaultPolicy(offering.getEgressDefaultPolicy());
+        response.setConcurrentConnections(offering.getConcurrentConnections());
         Long so = null;
         if (offering.getServiceOfferingId() != null) {
             so = offering.getServiceOfferingId();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c7a1dbb1/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 d5e6c00..0758b38 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3917,7 +3917,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
         }
         validateLoadBalancerServiceCapabilities(lbServiceCapabilityMap);
         
-        if (lbServiceCapabilityMap != null && !lbServiceCapabilityMap.isEmpty())
{
+        if (!serviceProviderMap.containsKey(Service.Lb) && lbServiceCapabilityMap
!= null && !lbServiceCapabilityMap.isEmpty()) {
             maxconn = cmd.getMaxconnections();
             if (maxconn == null) {
                 maxconn=Integer.parseInt(_configDao.getValue(Config.NetworkLBHaproxyMaxConn.key()));
@@ -4711,9 +4711,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
                 offering.setAvailability(availability);
             }
         }
-
-        if (maxconn != null) {
-            offering.setConcurrentConnections(maxconn);
+        if (_ntwkOffServiceMapDao.areServicesSupportedByNetworkOffering(offering.getId(),
Service.Lb)){
+            if (maxconn != null) {
+                 offering.setConcurrentConnections(maxconn);
+            }
         }
 
         if (_networkOfferingDao.update(id, offering)) {


Mime
View raw message