Update load balancer pool list

@param loadBalancerPoolList load balancer pool list
@param config load balancer pool config
@return OperationFuture wrapper for load balancer pool list
435416
public OperationFuture<List<LoadBalancerPool>> update(
            List<LoadBalancerPool> loadBalancerPoolList,
            LoadBalancerPoolConfig config
    ) {
        loadBalancerPoolList.forEach(pool -> update(pool, config));

        return new OperationFuture<>(
            loadBalancerPoolList,
            new NoWaitingJobFuture()
        );
    }
785012
@Override
    public synchronized void update(LogProviderConfig config) {
        // Get the configured log location, and derive the ffdc location from it
        File location = config.getLogDirectory();
        if (location == null) {
            location = new File(".");
        }
        location = new File(location, FFDCConfigurator.FFDC_DIR);

        ffdcLogDirectory = location;

        int maxFiles = config.getMaxFiles();

        // Creation and rolling of files should be done as the server
        Object token = ThreadIdentityManager.runAsServer();
        try {
            summaryLogSet.update(location,
                                 FFDCConfigurator.FFDC_SUMMARY_FILE_NAME,
                                 FFDCConfigurator.FFDC_EXTENSION,
                                 maxFiles);
            synchronized (ffdcLogSet) {
                ffdcLogSet.update(location,
                                  FFDCConfigurator.FFDC_FILE_NAME,
                                  FFDCConfigurator.FFDC_EXTENSION,
                                  0 /* unlimited */);
            }
        } finally {
            ThreadIdentityManager.reset(token);
        }
    }
