-
Notifications
You must be signed in to change notification settings - Fork 660
/
Copy pathopenconfig-platform-port.yang
321 lines (267 loc) · 8.83 KB
/
openconfig-platform-port.yang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
module openconfig-platform-port {
yang-version "1";
// namespace
namespace "http://openconfig.net/yang/platform/port";
prefix "oc-port";
// import some basic types
import openconfig-platform { prefix oc-platform; }
import openconfig-interfaces { prefix oc-if; }
import openconfig-if-ethernet { prefix oc-eth; }
import openconfig-extensions { prefix oc-ext; }
// meta
organization "OpenConfig working group";
contact
"OpenConfig working group
www.openconfig.net";
description
"This module defines data related to PORT components in the
openconfig-platform model";
oc-ext:openconfig-version "1.0.0";
revision "2023-01-19" {
description
"Add clarification of the definition of a physical channel, and
example configurations.";
reference "1.0.0";
}
revision "2021-10-01" {
description
"Fix indentation for 'list group'";
reference "0.4.2";
}
revision "2021-06-16" {
description
"Remove trailing whitespace";
reference "0.4.1";
}
revision "2021-04-22" {
description
"Adding support for flexible port breakout.";
reference "0.4.0";
}
revision "2020-05-06" {
description
"Ensure that when statements in read-write contexts
reference only read-write leaves.";
reference "0.3.3";
}
revision "2018-11-21" {
description
"Add OpenConfig module metadata extensions.";
reference "0.3.2";
}
revision "2018-11-07" {
description
"Fixed error in when statement path";
reference "0.3.1";
}
revision "2018-01-20" {
description
"Added augmentation for interface-to-port reference";
reference "0.3.0";
}
revision "2017-11-17" {
description
"Corrected augmentation path for port data";
reference "0.2.0";
}
revision "2016-10-24" {
description
"Initial revision";
reference "0.1.0";
}
// OpenConfig specific extensions for module metadata.
oc-ext:regexp-posix;
oc-ext:catalog-organization "openconfig";
oc-ext:origin "openconfig";
// extension statements
// feature statements
// identity statements
// typedef statements
// grouping statements
grouping group-config {
description
"Configuration data for the breakout group.";
leaf index {
type uint8;
description
"Each index specifies breakouts that are identical in
terms of speed and the number of physical channels.";
}
leaf num-breakouts {
type uint8;
description
"Sets the number of interfaces using this breakout group.";
}
leaf breakout-speed {
type identityref {
base oc-eth:ETHERNET_SPEED;
}
description
"Speed of interfaces in this breakout group, supported
values are defined by the ETHERNET_SPEED identity.";
}
leaf num-physical-channels {
type uint8;
description
"Sets the number of lanes or physical channels assigned
to the interfaces in this breakout group. This leaf need
not be set if there is only one breakout group where all
the interfaces are of equal speed and have equal number
of physical channels.
The physical channels referred to by this leaf are
electrical channels towards the transceiver.";
}
}
grouping group-state {
description
"Operational state data for the port breakout group.";
}
grouping port-breakout-top {
description
"Top-level grouping for port breakout data.";
container breakout-mode {
description
"Top-level container for port breakout-mode data.";
container groups {
description
"Top level container for breakout groups data.
When a device has the capability to break a port into
interfaces of different speeds and different number of
physical channels, it can breakout a 400G OSFP port with
8 physical channels (with support for 25G NRZ, 50G PAM4
and 100G PAM4) into mixed speed interfaces. Particularly, to
break out into two 100G ports with different modulation, and a 200G
port, a user must configure 1 interface with 2 physical channels
1 interface with 4 physical channels and 1 interface with
2 physical channels. With this configuration the interface in
1st breakout group would use 50G PAM4 modulation, interface
in 2nd breakout group would use 25G NRZ modulation and the
interface in 3rd breakout group would use 100G PAM4 modulation
This configuration would result in 3 entries in the breakout
groups list. The example configuration for this case is shown below:
{
\"groups\": {
\"group\": [
{
\"config\": {
\"breakout-speed\": \"SPEED_100GB\",
\"index\": 0,
\"num-breakouts\": 1,
\"num-physical-channels\": 2
},
\"index\": 0
},
{
\"config\": {
\"breakout-speed\": \"SPEED_100GB\",
\"index\": 1,
\"num-breakouts\": 1,
\"num-physical-channels\": 4
},
\"index\": 1
},
{
\"config\": {
\"breakout-speed\": \"SPEED_200GB\",
\"index\": 2,
\"num-breakouts\": 1,
\"num-physical-channels\": 2
},
\"index\": 2
}
]
}
}
When a device does not have the capability to break a port
into interfaces of different speeds and different number of
physical channels, in order to breakout a 400G OSFP port with
8 physical channels into 50G breakout ports it would use 8 interfaces
with 1 physical channel each. This would result in 1 entry in the
breakout groups list. The example configuration for this case is
shown below:
{
\"groups\": {
\"group\": [
{
\"config\": {
\"breakout-speed\": \"SPEED_50GB\",
\"index\": 0,
\"num-breakouts\": 8,
\"num-physical-channels\": 1
},
\"index\": 0
}
]
}
}
Similarly, if a 400G-DR4 interface (8 electrical channels at 50Gbps)
is to be broken out into 4 100Gbps ports, the following configuration
is used:
{
\"groups\": {
\"group\": [
{
\"config\": {
\"breakout-speed\": \"SPEED_100GB\",
\"index\": 0,
\"num-breakouts\": 4,
\"num-physical-channels\": 2
},
\"index\": 0
}
]
}
}";
list group {
key "index";
description
"List of breakout groups.";
leaf index {
type leafref {
path "../config/index";
}
description
"Index of the breakout group entry in the breakout groups list.";
}
container config {
description
"Configuration data for breakout group.";
uses group-config;
}
container state {
config false;
description
"Operational state data for breakout group.";
uses group-config;
uses group-state;
}
}
}
}
}
// data definition statements
// augment statements
augment "/oc-platform:components/oc-platform:component/" +
"oc-platform:port" {
description
"Adding port breakout data to physical platform data. This subtree
is only valid when the type of the component is PORT.";
uses port-breakout-top;
}
augment "/oc-if:interfaces/oc-if:interface/oc-if:state" {
description
"Adds a reference from the base interface to the corresponding
port component in the device inventory.";
leaf hardware-port {
type leafref {
path "/oc-platform:components/oc-platform:component/" +
"oc-platform:name";
}
description
"For non-channelized interfaces, references the hardware port
corresponding to the base interface.";
}
}
// rpc statements
// notification statements
}