dhcpkit.ipv6.server.filters package

Filters to apply to transaction bundles

class dhcpkit.ipv6.server.filters.Filter(filter_condition: object, sub_filters: Iterable = None, sub_handlers: Iterable = None)[source]

Bases: object

Base class for filters


A short description of this filter for log messages.

Returns:The description
get_handlers(bundle: dhcpkit.ipv6.server.transaction_bundle.TransactionBundle) → List[source]

Get all handlers that are going to be applied to the request in the bundle.

Parameters:bundle – The transaction bundle
Returns:The list of handlers to apply
match(bundle: dhcpkit.ipv6.server.transaction_bundle.TransactionBundle) → bool[source]

Check whether the given message matches our filter condition.

Parameters:bundle – The transaction bundle
Returns:Whether our filter condition matches

Separate initialisation that will be called in each worker process that is created. Things that can’t be forked (think database connections etc) have to be initialised here.

class dhcpkit.ipv6.server.filters.FilterFactory(section: ZConfig.matcher.SectionValue)[source]

Bases: dhcpkit.common.server.config_elements.ConfigElementFactory

Base class for filter factories


Create the filter and feed it with the sub-filters and sub-handlers.

Returns:The filter

Get the class of filter to create

Returns:The class of filter

Return the filter condition, the name of the section by default :return: The filter condition