Search in sources :

Example 6 with LoadBalancerVO

use of com.cloud.network.dao.LoadBalancerVO in project cloudstack by apache.

the class LoadBalancingRules method accept.

@Override
public boolean accept(final NetworkTopologyVisitor visitor, final VirtualRouter router) throws ResourceUnavailableException {
    _router = router;
    LoadBalancerDao loadBalancerDao = visitor.getVirtualNetworkApplianceFactory().getLoadBalancerDao();
    // For load balancer we have to resend all lb rules for the network
    final List<LoadBalancerVO> lbs = loadBalancerDao.listByNetworkIdAndScheme(_network.getId(), Scheme.Public);
    // We are cleaning it before because all the rules have to be sent to the router.
    _rules.clear();
    LoadBalancingRulesManager lbMgr = visitor.getVirtualNetworkApplianceFactory().getLbMgr();
    NetworkModel networkModel = visitor.getVirtualNetworkApplianceFactory().getNetworkModel();
    for (final LoadBalancerVO lb : lbs) {
        final List<LbDestination> dstList = lbMgr.getExistingDestinations(lb.getId());
        final List<LbStickinessPolicy> policyList = lbMgr.getStickinessPolicies(lb.getId());
        final List<LbHealthCheckPolicy> hcPolicyList = lbMgr.getHealthCheckPolicies(lb.getId());
        final LbSslCert sslCert = lbMgr.getLbSslCert(lb.getId());
        final Ip sourceIp = networkModel.getPublicIpAddress(lb.getSourceIpAddressId()).getAddress();
        final LoadBalancingRule loadBalancing = new LoadBalancingRule(lb, dstList, policyList, hcPolicyList, sourceIp, sslCert, lb.getLbProtocol());
        _rules.add(loadBalancing);
    }
    return visitor.visit(this);
}
Also used : LoadBalancerDao(com.cloud.network.dao.LoadBalancerDao) LbSslCert(com.cloud.network.lb.LoadBalancingRule.LbSslCert) LoadBalancingRule(com.cloud.network.lb.LoadBalancingRule) LoadBalancingRulesManager(com.cloud.network.lb.LoadBalancingRulesManager) Ip(com.cloud.utils.net.Ip) LoadBalancerVO(com.cloud.network.dao.LoadBalancerVO) LbStickinessPolicy(com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy) LbDestination(com.cloud.network.lb.LoadBalancingRule.LbDestination) NetworkModel(com.cloud.network.NetworkModel) LbHealthCheckPolicy(com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy)

Example 7 with LoadBalancerVO

use of com.cloud.network.dao.LoadBalancerVO in project cloudstack by apache.

the class LoadBalancingRulesManagerImpl method createPublicLoadBalancer.

