summaryrefslogtreecommitdiff
path: root/interface-definitions/service_event-handler.xml.in
blob: 2cee4f59541c37d0bfaa32c9b6fa2f1652dbd407 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<interfaceDefinition>
  <node name="service">
    <children>
      <node name="event-handler" owner="${vyos_conf_scripts_dir}/service_event-handler.py">
        <properties>
          <help>Service event handler</help>
        </properties>
        <children>
          <tagNode name="event">
            <properties>
              <help>Event handler name</help>
            </properties>
            <children>
              <node name="filter">
                <properties>
                  <help>Logs filter settings</help>
                </properties>
                <children>
                  <leafNode name="pattern">
                    <properties>
                      <help>Match pattern (regex)</help>
                    </properties>
                  </leafNode>
                  <leafNode name="syslog-identifier">
                    <properties>
                      <help>Identifier of a process in syslog (string)</help>
                    </properties>
                  </leafNode>
                </children>
              </node>
              <node name="script">
                <properties>
                  <help>Event handler script file</help>
                </properties>
                <children>
                  <leafNode name="arguments">
                    <properties>
                      <help>Script arguments</help>
                    </properties>
                  </leafNode>
                  <tagNode name="environment">
                    <properties>
                      <help>Script environment arguments</help>
                    </properties>
                    <children>
                      <leafNode name="value">
                        <properties>
                          <help>Environment value</help>
                        </properties>
                      </leafNode>
                    </children>
                  </tagNode>
                  <leafNode name="path">
                    <properties>
                      <help>Path to the script</help>
                      <constraint>
                        <validator name="script"/>
                      </constraint>
                    </properties>
                  </leafNode>
                </children>
              </node>
            </children>
          </tagNode>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>