janani b | 3a3e326 | 2016-10-19 00:23:28 +0530 | [diff] [blame^] | 1 | module ietf-network { |
2 | yang-version 1; | ||||
3 | namespace "urn:ietf:params:xml:ns:yang:ietf-network"; | ||||
4 | prefix nd; | ||||
5 | list interface { | ||||
6 | key "name"; | ||||
7 | leaf name { | ||||
8 | type string; | ||||
9 | } | ||||
10 | leaf admin-status { | ||||
11 | type uint8; | ||||
12 | } | ||||
13 | list address { | ||||
14 | key "ip"; | ||||
15 | leaf ip { | ||||
16 | type int8; | ||||
17 | } | ||||
18 | } | ||||
19 | } | ||||
20 | container default-address { | ||||
21 | leaf ifname { | ||||
22 | type leafref { | ||||
23 | path "../../interface/name"; | ||||
24 | } | ||||
25 | } | ||||
26 | leaf address { | ||||
27 | type leafref { | ||||
28 | path "../../default-address[ifname = current()/../ifname]/" + | ||||
29 | "ifname"; | ||||
30 | } | ||||
31 | } | ||||
32 | } | ||||
33 | } |