@DB
@Override
public LoadBalancer createPublicLoadBalancer(final String xId, final String name, final String description, final int srcPort, final int destPort, final long sourceIpId, final String protocol, final String algorithm, final boolean openFirewall, final CallContext caller, final String lbProtocol, final Boolean forDisplay) throws NetworkRuleConflictException {
    if (!NetUtils.isValidPort(destPort)) {
        throw new InvalidParameterValueException("privatePort is an invalid value: " + destPort);
    }
    if ((algorithm == null) || !NetUtils.isValidAlgorithm(algorithm)) {
        throw new InvalidParameterValueException("Invalid algorithm: " + algorithm);
    }
    final IPAddressVO ipAddr = _ipAddressDao.findById(sourceIpId);
    // make sure ip address exists
    if (ipAddr == null || !ipAddr.readyToUse()) {
        InvalidParameterValueException ex = new InvalidParameterValueException("Unable to create load balancer rule, invalid IP address id specified");
        if (ipAddr == null) {
            ex.addProxyObject(String.valueOf(sourceIpId), "sourceIpId");
        } else {
            ex.addProxyObject(ipAddr.getUuid(), "sourceIpId");
        }
        throw ex;
    } else if (ipAddr.isOneToOneNat()) {
        InvalidParameterValueException ex = new InvalidParameterValueException("Unable to create load balancer rule; specified sourceip id has static nat enabled");
        ex.addProxyObject(ipAddr.getUuid(), "sourceIpId");
        throw ex;
    }
    _accountMgr.checkAccess(caller.getCallingAccount(), null, true, ipAddr);
    final Long networkId = ipAddr.getAssociatedWithNetworkId();
    if (networkId == null) {
        InvalidParameterValueException ex = new InvalidParameterValueException("Unable to create load balancer rule ; specified sourceip id is not associated with any network");
        ex.addProxyObject(ipAddr.getUuid(), "sourceIpId");
        throw ex;
    }
    // verify that lb service is supported by the network
    isLbServiceSupportedInNetwork(networkId, Scheme.Public);
    _firewallMgr.validateFirewallRule(caller.getCallingAccount(), ipAddr, srcPort, srcPort, protocol, Purpose.LoadBalancing, FirewallRuleType.User, networkId, null);
    LoadBalancerVO newRule = new LoadBalancerVO(xId, name, description, sourceIpId, srcPort, destPort, algorithm, networkId, ipAddr.getAllocatedToAccountId(), ipAddr.getAllocatedInDomainId(), lbProtocol);
    // verify rule is supported by Lb provider of the network
    Ip sourceIp = getSourceIp(newRule);
    LoadBalancingRule loadBalancing = new LoadBalancingRule(newRule, new ArrayList<LbDestination>(), new ArrayList<LbStickinessPolicy>(), new ArrayList<LbHealthCheckPolicy>(), sourceIp, null, lbProtocol);
    if (!validateLbRule(loadBalancing)) {
        throw new InvalidParameterValueException("LB service provider cannot support this rule");
    }
    return Transaction.execute(new TransactionCallbackWithException<LoadBalancerVO, NetworkRuleConflictException>() {

        @Override
        public LoadBalancerVO doInTransaction(TransactionStatus status) throws NetworkRuleConflictException {
            LoadBalancerVO newRule = new LoadBalancerVO(xId, name, description, sourceIpId, srcPort, destPort, algorithm, networkId, ipAddr.getAllocatedToAccountId(), ipAddr.getAllocatedInDomainId(), lbProtocol);
            if (forDisplay != null) {
                newRule.setDisplay(forDisplay);
            }
            // verify rule is supported by Lb provider of the network
            Ip sourceIp = getSourceIp(newRule);
            LoadBalancingRule loadBalancing = new LoadBalancingRule(newRule, new ArrayList<LbDestination>(), new ArrayList<LbStickinessPolicy>(), new ArrayList<LbHealthCheckPolicy>(), sourceIp, null, lbProtocol);
            if (!validateLbRule(loadBalancing)) {
                throw new InvalidParameterValueException("LB service provider cannot support this rule");
            }
            newRule = _lbDao.persist(newRule);
            //create rule for all CIDRs
            if (openFirewall) {
                _firewallMgr.createRuleForAllCidrs(sourceIpId, caller.getCallingAccount(), srcPort, srcPort, protocol, null, null, newRule.getId(), networkId);
            }
            boolean success = true;
            try {
                _firewallMgr.detectRulesConflict(newRule);
                if (!_firewallDao.setStateToAdd(newRule)) {
                    throw new CloudRuntimeException("Unable to update the state to add for " + newRule);
                }
                s_logger.debug("Load balancer " + newRule.getId() + " for Ip address id=" + sourceIpId + ", public port " + srcPort + ", private port " + destPort + " is added successfully.");
                CallContext.current().setEventDetails("Load balancer Id: " + newRule.getId());
                UsageEventUtils.publishUsageEvent(EventTypes.EVENT_LOAD_BALANCER_CREATE, ipAddr.getAllocatedToAccountId(), ipAddr.getDataCenterId(), newRule.getId(), null, LoadBalancingRule.class.getName(), newRule.getUuid());
                return newRule;
            } catch (Exception e) {
                success = false;
                if (e instanceof NetworkRuleConflictException) {
                    throw (NetworkRuleConflictException) e;
                }
                throw new CloudRuntimeException("Unable to add rule for ip address id=" + newRule.getSourceIpAddressId(), e);
            } finally {
                if (!success && newRule != null) {
                    _firewallMgr.revokeRelatedFirewallRule(newRule.getId(), false);
                    removeLBRule(newRule);
                }
            }
        }
    });
}
Also used : Ip(com.cloud.utils.net.Ip) PublicIp(com.cloud.network.addr.PublicIp) LoadBalancerVO(com.cloud.network.dao.LoadBalancerVO) ArrayList(java.util.ArrayList) TransactionStatus(com.cloud.utils.db.TransactionStatus) LbStickinessPolicy(com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy) NetworkRuleConflictException(com.cloud.exception.NetworkRuleConflictException) InvalidParameterException(java.security.InvalidParameterException) TransactionCallbackWithException(com.cloud.utils.db.TransactionCallbackWithException) NetworkRuleConflictException(com.cloud.exception.NetworkRuleConflictException) InsufficientAddressCapacityException(com.cloud.exception.InsufficientAddressCapacityException) ResourceUnavailableException(com.cloud.exception.ResourceUnavailableException) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) PermissionDeniedException(com.cloud.exception.PermissionDeniedException) LbDestination(com.cloud.network.lb.LoadBalancingRule.LbDestination) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) LbHealthCheckPolicy(com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy) IPAddressVO(com.cloud.network.dao.IPAddressVO) DB(com.cloud.utils.db.DB)

