BUG-584: added test-models to integration-test project.
[yangtools.git] / integration-test / test-models / src / main / yang / nested-groupings / grouping-definitions.yang
1 module grouping-definitions {
2     yang-version 1;
3     namespace "odl:test:grouping-definitions";
4     prefix "gd";
5
6     organization "opendaylight";
7     contact "asdf";
8
9     revision "2013-09-04" {
10     }
11
12
13     typedef int-ext {
14         type string;
15     }
16
17     typedef protocol-version {
18         type uint8 {
19             range 1..7;
20         }
21     }
22
23     grouping base-header {
24         leaf delete {
25             type uint32;
26             mandatory true;
27         }
28         leaf setup {
29             type uint32;
30             mandatory true;
31         }
32     }
33
34     grouping ieee754-32 {
35         reference "IEEE 754-2008";
36         leaf fraction {
37             type uint32 {
38                 range 0..1677215;
39             }
40             mandatory true;
41         }
42     }
43
44     grouping message-header {
45         leaf version {
46             type protocol-version;
47             default 1;
48         }
49         leaf type {
50             type int-ext;
51         }
52     }
53
54     grouping object {
55         uses object-header;
56
57         container box {
58         }
59     }
60
61     grouping object-header {
62         leaf processing-rule {
63             type boolean;
64         }
65         leaf ignore {
66             type boolean;
67         }
68     }
69
70     grouping rp-object {
71         uses object {
72             augment "box" {
73                 container order {
74                     uses base-header;
75                 }
76             }
77         }
78
79         leaf priority {
80             type uint8 {
81                 range 1..7;
82             }
83         }
84     }
85
86 }