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