Example 8 with LoadBalancerVO

use of com.cloud.network.dao.LoadBalancerVO in project cloudstack by apache.

the class LoadBalancingRulesManagerImpl method assignToLoadBalancer.

@Override
@DB
@ActionEvent(eventType = EventTypes.EVENT_ASSIGN_TO_LOAD_BALANCER_RULE, eventDescription = "assigning to load balancer", async = true)
public boolean assignToLoadBalancer(long loadBalancerId, List<Long> instanceIds, Map<Long, List<String>> vmIdIpMap) {
    CallContext ctx = CallContext.current();
    Account caller = ctx.getCallingAccount();
    final LoadBalancerVO loadBalancer = _lbDao.findById(loadBalancerId);
    if (loadBalancer == null) {
        throw new InvalidParameterValueException("Failed to assign to load balancer " + loadBalancerId + ", the load balancer was not found.");
    }
    if (instanceIds == null && vmIdIpMap.isEmpty()) {
        throw new InvalidParameterValueException("Both instanceids and vmidipmap  can't be null");
    }
    // instanceIds and vmIdipmap is passed
    if (instanceIds != null && !vmIdIpMap.isEmpty()) {
        for (long instanceId : instanceIds) {
            if (!vmIdIpMap.containsKey(instanceId)) {
                vmIdIpMap.put(instanceId, null);
            }
        }
    }
    //only instanceids list passed
    if (instanceIds != null && vmIdIpMap.isEmpty()) {
        vmIdIpMap = new HashMap<Long, List<String>>();
        for (long instanceId : instanceIds) {
            vmIdIpMap.put(instanceId, null);
        }
    }
    List<LoadBalancerVMMapVO> mappedInstances = _lb2VmMapDao.listByLoadBalancerId(loadBalancerId, false);
    Set<Long> mappedInstanceIds = new HashSet<Long>();
    for (LoadBalancerVMMapVO mappedInstance : mappedInstances) {
        mappedInstanceIds.add(Long.valueOf(mappedInstance.getInstanceId()));
    }
    Map<Long, List<String>> existingVmIdIps = new HashMap<Long, List<String>>();
    // now get the ips of vm and add it to map
    for (LoadBalancerVMMapVO mappedInstance : mappedInstances) {
        List<String> ipsList = null;
        if (existingVmIdIps.containsKey(mappedInstance.getInstanceId())) {
            ipsList = existingVmIdIps.get(mappedInstance.getInstanceId());
        } else {
            ipsList = new ArrayList<String>();
        }
        ipsList.add(mappedInstance.getInstanceIp());
        existingVmIdIps.put(mappedInstance.getInstanceId(), ipsList);
    }
    final List<UserVm> vmsToAdd = new ArrayList<UserVm>();
    // check for conflict
    Set<Long> passedInstanceIds = vmIdIpMap.keySet();
    for (Long instanceId : passedInstanceIds) {
        UserVm vm = _vmDao.findById(instanceId);
        if (vm == null || vm.getState() == State.Destroyed || vm.getState() == State.Expunging) {
            InvalidParameterValueException ex = new InvalidParameterValueException("Invalid instance id specified");
            if (vm == null) {
                ex.addProxyObject(instanceId.toString(), "instanceId");
            } else {
                ex.addProxyObject(vm.getUuid(), "instanceId");
            }
            throw ex;
        }
        _rulesMgr.checkRuleAndUserVm(loadBalancer, vm, caller);
        if (vm.getAccountId() != loadBalancer.getAccountId()) {
            throw new PermissionDeniedException("Cannot add virtual machines that do not belong to the same owner.");
        }
        // Let's check to make sure the vm has a nic in the same network as
        // the load balancing rule.
        List<? extends Nic> nics = _networkModel.getNics(vm.getId());
        Nic nicInSameNetwork = null;
        for (Nic nic : nics) {
            if (nic.getNetworkId() == loadBalancer.getNetworkId()) {
                nicInSameNetwork = nic;
                break;
            }
        }
        if (nicInSameNetwork == null) {
            InvalidParameterValueException ex = new InvalidParameterValueException("VM with id specified cannot be added because it doesn't belong in the same network.");
            ex.addProxyObject(vm.getUuid(), "instanceId");
            throw ex;
        }
        String priIp = nicInSameNetwork.getIPv4Address();
        if (existingVmIdIps.containsKey(instanceId)) {
            // now check for ip address
            List<String> mappedIps = existingVmIdIps.get(instanceId);
            List<String> newIps = vmIdIpMap.get(instanceId);
            if (newIps == null) {
                newIps = new ArrayList<String>();
                newIps.add(priIp);
            }
            for (String newIp : newIps) {
                if (mappedIps.contains(newIp)) {
                    throw new InvalidParameterValueException("VM " + instanceId + " with " + newIp + " is already mapped to load balancer.");
                }
            }
        }
        List<String> vmIpsList = vmIdIpMap.get(instanceId);
        String vmLbIp = null;
        if (vmIpsList != null) {
            //check if the ips belongs to nic secondary ip
            for (String ip : vmIpsList) {
                // skip the primary ip from vm secondary ip comparisions
                if (ip.equals(priIp)) {
                    continue;
                }
                if (_nicSecondaryIpDao.findByIp4AddressAndNicId(ip, nicInSameNetwork.getId()) == null) {
                    throw new InvalidParameterValueException("VM ip " + ip + " specified does not belong to " + "nic in network " + nicInSameNetwork.getNetworkId());
                }
            }
        } else {
            vmIpsList = new ArrayList<String>();
            vmIpsList.add(priIp);
        }
        // assign for primary ip and ip passed in vmidipmap
        if (instanceIds != null) {
            if (instanceIds.contains(instanceId)) {
                vmIpsList.add(priIp);
            }
        }
        vmIdIpMap.put(instanceId, vmIpsList);
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("Adding " + vm + " to the load balancer pool");
        }
        vmsToAdd.add(vm);
    }
    final Set<Long> vmIds = vmIdIpMap.keySet();
    final Map<Long, List<String>> newMap = vmIdIpMap;
    Transaction.execute(new TransactionCallbackNoReturn() {

        @Override
        public void doInTransactionWithoutResult(TransactionStatus status) {
            for (Long vmId : vmIds) {
                final Set<String> lbVmIps = new HashSet<String>(newMap.get(vmId));
                for (String vmIp : lbVmIps) {
                    LoadBalancerVMMapVO map = new LoadBalancerVMMapVO(loadBalancer.getId(), vmId, vmIp, false);
                    map = _lb2VmMapDao.persist(map);
                }
            }
        }
    });
    if (_autoScaleVmGroupDao.isAutoScaleLoadBalancer(loadBalancerId)) {
        // We can consider the job done.
        return true;
    }
    boolean success = false;
    FirewallRule.State backupState = loadBalancer.getState();
    try {
        loadBalancer.setState(FirewallRule.State.Add);
        _lbDao.persist(loadBalancer);
        applyLoadBalancerConfig(loadBalancerId);
        success = true;
    } catch (ResourceUnavailableException e) {
        s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
        success = false;
    } finally {
        if (!success) {
            final List<Long> vmInstanceIds = new ArrayList<Long>();
            Transaction.execute(new TransactionCallbackNoReturn() {

                @Override
                public void doInTransactionWithoutResult(TransactionStatus status) {
                    for (Long vmId : vmIds) {
                        vmInstanceIds.add(vmId);
                    }
                }
            });
            if (!vmInstanceIds.isEmpty()) {
                _lb2VmMapDao.remove(loadBalancer.getId(), vmInstanceIds, null);
                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + "  while attaching VM: " + vmInstanceIds);
            }
            loadBalancer.setState(backupState);
            _lbDao.persist(loadBalancer);
            CloudRuntimeException ex = new CloudRuntimeException("Failed to add specified loadbalancerruleid for vms " + vmInstanceIds);
            ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
            // right VO object or table name.
            throw ex;
        }
    }
    return success;
}
Also used : Account(com.cloud.user.Account) Set(java.util.Set) HashSet(java.util.HashSet) HashMap(java.util.HashMap) LoadBalancerVO(com.cloud.network.dao.LoadBalancerVO) ArrayList(java.util.ArrayList) TransactionStatus(com.cloud.utils.db.TransactionStatus) TransactionCallbackNoReturn(com.cloud.utils.db.TransactionCallbackNoReturn) UserVm(com.cloud.uservm.UserVm) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) ArrayList(java.util.ArrayList) List(java.util.List) LoadBalancerVMMapVO(com.cloud.network.dao.LoadBalancerVMMapVO) FirewallRule(com.cloud.network.rules.FirewallRule) HashSet(java.util.HashSet) Nic(com.cloud.vm.Nic) CallContext(org.apache.cloudstack.context.CallContext) ResourceUnavailableException(com.cloud.exception.ResourceUnavailableException) PermissionDeniedException(com.cloud.exception.PermissionDeniedException) ActionEvent(com.cloud.event.ActionEvent) DB(com.cloud.utils.db.DB)

