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