Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 1 | module test { |
2 | namespace "test:test"; | ||||
3 | prefix test ; | ||||
4 | |||||
5 | |||||
6 | import test1{ | ||||
7 | prefix test1; | ||||
8 | } | ||||
9 | |||||
10 | import test2{ | ||||
11 | prefix test2; | ||||
12 | } | ||||
13 | |||||
14 | include acme-types; | ||||
15 | |||||
16 | organization ""; | ||||
17 | contact ""; | ||||
18 | |||||
19 | description | ||||
20 | "Defines basic service types for L3VPN service."; | ||||
21 | |||||
22 | revision "2015-12-16" { | ||||
23 | reference ""; | ||||
24 | } | ||||
25 | |||||
26 | container cont1 { | ||||
27 | container cont2 { | ||||
28 | leaf leaf { | ||||
29 | type int32; | ||||
30 | } | ||||
31 | } | ||||
32 | } | ||||
33 | |||||
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 34 | choice choice1 { |
35 | case case1 { | ||||
36 | leaf case-leaf { | ||||
37 | type int32; | ||||
38 | } | ||||
39 | container case-container3 { | ||||
40 | leaf leafs { | ||||
41 | type int64; | ||||
42 | } | ||||
43 | } | ||||
44 | } | ||||
45 | } | ||||
Bharat saraswal | c2fd322 | 2016-10-19 16:10:27 +0530 | [diff] [blame] | 46 | |
47 | leaf leaf-a { | ||||
48 | type int32; | ||||
49 | } | ||||
50 | |||||
51 | leaf-list leaf-list-a { | ||||
52 | type int32; | ||||
53 | } | ||||
54 | |||||
55 | list list-a { | ||||
56 | key "name"; | ||||
57 | leaf name { | ||||
58 | type string; | ||||
59 | } | ||||
60 | } | ||||
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 61 | |
62 | augment /cont3 { | ||||
63 | leaf leaf1 { | ||||
64 | type int32; | ||||
65 | } | ||||
66 | } | ||||
67 | |||||
68 | augment /cont1/cont2 { | ||||
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 69 | leaf-list leaf2 { |
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 70 | type int32; |
71 | } | ||||
72 | } | ||||
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 73 | augment /choice1 { |
Bharat saraswal | a5c2851 | 2016-11-10 21:09:23 +0530 | [diff] [blame^] | 74 | case case2 { |
75 | container con1 { | ||||
76 | leaf in1 { | ||||
77 | type int32; | ||||
78 | } | ||||
79 | } | ||||
80 | } | ||||
81 | case case3 { | ||||
82 | container con2 { | ||||
83 | leaf in2 { | ||||
84 | type int32; | ||||
85 | } | ||||
86 | } | ||||
87 | } | ||||
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 88 | leaf-list leaf2 { |
89 | type int32; | ||||
90 | } | ||||
91 | leaf leaf1 { | ||||
92 | type int32; | ||||
93 | } | ||||
94 | container case-container { | ||||
95 | leaf leafs { | ||||
96 | type int64; | ||||
97 | } | ||||
98 | } | ||||
99 | container case-container2 { | ||||
100 | leaf leafs { | ||||
101 | type int64; | ||||
102 | } | ||||
103 | } | ||||
104 | } | ||||
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 105 | |
106 | augment /test1:cont1/test1:cont2 { | ||||
107 | leaf a { | ||||
108 | type int32; | ||||
109 | } | ||||
110 | } | ||||
111 | |||||
112 | augment /test1:cont1/test1:cont2/test1:cont1s/test1:cont1s { | ||||
113 | leaf a { | ||||
114 | type int32; | ||||
115 | } | ||||
116 | } | ||||
117 | |||||
118 | augment /test1:cont1/test1:cont2/test1:cont1s/test1:cont1s/test2:aa { | ||||
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 119 | leaf name { |
120 | type string; | ||||
121 | } | ||||
122 | leaf surname { | ||||
123 | type string; | ||||
124 | } | ||||
125 | leaf-list aleaflist { | ||||
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 126 | type int32; |
127 | } | ||||
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 128 | container cont1 { |
129 | } | ||||
130 | list alist { | ||||
131 | key "name"; | ||||
132 | leaf name { | ||||
133 | type string; | ||||
134 | } | ||||
135 | leaf-list surname { | ||||
136 | type string; | ||||
137 | } | ||||
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 138 | } |
139 | } | ||||
140 | |||||
Bharat saraswal | 9fab16b | 2016-09-23 23:27:24 +0530 | [diff] [blame] | 141 | augment /test1:rpc-input/test1:input { |
142 | leaf leaf2 { | ||||
143 | type int32; | ||||
144 | } | ||||
145 | } | ||||
146 | |||||
147 | augment /test1:rpc-output/test1:output { | ||||
148 | leaf leaf2 { | ||||
149 | type int32; | ||||
150 | } | ||||
151 | } | ||||
152 | |||||
153 | augment /test1:rpc-input-output/test1:output { | ||||
154 | leaf leaf2 { | ||||
155 | type int32; | ||||
156 | } | ||||
157 | } | ||||
158 | |||||
159 | augment /test1:rpc-input-output/test1:input { | ||||
160 | leaf leaf2 { | ||||
161 | type int32; | ||||
162 | } | ||||
163 | } | ||||
164 | |||||
165 | |||||
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 166 | } |
167 |