get the list of resource list to collect based on clz list

        :param rsc_clz_list: the list of classes to collect
        :return: filtered list of resource list,
                 like [VNXLunList(), VNXDiskList()]
335871
def get_rsc_list_2(self, rsc_clz_list=None):
        
        rsc_list_2 = self._default_rsc_list_with_perf_stats()
        if rsc_clz_list is None:
            rsc_clz_list = ResourceList.get_rsc_clz_list(rsc_list_2)

        return [rsc_list
                for rsc_list in rsc_list_2
                if rsc_list.get_resource_class() in rsc_clz_list]
593061
def list(self):
    '''
    '''
    if not self._list:
      self._list = map(Namespace, self._string.split('/'))
    return self._list
21305
def getClsNames(item):
    '''
    

    '''
    mro = inspect.getmro(item.__class__)
    mro = [c for c in mro if c not in clsskip]
    return ['%s.%s' % (c.__module__, c.__name__) for c in mro]
573291
def sources(
            self):
        
        sourceResultsList = []
        sourceResultsList[:] = [dict(l) for l in self.sourceResultsList]
        return sourceResultsList
1220126
def list_of(cls):
    
    return lambda l: isinstance(l, list) and all(isinstance(x, cls) for x in l)
66205
public List<I> getNewInstanceList(String[] clsssList) {
        List<I> instances = new ArrayList<>();
        for (String className : clsssList) {
            I instance = new ReflectUtil<I>().getNewInstance(className);
            instances.add(instance);
        }
        return instances;
    }
1171534
def collect(self):
        
        with SCCallSiteSync(self.context) as css:
            sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
        return list(_load_from_socket(sock_info, self._jrdd_deserializer))
337216
def retrieve_list(self, parsed_args):
        """"""
        neutron_client = self.get_client()
        _extra_values = parse_args_to_dict(self.values_specs)
        _merge_args(self, parsed_args, _extra_values,
                    self.values_specs)
        search_opts = self.args2search_opts(parsed_args)
        search_opts.update(_extra_values)
        if self.pagination_support:
            page_size = parsed_args.page_size
            if page_size:
                search_opts.update({'limit': page_size})
        if self.sorting_support:
            keys = parsed_args.sort_key
            if keys:
                search_opts.update({'sort_key': keys})
            dirs = parsed_args.sort_dir
            len_diff = len(keys) - len(dirs)
            if len_diff > 0:
                dirs += ['asc'] * len_diff
            elif len_diff < 0:
                dirs = dirs[:len(keys)]
            if dirs:
                search_opts.update({'sort_dir': dirs})
        data = self.call_server(neutron_client, search_opts, parsed_args)
        collection = _get_resource_plural(self.resource, neutron_client)
        return data.get(collection, [])
184599
def _list_collections(self, sock_info, slave_okay, session,
                          read_preference, **kwargs):
        """"""

        coll = self.get_collection(
            "$cmd", read_preference=read_preference)
        if sock_info.max_wire_version > 2:
            cmd = SON([("listCollections", 1),
                       ("cursor", {})])
            cmd.update(kwargs)
            with self.__client._tmp_session(
                    session, close=False) as tmp_session:
                cursor = self._command(
                    sock_info, cmd, slave_okay,
                    read_preference=read_preference,
                    session=tmp_session)["cursor"]
                return CommandCursor(
                    coll,
                    cursor,
                    sock_info.address,
                    session=tmp_session,
                    explicit_session=session is not None)
        else:
            match = _INDEX_REGEX
            if "filter" in kwargs:
                match = {"$and": [_INDEX_REGEX, kwargs["filter"]]}
            dblen = len(self.name.encode("utf8") + b".")
            pipeline = [
                {"$project": {"name": {"$substr": ["$name", dblen, -1]},
                              "options": 1}},
                {"$match": match}
            ]
            cmd = SON([("aggregate", "system.namespaces"),
                       ("pipeline", pipeline),
                       ("cursor", kwargs.get("cursor", {}))])
            cursor = self._command(sock_info, cmd, slave_okay)["cursor"]
            return CommandCursor(coll, cursor, sock_info.address)
488530
def as_list(self):
        
        if hasattr(self, 'cust_list'):
            return self.cust_list
        if hasattr(self, 'attr_check'):
            self.attr_check()
        cls_bltns = set(dir(self.__class__))
        ret = [a for a in dir(self) if a not in cls_bltns and getattr(self, a)]
        return ret
402645
def cluster_list(verbose=False):
    '''
    
    '''
    cmd = [salt.utils.path.which('pg_lsclusters'), '--no-header']
    ret = __salt__['cmd.run_all'](' '.join([pipes.quote(c) for c in cmd]))
    if ret.get('retcode', 0) != 0:
        log.error('Error listing clusters')
    cluster_dict = _parse_pg_lscluster(ret['stdout'])
    if verbose:
        return cluster_dict
    return cluster_dict.keys()
420936
def list(cls, vrf=None):
        

        if vrf is None:
            vrf = {}

        xmlrpc = XMLRPCConnection()
        try:
            vrf_list = xmlrpc.connection.list_vrf(
                {
                    'vrf': vrf,
                    'auth': AuthOptions().options
                })
        except xmlrpclib.Fault as xml_fault:
            raise _fault_to_exception(xml_fault)

        res = list()
        for v in vrf_list:
            res.append(VRF.from_dict(v))

        return res
1164349
def sr_list(call=None):
    '''
    

    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'This function must be called with -f, --function argument.'
        )
    ret = {}
    session = _get_session()
    srs = session.xenapi.SR.get_all()
    for sr in srs:
        sr_record = session.xenapi.SR.get_record(sr)
        ret[sr_record['name_label']] = sr_record
    return ret
1072707
def get_emb_szs(self, sz_dict=None):
        ""
        return [def_emb_sz(self.classes, n, sz_dict) for n in self.cat_names]
278002
def read_resource_list(self, uri):
        """"""
        self.logger.info("Reading resource list %s" % (uri))
        try:
            resource_list = ResourceList(allow_multifile=self.allow_multifile,
                                         mapper=self.mapper)
            resource_list.read(uri=uri)
        except Exception as e:
            raise ClientError("Can't read source resource list from %s (%s)" %
                              (uri, str(e)))
        self.logger.debug("Finished reading resource list")
        return(resource_list)
181823
def get_example(cls) -> list:
        
        if cls.example is not None:
            return cls.example
        if cls.items is not None:
            if isinstance(cls.items, list):
                return [item.get_example() for item in cls.items]
            else:
                return [cls.items.get_example()]
        return [1]
33074
def luns(self):
        """"""
        lun_list, smp_list = [], []
        if self.ioclass_luns:
            lun_list = map(lambda l: VNXLun(lun_id=l.lun_id, name=l.name,
                                            cli=self._cli), self.ioclass_luns)
        if self.ioclass_snapshots:
            smp_list = map(lambda smp: VNXLun(name=smp.name, cli=self._cli),
                           self.ioclass_snapshots)
        return list(lun_list) + list(smp_list)