The nova.filters Module

Filter support

class BaseFilter

Bases: object

Base class for all filter classes.

filter_all(filter_obj_list, spec_obj)

Yield objects that pass the filter.

Can be overridden in a subclass, if you need to base filtering decisions on all objects. Otherwise, one can just override _filter_one() to filter a single object.


Return True if the filter needs to be run for the “index-th” instance in a request. Only need to override this if a filter needs anything other than “first only” or “all” behaviour.

run_filter_once_per_request = False
class BaseFilterHandler(loadable_cls_type)

Bases: nova.loadables.BaseLoader

Base class to handle loading filter classes.

This class should be subclassed where one needs to use filters.

get_filtered_objects(filters, objs, spec_obj, index=0)

Previous topic

The nova.exception Module

Next topic

The nova.hacking.checks Module

Project Source

This Page