Example 9 with LoadBalancerVO

use of com.cloud.network.dao.LoadBalancerVO in project cloudstack by apache.

the class LoadBalancingRulesManagerImpl method updateLBHealthChecks.

// This method will check the status of services which has monitors created
// by CloudStack and update them in lbvmmap table
@DB
@Override
public void updateLBHealthChecks(Scheme scheme) throws ResourceUnavailableException {
    List<LoadBalancerVO> rules = _lbDao.listAll();
    List<NetworkVO> networks = _networkDao.listAll();
    List<LoadBalancerTO> stateRules = null;
    boolean isHandled = false;
    for (NetworkVO ntwk : networks) {
        Network network = _networkDao.findById(ntwk.getId());
        String capability = getLBCapability(network.getId(), Capability.HealthCheckPolicy.getName());
        if (capability != null && capability.equalsIgnoreCase("true")) {
            /*
                 * s_logger.debug(
                 * "HealthCheck Manager :: LB Provider in the Network has the Healthcheck policy capability :: "
                 * + provider.get(0).getName());
                 */
            rules = _lbDao.listByNetworkIdAndScheme(network.getId(), scheme);
            if (rules != null && rules.size() > 0) {
                List<LoadBalancingRule> lbrules = new ArrayList<LoadBalancingRule>();
                for (LoadBalancerVO lb : rules) {
                    List<LbDestination> dstList = getExistingDestinations(lb.getId());
                    List<LbHealthCheckPolicy> hcPolicyList = getHealthCheckPolicies(lb.getId());
                    // hashealtChecks
                    if (hcPolicyList != null && hcPolicyList.size() > 0) {
                        Ip sourceIp = getSourceIp(lb);
                        LoadBalancingRule loadBalancing = new LoadBalancingRule(lb, dstList, null, hcPolicyList, sourceIp, null, lb.getLbProtocol());
                        lbrules.add(loadBalancing);
                    }
                }
                if (lbrules.size() > 0) {
                    isHandled = false;
                    for (LoadBalancingServiceProvider lbElement : _lbProviders) {
                        stateRules = lbElement.updateHealthChecks(network, lbrules);
                        if (stateRules != null && stateRules.size() > 0) {
                            for (LoadBalancerTO lbto : stateRules) {
                                LoadBalancerVO ulb = _lbDao.findByUuid(lbto.getUuid());
                                List<LoadBalancerVMMapVO> lbVmMaps = _lb2VmMapDao.listByLoadBalancerId(ulb.getId());
                                for (LoadBalancerVMMapVO lbVmMap : lbVmMaps) {
                                    UserVm vm = _vmDao.findById(lbVmMap.getInstanceId());
                                    Nic nic = _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(ulb.getNetworkId(), vm.getId());
                                    String dstIp = lbVmMap.getInstanceIp() == null ? nic.getIPv4Address() : lbVmMap.getInstanceIp();
                                    for (int i = 0; i < lbto.getDestinations().length; i++) {
                                        LoadBalancerTO.DestinationTO des = lbto.getDestinations()[i];
                                        if (dstIp.equalsIgnoreCase(lbto.getDestinations()[i].getDestIp())) {
                                            lbVmMap.setState(des.getMonitorState());
                                            _lb2VmMapDao.persist(lbVmMap);
                                            s_logger.debug("Updating the LB VM Map table with the service state");
                                        }
                                    }
                                }
                            }
                            isHandled = true;
                        }
                        if (isHandled) {
                            break;
                        }
                    }
                }
            }
        } else {
        // s_logger.debug("HealthCheck Manager :: LB Provider in the Network DNOT the Healthcheck policy capability ");
        }
    }
}
Also used : NetworkVO(com.cloud.network.dao.NetworkVO) Ip(com.cloud.utils.net.Ip) PublicIp(com.cloud.network.addr.PublicIp) LoadBalancerVO(com.cloud.network.dao.LoadBalancerVO) ArrayList(java.util.ArrayList) Nic(com.cloud.vm.Nic) LoadBalancerTO(com.cloud.agent.api.to.LoadBalancerTO) LoadBalancingServiceProvider(com.cloud.network.element.LoadBalancingServiceProvider) LbDestination(com.cloud.network.lb.LoadBalancingRule.LbDestination) UserVm(com.cloud.uservm.UserVm) Network(com.cloud.network.Network) LbHealthCheckPolicy(com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy) LoadBalancerVMMapVO(com.cloud.network.dao.LoadBalancerVMMapVO) DB(com.cloud.utils.db.DB)

