Fetches a list of all subnetpools for a project.
973846
def list_subnetpools(self, retrieve_all=True, **_params):
        """"""
        return self.list('subnetpools', self.subnetpools_path, retrieve_all,
                         **_params)
784235
def projects(self, task, params={}, **options): 
        
        path = "/tasks/%s/projects" % (task)
        return self.client.get_collection(path, params, **options)
586734
public List<GitlabProject> getAllProjects() {
        String tailUrl = GitlabProject.URL;
        return retrieve().getAll(tailUrl, GitlabProject[].class);
    }
1190195
def get_network_project(network_id, **kwargs):
    

    net_proj = db.DBSession.query(Project).join(Network, and_(Project.id==Network.id, Network.id==network_id)).first()

    if net_proj is None:
        raise HydraError("Network %s not found"% network_id)

    return net_proj
43634
def list_spiders(self, project):
        
        url = self._build_url(constants.LIST_SPIDERS_ENDPOINT)
        params = {'project': project}
        json = self.client.get(url, params=params, timeout=self.timeout)
        return json['spiders']
866093
public List<Project> findAllProjects() {
        List<Project> list = new ArrayList<>();
        List<String> projectNames;
        try {
            projectNames = readLines(projectsFile);
        } catch (IOException e) {
            throw new FileBasedRuntimeException(e);
        }
        for (String projectName : projectNames) {
            if (StringUtils.isNotBlank(projectName)) {
                list.add(new Project(projectName));
            }
        }
        
        return list;
    }
538966
def get_subnets_for_net(self, net):
        
        try:
            subnet_list = self.neutronclient.list_subnets(network_id=net)
            subnet_dat = subnet_list.get('subnets')
            return subnet_dat
        except Exception as exc:
            LOG.error("Failed to list subnet net %(net)s, Exc: %(exc)s",
                      {'net': net, 'exc': str(exc)})
            return None
1298935
def show_subnetpool(self, subnetpool, **_params):
        """"""
        return self.get(self.subnetpool_path % (subnetpool), params=_params)
1255341
def list_networks(self, org, part):
        
        if org and part:
            list_url = self._del_part + '/networks'
            list_url = list_url % (org, part)
            res = self._send_request('GET', list_url, '', 'networks')
            if res and res.status_code in self._resp_ok:
                return res.json()
772609
def system_find_project_members(input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/system/findProjectMembers', input_params, always_retry=always_retry, **kwargs)
1303433
def floating_ip_pool_list(self):
        '''
        
        '''
        nt_ks = self.compute_conn
        pools = nt_ks.floating_ip_pools.list()
        response = {}
        for pool in pools:
            response[pool.name] = {
                'name': pool.name,
            }
        return response
579888
def list_sets(self, project, **filters):
        """"""
        url = URL.articlesets.format(**locals())
        return self.get_pages(url, **filters)
1358345
def list_networks(self, retrieve_all=True, **_params):
        """"""
        # Pass filters in "params" argument to do_request
        return self.list('networks', self.networks_path, retrieve_all,
                         **_params)
17456
def list_subnets(call=None, kwargs=None):
    '''
    
    '''
    if kwargs is None:
        kwargs = {}

    if call == 'action':
        raise SaltCloudSystemExit(
            'The avail_sizes function must be called with '
            '-f or --function'
        )

    netconn = get_conn(client_type='network')

    resource_group = kwargs.get('resource_group') or config.get_cloud_config_value(
                         'resource_group',
                         get_configured_provider(), __opts__, search_global=False
                     )

    if not resource_group and 'group' in kwargs and 'resource_group' not in kwargs:
        resource_group = kwargs['group']

    if not resource_group:
        raise SaltCloudSystemExit(
            'A resource group must be specified'
        )

    if kwargs.get('network') is None:
        kwargs['network'] = config.get_cloud_config_value(
            'network', get_configured_provider(), __opts__, search_global=False
        )

    if 'network' not in kwargs or kwargs['network'] is None:
        raise SaltCloudSystemExit(
            'A "network" must be specified'
        )

    ret = {}
    subnets = netconn.subnets.list(resource_group, kwargs['network'])
    for subnet in subnets:
        ret[subnet.name] = subnet.as_dict()
        ret[subnet.name]['ip_configurations'] = {}
        for ip_ in subnet.ip_configurations:
            comps = ip_.id.split('/')
            name = comps[-1]
            ret[subnet.name]['ip_configurations'][name] = ip_.as_dict()
            ret[subnet.name]['ip_configurations'][name]['subnet'] = subnet.name
        ret[subnet.name]['resource_group'] = resource_group
    return ret
1102171
def get_project(project_id, include_deleted_networks=False, **kwargs):
    
    user_id = kwargs.get('user_id')
    proj_i = _get_project(project_id)

    #lazy load owners
    proj_i.owners

    proj_i.check_read_permission(user_id)

    proj_j = JSONObject(proj_i)

    proj_j.networks = []
    for net_i in proj_i.networks:
        #lazy load owners
        net_i.owners
        net_i.scenarios

        if include_deleted_networks==False and net_i.status.lower() == 'x':
            continue

        can_read_network = net_i.check_read_permission(user_id, do_raise=False)
        if can_read_network is False:
            continue

        net_j = JSONObject(net_i)
        proj_j.networks.append(net_j)

    return proj_j
1079511
def list_projects(self, ignore_default_project_node=True):
        

        return [project_node.path for project_node in self.list_project_nodes(ignore_default_project_node) if
                project_node.path]
296913
def project_list(self, limit=None):
        
        params = {}
        if limit:
            params['limit'] = limit
        return (self.get('rest/api/1.0/projects', params=params) or {}).get('values')