// RemoveSubnet removes the given subnet from n.
355376
func (n *NIC) RemoveSubnet(subnet tcpip.Subnet) {
	n.mu.Lock()

	// Use the same underlying array.
	tmp := n.subnets[:0]
	for _, sub := range n.subnets {
		if sub != subnet {
			tmp = append(tmp, sub)
		}
	}
	n.subnets = tmp

	n.mu.Unlock()
}
276853
func (s *AvailabilityZone) SetSubnetId(v string) *AvailabilityZone {
	s.SubnetId = &v
	return s
}
1057090
func (s *DescribeHsmOutput) SetSubnetId(v string) *DescribeHsmOutput {
	s.SubnetId = &v
	return s
}
248839
func (s *DetachLoadBalancerFromSubnetsOutput) SetSubnets(v []*string) *DetachLoadBalancerFromSubnetsOutput {
	s.Subnets = v
	return s
}
794996
func (n *Network) Remove(ctx context.Context) error {
	if n.external {
		fmt.Printf("Network %s is external, skipping", n.fullName())
		return nil
	}
	fmt.Printf("Removing network %q\n", n.fullName())
	return n.client.NetworkRemove(ctx, n.fullName())
}
357187
func (env *maasEnviron) Subnets(ctx context.ProviderCallContext, instId instance.Id, subnetIds []network.Id) ([]network.SubnetInfo, error) {
	if env.usingMAAS2() {
		return env.subnets2(ctx, instId, subnetIds)
	}
	return env.subnets1(ctx, instId, subnetIds)
}
854525
func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration {
	s.Subnets = v
	return s
}
452177
func (s *DistinctNetSet) Remove(ip net.IP) {
	key := s.key(ip)
	if n, ok := s.members[string(key)]; ok {
		if n == 1 {
			delete(s.members, string(key))
		} else {
			s.members[string(key)] = n - 1
		}
	}
}
968043
func (s *AwsEc2InstanceDetails) SetSubnetId(v string) *AwsEc2InstanceDetails {
	s.SubnetId = &v
	return s
}
189953
func (reg *VIFRegistry) SetSubnet(subnet string) error {
	if err := validation.IsSubnetCIDR(subnet); err != nil {
		return err
	}
	reg.subnet = subnet
	glog.Infof("vif subnet is: %s", reg.subnet)
	return nil
}
495398
func (s *RDSDataSpec) SetSubnetId(v string) *RDSDataSpec {
	s.SubnetId = &v
	return s
}
630616
func IsSubnet16(value string) error {
	parts := strings.Split(value, ".")
	if len(parts) != 2 {
		return NewViolation(fmt.Sprintf("invalid /16 subnet %s", value))
	}

	ip := fmt.Sprintf("%s.1.1", value)
	if nil == net.ParseIP(ip) {
		return NewViolation(fmt.Sprintf("invalid /16 subnet %s", value))
	}
	return nil
}
539830
func (r Network_Storage_Iscsi) RemoveAccessToReplicantFromSubnet(subnetObjectTemplate *datatypes.Network_Subnet) (resp bool, err error) {
	params := []interface{}{
		subnetObjectTemplate,
	}
	err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "removeAccessToReplicantFromSubnet", params, &r.Options, &resp)
	return
}
1247842
func (mgr *AddrSubManager) removeSub(p peer.ID, s *addrSub) {
	mgr.mu.Lock()
	defer mgr.mu.Unlock()

	subs := mgr.subs[p]
	if len(subs) == 1 {
		if subs[0] != s {
			return
		}
		delete(mgr.subs, p)
		return
	}

	for i, v := range subs {
		if v == s {
			subs[i] = subs[len(subs)-1]
			subs[len(subs)-1] = nil
			mgr.subs[p] = subs[:len(subs)-1]
			return
		}
	}
}
588003
func (s *DetachLoadBalancerFromSubnetsInput) SetSubnets(v []*string) *DetachLoadBalancerFromSubnetsInput {
	s.Subnets = v
	return s
}
844596
func (c *Client) RemoveNetwork(id string) error {
	resp, err := c.do("DELETE", "/networks/"+id, doOptions{})
	if err != nil {
		if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
			return &NoSuchNetwork{ID: id}
		}
		return err
	}
	resp.Body.Close()
	return nil
}
1027851
func (s *PhysicalConnectionRequirements) SetSubnetId(v string) *PhysicalConnectionRequirements {
	s.SubnetId = &v
	return s
}