3333import com .cloud .network .lb .LoadBalancingRule .LbDestination ;
3434import com .cloud .network .lb .LoadBalancingRule .LbHealthCheckPolicy ;
3535import com .cloud .network .lb .LoadBalancingRule .LbStickinessPolicy ;
36+ import com .cloud .network .lb .LoadBalancingRule .LbSslCert ;
3637import com .cloud .utils .Pair ;
3738
3839
@@ -41,13 +42,15 @@ public class LoadBalancerTO {
4142 String srcIp ;
4243 int srcPort ;
4344 String protocol ;
45+ String lbProtocol ;
4446 String algorithm ;
4547 boolean revoked ;
4648 boolean alreadyAdded ;
4749 boolean inline ;
4850 DestinationTO [] destinations ;
4951 private StickinessPolicyTO [] stickinessPolicies ;
5052 private HealthCheckPolicyTO [] healthCheckPolicies ;
53+ private LbSslCert sslCert ; /* XXX: Should this be SslCertTO? */
5154 private AutoScaleVmGroupTO autoScaleVmGroupTO ;
5255 final static int MAX_STICKINESS_POLICIES = 1 ;
5356 final static int MAX_HEALTHCHECK_POLICIES = 1 ;
@@ -66,6 +69,8 @@ public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, S
6669 this .inline = inline ;
6770 this .destinations = new DestinationTO [destinations .size ()];
6871 this .stickinessPolicies = null ;
72+ this .sslCert = null ;
73+ this .lbProtocol = null ;
6974 int i = 0 ;
7075 for (LbDestination destination : destinations ) {
7176 this .destinations [i ++] = new DestinationTO (destination .getIpAddress (), destination .getDestinationPortStart (), destination .isRevoked (), false );
@@ -77,12 +82,12 @@ public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, Str
7782 List <LbStickinessPolicy > stickinessPolicies ) {
7883
7984 this (id , srcIp , srcPort , protocol , algorithm , revoked , alreadyAdded , inline , arg_destinations ,
80- stickinessPolicies , null );
85+ stickinessPolicies , null , null , null );
8186 }
8287
8388 public LoadBalancerTO (String id , String srcIp , int srcPort , String protocol , String algorithm , boolean revoked ,
8489 boolean alreadyAdded , boolean inline , List <LbDestination > arg_destinations ,
85- List <LbStickinessPolicy > stickinessPolicies , List <LbHealthCheckPolicy > healthCheckPolicies ) {
90+ List <LbStickinessPolicy > stickinessPolicies , List <LbHealthCheckPolicy > healthCheckPolicies , LbSslCert sslCert , String lbProtocol ) {
8691 this (id , srcIp , srcPort , protocol , algorithm , revoked , alreadyAdded , inline , arg_destinations );
8792 this .stickinessPolicies = null ;
8893 this .healthCheckPolicies = null ;
@@ -117,6 +122,9 @@ public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, Str
117122 if (index == 0 )
118123 this .healthCheckPolicies = null ;
119124 }
125+
126+ this .sslCert = sslCert ;
127+ this .lbProtocol = lbProtocol ;
120128 }
121129
122130 protected LoadBalancerTO () {
@@ -142,6 +150,10 @@ public String getProtocol() {
142150 return protocol ;
143151 }
144152
153+ public String getLbProtocol () {
154+ return lbProtocol ;
155+ }
156+
145157 public boolean isRevoked () {
146158 return revoked ;
147159 }
@@ -178,6 +190,10 @@ public boolean isAutoScaleVmGroupTO() {
178190 return this .autoScaleVmGroupTO != null ;
179191 }
180192
193+ public LbSslCert getSslCert (){
194+ return this .sslCert ;
195+ }
196+
181197 public static class StickinessPolicyTO {
182198 private String _methodName ;
183199 private List <Pair <String , String >> _paramsList ;
@@ -294,6 +310,8 @@ public void setMonitorState(String state) {
294310 public String getMonitorState () {
295311 return monitorState ;
296312 }
313+
314+
297315 }
298316 public static class CounterTO implements Serializable {
299317 private final String name ;
@@ -558,5 +576,4 @@ public void setAutoScaleVmGroup(LbAutoScaleVmGroup lbAutoScaleVmGroup)
558576 autoScaleVmGroupTO = new AutoScaleVmGroupTO (autoScaleVmGroup .getUuid (), autoScaleVmGroup .getMinMembers (), autoScaleVmGroup .getMaxMembers (), autoScaleVmGroup .getMemberPort (),
559577 autoScaleVmGroup .getInterval (), autoScalePolicyTOs , autoScaleVmProfileTO , autoScaleVmGroup .getState (), lbAutoScaleVmGroup .getCurrentState ());
560578 }
561-
562579}
0 commit comments