File tree Expand file tree Collapse file tree
api/src/org/apache/cloudstack/api/response
engine/schema/src/com/cloud/offerings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ public class NetworkOfferingResponse extends BaseResponse {
9191 @ SerializedName (ApiConstants .EGRESS_DEFAULT_POLICY ) @ Param (description ="true if network offering supports persistent networks, false otherwise" )
9292 private Boolean egressDefaultPolicy ;
9393
94+ @ SerializedName (ApiConstants .MAX_CONNECTIONS ) @ Param (description = "maximum number of concurrents connections to be handled by lb" )
95+ private Integer concurrentConnections ;
9496
9597 public void setId (String id ) {
9698 this .id = id ;
@@ -173,4 +175,8 @@ public void setEgressDefaultPolicy(Boolean egressDefaultPolicy) {
173175 this .egressDefaultPolicy = egressDefaultPolicy ;
174176 }
175177
178+ public void setConcurrentConnections (Integer concurrentConnections ) {
179+ this .concurrentConnections = concurrentConnections ;
180+ }
181+
176182}
Original file line number Diff line number Diff line change @@ -134,7 +134,8 @@ public class NetworkOfferingVO implements NetworkOffering {
134134 boolean egressdefaultpolicy ;
135135
136136 @ Column (name = "concurrent_connections" )
137- Integer concurrent_connections ;
137+ Integer concurrentConnections ;
138+
138139
139140 @ Override
140141 public String getDisplayText () {
@@ -433,10 +434,10 @@ public void setPublicLb(boolean publicLb) {
433434 this .publicLb = publicLb ;
434435 }
435436 public Integer getConcurrentConnections () {
436- return this .concurrent_connections ;
437+ return this .concurrentConnections ;
437438 }
438439
439440 public void setConcurrentConnections (Integer concurrent_connections ) {
440- this .concurrent_connections = concurrent_connections ;
441+ this .concurrentConnections = concurrent_connections ;
441442 }
442443}
Original file line number Diff line number Diff line change @@ -2001,6 +2001,7 @@ public NetworkOfferingResponse createNetworkOfferingResponse(NetworkOffering off
20012001 response .setIsPersistent (offering .getIsPersistent ());
20022002 response .setNetworkRate (ApiDBUtils .getNetworkRate (offering .getId ()));
20032003 response .setEgressDefaultPolicy (offering .getEgressDefaultPolicy ());
2004+ response .setConcurrentConnections (offering .getConcurrentConnections ());
20042005 Long so = null ;
20052006 if (offering .getServiceOfferingId () != null ) {
20062007 so = offering .getServiceOfferingId ();
Original file line number Diff line number Diff line change @@ -3926,7 +3926,7 @@ public NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd) {
39263926 }
39273927 validateLoadBalancerServiceCapabilities (lbServiceCapabilityMap );
39283928
3929- if (lbServiceCapabilityMap != null && !lbServiceCapabilityMap .isEmpty ()) {
3929+ if (! serviceProviderMap . containsKey ( Service . Lb ) && lbServiceCapabilityMap != null && !lbServiceCapabilityMap .isEmpty ()) {
39303930 maxconn = cmd .getMaxconnections ();
39313931 if (maxconn == null ) {
39323932 maxconn =Integer .parseInt (_configDao .getValue (Config .NetworkLBHaproxyMaxConn .key ()));
@@ -4718,9 +4718,10 @@ public NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd) {
47184718 offering .setAvailability (availability );
47194719 }
47204720 }
4721-
4722- if (maxconn != null ) {
4723- offering .setConcurrentConnections (maxconn );
4721+ if (_ntwkOffServiceMapDao .areServicesSupportedByNetworkOffering (offering .getId (), Service .Lb )){
4722+ if (maxconn != null ) {
4723+ offering .setConcurrentConnections (maxconn );
4724+ }
47244725 }
47254726
47264727 if (_networkOfferingDao .update (id , offering )) {
You can’t perform that action at this time.
0 commit comments