selinonlib.flow module

A flow representation.

class selinonlib.flow.Flow(name, **opts)[source]

Bases: selinonlib.node.Node

Flow representation.

add_eager_failure(node)[source]

Add a node to eager failure nodes listing.

Parameters:node – a node that should be marked as eager failure node
add_edge(edge)[source]

Add edge to this flow.

Parameters:edge (List[Edge]) – edge to be added
add_nowait_node(node)[source]

Add edge to this flow, do not wait for node to finish.

Parameters:node – add a node that should be marked with nowait flag
all_destination_nodes()[source]

Compute all destination nodes for this flow.

Returns:all destination nodes in flow, including failures
all_nodes_from()[source]

Compute all nodes that are stated in ‘from’ in edges section for this flow.

Returns:all source nodes in flow, excluding failures
all_nodes_to()[source]

Compute all nodes that are stated in ‘to’ in edges section for this flow.

Returns:all destination nodes in flow, excluding failures
all_source_nodes()[source]

Compute all source nodes for this flow.

Returns:all source nodes in flow, including failures
all_used_nodes()[source]

Get all used nodes in this flow, including failures.

Returns:all used nodes in flow
parse_definition(flow_def, system)[source]

Parse flow definition (fill flow attributes) from a dictionary.

Parameters:
  • flow_def – dictionary containing flow definition
  • system – system in which flow is defined
should_propagate_compound_failures(dst_node_name)[source]

Check whether this flow should info about failures (in compound/flattered mode).

Parameters:dst_node_name – destination node to which configuration should be propagated
Returns:True if should propagate_compound_failures
should_propagate_compound_finished(dst_node_name)[source]

Check whether this flow should info about finished nodes (in compound/flattered mode).

Parameters:dst_node_name – destination node to which configuration should be propagated
Returns:True if should propagate_compound_finished
should_propagate_failures(dst_node_name)[source]

Check whether this flow should propagate info about failed nodes.

Parameters:dst_node_name – destination node to which configuration should be propagated
Returns:True if should propagate_failures
should_propagate_finished(dst_node_name)[source]

Check whether this flow should propagate info about finished nodes.

Parameters:dst_node_name – destination node to which configuration should be propagated
Returns:True if should propagate_finished
should_propagate_node_args(dst_node_name)[source]

Check whether this flow should propagate flow arguments.

Parameters:dst_node_name – destination node to which configuration should be propagated
Returns:True if should propagate_node_args
should_propagate_parent(dst_node_name)[source]

Check whether this flow should propagate parent nodes.

Parameters:dst_node_name – destination node to which configuration should be propagated
Returns:True if should propagate_parent
should_propagate_parent_failures(dst_node_name)[source]

Check whether this flow should propagate parent node failures.

Parameters:dst_node_name – destination node to which configuration should be propagated
Returns:True if should propagate_parent_failures