Thomas Vachuska | 6655bee | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | module openconfig-wavelength-router { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/wavelength-router"; |
| 7 | |
| 8 | prefix "oc-wave-router"; |
| 9 | |
| 10 | // import some basic types |
| 11 | import openconfig-extensions { prefix oc-ext; } |
| 12 | import openconfig-types { prefix oc-types; } |
| 13 | import openconfig-interfaces { prefix oc-if; } |
| 14 | import openconfig-transport-types { prefix oc-opt-types; } |
| 15 | |
| 16 | |
| 17 | // meta |
| 18 | organization "OpenConfig working group"; |
| 19 | |
| 20 | contact |
| 21 | "OpenConfig working group |
| 22 | www.openconfig.net"; |
| 23 | |
| 24 | description |
| 25 | "This model describes configuration and operational state data |
| 26 | for an optical transport line system node, or ROADM (incl. CDC |
| 27 | ROADMs, WSS, Dynamic Gain Equalizer/DGE). |
| 28 | |
| 29 | Nodes are modeled as a configurable switching element with |
| 30 | ingress and egress ports, as well as a number of add/drop ports |
| 31 | that can be set up to direct portions of the optical spectrum |
| 32 | to the appropriate degrees."; |
| 33 | |
| 34 | oc-ext:openconfig-version "0.3.0"; |
| 35 | |
| 36 | revision "2017-07-08" { |
| 37 | description |
| 38 | "Support multiple OCMs, add monitor port type |
| 39 | and refs to hw ports, "; |
| 40 | reference "0.3.0"; |
| 41 | } |
| 42 | |
| 43 | revision "2017-03-28" { |
| 44 | description |
| 45 | "Added min/max/avg stats, status for media channels, OCM, APS"; |
| 46 | reference "0.2.0"; |
| 47 | } |
| 48 | |
| 49 | revision "2016-03-31" { |
| 50 | description |
| 51 | "Initial public release"; |
| 52 | reference "0.1.0"; |
| 53 | } |
| 54 | |
| 55 | |
| 56 | |
| 57 | // grouping statements |
| 58 | |
| 59 | grouping media-channel-port-config { |
| 60 | description |
| 61 | "Configuration data for a media channel source/dest port"; |
| 62 | |
| 63 | leaf port-name { |
| 64 | type oc-if:base-interface-ref; |
| 65 | description |
| 66 | "Reference to the corresponding node interface"; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | grouping media-channel-port-state { |
| 71 | description |
| 72 | "Operational state data for a media channel source/dest port"; |
| 73 | } |
| 74 | |
| 75 | grouping media-channel-source-port-top { |
| 76 | description |
| 77 | "Top-level grouping for source of the media channel"; |
| 78 | |
| 79 | container source { |
| 80 | description |
| 81 | "Top-level container for media channel source"; |
| 82 | |
| 83 | container config { |
| 84 | description |
| 85 | "Configuration data for the media channel source"; |
| 86 | |
| 87 | uses media-channel-port-config; |
| 88 | } |
| 89 | |
| 90 | container state { |
| 91 | |
| 92 | config false; |
| 93 | |
| 94 | description |
| 95 | "Operational state data for the media channel source"; |
| 96 | |
| 97 | uses media-channel-port-config; |
| 98 | uses media-channel-port-state; |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | grouping media-channel-dest-port-top { |
| 104 | description |
| 105 | "Top-level grouping for destination of the media channel"; |
| 106 | |
| 107 | container dest { |
| 108 | description |
| 109 | "Top-level container for media channel destination"; |
| 110 | |
| 111 | container config { |
| 112 | description |
| 113 | "Configuration data for the media channel destination"; |
| 114 | |
| 115 | uses media-channel-port-config; |
| 116 | } |
| 117 | |
| 118 | container state { |
| 119 | |
| 120 | config false; |
| 121 | |
| 122 | description |
| 123 | "Operational state data for the media channel destination"; |
| 124 | |
| 125 | uses media-channel-port-config; |
| 126 | uses media-channel-port-state; |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | grouping media-channel-psd-config { |
| 132 | description |
| 133 | "Configuration data for the media channel PSD"; |
| 134 | |
| 135 | leaf lower-frequency { |
| 136 | type oc-opt-types:frequency-type; |
| 137 | description |
| 138 | "Lower frequency of the specified PSD"; |
| 139 | } |
| 140 | |
| 141 | leaf upper-frequency { |
| 142 | type oc-opt-types:frequency-type; |
| 143 | description |
| 144 | "Upper frequency of the specified PSD"; |
| 145 | } |
| 146 | |
| 147 | leaf psd { |
| 148 | type oc-types:ieeefloat32; |
| 149 | units "nW/MHz"; |
| 150 | description |
| 151 | "Power spectral density expressed in nanowatts per |
| 152 | megahertz, nW/MHz. These units allow the value to often |
| 153 | be greater than 1.0. It also avoids dealing with zero values |
| 154 | for 0dBm. For example, a 40GHz wide channel |
| 155 | with 0dBm power would be: |
| 156 | 0dBm = 1mW = 10^6nW |
| 157 | 40GHz = 40,000MHz |
| 158 | 0dBm/40GHz = 10^6nW/40,000MHz = 1000/40 = 25"; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | grouping media-channel-psd-state { |
| 163 | description |
| 164 | "Operational state data for the media channel PSD"; |
| 165 | } |
| 166 | |
| 167 | grouping media-channel-psd-top { |
| 168 | description |
| 169 | "Top-level grouping "; |
| 170 | |
| 171 | container psd-distribution { |
| 172 | description |
| 173 | "Enclosing container for the list of values describing |
| 174 | the power spectral density distribution"; |
| 175 | |
| 176 | list psd-value { |
| 177 | key "lower-frequency upper-frequency"; |
| 178 | description |
| 179 | "List of tuples describing the PSD distribution"; |
| 180 | |
| 181 | leaf lower-frequency { |
| 182 | type leafref { |
| 183 | path "../config/lower-frequency"; |
| 184 | } |
| 185 | description |
| 186 | "Reference to the list key"; |
| 187 | } |
| 188 | |
| 189 | leaf upper-frequency { |
| 190 | type leafref { |
| 191 | path "../config/upper-frequency"; |
| 192 | } |
| 193 | description |
| 194 | "Reference to the list key"; |
| 195 | } |
| 196 | |
| 197 | container config { |
| 198 | description |
| 199 | "Configuration data for PSD"; |
| 200 | |
| 201 | uses media-channel-psd-config; |
| 202 | } |
| 203 | |
| 204 | container state { |
| 205 | |
| 206 | config false; |
| 207 | |
| 208 | description |
| 209 | "Operational state data for PSD"; |
| 210 | |
| 211 | uses media-channel-psd-config; |
| 212 | uses media-channel-psd-state; |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | grouping media-channel-config { |
| 219 | description |
| 220 | "Configuration data for media channel definitions"; |
| 221 | |
| 222 | leaf index { |
| 223 | type uint32; |
| 224 | description |
| 225 | "Identifier for the defined media channel"; |
| 226 | } |
| 227 | |
| 228 | leaf name { |
| 229 | type string; |
| 230 | description |
| 231 | "The user supplied name of the media channel"; |
| 232 | } |
| 233 | |
| 234 | leaf lower-frequency { |
| 235 | type oc-opt-types:frequency-type; |
| 236 | description |
| 237 | "The lower frequency for the spectrum defined by this media |
| 238 | channel"; |
| 239 | } |
| 240 | |
| 241 | leaf upper-frequency { |
| 242 | type oc-opt-types:frequency-type; |
| 243 | description |
| 244 | "The upper frequency for the spectrum defined by this media |
| 245 | channel"; |
| 246 | } |
| 247 | |
| 248 | leaf admin-status { |
| 249 | type oc-opt-types:admin-state-type; |
| 250 | description |
| 251 | "Sets the admin status of the media channel"; |
| 252 | } |
| 253 | |
| 254 | } |
| 255 | |
| 256 | grouping media-channel-state { |
| 257 | description |
| 258 | "Operational state data for media channels "; |
| 259 | |
| 260 | leaf oper-status { |
| 261 | type enumeration { |
| 262 | enum UP { |
| 263 | description |
| 264 | "Media channel is operationally up"; |
| 265 | } |
| 266 | enum DOWN { |
| 267 | description |
| 268 | "Media channel is operationally down"; |
| 269 | } |
| 270 | } |
| 271 | description |
| 272 | "Operational state of the media channel"; |
| 273 | } |
| 274 | |
| 275 | } |
| 276 | |
| 277 | grouping media-channel-top { |
| 278 | description |
| 279 | "Top-level grouping for list of defined media channels"; |
| 280 | |
| 281 | container media-channels { |
| 282 | description |
| 283 | "Enclosing container for media channel list"; |
| 284 | |
| 285 | list channel { |
| 286 | key "index"; |
| 287 | description |
| 288 | "List of media channels"; |
| 289 | |
| 290 | leaf index { |
| 291 | type leafref { |
| 292 | path "../config/index"; |
| 293 | } |
| 294 | description |
| 295 | "Reference to index number of the media channel"; |
| 296 | } |
| 297 | |
| 298 | container config { |
| 299 | description |
| 300 | "Configuration data "; |
| 301 | |
| 302 | uses media-channel-config; |
| 303 | } |
| 304 | |
| 305 | container state { |
| 306 | |
| 307 | config false; |
| 308 | |
| 309 | description |
| 310 | "Operational state data "; |
| 311 | |
| 312 | uses media-channel-config; |
| 313 | uses media-channel-state; |
| 314 | } |
| 315 | |
| 316 | uses media-channel-source-port-top; |
| 317 | uses media-channel-dest-port-top; |
| 318 | uses media-channel-psd-top; |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | grouping wavelength-router-top { |
| 324 | description |
| 325 | "Top level grouping for the wavelength router"; |
| 326 | |
| 327 | container wavelength-router { |
| 328 | description |
| 329 | "Top-level container for wavelength router device"; |
| 330 | |
| 331 | uses media-channel-top; |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | // data definition statements |
| 336 | |
| 337 | uses wavelength-router-top; |
| 338 | |
| 339 | // augment statements |
| 340 | |
| 341 | // rpc statements |
| 342 | |
| 343 | // notification statements |
| 344 | |
| 345 | } |