File: AvisoAttr.rst

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (88 lines) | stat: -rw-r--r-- 2,843 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
ecflow.AvisoAttr
////////////////


.. py:class:: AvisoAttr
   :module: ecflow

   Bases: :py:class:`~Boost.Python.instance`

An :term:`aviso` attribute, assigned to a :term:`node`, represents an external trigger holding the node queued untilan Aviso notification matching the attribute configuration is detected.

Although :term:`aviso` attributes can be set at any level (Suite, Family, Task), it only makes sense to assign aviso attributes to tasks, and only one aviso attribute per node is allowed.


Constructors::

   AvisoAttr(name, listener) (1)
   AvisoAttr(name, listener, url)
   AvisoAttr(name, listener, url, schema)
   AvisoAttr(name, listener, url, schema, polling)
   AvisoAttr(name, listener, url, schema, polling, auth)
    with:
      string name: The Aviso attribute name
      string listener: The Aviso listener configuration (in JSON format)
      string url: The URL used to contact the Aviso server
      string schema: The path to the Aviso schema
      string polling: The polling interval used to contact the Aviso server
      string auth: The path to the Aviso Authentication credentials

Note: Default values, based on %ECF_AVISO_...% variables, will be used for the calls where
the parameters url, schema, polling, and auth are not provided

We suggest to specify :code:`%ECF_AVISO_***%` variables once (at suite level), and then create the
Aviso attributes passing just the name and the listener definition as per call `(1)`.

.. note::   The `listener` parameter is expected to be a valid single line JSON string, enclosed in single quotes.
   As a convenience, missing surrounding single quotes are detected and will automatically be added.

Details regarding the format of `listener` are in the section describing the :term:`aviso` attribute.


Usage:

.. code-block:: python

   t1 = Task('t1', AvisoAttr('name', "'{...}'"))

   t2 = Task('t2')
   t2.add_aviso('name', "'{...}'", 'http://aviso.com', '60', '/path/to/auth')

The parameters `url`, `schema`, `polling`, and `auth` are optional


.. py:method:: AvisoAttr.auth( (AvisoAttr)arg1) -> str :
   :module: ecflow

Returns the path to Authentication credentials used to contact the Aviso server


.. py:method:: AvisoAttr.listener( (AvisoAttr)arg1) -> str :
   :module: ecflow

Returns the Aviso listener configuration


.. py:method:: AvisoAttr.name( (AvisoAttr)arg1) -> str :
   :module: ecflow

Returns the name of the Aviso attribute


.. py:method:: AvisoAttr.polling( (AvisoAttr)arg1) -> str :
   :module: ecflow

Returns polling interval used to contact the Aviso server


.. py:method:: AvisoAttr.schema( (AvisoAttr)arg1) -> str :
   :module: ecflow

Returns the path to the schema used to contact the Aviso server


.. py:method:: AvisoAttr.url( (AvisoAttr)arg1) -> str :
   :module: ecflow

Returns the URL used to contact the Aviso server