Validators¶
Actions¶
Validate root actions
and individual action
Schemas
- curator.validators.actions.root()¶
Return a valid
Schema
definition which is a dictionary withactions
Required
to be the root key with another dictionary as the value.
- curator.validators.actions.structure(data, location)¶
Return a valid
Schema
definition which testsdata
, which is ostensibly an individual action dictionary. If it is avalid_action()
, then it willupdate()
the baseSchema
with other options, based on the what the value ofdata['action']
is.
- curator.validators.actions.valid_action()¶
Return a valid
Schema
definition which is that the value of keyaction
isRequired
to beIn
the value returned byall_actions()
.
Options¶
Set up voluptuous Schema defaults for various actions
- curator.validators.options.action_specific(action)¶
- curator.validators.options.get_schema(action)¶
Return a
Schema
of acceptable options and their default values as returned byaction_specific()
, passing along the value ofaction
.
Filter Functions¶
Functions validating the filter
Schema of an action
- curator.validators.filter_functions.filterstructure()¶
Return a
Schema
object that uses the return value fromstructural_filter_elements()
to populate acceptable values and updates/merges the Schema object with the return value fromfiltertype()
- Returns:
A
Schema
object
- curator.validators.filter_functions.filtertype()¶
Return a
Schema
object that usesall_filtertypes()
to populate acceptable values- Returns:
A
Schema
object
- curator.validators.filter_functions.singlefilter(action, data)¶
Return a
Schema
object that is created using the return value fromfiltertype()
to create a local variableftype
. The values fromaction
anddata
are used to updateftype
based on matching function names infiltertypes
.structural_filter_elements()
to populate acceptable values and updates/merges the Schema object with the return value fromfiltertype()
- curator.validators.filter_functions.validfilters(action, location=None)¶
Validate the filters in a list