summaryrefslogtreecommitdiffstats
path: root/Common/bkr/common/schema/beaker-job.rng
blob: 877fc00fe94b0a7ad9ffc87d7e3b9f73e9976aaa (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<?xml version="1.0" encoding="UTF-8"?>
<!-- vim: set sw=2: -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
         xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
  <start>
    <ref name="job"/>
  </start>
  <define name="job">
    <element name="job">
      <interleave>
        <optional>
          <attribute name="retention_tag"/>
        </optional>
        <optional>
          <attribute name="product"/>
        </optional>
        <optional>
          <ref name="notify"/>
        </optional>
        <optional>
          <element name="whiteboard">
            <a:documentation xml:lang="en">
              A textual description of this job, for human consumption only.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <oneOrMore>
          <element name="recipeSet">
            <a:documentation xml:lang="en">
              A recipeset defines one or more recipes which are to be run in 
              parallel. Define multiple recipes within a recipeset for 
              multihost testing. Otherwise, define only one recipe within the 
              recipeset.
            </a:documentation>
            <optional>
              <attribute name="priority"/>
            </optional>
            <oneOrMore>
              <ref name="recipe"/>
            </oneOrMore>
          </element>
        </oneOrMore>
      </interleave>
    </element>
  </define>
  <define name="notify">
    <element name="notify">
      <a:documentation xml:lang="en">
        This element is a container for configurating notifications that this 
        job has finished running.
      </a:documentation>
      <zeroOrMore>
        <element name="cc">
          <a:documentation xml:lang="en">
            An e-mail address which will be cc'ed on the job completion e-mail.
          </a:documentation>
          <text/>
        </element>
      </zeroOrMore>
    </element>
  </define>
  <define name="recipe">
    <element name="recipe">
      <a:documentation xml:lang="en">
        A recipe is a sequence of tasks which are run on a single system,
        in parallel with any other recipes in the same recipeset.
        The system is always provisioned with an operating system at the start 
        of each recipe. Options for provisioning are contained within this 
        element.
      </a:documentation>
      <interleave>
        <zeroOrMore>
          <element name="guestrecipe">
            <interleave>
              <attribute name="guestname" />
              <attribute name="guestargs" />
              <ref name="recipe_contents" />
            </interleave>
          </element>
        </zeroOrMore>
        <ref name="recipe_contents" />
      </interleave>
    </element>
  </define>
  <define name="recipe_contents">
    <!-- stuff which is common to both <recipe/> and <guestrecipe/> -->
    <interleave>
      <optional>
        <attribute name="kernel_options"/>
      </optional>
      <optional>
        <attribute name="kernel_options_post"/>
      </optional>
      <optional>
        <attribute name="ks_meta"/>
      </optional>
      <optional>
        <attribute name="role"/>
      </optional>
      <optional>
        <attribute name="whiteboard">
          <a:documentation xml:lang="en">
            A textual description of this recipe, for human consumption only.
          </a:documentation>
          <text/>
        </attribute>
      </optional>
      <optional>
        <ref name="autopick"/>
      </optional>
      <optional>
        <element name="kickstart"><text/></element>
      </optional>
      <optional>
        <ref name="watchdog"/>
      </optional>
      <optional>
        <ref name="packages"/>
      </optional>
      <optional>
        <ref name="ks_appends"/>
      </optional>
      <optional>
        <ref name="repos"/>
      </optional>
      <element name="distroRequires">
        <a:documentation xml:lang="en">
          This element is a container for expressing contraints on the 
          operating system distribution which will be selected and 
          provisioned at the start of this recipe.
        </a:documentation>
        <zeroOrMore><ref name="distroreq"/></zeroOrMore>
      </element>
      <element name="hostRequires">
        <a:documentation xml:lang="en">
          This element is a container for expressing contraints on the 
          system which will be selected to run this recipe.
        </a:documentation>
        <zeroOrMore><ref name="hostreq"/></zeroOrMore>
      </element>
      <optional>
        <ref name="partitions"/>
      </optional>
      <oneOrMore>
        <ref name="task"/>
      </oneOrMore>
    </interleave>
  </define>
  <define name="autopick">
    <element name="autopick">
      <optional>
        <attribute name="random">
          <choice>
            <data type="boolean"/>
            <value>TRUE</value>
            <value>FALSE</value>
          </choice>
        </attribute>
      </optional>
    </element>
  </define>
  <define name="watchdog">
    <element name="watchdog">
      <optional>
        <attribute name="panic">
          <choice>
            <value>ignore</value>
            <value>None</value>
          </choice>
        </attribute>
      </optional>
    </element>
  </define>
  <define name="ks_appends">
    <element name="ks_appends">
     <zeroOrMore>
       <element name="ks_append"><text/></element>
     </zeroOrMore>
    </element>
  </define> 
  <define name="packages">
    <element name="packages">
      <zeroOrMore>
        <element name="package">
          <attribute name="name"/>
        </element>
      </zeroOrMore>
    </element>
  </define>
  <define name="repos">
    <element name="repos">
      <zeroOrMore>
        <element name="repo">
          <attribute name="name"/>
          <attribute name="url"/>
        </element>
      </zeroOrMore>
    </element>
  </define>
  <define name="partitions">
    <element name="partitions">
      <zeroOrMore>
        <element name="partition">
          <optional>
            <attribute name="fs">
              <a:documentation xml:lang="en">
                Type of filesystem to be created on this partition. Defaults to 
                'ext3' if not specified.
              </a:documentation>
              <text/>
            </attribute>
          </optional>
          <attribute name="name"/>
          <optional>
            <attribute name="type"/>
          </optional>
          <attribute name="size">
            <data type="integer"/>
          </attribute>
        </element>
      </zeroOrMore>
    </element>
  </define>
  <define name="task">
    <element name="task">
      <attribute name="name"/>
      <optional>
        <attribute name="role"/>
      </optional>
      <optional>
        <element name="params">
          <zeroOrMore>
            <element name="param">
              <attribute name="name"/>
              <attribute name="value"/>
            </element>
          </zeroOrMore>
        </element>
      </optional>
    </element>
  </define>
  <define name="distroreq">
    <choice>
      <element name="and">
        <zeroOrMore><ref name="distroreq"/></zeroOrMore>
      </element>
      <element name="or">
        <zeroOrMore><ref name="distroreq"/></zeroOrMore>
      </element>
      <element name="distro"><ref name="req"/></element>
      <element name="distro_family"><ref name="req"/></element>
      <element name="distro_name"><ref name="req"/></element>
      <element name="distro_tag"><ref name="req"/></element>
      <element name="distro_variant"><ref name="req"/></element>
      <element name="distro_arch"><ref name="req"/></element>
      <element name="distro_virt"><ref name="req"/></element>
      <element name="distro_method"><ref name="req"/></element>
      <element name="distrolabcontroller"><ref name="req"/></element>
    </choice>
  </define>
  <define name="hostreq">
    <choice>
      <element name="and">
        <zeroOrMore><ref name="hostreq"/></zeroOrMore>
      </element>
      <element name="or">
        <zeroOrMore><ref name="hostreq"/></zeroOrMore>
      </element>
      <element name="host"><ref name="req"/></element>
      <element name="hostlabcontroller"><ref name="req"/></element>
      <element name="system_type"><ref name="req"/></element>
      <element name="system"><ref name="req"/></element>
      <element name="memory"><ref name="req"/></element>
      <element name="cpu_count"><ref name="req"/></element>
      <element name="numa_node_count"><ref name="req"/></element>
      <element name="hostname"><ref name="req"/></element>
      <element name="arch"><ref name="req"/></element>
      <element name="auto_prov"><ref name="req"/></element>
      <element name="group">
        <ref name="equality_op"/>
        <attribute name="value"/>
      </element>
      <element name="key_value">
        <attribute name="key"/>
        <ref name="op"/>
        <attribute name="value"/>
      </element>
    </choice>
  </define>
  <define name="req">
    <optional>
      <ref name="op"/>
    </optional>
    <attribute name="value"/>
  </define>
  <define name="op">
    <attribute name="op">
      <choice>
        <value>!=</value>
        <value>==</value>
        <value>=</value>
        <value>&lt;=</value>
        <value>&lt;</value>
        <value>&gt;=</value>
        <value>&gt;</value>
      </choice>
    </attribute>
  </define>
  <define name="equality_op">
   <attribute name="op">
    <choice>
        <value>!=</value>
        <value>==</value>
        <value>=</value>
    </choice>
   </attribute>
  </define>
</grammar>