Limits configuration¶
The limits files are normally available to rules as a list of LimitsConf
objects. This combiner turns those into one set of data, and provides a
find_all()
method to search the rules from all the files.
-
class
insights.combiners.limits_conf.
AllLimitsConf
(limits)[source]¶ Bases:
object
Combiner for accessing all the limits configuration files.
-
domains
¶ the set of domains found in all data files.
Type: set
-
limits
¶ a list of the original LimitsConf parser results.
Type: list
-
rules
¶ the entire list of rules.
Type: list
-
find_all
(**kwargs)[source]¶ Find all the rules that match the given parameters. We cheat a bit here and combine the results from the find_all() method from the original parsers. Otherwise we’d have to reimplement the _matches method from the LimitsConf class.
Examples
>>> data = limits >>> results = data.find_all(domain='nproc') >>> len(results) 1 >>> results[0]['domain'] 'nproc'
Parameters: **kwargs (dict) -- key-value pairs for the search data. Returns: - a list of the rules matching the given keywords, as
- determined by the
_matches()
method in theLimitsConf
class.
Return type: (list)
-