~milo/linaro-ci-dashboard/xml-to-dict

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
= Directory Layout =

At the moment, the directory layout for `lianro-ci-dashboard' is as follows:

dashboard/
  |
  +--- frontend/
  |    |
  |    +--- integration_loop/
  |          |
  |          + tests/
  |          + ...
  |    +--- android_build/
  |    +--- kernel_build/
  |    |
  |    + models/
  |    + templates/
  |    + tests/
  |
  +--- jenkinsserver/
  |
  + settings.py
  + urls.py
  |
  +--- lib/

(the above schema is not a complete representation of the structure)

There are two main applications: `frontend' and `jenkinsserver'.

All the loops are, in Django terms, sub-applications of `frontend', also
declared as such in the `dashboard/settings.py' file.

Base templates for the loops are stored in `frontend/templates/', base models in
`frontend/models'.

`lib/' contains libraries useful throughout all the project.

= Creating a New Loop =

A new loop model should inherit the base `Loop' model as defined in
`frontend/models/loop.py'.

For the templates, the base ones defined in `frontend/templates/' should be used
and extended.

Specific URLs definition should be included in the base `urls.py' file, under
`dashboard/'.

Tests should be written and defined inside each sub-application.

= Loop Chaining =

Loop chaining in the linaro-ci-dashboard is a mechanism to use output from one
loop as input for another loop. Loops have to be "chainable", in the sense that
output of one must be valid to be used as the input of another one.

== XML Format Definition ==

This is the XML format definition for loop-chaining, with DTD and simple
example.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE loop [
    <!ELEMENT loop (description?,fields)>
    <!ELEMENT description (#PCDATA)>
    <!ELEMENT fields (field+)>
    <!ELEMENT field (#PCDATA)>
    <!ATTLIST field name CDATA #REQUIRED>
    <!ATTLIST field type (str|int|bool) "str">
]>
<loop>
    <fields>
        <field name="" type=""></field>
        <field name="" type=""></field>
        <field name="" type=""></field>
    </fields>
</loop>