// RemoveIPs provides a mock function with given fields: ctx, []string
8658
func (_m *FacadeInterface) RemoveIPs(ctx datastore.Context, args []string) error {
	ret := _m.Called(ctx, args)

	var r0 error
	if rf, ok := ret.Get(0).(func(datastore.Context, []string) error); ok {
		r0 = rf(ctx, args)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
84180
func filterIPs(filter func(net.IP) net.IP, ips []net.IP) []net.IP {
	n := 0
	for i := range ips {
		if ip := filter(ips[i]); ip != nil {
			ips[n] = ip
			n++
		}
	}
	return ips[:n]
}
875680
func removeRoutes(table string, vip net.IP) error {
	af := seesaw.IPv6
	if vip.To4() != nil {
		af = seesaw.IPv4
	}
	return ipRunAF(af, "route flush table %s %s", table, vip)
}
1081707
func removeIPAtIndex(ips []net.IP, i int) ([]net.IP, bool) {
	l := len(ips)
	ips[i] = ips[l-1]
	ips = ips[:l-1]
	return ips, l == 1
}
953556
func (c *Client) DeleteIPv4(id, ip string) error {
	values := url.Values{
		"SUBID": {id},
		"ip":    {ip},
	}

	if err := c.post(`server/destroy_ipv4`, values, nil); err != nil {
		return err
	}
	return nil
}
12201
func (i *goIpsetProvider) DestroyAll(prefix string) error {

	sets, err := i.ListIPSets()
	if err != nil {
		return ipset.DestroyAll()
	}

	for _, s := range sets {
		if !strings.HasPrefix(s, prefix) {
			continue
		}
		ips := i.GetIpset(s)
		if err := ips.Destroy(); err != nil {
			return ipset.DestroyAll()
		}
	}

	return nil
}
340915
func (n *NIC) RemoveAddress(addr tcpip.Address) *tcpip.Error {
	n.mu.Lock()
	r := n.endpoints[NetworkEndpointID{addr}]
	if r == nil || !r.holdsInsertRef {
		n.mu.Unlock()
		return tcpip.ErrBadLocalAddress
	}

	r.holdsInsertRef = false
	n.mu.Unlock()

	r.decRef()

	return nil
}
448834
func (this *ControlPlaneDao) AssignIPs(assignmentRequest addressassignment.AssignmentRequest, _ *int) error {
	return this.facade.AssignIPs(datastore.Get(), assignmentRequest)
}
506707
func (s *VPCRouterSetting) RemoveDHCPStaticMapping(ipAddress string, macAddress string) {
	if s.DHCPStaticMapping == nil {
		return
	}

	if s.DHCPStaticMapping.Config == nil {
		s.DHCPStaticMapping.Enabled = "False"
		return
	}

	dest := []*VPCRouterDHCPStaticMappingConfig{}
	for _, c := range s.DHCPStaticMapping.Config {
		if c.IPAddress != ipAddress || c.MACAddress != macAddress {
			dest = append(dest, c)
		}
	}
	s.DHCPStaticMapping.Config = dest

	if len(s.DHCPStaticMapping.Config) == 0 {
		s.DHCPStaticMapping.Enabled = "False"
		s.DHCPStaticMapping.Config = nil
		return
	}
	s.DHCPStaticMapping.Enabled = "True"

}
1116670
func GetIPs(code dhcp4.OptionCode, o dhcp4.Options) IPs {
	v := o.Get(code)
	if v == nil {
		return nil
	}

	var i IPs
	if err := i.UnmarshalBinary(v); err != nil {
		return nil
	}
	return i
}
1176663
func (s *NicService) RemoveIpFromNic(p *RemoveIpFromNicParams) (*RemoveIpFromNicResponse, error) {
	resp, err := s.cs.newRequest("removeIpFromNic", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

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

	return &r, nil
}
1286554
func (s *ListIPSetsOutput) SetIPSets(v []*IPSetSummary) *ListIPSetsOutput {
	s.IPSets = v
	return s
}
888565
func (dev *LinkLayerDevice) RemoveAddresses() error {
	findQuery := findAddressesQuery(dev.doc.MachineID, dev.doc.Name)
	ops, err := dev.st.removeMatchingIPAddressesDocOps(findQuery)
	if err != nil {
		return errors.Trace(err)
	}

	return dev.st.db().RunTransaction(ops)
}
209054
func (_m *FacadeInterface) AssignIPs(ctx datastore.Context, assignmentRequest addressassignment.AssignmentRequest) error {
	ret := _m.Called(ctx, assignmentRequest)

	var r0 error
	if rf, ok := ret.Get(0).(func(datastore.Context, addressassignment.AssignmentRequest) error); ok {
		r0 = rf(ctx, assignmentRequest)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
254995
func (s *Accelerator) SetIpSets(v []*IpSet) *Accelerator {
	s.IpSets = v
	return s
}
458853
func (sto *unionStorage) RemoveBlobs(ctx context.Context, blobs []blob.Ref) error {
	return blobserver.ErrReadonly
}
46121
func (c *Client) IPs() (IPAddrs, error) {
	resp, err := c.Get("/public-ip-list", nil)
	if err != nil {
		return nil, err
	}

	var m map[string][]string
	if err := decodeJSON(&m, resp.Body); err != nil {
		return nil, err
	}
	return IPAddrs(m["addresses"]), nil
}