1317109
public ILoadBalancer buildLoadBalancerFromConfigWithReflection() {
        String loadBalancerClassName = config.get(CommonClientConfigKey.NFLoadBalancerClassName);
        if (loadBalancerClassName == null) {
            throw new IllegalArgumentException("NFLoadBalancerClassName is not specified in the IClientConfig");
        }
        ILoadBalancer lb;
        try {
            lb = (ILoadBalancer) factory.create(loadBalancerClassName, config);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return lb;
    }
207967
public OperationFuture<List<LoadBalancerPool>> delete(LoadBalancerPoolFilter filter) {
        List<LoadBalancerPool> loadBalancerPoolList = findLazy(filter)
            .map(metadata -> LoadBalancerPool.refById(
                metadata.getId(),
                LoadBalancer.refById(
                    metadata.getLoadBalancerId(),
                    DataCenter.refById(metadata.getDataCenterId())
                )
            ))
            .collect(toList());

        return delete(loadBalancerPoolList);
    }
1355260
@SuppressWarnings("unchecked")
  public static List<LbConfig> unwrapLoadBalancingConfigList(List<Map<String, ?>> list) {
    ArrayList<LbConfig> result = new ArrayList<>();
    for (Map<String, ?> rawChildPolicy : list) {
      result.add(unwrapLoadBalancingConfig(rawChildPolicy));
    }
    return Collections.unmodifiableList(result);
  }
1179799
public OperationFuture<List<Server>> modifyPublicIp(ServerFilter filter, ModifyPublicIpConfig config) {
        return modifyPublicIp(Arrays.asList(getRefsFromFilter(filter)), config);
    }
816981
public OperationFuture<Server> modifyPublicIp(Server server, ModifyPublicIpConfig config) {
        checkNotNull(config, CHECK_PUBLIC_IP_CONFIG);
        List<IpAddress> ipAddresses = findByRef(server).getDetails().getIpAddresses();

        List<String> responseIds = ipAddresses.stream()
            .map(IpAddress::getPublicIp)
            .filter(notNull())
            .map(ipAddress ->
                client.modifyPublicIp(idByRef(server),
                    ipAddress,
                    publicIpConverter.createPublicIpRequest(config)))
            .map(Link::getId)
            .collect(toList());

        return new OperationFuture<>(
            server,
            responseIds,
            queueClient
        );
    }
1181407
private List<LoadBalancer> findLoadBalancers(@Nullable String loadBalancerId) throws CloudException, InternalException {
        APITrace.begin(getProvider(), "LB.listLoadBalancers");
        try {
            // get all vips, optionally filtered by lbId
            List<JSONObject> listeners = findAllVips(loadBalancerId);

            // get all members, optionally filtered by lbId
            List<JSONObject> members = findAllMembers(loadBalancerId);

            NovaMethod method = new NovaMethod(getProvider());
            // Unlike Horizon the OS LB API returns all tenants' load balancers, so we must filter
            JSONObject result = method.getNetworks(getLoadBalancersResource(), loadBalancerId, false, "?tenant_id="+getContext().getAccountNumber());
            List<LoadBalancer> results = new ArrayList<LoadBalancer>();
            if( loadBalancerId == null && result != null && result.has("pools") ) {
                try {
                    JSONArray loadbalancers = result.getJSONArray("pools");
                    for( int i = 0; i < loadbalancers.length(); i++ ) {
                        JSONObject lb = loadbalancers.getJSONObject(i);
                        results.add(toLoadBalancer(lb, listeners, members));
                    }
                }
                catch( JSONException e ) {
                    logger.error("Unable to understand listPools response: " + e.getMessage());
                    throw new CloudException(e);
                }
            }
            else if( result != null && result.has("pool")) {
                try {
                    return Collections.singletonList(toLoadBalancer(result.getJSONObject("pool"), listeners, members));
                }
                catch( JSONException e ) {
                    logger.error("Unable to understand getPool response: " + e.getMessage());
                    throw new CloudException(e);
                }
            }

            return results;
        }
        finally {
            APITrace.end();
        }
    }
613506
@Override
    public java.util.concurrent.Future<ListContainerInstancesResult> listContainerInstancesAsync(
            com.amazonaws.handlers.AsyncHandler<ListContainerInstancesRequest, ListContainerInstancesResult> asyncHandler) {

        return listContainerInstancesAsync(new ListContainerInstancesRequest(), asyncHandler);
    }
695677
public OperationFuture<LoadBalancerPool> update(
            LoadBalancerPool loadBalancerPool,
            List<LoadBalancerNodeMetadata> nodesList
    ) {
        LoadBalancerPoolMetadata loadBalancerPoolMetadata = loadBalancerPoolService.findByRef(
                loadBalancerPool
        );

        loadBalancerNodeClient.update(
                loadBalancerPoolMetadata.getDataCenterId(),
                loadBalancerPoolMetadata.getLoadBalancerId(),
                loadBalancerPoolMetadata.getId(),
                nodesList
        );

        return new OperationFuture<>(
                loadBalancerPool,
                new NoWaitingJobFuture()
        );
    }
198309
func (api *API) ListLoadBalancerPools() ([]LoadBalancerPool, error) {
	uri := api.userBaseURL("/user") + "/load_balancers/pools"
	res, err := api.makeRequest("GET", uri, nil)
	if err != nil {
		return nil, errors.Wrap(err, errMakeRequestError)
	}
	var r loadBalancerPoolListResponse
	if err := json.Unmarshal(res, &r); err != nil {
		return nil, errors.Wrap(err, errUnmarshalError)
	}
	return r.Result, nil
}
332022
public PooledExecutionServiceConfigurationBuilder pool(String alias, int minSize, int maxSize) {
    PooledExecutionServiceConfigurationBuilder other = new PooledExecutionServiceConfigurationBuilder(this);
    other.pools.add(new Pool(alias, minSize, maxSize));
    return other;
  }
1002426
public void updateFlowConfig(FlowConfig flowConfig)
      throws RemoteInvocationException {
    LOG.debug("updateFlowConfig with groupName " + flowConfig.getId().getFlowGroup() + " flowName " +
        flowConfig.getId().getFlowName());

    FlowId flowId = new FlowId().setFlowGroup(flowConfig.getId().getFlowGroup())
        .setFlowName(flowConfig.getId().getFlowName());

    UpdateRequest<FlowConfig> updateRequest =
        _flowconfigsRequestBuilders.update().id(new ComplexResourceKey<>(flowId, new EmptyRecord()))
            .input(flowConfig).build();

    ResponseFuture<EmptyRecord> response = _restClient.get().sendRequest(updateRequest);

    response.getResponse();
  }
1040578
def cli(env, identifier, allocation, port, routing_type, routing_method):
    """"""
    mgr = SoftLayer.LoadBalancerManager(env.client)

    loadbal_id, group_id = loadbal.parse_id(identifier)

    # check if any input is provided
    if not any([allocation, port, routing_type, routing_method]):
        raise exceptions.CLIAbort(
            'At least one property is required to be changed!')

    mgr.edit_service_group(loadbal_id,
                           group_id,
                           allocation=allocation,
                           port=port,
                           routing_type=routing_type,
                           routing_method=routing_method)

    env.fout('Load balancer service group %s is being updated!' % identifier)
802001
private void addLoadBalancerListener() {
        if (!(lbContext.getLoadBalancer() instanceof BaseLoadBalancer)) {
            return;
        }
        
        ((BaseLoadBalancer) lbContext.getLoadBalancer()).addServerListChangeListener(new ServerListChangeListener() {
            @Override
            public void serverListChanged(List<Server> oldList, List<Server> newList) {
                Set<Server> removedServers = new HashSet<Server>(oldList);
                removedServers.removeAll(newList);
                for (Server server: rxClientCache.keySet()) {
                    if (removedServers.contains(server)) {
                        // this server is no longer in UP status
                        removeClient(server);
                    }
                }
            }
        });
    }
1242297
public OperationFuture<List<LoadBalancerPool>> update(
            LoadBalancerPoolFilter loadBalancerPoolFilter,
            LoadBalancerPoolConfig config
    ) {
        checkNotNull(loadBalancerPoolFilter, "Load balancer pool filter must be not null");

        List<LoadBalancerPool> loadBalancerPoolList = findLazy(loadBalancerPoolFilter)
            .map(metadata -> LoadBalancerPool.refById(
                metadata.getId(),
                LoadBalancer.refById(
                    metadata.getLoadBalancerId(),
                    DataCenter.refById(metadata.getDataCenterId())
                )
            ))
            .collect(toList());

        return update(loadBalancerPoolList, config);
    }
92124
private void updateSlotLimit(
      final Pool pool, final TaskType type, LimitType limitType) {
    if (poolMgr.fifoWeight(pool.getName())) {
      updateSlotLimitFifo(pool, type, limitType);
      return;
    }
    // Find the proper ratio of (# of minSlots / weight) by bineary search
    BinarySearcher searcher = new BinarySearcher() {
      @Override
      double targetFunction(double x) {
        return poolSlotsUsedWithWeightToSlotRatio(pool, x, type, false);
      }
    };
    int total = getPoolSlotLimit(pool, type, limitType);
    double lastRatio = getLastRatio(pool, limitType);
    double ratio = searcher.getSolution(total, lastRatio);
    setLastRatio(pool, limitType, ratio);

    int leftOver = total;
    List<JobInfo> candidates = new LinkedList<JobInfo>();
    for (JobInProgress job : pool.getJobs()) {
      JobInfo info = infos.get(job);
      if (info == null) {
        throw new IllegalStateException("Couldn't find job " + job.jobId +
            " in pool " + pool.getName());
      }
      candidates.add(info);
      if (leftOver == 0) {
        setSlotLimit(info, 0, type, limitType);
      }
      int slots = (int)Math.floor(computeShare(info, ratio, type, false));
      if (leftOver >= slots) {
        leftOver -= slots;
        setSlotLimit(info, slots, type, limitType);
      }
    }
    // Assign the left over slots in round-robin order
    for (int i = 0; i < leftOver && !candidates.isEmpty(); ++i) {
      JobInfo info = candidates.remove(0);
      if (incSlotLimit(info, type, limitType)) {
        candidates.add(info);
      }
    }
  }