blob: 8b4b853f10054c091c9391dd86ae76671aaf9fd9 [file] [log] [blame]
hiroki096259b2018-12-07 09:33:24 -08001module openconfig-transport-line-common {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/transport-line-common";
7
8 prefix "oc-line-com";
9
10 // import some basic types
11 import iana-if-type { prefix ift; }
12 import openconfig-extensions { prefix oc-ext; }
13 import openconfig-interfaces { prefix oc-if; }
14 import openconfig-platform { prefix oc-platform; }
15 import openconfig-types { prefix oc-types; }
16 import openconfig-transport-types { prefix oc-opt-types; }
17
18
19 // meta
20 organization "OpenConfig working group";
21
22 contact
23 "OpenConfig working group
24 www.openconfig.net";
25
26 description
27 "This module defines common data elements for OpenConfig data
28 models for optical transport line system elements, such as
29 amplifiers and ROADMs (wavelength routers).";
30
31 oc-ext:openconfig-version "0.3.1";
32
33 revision "2017-09-08" {
34 description
35 "Correct bug with OSC interfaces";
36 reference "0.3.1";
37 }
38
39 revision "2017-07-08" {
40 description
41 "Add monitor port type and refs to hw ports, ";
42 reference "0.3.0";
43 }
44
45 revision "2017-03-28" {
46 description
47 "Added min/max/avg stats, status for media channels, OCM, APS";
48 reference "0.2.0";
49 }
50
51 revision "2016-03-31" {
52 description
53 "Initial public release";
54 reference "0.1.0";
55 }
56
57
58 // extension statements
59
60 // feature statements
61
62 // identity statements
63
64 identity OPTICAL_LINE_PORT_TYPE {
65 description
66 "Type definition for optical node port types";
67 }
68
69 identity INGRESS {
70 base OPTICAL_LINE_PORT_TYPE;
71 description
72 "Ingress port, corresponding to a signal entering
73 a line device such as an amplifier or wavelength
74 router.";
75 }
76
77 identity EGRESS {
78 base OPTICAL_LINE_PORT_TYPE;
79 description
80 "Egress port, corresponding to a signal exiting
81 a line device such as an amplifier or wavelength
82 router.";
83 }
84
85 identity ADD {
86 base OPTICAL_LINE_PORT_TYPE;
87 description
88 "Add port, corresponding to a signal injected
89 at a wavelength router.";
90 }
91
92 identity DROP {
93 base OPTICAL_LINE_PORT_TYPE;
94 description
95 "Drop port, corresponding to a signal dropped
96 at a wavelength router.";
97 }
98
99 identity MONITOR {
100 base OPTICAL_LINE_PORT_TYPE;
101 description
102 "Monitor port, corresponding to a signal used by an optical
103 channel monitor. This is used to represent the connection
104 that a channel monitor port is connected to. This
105 connection may be via physical cable and faceplate ports or
106 internal to the device";
107 }
108
109 // typedef statements
110
111 // grouping statements
112
113 grouping optical-osc-config {
114 description
115 "Configuration data for OSC interfaces";
116
117 leaf interface {
118 type oc-if:base-interface-ref;
119 description
120 "Reference to an OSC interface";
121 }
122 }
123
124 grouping optical-osc-state {
125 description
126 "Operational state data for OSC interfaces";
127
128 container input-power {
129 description
130 "The input optical power of this port in units
131 of 0.01dBm. If avg/min/max statistics are not supported,
132 the target is expected to just supply the instant value";
133
134 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
135 }
136
137 container output-power {
138 description
139 "The output optical power of this port in units
140 of 0.01dBm. If avg/min/max statistics are not supported,
141 the target is expected to just supply the instant value";
142
143 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
144 }
145
146 container laser-bias-current {
147 description
148 "The current applied by the system to the transmit laser to
149 achieve the output power. The current is expressed in mA
150 with up to one decimal precision. If avg/min/max statistics
151 are not supported, the target is expected to just supply
152 the instant value";
153
154 uses oc-types:avg-min-max-instant-stats-precision2-mA;
155 }
156 }
157
158
159
160 grouping optical-osc-top {
161 description
162 "Top-level grouping for configuration and operational state
163 data for optical supervisory channels (OSC) for amplifiers,
164 WSS/ROADM, nodes, etc.";
165
166 container config {
167 description
168 "Configuration data for OSCs";
169
170 uses optical-osc-config;
171 }
172
173 container state {
174
175 config false;
176
177 description
178 "Operational state data for OSCs";
179
180 uses optical-osc-config;
181 uses optical-osc-state;
182 }
183 }
184
185
186 grouping transport-line-common-port-config {
187 description
188 "Configuration data for optical line ports";
189
190 leaf admin-state {
191 type oc-opt-types:admin-state-type;
192 description
193 "Sets the admin state of the optical-port";
194 }
195 }
196
197 grouping transport-line-common-port-state {
198 description
199 "Operational state data describing optical line ports";
200
201 leaf optical-port-type {
202 type identityref {
203 base OPTICAL_LINE_PORT_TYPE;
204 }
205 description
206 "Indicates the type of transport line port. This is an
207 informational field that should be made available by the
208 device (e.g., in the openconfig-platform model).";
209 }
210
211 container input-power {
212 description
213 "The total input optical power of this port in units
214 of 0.01dBm. If avg/min/max statistics are not supported,
215 just supply the instant value";
216
217 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
218 }
219
220 container output-power {
221 description
222 "The total output optical power of this port in units
223 of 0.01dBm. If avg/min/max statistics are not supported,
224 just supply the instant value";
225
226 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
227 }
228 }
229
230 grouping transport-line-common-port-top {
231 description
232 "Top-level grouping ";
233
234 container optical-port {
235 description
236 "Top-level container ";
237
238 container config {
239
240 description
241 "Operational config data for optical line ports";
242
243 uses transport-line-common-port-config;
244 }
245
246 container state {
247
248 config false;
249
250 description
251 "Operational state data for optical line ports";
252
253 uses transport-line-common-port-config;
254 uses transport-line-common-port-state;
255 }
256 }
257 }
258
259
260
261 // data definition statements
262
263 // uses optical-osc-top;
264
265 // augment statements
266
267 augment "/oc-platform:components/oc-platform:component" {
268 description
269 "Adding optical line port data to platform model";
270
271 uses transport-line-common-port-top {
272 when "/oc-platform:components/oc-platform:component/" +
273 "oc-platform:state/oc-platform:type = 'PORT'" {
274 description
275 "Augment is active when component is of type
276 PORT";
277 }
278 }
279 }
280
281 //TODO:this is placeholder until SONET model is added
282 //to interfaces model
283 augment "/oc-if:interfaces/oc-if:interface" {
284 when "oc-if:config/oc-if:type = 'ift:sonet'" {
285 description "Additional interface configuration parameters when
286 the interface type is SONET/SDH";
287 }
288 description "Adds additional SONET/SDH-specific data to
289 osc model";
290
291 container sonet {
292 description
293 "Data related to SONET/SDH interfaces";
294 }
295 }
296
297 // rpc statements
298
299 // notification statements
300
301}