if (getAvailabilityZones() != null) sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(","); if (getLoadBalancerNames() != null) sb.append("LoadBalancerNames: ").append(getLoadBalancerNames()).append(","); if (getTargetGroupARNs() != null) sb.append("TargetGroupARNs: ").append(getTargetGroupARNs()).append(",");
hashCode = prime * hashCode + ((getDefaultCooldown() == null) ? 0 : getDefaultCooldown().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); hashCode = prime * hashCode + ((getTargetGroupARNs() == null) ? 0 : getTargetGroupARNs().hashCode()); hashCode = prime * hashCode + ((getHealthCheckType() == null) ? 0 : getHealthCheckType().hashCode());
if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == false) return false; if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == null) return false; if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == false) return false; if (other.getTargetGroupARNs() == null ^ this.getTargetGroupARNs() == null)
/** * <p> * One or more load balancers associated with the group. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param loadBalancerNames <p> * One or more load balancers associated with the group. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public AutoScalingGroup withLoadBalancerNames(String... loadBalancerNames) { if (getLoadBalancerNames() == null) { this.loadBalancerNames = new java.util.ArrayList<String>(loadBalancerNames.length); } for (String value : loadBalancerNames) { this.loadBalancerNames.add(value); } return this; }
if (getAvailabilityZones() != null) sb.append("AvailabilityZones: " + getAvailabilityZones() + ","); if (getLoadBalancerNames() != null) sb.append("LoadBalancerNames: " + getLoadBalancerNames() + ","); if (getTargetGroupARNs() != null) sb.append("TargetGroupARNs: " + getTargetGroupARNs() + ",");
+ ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); hashCode = prime * hashCode + ((getTargetGroupARNs() == null) ? 0 : getTargetGroupARNs().hashCode());
protected List<MigrateLoadBalancerResult> generateTargetLoadBalancers(AutoScalingGroup sourceGroup) { return sourceGroup.getLoadBalancerNames().stream() .map(this::getMigrateLoadBalancerResult) .collect(Collectors.toList()); }
&& other.getAvailabilityZones().equals(this.getAvailabilityZones()) == false) return false; if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == null) return false; if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == false) return false; if (other.getTargetGroupARNs() == null ^ this.getTargetGroupARNs() == null)
public void handleError(AutoScalingGroup asGroup) { if (activeConfiguration.isSticky()) { asGroup.getLoadBalancerNames().forEach(elbName -> awsDeployUtils.disableStickiness(elbName, activeConfiguration.getStickyPorts())); } }
List<Ec2Instance> ec2Instances = instancesResult.getReservations().stream().flatMap(r -> r.getInstances().stream()).map(this::toEc2Instance).collect(Collectors.toList()); log.debug("describing elb status"); autoScalingGroup.getLoadBalancerNames().forEach(elb -> this.updateInstancesStateOnLoadBalancer(elb, ec2Instances)); ec2Instances.forEach(i -> i.updateAsState(AwsState.map(instanceMap.get(i.getInstanceId()).getLifecycleState()))); ec2Instances.sort((o1, o2) -> {
public void postDeploy(AutoScalingGroup asGroup, Integer originalDesiredCapacity) { if (DeployStrategyType.KEEP_CAPACITY.equals(activeConfiguration.getDeployStrategy())) { awsDeployUtils.setDesiredCapacity(asGroup, originalDesiredCapacity); } if (activeConfiguration.isSticky()) { asGroup.getLoadBalancerNames().forEach(elbName -> awsDeployUtils.disableStickiness(elbName, activeConfiguration.getStickyPorts())); } }
WaitForInstanceRequestExecutor.InstanceStatus instanceStatus = newInstance -> !asGroup.getLoadBalancerNames().isEmpty() && awsDeployUtils.checkInstanceInServiceOnAllElb(newInstance, asGroup.getLoadBalancerNames()); awsDeployUtils.setDesiredCapacity(asGroup, asGroup.getDesiredCapacity() + 1); WaitForInstanceRequestExecutor waitForDeployedInstanceRequestExecutor = new WaitForInstanceRequestExecutor(log, 10); asGroup.getLoadBalancerNames().forEach(elbName -> awsDeployUtils.enableStickiness(elbName, activeConfiguration.getStickyPorts()));
if (_autoScalingGroup.getLoadBalancerNames() != null) { prefix = _prefix + "LoadBalancerNames"; java.util.List<String> loadBalancerNames = _autoScalingGroup.getLoadBalancerNames(); int loadBalancerNamesIndex = 1; String loadBalancerNamesPrefix = prefix;
if (!autoScalingGroup.getLoadBalancerNames().isEmpty() || !autoScalingGroup.getTargetGroupARNs().isEmpty()) { event.getTask().updateStatus( PHASE,
metrics.startTimer(); for (Ec2Instance instance : instances) { awsDeployUtils.updateInstanceState(instance, asGroup.getLoadBalancerNames()); if (!DeployStateStrategyFactory.isDeployable(activeConfiguration, asGroup, instances)) { awsDeployUtils.resumeScheduledActions(); } catch (MojoExecutionException | MojoFailureException e) { getLog().error("Error during deploy. Resuming auto scaling processes.", e); awsDeployUtils.updateInstanceState(instance, asGroup.getLoadBalancerNames()); if (!DeployStateStrategyFactory.isDeployableOnError(activeConfiguration, asGroup, instances)) { awsDeployUtils.resumeScheduledActions();