blob: 8115652bad6db77d1150c053f4f35d696661d2bd [file] [log] [blame]
Thomas Vachuska6655bee2017-08-24 16:12:59 -07001module openconfig-if-aggregate {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/interfaces/aggregate";
7
8 prefix "oc-lag";
9
10 // import some basic types
11 import openconfig-interfaces { prefix oc-if; }
12 import openconfig-if-ethernet { prefix oc-eth; }
13 import iana-if-type { prefix ift; }
14 import openconfig-extensions { prefix oc-ext; }
15
16 // meta
17 organization "OpenConfig working group";
18
19 contact
20 "OpenConfig working group
21 netopenconfig@googlegroups.com";
22
23 description
24 "Model for managing aggregated (aka bundle, LAG) interfaces.";
25
26 oc-ext:openconfig-version "2.0.0";
27
28 revision "2017-07-14" {
29 description
30 "Added Ethernet/IP state data; Add dhcp-client;
31 migrate to OpenConfig types modules; Removed or
32 renamed opstate values";
33 reference "2.0.0";
34 }
35
36 revision "2016-12-22" {
37 description
38 "Fixes to Ethernet interfaces model";
39 reference "1.1.0";
40 }
41
42 // extension statements
43
44 // feature statements
45
46 // identity statements
47
48 // typedef statements
49
50
51
52 typedef aggregation-type {
53 type enumeration {
54 enum LACP {
55 description "LAG managed by LACP";
56 }
57 enum STATIC {
58 description "Statically configured bundle / LAG";
59 }
60 }
61 description
62 "Type to define the lag-type, i.e., how the LAG is
63 defined and managed";
64 }
65
66 // grouping statements
67
68
69 grouping aggregation-logical-config {
70 description
71 "Configuration data for aggregate interfaces";
72
73
74 leaf lag-type {
75 type aggregation-type;
76 description
77 "Sets the type of LAG, i.e., how it is
78 configured / maintained";
79 }
80
81 leaf min-links {
82 type uint16;
83 description
84 "Specifies the mininum number of member
85 interfaces that must be active for the aggregate interface
86 to be available";
87 }
88 }
89
90 grouping aggregation-logical-state {
91 description
92 "Operational state data for aggregate interfaces";
93
94 leaf lag-speed {
95 type uint32;
96 units Mbps;
97 description
98 "Reports effective speed of the aggregate interface,
99 based on speed of active member interfaces";
100 }
101
102 leaf-list member {
103 when "oc-lag:lag-type = 'STATIC'" {
104 description
105 "The simple list of member interfaces is active
106 when the aggregate is statically configured";
107 }
108 type oc-if:base-interface-ref;
109 description
110 "List of current member interfaces for the aggregate,
111 expressed as references to existing interfaces";
112 }
113 }
114
115 grouping aggregation-logical-top {
116 description "Top-level data definitions for LAGs";
117
118 container aggregation {
119
120 description
121 "Options for logical interfaces representing
122 aggregates";
123
124 container config {
125 description
126 "Configuration variables for logical aggregate /
127 LAG interfaces";
128
129 uses aggregation-logical-config;
130 }
131
132 container state {
133
134 config false;
135 description
136 "Operational state variables for logical
137 aggregate / LAG interfaces";
138
139 uses aggregation-logical-config;
140 uses aggregation-logical-state;
141
142 }
143 }
144 }
145
146 grouping ethernet-if-aggregation-config {
147 description
148 "Adds configuration items for Ethernet interfaces
149 belonging to a logical aggregate / LAG";
150
151 leaf aggregate-id {
152 type leafref {
153 path "/oc-if:interfaces/oc-if:interface/oc-if:name";
154 }
155 description
156 "Specify the logical aggregate interface to which
157 this interface belongs";
158 }
159 }
160
161 // data definition statements
162
163 // augment statements
164
165 augment "/oc-if:interfaces/oc-if:interface" {
166 when "oc-if:type = 'ift:ieee8023adLag'" {
167 description "active when the interface is set to type LAG";
168 }
169 description "Adds LAG configuration to the interface module";
170
171 uses aggregation-logical-top;
172 }
173
174 augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" +
175 "oc-eth:config" {
176 when "oc-if:type = 'ift:ethernetCsmacd'" {
177 description "active when the interface is Ethernet";
178 }
179 description "Adds LAG settings to individual Ethernet
180 interfaces";
181
182 uses ethernet-if-aggregation-config;
183 }
184
185 augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" +
186 "oc-eth:state" {
187 when "oc-if:type = 'ift:ethernetCsmacd'" {
188 description "active when the interface is Ethernet";
189 }
190 description "Adds LAG settings to individual Ethernet
191 interfaces";
192
193 uses ethernet-if-aggregation-config;
194 }
195
196 // rpc statements
197
198 // notification statements
199
200}