String timerName = generateAutoScaleTimerName(vmGroupIdentifier);
String scaleDownActionName = generateAutoScaleScaleDownActionName(vmGroupIdentifier);
String scaleUpActionName = generateAutoScaleScaleUpActionName(vmGroupIdentifier);
String mtName = generateSnmpMetricTableName(vmGroupIdentifier);
String monitorName = generateSnmpMonitorName(vmGroupIdentifier);
AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO();
AutoScaleVmProfileTO profileTO = vmGroupTO.getProfile();
List<AutoScalePolicyTO> policies = vmGroupTO.getPolicies();
int interval = vmGroupTO.getInterval();
List<Pair<String, String>> counterParams = profileTO.getCounterParamList();
String snmpCommunity = null;
int snmpPort = DEFAULT_SNMP_PORT;
long cur_prirotiy = 1;
// get the session persistence parameters
List<Pair<String, String>> paramsList = profileTO.getCounterParamList();
for(Pair<String,String> param : paramsList) {
if ("snmpcommunity".equalsIgnoreCase(param.first())) {
snmpCommunity = param.second();
} else if ("snmpport".equalsIgnoreCase(param.first())) {
snmpPort = Integer.parseInt(param.second());
}
}
try
{
// Set min and max autoscale members;
// add lb vserver lb http 10.102.31.100 80 -minAutoscaleMinMembers 3 -maxAutoscaleMembers 10
int minAutoScaleMembers = vmGroupTO.getMinMembers();
int maxAutoScaleMembers = vmGroupTO.getMaxMembers();
lbvserver vserver = new lbvserver();
try {
vserver.set_name(nsVirtualServerName);
vserver.set_minautoscalemembers(minAutoScaleMembers);
vserver.set_maxautoscalemembers(maxAutoScaleMembers);