BaragonService/src/main/java/com/hubspot/baragon/service/elb/ApplicationLoadBalancer.java
private void guaranteeRegistered(TrafficSource trafficSource,
                                   TargetGroup targetGroup,
                                   Collection<TargetDescription> targets,
                                   Collection<BaragonAgentMetadata> baragonAgents,
                                   Collection<LoadBalancer> loadBalancers) {
    /*
    - Check that load balancers, baragon agents, target groups are on same VPC
    - Check that load balancers, targets are on same subnet (== AZ)
    - Check that all baragon agents are associated with a target on target group
    - Check that load balancers has listeners, rules to make talk to target group
     */

    if (configuration.isPresent() && configuration.get().isCheckForCorrectVpc()) {
      guaranteeSameVPC(targetGroup, baragonAgents, loadBalancers);
    }

    guaranteeAzEnabled(baragonAgents, loadBalancers);
    guaranteeHasAllTargets(trafficSource, targetGroup, targets, baragonAgents);
    //guaranteeListenersPresent(targetGroup, loadBalancers);
  }
private void guaranteeRegistered(TrafficSource trafficSource,
                                   TargetGroup targetGroup,
                                   Collection<TargetDescription> targets,
                                   Collection<BaragonAgentMetadata> baragonAgents,
                                   Collection<LoadBalancer> loadBalancers) {
    /*
    - Check that load balancers, baragon agents, target groups are on same VPC
    - Check that load balancers, targets are on same subnet (== AZ)
    - Check that all baragon agents are associated with a target on target group
    - Check that load balancers has listeners, rules to make talk to target group
     */

    if (configuration.isPresent() && configuration.get().isCheckForCorrectVpc()) {
      guaranteeSameVPC(targetGroup, baragonAgents, loadBalancers);
    }

    guaranteeAzEnabled(baragonAgents, loadBalancers);
    guaranteeHasAllTargets(trafficSource, targetGroup, targets, baragonAgents);
    //guaranteeListenersPresent(targetGroup, loadBalancers);
  }
private void guaranteeRegistered ( TrafficSource trafficSource , TargetGroup targetGroup , Collection < TargetDescription > targets , Collection < BaragonAgentMetadata > baragonAgents , Collection < LoadBalancer > loadBalancers ) { /*
    - Check that load balancers, baragon agents, target groups are on same VPC
    - Check that load balancers, targets are on same subnet (== AZ)
    - Check that all baragon agents are associated with a target on target group
    - Check that load balancers has listeners, rules to make talk to target group
     */ if ( configuration . isPresent ( ) && configuration . get ( ) . isCheckForCorrectVpc ( ) ) { guaranteeSameVPC ( targetGroup , baragonAgents , loadBalancers ) ; } guaranteeAzEnabled ( baragonAgents , loadBalancers ) ; guaranteeHasAllTargets ( trafficSource , targetGroup , targets , baragonAgents ) ; //guaranteeListenersPresent(targetGroup, loadBalancers); }
Ensure that the given baragon agent is attached to the given target group. When this function
completes, the baragon agent will be attached to the load balancer, whether or not it originally
was.

@param baragonAgents BaragonAgent to register with given load balancer
@param loadBalancers Load balancer to register with
Ensure that the given baragon agent is attached to the given target group . When this function completes the baragon agent will be attached to the load balancer whether or not it originally was .