Example 10 with LoadBalancerVO

use of com.cloud.network.dao.LoadBalancerVO in project cloudstack by apache.

the class LoadBalancingRulesManagerImpl method searchForLBHealthCheckPolicies.

@Override
public List<LBHealthCheckPolicyVO> searchForLBHealthCheckPolicies(ListLBHealthCheckPoliciesCmd cmd) throws PermissionDeniedException {
    Account caller = CallContext.current().getCallingAccount();
    Long loadBalancerId = cmd.getLbRuleId();
    Long policyId = cmd.getId();
    boolean forDisplay = cmd.getDisplay();
    if (loadBalancerId == null) {
        loadBalancerId = findLBIdByHealtCheckPolicyId(policyId);
    }
    LoadBalancerVO loadBalancer = _lbDao.findById(loadBalancerId);
    if (loadBalancer == null) {
        return null;
    }
    _accountMgr.checkAccess(caller, null, true, loadBalancer);
    List<LBHealthCheckPolicyVO> hcDbpolicies = _lb2healthcheckDao.listByLoadBalancerIdAndDisplayFlag(loadBalancerId, forDisplay);
    return hcDbpolicies;
}
Also used : Account(com.cloud.user.Account) LoadBalancerVO(com.cloud.network.dao.LoadBalancerVO) LBHealthCheckPolicyVO(com.cloud.network.LBHealthCheckPolicyVO)

Aggregations

LoadBalancerVO (com.cloud.network.dao.LoadBalancerVO)56 ArrayList (java.util.ArrayList)29 InvalidParameterValueException (com.cloud.exception.InvalidParameterValueException)22 Account (com.cloud.user.Account)19 ActionEvent (com.cloud.event.ActionEvent)17 ResourceUnavailableException (com.cloud.exception.ResourceUnavailableException)17 DB (com.cloud.utils.db.DB)17 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)15 CallContext (org.apache.cloudstack.context.CallContext)12 LoadBalancerVMMapVO (com.cloud.network.dao.LoadBalancerVMMapVO)11 FirewallRule (com.cloud.network.rules.FirewallRule)11 Ip (com.cloud.utils.net.Ip)11 InvalidParameterException (java.security.InvalidParameterException)11 NetworkVO (com.cloud.network.dao.NetworkVO)10 Network (com.cloud.network.Network)9 IPAddressVO (com.cloud.network.dao.IPAddressVO)9 LoadBalancerDao (com.cloud.network.dao.LoadBalancerDao)9 TransactionStatus (com.cloud.utils.db.TransactionStatus)9 List (java.util.List)9 LbHealthCheckPolicy (com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy)8