Package com.cloud.agent.api.to.LoadBalancerTO

Examples of com.cloud.agent.api.to.LoadBalancerTO.AutoScaleVmGroupTO


    }

    public synchronized void applyAutoScaleConfig(LoadBalancerTO loadBalancer) throws Exception, ExecutionException {

        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);
        }
View Full Code Here


        int srcPort = loadBalancerTO.getSrcPort();
        String lbProtocol = getNetScalerProtocol(loadBalancerTO);
        String lbAlgorithm = loadBalancerTO.getAlgorithm();
        String vmGroupIdentifier = generateAutoScaleVmGroupIdentifier(loadBalancerTO);
        String nsVirtualServerName  = generateNSVirtualServerName(srcIp, srcPort);
        AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO();
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("Created load balancing virtual server " + nsVirtualServerName + " on the Netscaler device");
        }
        addLBVirtualServer(nsVirtualServerName, srcIp, srcPort, lbAlgorithm, lbProtocol, loadBalancerTO.getStickinessPolicies(), vmGroupTO);

        String serviceGroupName = generateAutoScaleServiceGroupName(loadBalancerTO);
        if(!nsServiceGroupExists(serviceGroupName)) {
            // add servicegroup lb_autoscaleGroup -autoscale POLICY -memberPort 80
            int memberPort = vmGroupTO.getMemberPort();
            try {
                servicegroup serviceGroup = new servicegroup();
                serviceGroup.set_servicegroupname(serviceGroupName);
                serviceGroup.set_servicetype(lbProtocol);
                serviceGroup.set_autoscale("POLICY");
View Full Code Here

        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);
View Full Code Here

        String scaleDownActionName = generateAutoScaleScaleDownActionName(vmGroupIdentifier);
        String scaleUpActionName = generateAutoScaleScaleUpActionName(vmGroupIdentifier);
        String mtName = generateSnmpMetricTableName(vmGroupIdentifier);
        String monitorName = generateSnmpMonitorName(vmGroupIdentifier);
        String serviceGroupName = generateAutoScaleServiceGroupName(loadBalancerTO);
        AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO();
        List<AutoScalePolicyTO> policies = vmGroupTO.getPolicies();
        String minMemberPolicyName = generateAutoScaleMinPolicyName(vmGroupIdentifier);
        String maxMemberPolicyName = generateAutoScaleMaxPolicyName(vmGroupIdentifier);

        try {
View Full Code Here

    }

    public synchronized void applyAutoScaleConfig(LoadBalancerTO loadBalancer) throws Exception, ExecutionException {

        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);
        }
View Full Code Here

        int srcPort = loadBalancerTO.getSrcPort();
        String lbProtocol = getNetScalerProtocol(loadBalancerTO);
        String lbAlgorithm = loadBalancerTO.getAlgorithm();
        String vmGroupIdentifier = generateAutoScaleVmGroupIdentifier(loadBalancerTO);
        String nsVirtualServerName  = generateNSVirtualServerName(srcIp, srcPort);
        AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO();
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("Created load balancing virtual server " + nsVirtualServerName + " on the Netscaler device");
        }
        addLBVirtualServer(nsVirtualServerName, srcIp, srcPort, lbAlgorithm, lbProtocol, loadBalancerTO.getStickinessPolicies(), vmGroupTO);

        String serviceGroupName = generateAutoScaleServiceGroupName(loadBalancerTO);
        if(!nsServiceGroupExists(serviceGroupName)) {
            // add servicegroup lb_autoscaleGroup -autoscale POLICY -memberPort 80
            int memberPort = vmGroupTO.getMemberPort();
            try {
                servicegroup serviceGroup = new servicegroup();
                serviceGroup.set_servicegroupname(serviceGroupName);
                serviceGroup.set_servicetype(lbProtocol);
                serviceGroup.set_autoscale("POLICY");
View Full Code Here

        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);
View Full Code Here

        String scaleDownActionName = generateAutoScaleScaleDownActionName(vmGroupIdentifier);
        String scaleUpActionName = generateAutoScaleScaleUpActionName(vmGroupIdentifier);
        String mtName = generateSnmpMetricTableName(vmGroupIdentifier);
        String monitorName = generateSnmpMonitorName(vmGroupIdentifier);
        String serviceGroupName = generateAutoScaleServiceGroupName(loadBalancerTO);
        AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO();
        List<AutoScalePolicyTO> policies = vmGroupTO.getPolicies();
        String minMemberPolicyName = generateAutoScaleMinPolicyName(vmGroupIdentifier);
        String maxMemberPolicyName = generateAutoScaleMaxPolicyName(vmGroupIdentifier);

        try {
View Full Code Here

    }

    public synchronized void applyAutoScaleConfig(LoadBalancerTO loadBalancer) throws Exception, ExecutionException {

        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.
View Full Code Here

        int srcPort = loadBalancerTO.getSrcPort();
        String lbProtocol = getNetScalerProtocol(loadBalancerTO);
        String lbAlgorithm = loadBalancerTO.getAlgorithm();
        generateAutoScaleVmGroupIdentifier(loadBalancerTO);
        String nsVirtualServerName = generateNSVirtualServerName(srcIp, srcPort);
        AutoScaleVmGroupTO vmGroupTO = loadBalancerTO.getAutoScaleVmGroupTO();
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("Created load balancing virtual server " + nsVirtualServerName + " on the Netscaler device");
        }
        addLBVirtualServer(nsVirtualServerName, srcIp, srcPort, lbAlgorithm, lbProtocol, loadBalancerTO.getStickinessPolicies(), vmGroupTO);

        String serviceGroupName = generateAutoScaleServiceGroupName(loadBalancerTO);
        if (!nsServiceGroupExists(serviceGroupName)) {
            // add servicegroup lb_autoscaleGroup -autoscale POLICY -memberPort 80
            int memberPort = vmGroupTO.getMemberPort();
            try {
                servicegroup serviceGroup = new servicegroup();
                serviceGroup.set_servicegroupname(serviceGroupName);
                serviceGroup.set_servicetype(lbProtocol);
                serviceGroup.set_autoscale("POLICY");
View Full Code Here

TOP

Related Classes of com.cloud.agent.api.to.LoadBalancerTO.AutoScaleVmGroupTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.