// SSHAddresses implements environs.SSHAddresses.
// For testing we cut "100.100.100.100" out of this list.
779364
func (*environ) SSHAddresses(ctx context.ProviderCallContext, addresses []network.Address) ([]network.Address, error) {
	var rv []network.Address
	for _, addr := range addresses {
		if addr.Value != "100.100.100.100" {
			rv = append(rv, addr)
		}
	}
	return rv, nil
}
249454
func (api *API) WereAddressesSpentFrom(addresses ...Hash) ([]bool, error) {
	if err := Validate(
		ValidateAddresses(false, addresses...),
	); err != nil {
		return nil, err
	}

	cleanedAddrs, err := checksum.RemoveChecksums(addresses)
	if err != nil {
		return nil, err
	}

	cmd := &WereAddressesSpentFromCommand{Addresses: cleanedAddrs, Command: Command{WereAddressesSpentFromCmd}}
	rsp := &WereAddressesSpentFromResponse{}
	if err := api.provider.Send(cmd, rsp); err != nil {
		return nil, err
	}
	return rsp.States, nil
}
285291
func (a *InstancePollerAPI) ProviderAddresses(args params.Entities) (params.MachineAddressesResults, error) {
	result := params.MachineAddressesResults{
		Results: make([]params.MachineAddressesResult, len(args.Entities)),
	}
	canAccess, err := a.accessMachine()
	if err != nil {
		return result, err
	}
	for i, arg := range args.Entities {
		machine, err := a.getOneMachine(arg.Tag, canAccess)
		if err == nil {
			addrs := machine.ProviderAddresses()
			result.Results[i].Addresses = params.FromNetworkAddresses(addrs...)
		}
		result.Results[i].Error = common.ServerError(err)
	}
	return result, nil
}
1271324
func (s *MessageRequest) SetAddresses(v map[string]*AddressConfiguration) *MessageRequest {
	s.Addresses = v
	return s
}
838824
func FilterAddresses(addrs ...*net.IPNet) Option {
	return func(cfg *Config) error {
		if cfg.Filters == nil {
			cfg.Filters = filter.NewFilters()
		}
		for _, addr := range addrs {
			cfg.Filters.AddDialFilter(addr)
		}
		return nil
	}
}
1230033
func (vs *VSphere) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error) {
	return vs.NodeAddresses(ctx, convertToK8sType(providerID))
}
436068
func (s *ListResolverEndpointIpAddressesOutput) SetIpAddresses(v []*IpAddressResponse) *ListResolverEndpointIpAddressesOutput {
	s.IpAddresses = v
	return s
}
702880
func (msg *MsgAddr) AddAddresses(netAddrs ...*NetAddress) error {
	for _, na := range netAddrs {
		err := msg.AddAddress(na)
		if err != nil {
			return err
		}
	}
	return nil
}
833940
func (inst *ec2Instance) Addresses(ctx context.ProviderCallContext) ([]network.Address, error) {
	var addresses []network.Address
	possibleAddresses := []network.Address{
		{
			Value: inst.IPAddress,
			Type:  network.IPv4Address,
			Scope: network.ScopePublic,
		},
		{
			Value: inst.PrivateIPAddress,
			Type:  network.IPv4Address,
			Scope: network.ScopeCloudLocal,
		},
	}
	for _, address := range possibleAddresses {
		if address.Value != "" {
			addresses = append(addresses, address)
		}
	}
	return addresses, nil
}
424304
func (r *remoteServer) UpdateAddresses(addresses []string) {
	r.mutex.Lock()
	defer r.mutex.Unlock()

	if r.connection == nil && r.stopConnecting != nil {
		// We are probably trying to reconnect, so interrupt that so we don't
		// get a race between setting addresses and trying to read them to
		// connect. Note that we don't call the interruptConnecting method
		// here because that method also tries to lock the mutex.
		r.logger.Debugf("interrupting connecting due to new addresses: %v", addresses)
		close(r.stopConnecting)
		r.stopConnecting = nil
	}
	r.info.Addrs = addresses
}
671277
func (a *APIAddresser) APIAddresses() (params.StringsResult, error) {
	addrs, err := apiAddresses(a.getter)
	if err != nil {
		return params.StringsResult{}, err
	}
	return params.StringsResult{
		Result: addrs,
	}, nil
}
261524
func (p *proxy) SetNewAddresses(addresses []addressTuple) {
	// Randomize the addresses so not all instances get them in the same order
	dest := make([]addressTuple, len(addresses))
	perm := rand.Perm(len(addresses))
	for i, v := range perm {
		dest[v] = addresses[i]
	}
	p.newAddresses <- dest
}
591592
func (a *StateAddresser) StateAddresses() (params.StringsResult, error) {
	addrs, err := a.getter.Addresses()
	if err != nil {
		return params.StringsResult{}, err
	}
	return params.StringsResult{
		Result: addrs,
	}, nil
}
862784
func (a *APIAddresser) APIAddresses() ([]string, error) {
	var result params.StringsResult
	err := a.facade.FacadeCall("APIAddresses", nil, &result)
	if err != nil {
		return nil, err
	}

	if err := result.Error; err != nil {
		return nil, err
	}
	return result.Result, nil
}
1331929
func (o *SharedNetworkResource) AddressRanges(info *bambou.FetchingInfo) (AddressRangesList, *bambou.Error) {

	var list AddressRangesList
	err := bambou.CurrentSession().FetchChildren(o, AddressRangeIdentity, &list, info)
	return list, err
}
535119
func (s *SSHService) ListSSHKeyPairs(p *ListSSHKeyPairsParams) (*ListSSHKeyPairsResponse, error) {
	resp, err := s.cs.newRequest("listSSHKeyPairs", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListSSHKeyPairsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
851405
func (s *NetworkInterface) SetPrivateIpAddresses(v []*PrivateIp) *NetworkInterface {
	s.PrivateIpAddresses = v
	return s
}