blob: 3a19205fade97ca7b864861952c3b33c378d26e5 [file] [log] [blame]
Bharat saraswal49120772017-03-10 17:06:10 +05301module model-data-to-resource-data {
2 yang-version 1;
3 namespace "yrt:model:converter:model:data:to:resource:data";
4 prefix "sch";
5 revision "2016-08-26";
6
7 leaf leaf1 {
8 type int32;
9 }
10
11 leaf-list leaf-list1 {
12 type string;
13 }
14
15 typedef uri {
16 type string;
17 }
18
19 grouping group1 {
20 container group-container {
21 leaf group-leaf {
22 type uri;
23 }
24 }
25 }
26 container first-level {
27 container only-container {
28 }
29 container container-leaf {
30 leaf leaf2 {
31 type string;
32 }
33 }
34 container container-leaf-list {
35 leaf-list leaf-list2 {
36 type enumeration {
37 enum ten { value "10";}
38 enum hundred { value "100";}
39 enum thousand { value "1000"; }
40 }
41 }
42 }
43 container container-list {
44 list list-leaf {
45 key "name";
46 leaf name {
47 type string;
48 }
49 }
50 }
51 container container-choice {
52 choice choice-case {
53 case leaf-case {
54 leaf leaf3 {
55 type uint32;
56 }
57 }
58 case container-case {
59 container case-container {
60 leaf leaf4 {
61 type uri;
62 }
63 }
64 }
65 case list-case {
66 list case-list {
67 config false;
68 leaf leaf5 {
69 type uri;
70 }
71 }
72 }
73 }
74 }
75 container container-grouping {
76 uses group1;
77 }
78 list list-in-list {
79 key "list-key";
80 leaf list-key {
81 type uri;
82 }
83 list list2 {
84 key "key2";
85 leaf key2 {
86 type int32;
87 }
88 }
89 }
90 }
91
92 augment /first-level {
93 leaf leaf-aug {
94 type int32;
95 }
96 }
97
98 augment /first-level/container-leaf {
99 leaf leaf-aug {
100 type empty;
101 }
102 }
103
104 augment /first-level/container-list/list-leaf {
105 leaf leaf-aug {
106 type union-typedef;
107 }
108 }
109
110 augment /first-level/container-choice/choice-case {
111 leaf leaf-aug {
112 type bits-typedef;
113 }
114 }
115
116 augment /first-level/container-choice/choice-case/leaf-case {
117 leaf leaf-aug {
118 type binary-typedef;
119 }
120 }
121 typedef binary-typedef {
122 type binary;
123 }
124
125 typedef bits-typedef {
126 type bits {
127 bit index {
128 position 1;
129 }
130 bit name {
131 position 10;
132 }
133 bit signature {
134 position 100;
135 }
136 }
137 }
138
139 typedef union-typedef {
140 type union {
141 type int32;
142 type string;
143 }
144 }
145
146}