aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-transport-line-common.yang
blob: 9db16b67933e6be047854b66edcc58e1ed2af1a5 (plain)
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
module openconfig-transport-line-common {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/transport-line-common";

  prefix "oc-line-com";

  // import some basic types
  import iana-if-type { prefix ift; }
  import openconfig-extensions { prefix oc-ext; }
  import openconfig-interfaces { prefix oc-if; }
  import openconfig-platform { prefix oc-platform; }
  import openconfig-types { prefix oc-types; }
  import openconfig-transport-types { prefix oc-opt-types; }
  import openconfig-platform-transceiver { prefix oc-transceiver; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module defines common data elements for OpenConfig data
    models for optical transport line system elements, such as
    amplifiers and ROADMs (wavelength routers).";

  oc-ext:openconfig-version "0.4.1";

  revision "2018-07-17" {
    description
      "Remove leaf 'enabled' from osc-config";
    reference "0.4.1";
  }

  revision "2018-05-08" {
    description
      "Added leaf 'enabled' to osc-config and
      leaf 'output-frequency' to osc-state";
    reference "0.4.0";
  }

  revision "2017-09-08" {
    description
      "Correct bug with OSC interfaces";
    reference "0.3.1";
  }

  revision "2017-07-08" {
    description
      "Add monitor port type and refs to hw ports, ";
    reference "0.3.0";
  }

  revision "2017-03-28" {
    description
      "Added min/max/avg stats, status for media channels, OCM, APS";
    reference "0.2.0";
  }

  revision "2016-03-31" {
    description
      "Initial public release";
    reference "0.1.0";
  }


  // extension statements

  // feature statements

  // identity statements

  identity OPTICAL_LINE_PORT_TYPE {
    description
      "Type definition for optical node port types";
  }

  identity INGRESS {
    base OPTICAL_LINE_PORT_TYPE;
    description
      "Ingress port, corresponding to a signal entering
      a line device such as an amplifier or wavelength
      router.";
  }

  identity EGRESS {
    base OPTICAL_LINE_PORT_TYPE;
    description
      "Egress port, corresponding to a signal exiting
      a line device such as an amplifier or wavelength
      router.";
  }

  identity ADD {
    base OPTICAL_LINE_PORT_TYPE;
    description
      "Add port, corresponding to a signal injected
      at a wavelength router.";
  }

  identity DROP {
    base OPTICAL_LINE_PORT_TYPE;
    description
      "Drop port, corresponding to a signal dropped
      at a wavelength router.";
  }

  identity MONITOR {
    base OPTICAL_LINE_PORT_TYPE;
    description
      "Monitor port, corresponding to a signal used by an optical
      channel monitor. This is used to represent the connection
      that a channel monitor port is connected to. This
      connection may be via physical cable and faceplate ports or
      internal to the device";
  }

  // typedef statements

  // grouping statements

   grouping optical-osc-config {
    description
      "Configuration data for OSC interfaces";

    leaf interface {
      type oc-if:base-interface-ref;
      description
        "Reference to an OSC interface";
    }
  }

  grouping optical-osc-state {
    description
      "Operational state data for OSC interfaces";

    container input-power {
      description
        "The input optical power of this port in units
        of 0.01dBm. If avg/min/max statistics are not supported,
        the target is expected to just supply the instant value";

      uses oc-types:avg-min-max-instant-stats-precision2-dBm;
    }

    container output-power {
      description
        "The output optical power of this port in units
        of 0.01dBm. If avg/min/max statistics are not supported,
        the target is expected to just supply the instant value";

      uses oc-types:avg-min-max-instant-stats-precision2-dBm;
    }

    container laser-bias-current {
      description
        "The current applied by the system to the transmit laser to
        achieve the output power. The current is expressed in mA
        with up to one decimal precision. If avg/min/max statistics
        are not supported, the target is expected to just supply
        the instant value";

      uses oc-types:avg-min-max-instant-stats-precision2-mA;
    }

    uses oc-transceiver:output-optical-frequency;
  }



  grouping optical-osc-top {
    description
      "Top-level grouping for configuration and operational state
      data for optical supervisory channels (OSC) for amplifiers,
      WSS/ROADM, nodes, etc.";

    container config {
      description
        "Configuration data for OSCs";

      uses optical-osc-config;
    }

    container state {

      config false;

      description
        "Operational state data for OSCs";

      uses optical-osc-config;
      uses optical-osc-state;
    }
  }


  grouping transport-line-common-port-config {
    description
      "Configuration data for optical line ports";

    leaf admin-state {
      type oc-opt-types:admin-state-type;
      description
          "Sets the admin state of the optical-port";
    }
  }

  grouping transport-line-common-port-state {
    description
      "Operational state data describing optical line ports";

    leaf optical-port-type {
      type identityref {
        base OPTICAL_LINE_PORT_TYPE;
      }
      description
        "Indicates the type of transport line port.  This is an
        informational field that should be made available by the
        device (e.g., in the openconfig-platform model).";
    }

    container input-power {
      description
        "The total input optical power of this port in units
        of 0.01dBm. If avg/min/max statistics are not supported,
        just supply the instant value";

      uses oc-types:avg-min-max-instant-stats-precision2-dBm;
    }

    container output-power {
      description
        "The total output optical power of this port in units
        of 0.01dBm. If avg/min/max statistics are not supported,
        just supply the instant value";

      uses oc-types:avg-min-max-instant-stats-precision2-dBm;
    }
  }

  grouping transport-line-common-port-top {
    description
      "Top-level grouping ";

    container optical-port {
      description
        "Top-level container ";

      container config {

        description
          "Operational config data for optical line ports";

        uses transport-line-common-port-config;
      }

      container state {

        config false;

        description
          "Operational state data for optical line ports";

        uses transport-line-common-port-config;
        uses transport-line-common-port-state;
      }
    }
  }



  // data definition statements

  // uses optical-osc-top;

  // augment statements

  augment "/oc-platform:components/oc-platform:component" {
    description
      "Adding optical line port data to platform model";

    uses transport-line-common-port-top {
      when "/oc-platform:components/oc-platform:component/" +
        "oc-platform:state/oc-platform:type = 'PORT'" {
        description
          "Augment is active when component is of type
          PORT";
      }
    }
  }

  //TODO:this is placeholder until SONET model is added
  //to interfaces model
  augment "/oc-if:interfaces/oc-if:interface" {
    when "oc-if:config/oc-if:type = 'ift:sonet'" {
      description "Additional interface configuration parameters when
      the interface type is SONET/SDH";
    }
    description "Adds additional SONET/SDH-specific data to
    osc model";

    container sonet {
      description
        "Data related to SONET/SDH interfaces";
    }
  }

  // rpc statements

  // notification statements

}