blob: 1c7a8cee614103bdeef88488bab9a9cff58a17d1 [file] [log] [blame]
janani bb8604ed2017-08-17 17:38:31 +05301module openconfig-if-ip {
2
3 yang-version "1";
4
5 namespace "http://openconfig.net/yang/interfaces/ip";
6
7 prefix "oc-ip";
8
9 import openconfig-interfaces {
10 prefix oc-if;
11 }
12
13 grouping ip-vrrp-top {
14 container vrrp {
15 list vrrp-group {
16 key "virtual-router-id";
17 leaf virtual-router-id {
18 type string;
19 }
20 }
21 }
22 }
23
24 grouping ipv4-top {
25 container ipv4 {
26 container addresses {
27 list address {
28 key "ip";
29 leaf ip {
30 type string;
31 }
32 }
33 }
34 }
35 }
36
37 grouping ipv6-top {
38 container ipv6 {
39 container addresses {
40 list address {
41 key "ip";
42 leaf ip {
43 type string;
44 }
45 }
46 }
47 }
48 }
49
50 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
51 "oc-if:subinterface" {
52 uses ipv4-top;
53 }
54
55 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
56 "oc-if:subinterface" {
57 uses ipv6-top;
58 }
59
60 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
61 "oc-if:subinterface/oc-ip:ipv4/oc-ip:addresses/oc-ip:address" {
62 uses ip-vrrp-top;
63 }
64
65 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
66 "oc-if:subinterface/oc-ip:ipv6/oc-ip:addresses/oc-ip:address" {
67 uses ip-vrrp-top;
68 }
69}