hiroki | 096259b | 2018-12-07 09:33:24 -0800 | [diff] [blame] | 1 | module openconfig-transport-line-protection { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/optical-transport-line-protection"; |
| 7 | |
| 8 | prefix "oc-line-protect"; |
| 9 | |
| 10 | import openconfig-extensions { prefix oc-ext; } |
| 11 | import openconfig-types { prefix oc-types; } |
| 12 | import openconfig-platform { prefix oc-platform; } |
| 13 | |
| 14 | // meta |
| 15 | organization "OpenConfig working group"; |
| 16 | |
| 17 | contact |
| 18 | "OpenConfig working group |
| 19 | www.openconfig.net"; |
| 20 | |
| 21 | description |
| 22 | "This model describes configuration and operational state data |
| 23 | for optical line protection elements, deployed as part of a |
| 24 | transport line system. An Automatic Protection Switch (APS) |
| 25 | is typically installed in the same device as the amplifiers |
| 26 | and wave-router, however an APS can also be a standalone |
| 27 | device. In both scenarios, it serves the same purpose of |
| 28 | providing protection using two dark fiber pairs to ensure the |
| 29 | amplifiers can still receive a signal if one of the two fiber |
| 30 | pairs is broken."; |
| 31 | |
| 32 | // |
| 33 | // Automatic Protection Switch (APS) port details and directionality. |
| 34 | // _________ |
| 35 | // | | |
| 36 | // | | <=== LINE-PRIMARY-IN |
| 37 | // | | |
| 38 | // COMMON-IN ===> | | ===> LINE-PRIMARY-OUT |
| 39 | // | | |
| 40 | // | APS | |
| 41 | // COMMON-OUT <=== | | |
| 42 | // | | <=== LINE-SECONDARY-IN |
| 43 | // | | |
| 44 | // | | ===> LINE-SECONDARY-OUT |
| 45 | // |_______| |
| 46 | // |
| 47 | |
| 48 | oc-ext:openconfig-version "0.3.1"; |
| 49 | |
| 50 | revision "2017-09-08" { |
| 51 | description |
| 52 | "Correct bug with OSC interfaces"; |
| 53 | reference "0.3.1"; |
| 54 | } |
| 55 | |
| 56 | revision "2017-07-08" { |
| 57 | description |
| 58 | "Support multiple OCMs, add monitor port type |
| 59 | and refs to hw ports, "; |
| 60 | reference "0.3.0"; |
| 61 | } |
| 62 | |
| 63 | revision "2017-03-28" { |
| 64 | description |
| 65 | "Added min/max/avg stats, status for media channels, OCM, APS"; |
| 66 | reference "0.2.0"; |
| 67 | } |
| 68 | |
| 69 | revision "2016-08-05" { |
| 70 | description |
| 71 | "Initial public release"; |
| 72 | reference "0.1.0"; |
| 73 | } |
| 74 | |
| 75 | // extension statements |
| 76 | |
| 77 | // feature statements |
| 78 | |
| 79 | // identity statements |
| 80 | |
| 81 | identity APS_PATHS { |
| 82 | description |
| 83 | "Base identity for identifying the line paths on an |
| 84 | automatic protection switch"; |
| 85 | } |
| 86 | |
| 87 | identity PRIMARY { |
| 88 | base APS_PATHS; |
| 89 | description |
| 90 | "The primary line path connected to an automatic protection |
| 91 | switch port indicating the primary/preferred path"; |
| 92 | } |
| 93 | |
| 94 | identity SECONDARY { |
| 95 | base APS_PATHS; |
| 96 | description |
| 97 | "The secondary line path connected to an automatic protection |
| 98 | switch port indicating the secondary path"; |
| 99 | } |
| 100 | |
| 101 | // grouping statements |
| 102 | |
| 103 | grouping aps-input-port-config { |
| 104 | description |
| 105 | "Grouping for config related to unidirectional automatic |
| 106 | protection switch input ports"; |
| 107 | |
| 108 | leaf enabled { |
| 109 | type boolean; |
| 110 | default "true"; |
| 111 | description |
| 112 | "This leaf contains the configured, desired state of the |
| 113 | port. Disabling the port turns off alarm reporting for |
| 114 | the port"; |
| 115 | } |
| 116 | |
| 117 | leaf target-attenuation { |
| 118 | type decimal64 { |
| 119 | fraction-digits 2; |
| 120 | } |
| 121 | units dB; |
| 122 | description |
| 123 | "Target attenuation of the variable optical attenuator |
| 124 | associated with the port in increments of 0.01 dB."; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | grouping aps-output-port-config { |
| 129 | description |
| 130 | "Grouping for config related to unidirectional automatic |
| 131 | protection switch output ports"; |
| 132 | |
| 133 | leaf target-attenuation { |
| 134 | type decimal64 { |
| 135 | fraction-digits 2; |
| 136 | } |
| 137 | units dB; |
| 138 | description |
| 139 | "Target attenuation of the variable optical attenuator |
| 140 | associated with the port in increments of 0.01 dB"; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | grouping aps-input-port-state { |
| 145 | description |
| 146 | "Grouping for state related to unidirectional automatic |
| 147 | protection switch input ports"; |
| 148 | |
| 149 | leaf attenuation { |
| 150 | type decimal64 { |
| 151 | fraction-digits 2; |
| 152 | } |
| 153 | units dB; |
| 154 | description |
| 155 | "The attenuation of the variable optical attenuator |
| 156 | associated with the port in increments of 0.01 dB."; |
| 157 | } |
| 158 | |
| 159 | container optical-power { |
| 160 | description |
| 161 | "The optical input power of this port in units of |
| 162 | 0.01dBm. Optical input power represents the signal |
| 163 | traversing from an external destination into the module. |
| 164 | The power is measured before any attenuation. If avg/min/max |
| 165 | statistics are not supported, the target is expected to |
| 166 | just supply the instant value"; |
| 167 | |
| 168 | uses oc-types:avg-min-max-instant-stats-precision2-dBm; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | grouping aps-output-port-state { |
| 173 | description |
| 174 | "Grouping for state related to unidirectional automatic |
| 175 | protection switch output ports"; |
| 176 | |
| 177 | leaf attenuation { |
| 178 | type decimal64 { |
| 179 | fraction-digits 2; |
| 180 | } |
| 181 | units dB; |
| 182 | description |
| 183 | "The attenuation of the variable optical attenuator |
| 184 | associated with the port in increments of 0.01 dB"; |
| 185 | } |
| 186 | |
| 187 | container optical-power { |
| 188 | description |
| 189 | "The optical output power of this port in units of |
| 190 | 0.01dBm. Optical output power represents the signal |
| 191 | traversing from the module to an external destination. The |
| 192 | power is measured after any attenuation. If avg/min/max |
| 193 | statistics are not supported, the target is expected to |
| 194 | just supply the instant value"; |
| 195 | |
| 196 | uses oc-types:avg-min-max-instant-stats-precision2-dBm; |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | grouping aps-ports { |
| 201 | description |
| 202 | "Top level grouping for automatic protection switch ports"; |
| 203 | |
| 204 | container line-primary-in { |
| 205 | description |
| 206 | "Container for information related to the line primary |
| 207 | input port"; |
| 208 | |
| 209 | container config { |
| 210 | description |
| 211 | "Configuration data for the line primary input port"; |
| 212 | |
| 213 | uses aps-input-port-config; |
| 214 | } |
| 215 | |
| 216 | container state { |
| 217 | |
| 218 | config false; |
| 219 | |
| 220 | description |
| 221 | "State data for the line primary input port"; |
| 222 | |
| 223 | uses aps-input-port-config; |
| 224 | uses aps-input-port-state; |
| 225 | } |
| 226 | |
| 227 | } |
| 228 | |
| 229 | container line-primary-out { |
| 230 | description |
| 231 | "Container for information related to the line primary |
| 232 | output port"; |
| 233 | |
| 234 | container config { |
| 235 | description |
| 236 | "Configuration data for the line primary output port"; |
| 237 | |
| 238 | uses aps-output-port-config; |
| 239 | } |
| 240 | |
| 241 | container state { |
| 242 | |
| 243 | config false; |
| 244 | |
| 245 | description |
| 246 | "State data for the line primary output port"; |
| 247 | |
| 248 | uses aps-output-port-config; |
| 249 | uses aps-output-port-state; |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | container line-secondary-in { |
| 254 | description |
| 255 | "Container for information related to the line secondary |
| 256 | input port"; |
| 257 | |
| 258 | container config { |
| 259 | description |
| 260 | "Configuration data for the line secondary input port"; |
| 261 | |
| 262 | uses aps-input-port-config; |
| 263 | } |
| 264 | |
| 265 | container state { |
| 266 | |
| 267 | config false; |
| 268 | |
| 269 | description |
| 270 | "State data for the line secondary input port"; |
| 271 | |
| 272 | uses aps-input-port-config; |
| 273 | uses aps-input-port-state; |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | container line-secondary-out { |
| 278 | description |
| 279 | "Container for information related to the line secondary |
| 280 | output port"; |
| 281 | |
| 282 | container config { |
| 283 | description |
| 284 | "Configuration data for the line secondary output port"; |
| 285 | |
| 286 | uses aps-output-port-config; |
| 287 | } |
| 288 | |
| 289 | container state { |
| 290 | |
| 291 | config false; |
| 292 | |
| 293 | description |
| 294 | "State data for the line secondary output port"; |
| 295 | |
| 296 | uses aps-output-port-config; |
| 297 | uses aps-output-port-state; |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | container common-in { |
| 302 | description |
| 303 | "Container for information related to the line common |
| 304 | input port"; |
| 305 | |
| 306 | container config { |
| 307 | description |
| 308 | "Configuration data for the line common input port"; |
| 309 | |
| 310 | uses aps-input-port-config; |
| 311 | } |
| 312 | |
| 313 | container state { |
| 314 | |
| 315 | config false; |
| 316 | |
| 317 | description |
| 318 | "State data for the line common input port"; |
| 319 | |
| 320 | uses aps-input-port-config; |
| 321 | uses aps-input-port-state; |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | container common-output { |
| 326 | description |
| 327 | "Container for information related to the line common |
| 328 | output port"; |
| 329 | |
| 330 | container config { |
| 331 | description |
| 332 | "Configuration data for the line common output port"; |
| 333 | |
| 334 | uses aps-output-port-config; |
| 335 | } |
| 336 | |
| 337 | container state { |
| 338 | |
| 339 | config false; |
| 340 | |
| 341 | description |
| 342 | "State data for the line common output port"; |
| 343 | |
| 344 | uses aps-output-port-config; |
| 345 | uses aps-output-port-state; |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | grouping aps-config { |
| 351 | description |
| 352 | "Configuration data for automatic protection switch modules"; |
| 353 | |
| 354 | leaf name { |
| 355 | type leafref { |
| 356 | path "/oc-platform:components/oc-platform:component/" + |
| 357 | "oc-platform:name"; |
| 358 | } |
| 359 | description |
| 360 | "Reference to the component name (in the platform model) |
| 361 | corresponding to this automatic protection switch module |
| 362 | in the device"; |
| 363 | } |
| 364 | |
| 365 | leaf revertive { |
| 366 | type boolean; |
| 367 | description |
| 368 | "Revertive behavior of the module. |
| 369 | If True, then automatically revert after protection switch |
| 370 | once the fault is restored."; |
| 371 | } |
| 372 | |
| 373 | leaf primary-switch-threshold { |
| 374 | type decimal64 { |
| 375 | fraction-digits 2; |
| 376 | } |
| 377 | units dBm; |
| 378 | description |
| 379 | "The threshold at which the primary line port will switch to |
| 380 | the opposite line port in increments of 0.01 dBm. If the |
| 381 | hardware supports only one switch threshold for primary and |
| 382 | and secondary ports then it is recommended to set both |
| 383 | primary-switch-threshold and secondary-switch-threshold to |
| 384 | the same value to be explicit"; |
| 385 | } |
| 386 | |
| 387 | leaf primary-switch-hysteresis { |
| 388 | type decimal64 { |
| 389 | fraction-digits 2; |
| 390 | } |
| 391 | units dB; |
| 392 | description |
| 393 | "The delta in 0.01 dB between the primary-switch-threshold |
| 394 | and the signal received before initiating a reversion in |
| 395 | order to prevent toggling between ports when an input |
| 396 | signal is very close to threshold. If the hardware supports |
| 397 | only one switch hysteresis for primary and secondary ports |
| 398 | then it is recommended to set both primary-switch-threshold |
| 399 | and secondary-switch-threshold to the same value to be |
| 400 | explicit"; |
| 401 | } |
| 402 | |
| 403 | leaf secondary-switch-threshold { |
| 404 | type decimal64 { |
| 405 | fraction-digits 2; |
| 406 | } |
| 407 | units dBm; |
| 408 | description |
| 409 | "The threshold at which the secondary line port will switch to |
| 410 | the opposite line port in increments of 0.01 dBm. If the |
| 411 | hardware supports only one switch threshold for primary and |
| 412 | and secondary ports then it is recommended to set both |
| 413 | primary-switch-threshold and secondary-switch-threshold to |
| 414 | the same value to be explicit"; |
| 415 | } |
| 416 | |
| 417 | leaf secondary-switch-hysteresis { |
| 418 | type decimal64 { |
| 419 | fraction-digits 2; |
| 420 | } |
| 421 | units dB; |
| 422 | description |
| 423 | "The delta in 0.01 dB between the secondary-switch-threshold |
| 424 | and the signal received before initiating a reversion in |
| 425 | order to prevent toggling between ports when an input |
| 426 | signal is very close to threshold. If the hardware supports |
| 427 | only one switch hysteresis for primary and secondary ports |
| 428 | then it is recommended to set both primary-switch-threshold |
| 429 | and secondary-switch-threshold to the same value to be |
| 430 | explicit"; |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | grouping aps-state { |
| 435 | description |
| 436 | "State data for automatic protection switch modules"; |
| 437 | |
| 438 | leaf active-path { |
| 439 | type identityref { |
| 440 | base APS_PATHS; |
| 441 | } |
| 442 | description |
| 443 | "Indicates which line path on the automatic protection switch |
| 444 | is currently the active path connected to the common port"; |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | grouping automatic-protection-switch-top { |
| 449 | description |
| 450 | "Top level grouping for automatic protection switch data"; |
| 451 | |
| 452 | container aps-modules { |
| 453 | description |
| 454 | "Enclosing container for list of automatic protection |
| 455 | switch modules"; |
| 456 | |
| 457 | list aps-module { |
| 458 | key "name"; |
| 459 | description |
| 460 | "List of automatic protection switch modules present |
| 461 | in the device"; |
| 462 | |
| 463 | leaf name { |
| 464 | type leafref { |
| 465 | path "../config/name"; |
| 466 | } |
| 467 | description |
| 468 | "Reference to the config name list key"; |
| 469 | } |
| 470 | |
| 471 | container config { |
| 472 | description |
| 473 | "Configuration data for an automatic protection |
| 474 | switch module"; |
| 475 | |
| 476 | uses aps-config; |
| 477 | } |
| 478 | |
| 479 | container state { |
| 480 | |
| 481 | config false; |
| 482 | |
| 483 | description |
| 484 | "Operational state data for an automatic protection |
| 485 | switch module"; |
| 486 | |
| 487 | uses aps-config; |
| 488 | uses aps-state; |
| 489 | } |
| 490 | |
| 491 | container ports { |
| 492 | description |
| 493 | "Top level grouping for automatic protection switch ports"; |
| 494 | |
| 495 | uses aps-ports; |
| 496 | } |
| 497 | } |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | grouping transport-line-protection-top { |
| 502 | description |
| 503 | "Top level grouping for transport line protection data"; |
| 504 | |
| 505 | container aps { |
| 506 | description |
| 507 | "Top level grouping for automatic protection switch data"; |
| 508 | |
| 509 | uses automatic-protection-switch-top; |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | // data definition statements |
| 514 | |
| 515 | uses transport-line-protection-top; |
| 516 | |
| 517 | } |