Returns all the subnets.
341513
def get_all_subnets_cidr(self, no_mask=False):
        
        body = {}
        subnet_cidrs = []
        try:
            subnet_list = self.neutronclient.list_subnets(body=body)
            subnet_dat = subnet_list.get('subnets')
            for sub in subnet_dat:
                if no_mask:
                    subnet_cidrs.append(sub.get('cidr').split('/')[0])
                else:
                    subnet_cidrs.append(sub.get('cidr'))
        except Exception as exc:
            LOG.error("Failed to list subnet Exc %s", str(exc))
        return subnet_cidrs
800454
def all_connections(self):
        """"""
        for i in _xrange(self.num_patterns):
            for c in self._available_connections[i]:
                yield c
            for c in self._in_use_connections[i]:
                yield c
949977
def id_pools_ipv4_subnets(self):
        
        if not self.__id_pools_ipv4_subnets:
            self.__id_pools_ipv4_subnets = IdPoolsIpv4Subnets(self.__connection)
        return self.__id_pools_ipv4_subnets
1130271
public void setSubnets(java.util.Collection<Subnet> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }

        this.subnets = new java.util.ArrayList<Subnet>(subnets);
    }
1179968
def _get_network(self):
        '''
        
        '''
        data = dict()
        data['interfaces'] = salt.utils.network.interfaces()
        data['subnets'] = salt.utils.network.subnets()

        return data
340599
public Set<String> subprotocols() {
        Set<String> ret = new LinkedHashSet<String>();
        Collections.addAll(ret, subprotocols);
        return ret;
    }
1298935
def show_subnetpool(self, subnetpool, **_params):
        """"""
        return self.get(self.subnetpool_path % (subnetpool), params=_params)
1220565
def getNetworkIDs(self):
        """"""

        res = []
        i = 0
        while True:
            netid = self.getValue("net_interface.%d.connection" % i)
            if not netid:
                return res
            res.append(netid)
            i += 1
679882
def subnet_get(auth=None, **kwargs):
    '''
    

    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.get_subnet(**kwargs)
1042105
def get_all_cache_subnet_groups(name=None, region=None, key=None,
                                keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        marker = ''
        groups = []
        while marker is not None:
            ret = conn.describe_cache_subnet_groups(cache_subnet_group_name=name,
                                                    marker=marker)
            trimmed = ret.get('DescribeCacheSubnetGroupsResponse',
                              {}).get('DescribeCacheSubnetGroupsResult', {})
            groups += trimmed.get('CacheSubnetGroups', [])
            marker = trimmed.get('Marker', None)
        if not groups:
            log.debug('No ElastiCache subnet groups found.')
        return groups
    except boto.exception.BotoServerError as e:
        log.error(e)
        return []
313682
def in_subnet(cidr, addr=None):
    '''
    
    '''
    try:
        cidr = ipaddress.ip_network(cidr)
    except ValueError:
        log.error('Invalid CIDR \'%s\'', cidr)
        return False

    if addr is None:
        addr = ip_addrs()
        addr.extend(ip_addrs6())
    elif not isinstance(addr, (list, tuple)):
        addr = (addr,)

    return any(ipaddress.ip_address(item) in cidr for item in addr)
87656
def networks(self):
        
        import ns1.rest.ipam
        return ns1.rest.ipam.Networks(self.config)
1214793
def subrouters(self):
        
        yield from filter(lambda mw: isinstance(mw.func, Router), self.mw_list)
213095
@NonNull
    public final List<Router> getChildRouters() {
        List<Router> routers = new ArrayList<>(childRouters.size());
        routers.addAll(childRouters);
        return routers;
    }
1063676
async def AddSubnets(self, subnets):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Subnets',
                   request='AddSubnets',
                   version=2,
                   params=_params)
        _params['subnets'] = subnets
        reply = await self.rpc(msg)
        return reply
1275931
def nth_subnet(prefix_len,index)
			count = self.subnet_count(prefix_len)
			if (count == 0 || index >= count)
				return nil
			end
			sub0 = IPv4Net.new(self.network, Mask32.new(prefix_len))
			return sub0.nth_next_sib(index)
		end
564741
public void setSubnets(java.util.Collection<Subnet> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }

        this.subnets = new com.amazonaws.internal.SdkInternalList<Subnet>(subnets);
    }