Bharat saraswal | 4912077 | 2017-03-10 17:06:10 +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 | |||||
10 | choice content-test { | ||||
11 | leaf-list list-items { | ||||
12 | type leafref { | ||||
13 | path "/refer"; | ||||
14 | } | ||||
15 | } | ||||
16 | container choice-container { | ||||
17 | list predict { | ||||
18 | config "false"; | ||||
19 | container reproduce { | ||||
20 | leaf catch { | ||||
21 | type int16; | ||||
22 | } | ||||
23 | } | ||||
24 | } | ||||
25 | } | ||||
26 | case valid { | ||||
27 | list validlistincase { | ||||
28 | config "false"; | ||||
29 | leaf validity { | ||||
30 | type int32; | ||||
31 | } | ||||
32 | } | ||||
33 | } | ||||
34 | case invalid { | ||||
35 | leaf create-invalid { | ||||
36 | type uint16; | ||||
37 | } | ||||
38 | } | ||||
39 | } | ||||
40 | |||||
41 | choice current-value { | ||||
42 | case ytb-present { | ||||
43 | leaf-list represent { | ||||
44 | type uint32; | ||||
45 | } | ||||
46 | } | ||||
47 | case ytb-absent { | ||||
48 | leaf-list final { | ||||
49 | type instance-identifier; | ||||
50 | } | ||||
51 | } | ||||
52 | } | ||||
53 | } |