TubeLayers | PyF, flow-based python programming TubeLayers

TubeLayers

class pyf.services.model.TubeLayer(**kwargs)

Tube Layers are basically modifiers for tubes.

A tube layer is applied if the tube is called with the correct variant name.

Layers are applied using pyf.services.core.modifiers (specifically

Example of layer:

<modifiers>
    <modifier target="foo" action="modify">
        <bar>new bar value</bar>
    </modifier>
    <modifier target="foo_that_will_be_deleted" action="remove" />
    <modifier target="foo" action="enclose">
        <node name="node_that_will_contain_foo_as_a_child" type="adapter" pluginname="bar" />
    </modifier>
</modifiers>
Class attributes:
  • id : Numerical unique identifier of the layer (primary key)

  • tube_id : The id of the tube the layer is applied on

  • tube : The linked tube object

  • name : Unique identifier of the tube layer, used for simple retrieval

  • display_name : Display name of the tube layer (50 chars. max)

  • description : Description of the tube layer (250 chars. max)

  • active : Description of the tube layer (250 chars. max)

  • variant_name : The variant name (multiple layers can have the same variant name)

  • last_run_date

  • payload : The xml content for the modifiers.

  • priority :

    The priority of the layer (the lower the number, the higher the priority). Example:

    Layer “Foo” has variant name “barred” and priority 10, layer “FooBar” has variant name “barred” and priority 0... Layer “FooBar” will get applied before Foo.

active

Boolean column, flags the tube alyer as active

description

Description of the tube layer (250 chars. max)

display_name

Display name of the tube layer (50 chars. max)

get_modifier_tree()

Returns the raw ET tree for the layer

id

Numerical unique identifier of the layer (primary key)

last_run_date

Public-facing descriptor, placed in the mapped class dictionary.

name

Unique identifier of the tube layer, used for simple retrieval

payload

The xml content for the modifiers. See pyjon.descriptors for more info.

priority

The priority of the layer (the lower the number, the higher the priority).

Example :

Layer “Foo” has variant name “barred” and priority 10, layer “FooBar” has variant name “barred” and priority 0...

Layer “FooBar” will get applied before Foo.

tube

The linked tube object

tube_id

The id of the tube the layer is applied on

variant_name

The variant name (multiple layers can have the same variant name)