@@ -49,7 +49,7 @@ public class LoadBalancerTO {
4949 final static int MAX_STICKINESS_POLICIES = 1 ;
5050
5151 public LoadBalancerTO (Long id , String srcIp , int srcPort , String protocol , String algorithm , boolean revoked , boolean alreadyAdded , List <LbDestination > destinations ) {
52- if (destinations == null ) { // for autoscaleconfig destinations will be null;
52+ if (destinations == null ) { // for autoscaleconfig destinations will be null;
5353 destinations = new ArrayList <LbDestination >();
5454 }
5555 this .id = id ;
@@ -70,7 +70,7 @@ public LoadBalancerTO (Long id, String srcIp, int srcPort, String protocol, Stri
7070 public LoadBalancerTO (Long id , String srcIp , int srcPort , String protocol , String algorithm , boolean revoked , boolean alreadyAdded , List <LbDestination > arg_destinations , List <LbStickinessPolicy > stickinessPolicies ) {
7171 this (id , srcIp , srcPort , protocol , algorithm , revoked , alreadyAdded , arg_destinations );
7272 this .stickinessPolicies = null ;
73- if (stickinessPolicies != null && stickinessPolicies .size ()> 0 ) {
73+ if (stickinessPolicies != null && stickinessPolicies .size () > 0 ) {
7474 this .stickinessPolicies = new StickinessPolicyTO [MAX_STICKINESS_POLICIES ];
7575 int index = 0 ;
7676 for (LbStickinessPolicy stickinesspolicy : stickinessPolicies ) {
@@ -186,7 +186,7 @@ public boolean isAlreadyAdded() {
186186 return alreadyAdded ;
187187 }
188188 }
189- public static class CounterTO implements Serializable {
189+ public static class CounterTO implements Serializable {
190190 private final String name ;
191191 private final String source ;
192192 private final String value ;
@@ -210,7 +210,7 @@ public String getValue() {
210210 }
211211 }
212212
213- public static class ConditionTO implements Serializable {
213+ public static class ConditionTO implements Serializable {
214214 private final long threshold ;
215215 private final String relationalOperator ;
216216 private final CounterTO counter ;
@@ -235,7 +235,7 @@ public CounterTO getCounter() {
235235 }
236236 }
237237
238- public static class AutoScalePolicyTO implements Serializable {
238+ public static class AutoScalePolicyTO implements Serializable {
239239 private final long id ;
240240 private final int duration ;
241241 private final int quietTime ;
@@ -277,7 +277,7 @@ public List<ConditionTO> getConditions() {
277277 }
278278 }
279279
280- public static class AutoScaleVmProfileTO implements Serializable {
280+ public static class AutoScaleVmProfileTO implements Serializable {
281281 private final Long zoneId ;
282282 private final Long domainId ;
283283 private final Long serviceOfferingId ;
@@ -350,16 +350,17 @@ public String getAutoScaleUserSecretKey() {
350350 }
351351 }
352352
353- public static class AutoScaleVmGroupTO implements Serializable {
353+ public static class AutoScaleVmGroupTO implements Serializable {
354354 private final int minMembers ;
355355 private final int maxMembers ;
356356 private final int memberPort ;
357357 private final int interval ;
358358 private final List <AutoScalePolicyTO > policies ;
359359 private final AutoScaleVmProfileTO profile ;
360360 private final String state ;
361+ private final String currentState ;
361362
362- AutoScaleVmGroupTO (int minMembers , int maxMembers , int memberPort , int interval , List <AutoScalePolicyTO > policies , AutoScaleVmProfileTO profile , String state )
363+ AutoScaleVmGroupTO (int minMembers , int maxMembers , int memberPort , int interval , List <AutoScalePolicyTO > policies , AutoScaleVmProfileTO profile , String state , String currentState )
363364 {
364365 this .minMembers = minMembers ;
365366 this .maxMembers = maxMembers ;
@@ -368,6 +369,7 @@ public static class AutoScaleVmGroupTO implements Serializable{
368369 this .policies = policies ;
369370 this .profile = profile ;
370371 this .state = state ;
372+ this .currentState = currentState ;
371373 }
372374
373375 public int getMinMembers () {
@@ -397,6 +399,10 @@ public AutoScaleVmProfileTO getProfile() {
397399 public String getState () {
398400 return state ;
399401 }
402+
403+ public String getCurrentState () {
404+ return currentState ;
405+ }
400406 }
401407
402408 public void setAutoScaleVmGroup (LbAutoScaleVmGroup lbAutoScaleVmGroup )
@@ -428,7 +434,7 @@ public void setAutoScaleVmGroup(LbAutoScaleVmGroup lbAutoScaleVmGroup)
428434
429435 AutoScaleVmGroup autoScaleVmGroup = lbAutoScaleVmGroup .getVmGroup ();
430436 autoScaleVmGroupTO = new AutoScaleVmGroupTO (autoScaleVmGroup .getMinMembers (), autoScaleVmGroup .getMaxMembers (), autoScaleVmGroup .getMemberPort (),
431- autoScaleVmGroup .getInterval (), autoScalePolicyTOs , autoScaleVmProfileTO , autoScaleVmGroup .getState ());
437+ autoScaleVmGroup .getInterval (), autoScalePolicyTOs , autoScaleVmProfileTO , autoScaleVmGroup .getState (), lbAutoScaleVmGroup . getCurrentState () );
432438 }
433439
434440}
0 commit comments