blob: 498446edaa9cd093015a2b6542d398a727cc78b6 [file] [log] [blame]
Václav Kubernát73109382018-09-14 19:52:03 +02001module example-schema {
2 prefix aha;
3 namespace "http://example.com";
4
Václav Kubernát134d78f2019-09-03 16:42:29 +02005 leaf leafUInt8 {
6 type uint8;
7 }
8
9 leaf leafUInt16 {
10 type uint16;
11 }
12
13 leaf leafUInt32 {
14 type uint32;
15 }
16
17 leaf leafUInt64 {
18 type uint64;
19 }
20
21 leaf leafInt8 {
22 type int8;
23 }
24
25 leaf leafInt16 {
26 type int16;
27 }
28
29 leaf leafInt32 {
Václav Kubernát73109382018-09-14 19:52:03 +020030 type int32;
31 }
32
Václav Kubernát134d78f2019-09-03 16:42:29 +020033 leaf leafInt64 {
34 type int64;
35 }
36
Václav Kubernát73109382018-09-14 19:52:03 +020037 leaf leafString {
38 type string;
39 }
40
41 leaf leafEnum {
42 type enumeration {
43 enum lol;
44 enum data;
45 enum coze;
46 }
47 }
48
49 leaf leafDecimal {
50 type decimal64 {
51 fraction-digits 9;
52 }
53 }
54
55 container pContainer {
56 presence true;
57 }
58
Václav Kubernát45f4a822019-05-29 21:10:50 +020059 list person {
60 key 'name';
61 leaf name {
62 type string;
63 }
64 }
65
Václav Kubernát3efb5ca2019-10-09 20:07:40 +020066 leaf bossPerson {
67 type leafref {
68 path '../aha:person/name';
69 }
70 }
71
Václav Kubernát7d82da72019-04-11 15:16:38 +020072 grouping upAndDown {
73 leaf up {
74 type boolean;
75 }
76 leaf down {
77 type boolean;
78 }
79 }
80
81 uses upAndDown;
82
83 container lol {
84 uses upAndDown;
85 }
Václav Kubernát73109382018-09-14 19:52:03 +020086}