janani b | 05614f1 | 2016-10-04 12:55:43 +0530 | [diff] [blame] | 1 | module YtbChoiceWithContainerAndLeafList { |
2 | yang-version 1; | ||||
3 | namespace "yms:test:ytb:choice:with:container:and:leaf:list"; | ||||
4 | prefix "sch"; | ||||
5 | revision "2016-08-26"; | ||||
6 | leaf refer { | ||||
7 | type binary; | ||||
8 | } | ||||
9 | rpc invalid1 { | ||||
10 | input { | ||||
11 | leaf value { | ||||
12 | type string; | ||||
13 | } | ||||
14 | } | ||||
15 | output { | ||||
16 | leaf value { | ||||
17 | type string; | ||||
18 | } | ||||
19 | } | ||||
20 | } | ||||
21 | choice content-test { | ||||
22 | leaf-list list-items { | ||||
23 | type leafref { | ||||
24 | path "/refer"; | ||||
25 | } | ||||
26 | } | ||||
27 | container choice-container { | ||||
28 | list predict { | ||||
29 | config "false"; | ||||
30 | container reproduce { | ||||
31 | leaf catch { | ||||
32 | type int16; | ||||
33 | } | ||||
34 | } | ||||
35 | } | ||||
36 | } | ||||
37 | case valid { | ||||
38 | list validlistincase { | ||||
39 | config "false"; | ||||
40 | leaf validity { | ||||
41 | type int32; | ||||
42 | } | ||||
43 | } | ||||
44 | } | ||||
45 | case invalid { | ||||
46 | leaf create-invalid { | ||||
47 | type uint16; | ||||
48 | } | ||||
49 | } | ||||
50 | } | ||||
51 | notification invalid { | ||||
52 | leaf value { | ||||
53 | type string; | ||||
54 | } | ||||
55 | } | ||||
56 | notification invalid2 { | ||||
57 | list node { | ||||
58 | config false; | ||||
59 | leaf value { | ||||
60 | type string; | ||||
61 | } | ||||
62 | } | ||||
63 | } | ||||
64 | choice current-value { | ||||
65 | case ytb-present { | ||||
66 | leaf-list represent { | ||||
67 | type uint32; | ||||
68 | } | ||||
69 | } | ||||
70 | case ytb-absent { | ||||
71 | leaf-list final { | ||||
72 | type instance-identifier; | ||||
73 | } | ||||
74 | } | ||||
75 | } | ||||
76 | } |