-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathietf-wson-topology.yang
342 lines (298 loc) · 11.1 KB
/
ietf-wson-topology.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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
module ietf-wson-topology {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-wson-topology";
prefix "wson";
import ietf-network {
prefix "nd";
}
import ietf-network-topology {
prefix "lnk";
}
import ietf-inet-types {
prefix "inet";
}
import ietf-te-topology {
prefix "tet";
}
organization
"IETF CCAMP Working Group";
contact
"Editor: Young Lee <leeyoung@huawei.com>
Editor: Dhruv Dhody <dhruv.ietf@gmail.com>
Editor: Ricard Vilalta <ricard.vilalta@cttc.es>";
description
"This module contains a collection of YANG definitions for
RWA WSON.
Copyright (c) 2017 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).";
revision 2017-06-20 {
description
"corrected connectivity matrix references";
reference
"RFC XXX: A Yang Data Model for WSON Optical Networks ";
}
typedef wson-topology-id {
type inet:uri;
description
"The WSON Topology ID";
}
typedef wson-node-id {
type inet:ip-address;
description
"The WSON Node ID";
}
typedef devicetype {
type enumeration {
enum adm {
value 1;
description
"Device is ADM";
}
enum roadm {
value 2;
description
"Device is ROAMD/OXC";
}
}
description
"device type: fixed (ADM) or switched (ROADM/OXC)";
}
typedef directionality {
type enumeration {
enum bidir {
value 0;
description
"bi-directional";
}
enum input {
value 1;
description
"input direction";
}
enum output {
value 2;
description
"output direction";
}
}
description
"The directionality of link set";
}
typedef wson-interface-ref {
type leafref {
path "/nd:networks/nd:network/nd:node/tet:te/tet:config"
+ "/tet:te-node-attributes/wson:wson-node/"
+ "wson:interfaces/wson:name";
}
description
"This type is used by data models that need to
reference WSON interface.";
}
grouping wson-topology-type {
description "wson-topology type";
container wson-topology {
presence "indicates a topology of wson";
description
"Container to identify wson topology type";
}
}
grouping wson-node-attributes {
description "wson node attributes";
container wson-node {
description "WSON node attrtibutes.";
leaf device-type {
type devicetype;
description
"device type: fixed (ADM) or switched
(ROADM/OXC)";
}
leaf dir {
type directionality;
description
"bi-directionality or input or output
of link set";
}
list interfaces {
key "name";
unique "port-number"; // TODO Puerto y TP ID
description "List of interfaces contained in the node";
uses node-interface;
}
}
}
grouping node-interface {
description "node interface definition";
leaf name {
type string;
description "Interface name";
}
leaf port-number {
type uint32;
description "Number of the port used by the interface";
}
leaf input-port {
type boolean;
description "Determines if the port is an input port";
}
leaf output-port {
type boolean;
description
"Determines if the port is an output port";
}
leaf description {
type string;
description "Description of the interface";
}
}
grouping available-wavelength {
description "describe available wavelengths";
leaf-list wavelength-available-bitmap {
type binary;
description
"array of bits (i.e., bitmap) that indicates
if a wavelength is available or not on each
channel.";
}
}
grouping wson-link-attributes {
description "Set of WSON link attributes";
leaf channel-max {
type int32;
description "Maximum Number of OCh channels available
by the node";
}
leaf default-frequency {
type decimal64 {
fraction-digits 5;
}
units THz;
default 193.1;
description "Default Central Frequency";
}
leaf channel-spacing {
type decimal64 {
fraction-digits 5;
}
units GHz;
description "This is fixed channel spacing for WSON,
e.g, 12.5, 25, 50, 100, ..";
}
}
grouping wson-connectivity-matrix {
description "wson connectivity matrix";
list matrix-interface {
key "in-port-id";
description
"matrix-interface describes input-ports
and out-ports around a connectivity
matrix";
leaf in-port-id {
type wson-interface-ref;
description
"The reference to in-port";
}
leaf out-port-id {
type wson-interface-ref;
description
"The reference to out-port";
}
}
}
grouping resource-pool-attributes {
description "resource pool describes regeneration or wave converter";
list resource-pool {
key "resource-pool-id";
description
"The resource pool list";
leaf resource-pool-id {
type uint32;
description
"The resource pool ID";
}
leaf pool-state {
type boolean;
description
"TRUE is state UP; FALSE is state down";
}
uses wson-connectivity-matrix;
}
}
augment "/nd:networks/nd:network/nd:network-types" {
description "wson-topology augmented";
uses wson-topology-type;
}
augment "/nd:networks/nd:network/nd:node/tet:te/tet:config"
+ "/tet:te-node-attributes/tet:connectivity-matrices"
+ "/tet:connectivity-matrix" {
when "/nd:networks/nd:network/nd:network-types"
+"/wson-topology" {
description
"This augment is only valid for
WSON connectivity matrix.";
}
description "WSON connectivity matrix config augmentation";
uses wson-connectivity-matrix;
}
augment "/nd:networks/nd:network/nd:node/tet:te/tet:state"
+ "/tet:te-node-attributes/tet:connectivity-matrices"
+ "/tet:connectivity-matrix" {
when "/nd:networks/nd:network/nd:network-types"
+"/wson-topology" {
description
"This augment is only valid for
WSON connectivity matrix.";
}
description "WSON connectivity matrix state augmentation";
uses wson-connectivity-matrix;
}
augment "/nd:networks/nd:network/lnk:link/tet:te/tet:config"
+ "/tet:te-link-attributes" {
when "/nd:networks/nd:network/nd:network-types"
+"/wson-topology" {
description
"This augment is only valid for WSON.";
}
description "WSON Link augmentation.";
uses wson-link-attributes;
uses available-wavelength;
}
augment "/nd:networks/nd:network/lnk:link/tet:te/tet:state"
+ "/tet:te-link-attributes" {
when "/nd:networks/nd:network/nd:network-types"
+"/wson-topology" {
description
"This augment is only valid for WSON.";
}
description "WSON Link augmentation.";
uses wson-link-attributes;
uses available-wavelength;
}
augment "/nd:networks/nd:network/nd:node/tet:te/tet:config"
+ "/tet:te-node-attributes" {
when "/nd:networks/nd:network/nd:network-types"
+"/wson-topology" {
description
"This augment is only valid for WSON.";
}
description "WSON Node augmentation.";
uses wson-node-attributes;
uses resource-pool-attributes;
}
augment "/nd:networks/nd:network/nd:node/tet:te/tet:state"
+ "/tet:te-node-attributes" {
when "/nd:networks/nd:network/nd:network-types"
+"/wson-topology" {
description
"This augment is only valid for WSON.";
}
description "WSON Node augmentation.";
uses wson-node-attributes;
uses resource-pool-attributes;
}
}