75d50ef2b6c042d915c4bd566c5de1b25ab5b276
[cascardo/ovs.git] / tests / idltest.ovsidl
1 //
2 // This is an ovsdb-idl schema.  The OVSDB IDL compiler, ovsdb-idlc,
3 // can translate it into an OVSDB schema (which simply entails
4 // deleting some members from the schema) or C headers or source for
5 // use with the IDL at runtime.
6 //
7
8 {"name": "idltest",
9  "idlPrefix": "idltest_",
10  "idlHeader": "\"tests/idltest.h\"",
11  "tables": {
12    "simple": {
13      "columns": {
14        "i": {"type": "integer"},
15        "r": {"type": "real"},
16        "b": {"type": "boolean"},
17        "s": {"type": "string"},
18        "u": {"type": "uuid"},
19        "ia": {"type": {"key": "integer", "min": 0, "max": "unlimited"}},
20        "ra": {"type": {"key": "real", "min": 0, "max": "unlimited"}},
21        "ba": {"type": {"key": "boolean", "min": 0, "max": "unlimited"}},
22        "sa": {"type": {"key": "string", "min": 0, "max": "unlimited"}},
23        "ua": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}},
24    "link1": {
25      "columns": {
26        "i": {"type": "integer"},
27        "k": {"type": {"key": "uuid", "keyRefTable": "link1"}},
28        "ka": {"type": {"key": "uuid", "keyRefTable": "link1",
29                        "min": 0, "max": "unlimited"}},
30        "l2": {"type": {"key": "uuid", "keyRefTable": "link2",
31                        "min": 0, "max": 1}}}},
32    "link2": {
33      "columns": {
34        "i": {"type": "integer"},
35        "l1": {"type": {"key": "uuid", "keyRefTable": "link1",
36                        "min": 0, "max": 1}}}}}}