Qualifiers are callable objects that can be used to ‘match’ a job definition to some set of rules.
Bases: plainbox.impl.pod.POD
A JobQualifier that has qualifies jobs matching any inclusive qualifiers while not matching all of the exclusive qualifiers
Return the data in this POD as a dictionary
Return the data in this POD as a tuple.
Order of elements in the tuple corresponds to the order of field declarations.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
alias of CompositeQualifier
qualifier_list
Bases: plainbox.impl.secure.qualifiers.SimpleQualifier
A SimpleQualifer that uses matchers to compare particular fields
Return a list of primitives that constitute this qualifier.
Returns: | A list of IJobQualifier objects that each is the smallest, indivisible entity. Here it just returns a list of one element, itself. |
---|
Check if the given job matches this qualifier.
This method should not be called directly, it is an implementation detail of SimpleQualifier class.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
Origin of this qualifier
This property can be used to trace the origin of a qualifier back to its definition point.
Bases: builtins.object
Interface for objects that perform some kind of comparison on a value
Bases: plainbox.impl.secure.qualifiers.SimpleQualifier
A JobQualifier that designates a single job with a particular id
Return a list of primitives that constitute this qualifier.
Returns: | A list of IJobQualifier objects that each is the smallest, indivisible entity. Here it just returns a list of one element, itself. |
---|
Check if the given job matches this qualifier.
This method should not be called directly, it is an implementation detail of SimpleQualifier class.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
Origin of this qualifier
This property can be used to trace the origin of a qualifier back to its definition point.
Bases: plainbox.impl.secure.qualifiers.SimpleQualifier
A JobQualifier that designates only non local jobs
Return a list of primitives that constitute this qualifier.
Returns: | A list of IJobQualifier objects that each is the smallest, indivisible entity. Here it just returns a list of one element, itself. |
---|
Check if the given job matches this qualifier.
This method should not be called directly, it is an implementation detail of SimpleQualifier class.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
Origin of this qualifier
This property can be used to trace the origin of a qualifier back to its definition point.
Bases: builtins.Exception
Exception raised when IJobQualifier.origin is meaningless as it is being requested on a non-primitive qualifier such as the CompositeQualifier
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
Bases: plainbox.impl.secure.qualifiers.IMatcher
A matcher that applies a binary operator to the value
Bases: plainbox.impl.secure.qualifiers.IMatcher
A matcher that compares values by regular expression pattern
Bases: plainbox.impl.secure.qualifiers.SimpleQualifier
A JobQualifier that designates jobs by matching their id to a regular expression
Return a list of primitives that constitute this qualifier.
Returns: | A list of IJobQualifier objects that each is the smallest, indivisible entity. Here it just returns a list of one element, itself. |
---|
Check if the given job matches this qualifier.
This method should not be called directly, it is an implementation detail of SimpleQualifier class.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
Origin of this qualifier
This property can be used to trace the origin of a qualifier back to its definition point.
Bases: plainbox.abc.IJobQualifier
Abstract base class that implements common features of simple (non composite) qualifiers. This allows two concrete subclasses below to have share some code.
Return a list of primitives that constitute this qualifier.
Returns: | A list of IJobQualifier objects that each is the smallest, indivisible entity. Here it just returns a list of one element, itself. |
---|
Get a simple yes-or-no boolean answer if the given job matches the simple aspect of this qualifier. This method should be overridden by concrete subclasses.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
Bases: plainbox.impl.secure.qualifiers.CompositeQualifier
A qualifier that understands checkbox whitelist files.
A whitelist file is a plain text, line oriented file. Each line represents a regular expression pattern that can be matched against the id of a job.
The file can contain simple shell-style comments that begin with the pound or hash key (#). Those are ignored. Comments can span both a fraction of a line as well as the whole line.
For historical reasons each pattern has an implicit ‘^’ and ‘$’ prepended and appended (respectively) to the actual pattern specified in the file.
Return the data in this POD as a dictionary
Return the data in this POD as a tuple.
Order of elements in the tuple corresponds to the order of field declarations.
Load and initialize the WhiteList object from the specified file.
Parameters: |
|
---|---|
Returns: | a fresh WhiteList object |
Load and initialize the WhiteList object from the specified string.
Parameters: |
|
---|---|
Returns: | a fresh WhiteList object |
The optional filename or a pair of name and origin arguments may be provided in order to have additional meta-data. This is typically needed when the from_file() method cannot be used as the caller already has the full text of the intended file available.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
Compute the name of a whitelist based on the name of the file it is stored in.
qualifier_list