private String generateAutoScaleServiceGroupName(final LoadBalancerTO lbTO) { /* * ServiceGroup name in NetScaler wont support long names. Providing special name. * Need for introducing uuid because every vmgroup creation should be distinguished. * Ex. (1) create a vm group, delete a vmgroup, create a vmgroup on same lb ip and port * This will reuse all vms from the original vm group in step (1) */ return "Cloud" + lbTO.getAutoScaleVmGroupTO().getUuid().replace("-", ""); }
public synchronized void applyAutoScaleConfig(final LoadBalancerTO loadBalancer) throws Exception, ExecutionException { final AutoScaleVmGroupTO vmGroupTO = loadBalancer.getAutoScaleVmGroupTO(); if (!isAutoScaleSupportedInNetScaler()) { throw new ExecutionException("AutoScale not supported in this version of NetScaler"); } if (loadBalancer.isRevoked() || vmGroupTO.getState().equals("revoke")) { removeAutoScaleConfig(loadBalancer); } else { createAutoScaleConfig(loadBalancer); } // AutoScale APIs are successful executed, now save the configuration. saveConfiguration(); if (s_logger.isInfoEnabled()) { s_logger.info("Successfully executed resource AutoScaleConfig"); } }
generateAutoScaleVmGroupIdentifier(loadBalancerTO); final String nsVirtualServerName = generateNSVirtualServerName(srcIp, srcPort); final AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO(); if (s_logger.isDebugEnabled()) { s_logger.debug("Created load balancing virtual server " + nsVirtualServerName + " on the Netscaler device"); if (!loadBalancerTO.getAutoScaleVmGroupTO().getState().equals("disabled")) { } else if (loadBalancerTO.getAutoScaleVmGroupTO().getState().equals("disabled")) { disableAutoScaleConfig(loadBalancerTO, false);
final String serviceGroupName = generateAutoScaleServiceGroupName(loadBalancerTO); if (loadBalancerTO.getAutoScaleVmGroupTO().getCurrentState().equals("enabled")) { disableAutoScaleConfig(loadBalancerTO, false);
final String mtName = generateSnmpMetricTableName(vmGroupIdentifier); final String monitorName = generateSnmpMonitorName(vmGroupIdentifier); final AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO(); final AutoScaleVmProfileTO profileTO = vmGroupTO.getProfile(); final List<AutoScalePolicyTO> policies = vmGroupTO.getPolicies();
final String monitorName = generateSnmpMonitorName(vmGroupIdentifier); final String serviceGroupName = generateAutoScaleServiceGroupName(loadBalancerTO); final AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO(); final List<AutoScalePolicyTO> policies = vmGroupTO.getPolicies(); final String minMemberPolicyName = generateAutoScaleMinPolicyName(vmGroupIdentifier);