janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 1 | module PathListener { |
2 | namespace "test"; | ||||
3 | prefix test; | ||||
4 | list interface { | ||||
5 | key "name"; | ||||
6 | leaf name { | ||||
7 | type string; | ||||
8 | } | ||||
9 | leaf admin-status { | ||||
10 | type string; | ||||
11 | } | ||||
12 | list address { | ||||
13 | key "ip"; | ||||
14 | leaf ip { | ||||
15 | type string; | ||||
16 | } | ||||
17 | } | ||||
18 | } | ||||
19 | container default-address { | ||||
20 | leaf ifname { | ||||
21 | type leafref { | ||||
22 | path "../../test:interface/test:name"; | ||||
23 | } | ||||
24 | } | ||||
25 | leaf status { | ||||
26 | type leafref { | ||||
27 | path "/test:interface[name = current()/../ifname]/test:admin-status"; | ||||
28 | } | ||||
29 | } | ||||
30 | } | ||||
31 | } |