selinonlib.node module

Abstract representation of nodes in task/flow dependencies - a node is either a task or a flow.

class selinonlib.node.Node(name)[source]

Bases: object

An abstract class for node representation.

classmethod check_name(name)[source]

Check whether name is a correct node (flow/task) name.

Parameters:name – node name
Returns:True if name is a correct node name
Return type:bool
is_flow()[source]

Check if this node is a flow.

Returns:True if node represents a Flow
is_task()[source]

Check if this node is a task.

Returns:True if node represents a Task
name

Get name of the node.

Returns:a name of the node
parse_throttling(dict_)[source]

Parse throttling definition from a dictionary.

Parameters:dict – dictionary from which throttling should be parsed
Returns:timedelta describing throttling countdown or None if not throttling applied
Return type:time.timedelta