Package rtslib :: Module config_filters
[hide private]
[frames] | no frames]

Module config_filters


This file is part of LIO(tm).

Copyright (c) 2012-2014 by Datera, Inc.
More information on www.datera.io.

Original author: Jerome Martin <jxm@netiant.com>

Datera and LIO are trademarks of Datera, Inc., which may be registered in some
jurisdictions.

Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.

Functions [hide private]
 
get_composed_filter(*filters)
Returns a node filter that is the composition of all filter functions passed as arguments.
 
get_filter_on_type(allowed_types)
Returns a node filter that only let nodes whose type is in the allowed_types list to pass through.
 
get_reverse_filter(node_filter)
Returns a new filter that lets throught all nodes normally filtered out by node_filter, and filters out the one normally passed.
 
filter_no_default(node_in)
A filter that lets all nodes through, except attributes with a default value and attribute groups containing only such attributes.
 
filter_only_default(node_in)
A filter that lets all nodes through, except attributes with a default value and attribute groups containing only such attributes.
 
filter_no_missing(node_in)
A filter that lets all nodes through, except required attributes missing a value.
 
filter_only_missing(node_in)
A filter that only let through obj and groups containing attributes with missing values, as well as those attributes.
 
filter_only_required(node_in)
A filter that only lets through required attribute nodes, aka those attributes without a default value in LIO configuration policy.
Variables [hide private]
  __package__ = 'rtslib'
Function Details [hide private]

get_composed_filter(*filters)

 

Returns a node filter that is the composition of all filter functions passed as arguments. Filters will be applied in the order they appear.

get_reverse_filter(node_filter)

 

Returns a new filter that lets throught all nodes normally filtered out by node_filter, and filters out the one normally passed.

This should be useful only with filters that pass nodes through without modifying them.