s_logger.warn("Failed to remove load balancer rule id " + loadBalancerId + " for vms " + instanceIds); CloudRuntimeException ex = new CloudRuntimeException("Failed to remove specified load balancer rule id for vms " + instanceIds); ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId"); throw ex; ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId"); throw ex;
CloudRuntimeException ex = new CloudRuntimeException("Failed to add specified loadbalancerruleid for vms " + vmInstanceIds); ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
@DB @Override @ActionEvent(eventType = EventTypes.EVENT_LB_CERT_DELETE, eventDescription = "Deleting a certificate to cloudstack", async = false) public void deleteSslCert(final DeleteSslCertCmd deleteSslCertCmd) { Preconditions.checkNotNull(deleteSslCertCmd); final CallContext ctx = CallContext.current(); final Account caller = ctx.getCallingAccount(); final Long certId = deleteSslCertCmd.getId(); final SslCertVO certVO = _sslCertDao.findById(certId); if (certVO == null) { throw new InvalidParameterValueException("Invalid certificate id: " + certId); } _accountMgr.checkAccess(caller, SecurityChecker.AccessType.OperateEntry, true, certVO); final List<LoadBalancerCertMapVO> lbCertRule = _lbCertDao.listByCertId(certId); if (lbCertRule != null && !lbCertRule.isEmpty()) { String lbUuids = ""; for (final LoadBalancerCertMapVO rule : lbCertRule) { final LoadBalancerVO lb = _entityMgr.findById(LoadBalancerVO.class, rule.getLbId()); lbUuids += " " + lb.getUuid(); } throw new CloudRuntimeException("Certificate in use by a loadbalancer(s)" + lbUuids); } _sslCertDao.remove(certId); }
s_logger.warn("Failed to remove cert from load balancer rule id " + lbRuleId); CloudRuntimeException ex = new CloudRuntimeException("Failed to remove certificate load balancer rule id " + lbRuleId); ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId"); throw ex; if (!success) { CloudRuntimeException ex = new CloudRuntimeException("Failed to remove certificate from load balancer rule id " + lbRuleId); ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId"); throw ex;
null, LoadBalancingRule.class.getName(), lb.getUuid());
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());
LoadBalancerVO loadBalancer = _lbDao.findById(lbRuleId); if (oldLbRuleIds != null && !oldLbRuleIds.contains(loadBalancer.getId())) { throw new InvalidParameterValueException("Load balancer ID " + loadBalancer.getUuid() + " is not assigned" + " to global load balancer rule: " + gslbRule.getUuid());
resourceType = ResourceObjectType.LoadBalancer; if (lb != null) { usageRecResponse.setUsageId(lb.getUuid()); resourceId = lb.getId();