Jeff Groom | 34c28ce | 2018-04-26 19:42:18 -0600 | [diff] [blame] | 1 | module ciena-waveserver-alarm { |
| 2 | namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-alarm"; |
| 3 | prefix alarm; |
| 4 | |
| 5 | import ciena-waveserver-typedefs { |
| 6 | prefix cienawstypes; |
| 7 | } |
| 8 | |
| 9 | organization |
| 10 | "Ciena Corporation"; |
| 11 | contact |
| 12 | "Web URL: http://www.ciena.com/ |
| 13 | Postal: 7035 Ridge Road |
| 14 | Hanover, Maryland 21076 |
| 15 | U.S.A. |
| 16 | Phone: +1 800-921-1144 |
| 17 | Fax: +1 410-694-5750"; |
| 18 | description |
| 19 | "This module defines alarm data for the Waveserver Platform."; |
| 20 | |
| 21 | revision 2017-12-15 { |
| 22 | description |
| 23 | "Updated defined alarm severity type from enum to bits, to accommodate multi-severity alarms. |
| 24 | Added 'reset' alarm-reason enum value for alarm history. |
| 25 | Added 'intermittent' boolean attribute to active alarms container. |
| 26 | Added 'return-string' to provide description in responses to RPC requests."; |
| 27 | reference "Waveserver Ai user's guide."; |
| 28 | } |
| 29 | revision 2017-06-16 { |
| 30 | description |
| 31 | "Waveserver Platform Data Model |
| 32 | Migrated from Waveserver Classic R1.4 YANG model. |
| 33 | Updated namespace to 'ciena-waveserver'. |
| 34 | Added alarm-instance-string typedef with chassis-specific descriptions. |
| 35 | Removed 'cleared' and 'info' alarm-severity enum values. |
| 36 | Removed 'reset', 'delete', and 'config' alarm-reason enum values. |
| 37 | Updated description strings. |
| 38 | Moved 'reason' leaf into 'alarm-group' grouping."; |
| 39 | reference "Waveserver Ai user's guide."; |
| 40 | } |
| 41 | |
| 42 | typedef alarm-severity { |
| 43 | type enumeration { |
| 44 | enum "critical" { |
| 45 | value 3; |
| 46 | description |
| 47 | "Critical Alarm Severity."; |
| 48 | } |
| 49 | enum "major" { |
| 50 | value 4; |
| 51 | description |
| 52 | "Major Alarm Severity."; |
| 53 | } |
| 54 | enum "minor" { |
| 55 | value 5; |
| 56 | description |
| 57 | "Minor Alarm Severity."; |
| 58 | } |
| 59 | enum "warning" { |
| 60 | value 6; |
| 61 | description |
| 62 | "Warning Alarm Severity."; |
| 63 | } |
| 64 | } |
| 65 | description |
| 66 | "Alarm Severity."; |
| 67 | } |
| 68 | |
| 69 | typedef alarm-severity-bits { |
| 70 | type bits { |
| 71 | bit critical { |
| 72 | position 3; |
| 73 | description |
| 74 | "Critical Alarm Severity"; |
| 75 | } |
| 76 | bit major { |
| 77 | position 4; |
| 78 | description |
| 79 | "Major Alarm Severity"; |
| 80 | } |
| 81 | bit minor { |
| 82 | position 5; |
| 83 | description |
| 84 | "Minor Alarm Severity"; |
| 85 | } |
| 86 | bit warning { |
| 87 | position 6; |
| 88 | description |
| 89 | "Warning Alarm Severity"; |
| 90 | } |
| 91 | } |
| 92 | description |
| 93 | "Alarm Severity bits. A list of the supported severities of the defined alarm."; |
| 94 | } |
| 95 | |
| 96 | typedef alarm-reason { |
| 97 | type enumeration { |
| 98 | enum "reset" { |
| 99 | value 1; |
| 100 | description |
| 101 | "Alarm was raised due to reset/restart operation."; |
| 102 | } |
| 103 | enum "set" { |
| 104 | value 2; |
| 105 | description |
| 106 | "Alarm is active or became active."; |
| 107 | } |
| 108 | enum "acknowledge" { |
| 109 | value 5; |
| 110 | description |
| 111 | "Alarm has been manually acknowledged."; |
| 112 | } |
| 113 | enum "clear" { |
| 114 | value 6; |
| 115 | description |
| 116 | "Alarm was cleared."; |
| 117 | } |
| 118 | enum "intermittent" { |
| 119 | value 10; |
| 120 | description |
| 121 | "Alarm is intermittent."; |
| 122 | } |
| 123 | } |
| 124 | description |
| 125 | "The reason for the alarm entry."; |
| 126 | } |
| 127 | |
| 128 | typedef alarm-instance-string { |
| 129 | type string { |
| 130 | length "0..32"; |
| 131 | } |
| 132 | description |
| 133 | "The object instance the alarm is raised against. |
| 134 | |
| 135 | Example formats: |
| 136 | |
| 137 | Waveserver Waveserver Ai |
| 138 | ---------- ------------- |
| 139 | Chassis Chassis |
| 140 | DCN DCN |
| 141 | ILAN-<n> ILAN-<n> |
| 142 | PSU-<n> PSU-<n> |
| 143 | CFU-<n> CFU-<n> |
| 144 | n/a Module-<s> |
| 145 | XCVR-<p> XCVR-<s>-<p> |
| 146 | PTP-<p> PTP-<s>-<p> |
| 147 | Port-<p> Port-<s>-<p> |
| 148 | n/a Channel-<s>-<p>.<c> |
| 149 | Service-<n> Service-<n> |
| 150 | "; |
| 151 | } |
| 152 | |
| 153 | grouping alarm-group { |
| 154 | description |
| 155 | "Grouping for common alarm attributes used in 'active' and 'history' lists."; |
| 156 | leaf alarm-table-id { |
| 157 | type uint32; |
| 158 | config false; |
| 159 | description |
| 160 | "A unique identifier per alarm description on a product. Alarm table id may not represent the same alarm type on a Waveserver 400G and Waverver Ai"; |
| 161 | } |
| 162 | leaf reason { |
| 163 | type alarm-reason; |
| 164 | config false; |
| 165 | description |
| 166 | "The reason for the alarm entry."; |
| 167 | } |
| 168 | leaf severity { |
| 169 | type alarm-severity; |
| 170 | config false; |
| 171 | description |
| 172 | "The alarm severity. Critical alarms are service affecting. Other severities are not service affecting."; |
| 173 | } |
| 174 | leaf local-date-time { |
| 175 | type cienawstypes:string-maxl-32; |
| 176 | config false; |
| 177 | description |
| 178 | "The local date and time when alarm was updated."; |
| 179 | } |
| 180 | leaf instance { |
| 181 | type alarm-instance-string; |
| 182 | config false; |
| 183 | description |
| 184 | "The object instance the alarm is raised against."; |
| 185 | } |
| 186 | leaf description { |
| 187 | type cienawstypes:string-maxl-44; |
| 188 | config false; |
| 189 | description |
| 190 | "The alarm description."; |
| 191 | } |
| 192 | leaf site-identifier { |
| 193 | type uint16 { |
| 194 | range "0..65535"; |
| 195 | } |
| 196 | config false; |
| 197 | description |
| 198 | "An integer to uniquely identify the site where this Waveserver is located."; |
| 199 | } |
| 200 | leaf group-identifier { |
| 201 | type uint8 { |
| 202 | range "0..99"; |
| 203 | } |
| 204 | config false; |
| 205 | description |
| 206 | "An integer to uniquely identify a group of Waveservers within a site."; |
| 207 | } |
| 208 | leaf member-identifier { |
| 209 | type uint8 { |
| 210 | range "0..254"; |
| 211 | } |
| 212 | config false; |
| 213 | description |
| 214 | "An integer to uniquely identify a Waveserver chassis within a group of Waveservers."; |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | container waveserver-alarms { |
| 219 | config false; |
| 220 | description |
| 221 | "Waveserver alarms."; |
| 222 | list active { |
| 223 | key "alarm-instance-id"; |
| 224 | config false; |
| 225 | description |
| 226 | "Active alarms"; |
| 227 | leaf alarm-instance-id { |
| 228 | type uint32; |
| 229 | description |
| 230 | "The alarm Instance ID uniquely identifies the occurence of the alarm since the last restart of the Waveserver. It can be used to correlate the raise and clear of the occurence."; |
| 231 | } |
| 232 | leaf acknowledged { |
| 233 | type boolean; |
| 234 | config false; |
| 235 | description |
| 236 | "Alarm has been acknowledged. Acknowledged alarms are not counted in the alarm statistics."; |
| 237 | } |
| 238 | leaf intermittent { |
| 239 | type boolean; |
| 240 | config false; |
| 241 | description |
| 242 | "Alarm condition is intermittent."; |
| 243 | } |
| 244 | uses alarm-group; |
| 245 | } |
| 246 | list history { |
| 247 | key "history-id"; |
| 248 | config false; |
| 249 | description |
| 250 | "Alarm history"; |
| 251 | leaf history-id { |
| 252 | type uint32; |
| 253 | config false; |
| 254 | description |
| 255 | "The alarm history ID uniquely identifies the alarm and action (set or clear) since the Waveserver was installed."; |
| 256 | } |
| 257 | leaf alarm-instance-id { |
| 258 | type uint32; |
| 259 | config false; |
| 260 | description |
| 261 | "The alarm instance ID."; |
| 262 | } |
| 263 | uses alarm-group; |
| 264 | } |
| 265 | list defined { |
| 266 | key "alarm-table-id"; |
| 267 | config false; |
| 268 | description |
| 269 | "Defined Alarm Table"; |
| 270 | leaf alarm-table-id { |
| 271 | type uint32; |
| 272 | config false; |
| 273 | description |
| 274 | "The alarm table ID."; |
| 275 | } |
| 276 | leaf enabled { |
| 277 | type boolean; |
| 278 | config false; |
| 279 | description |
| 280 | "Alarm is enabled."; |
| 281 | } |
| 282 | leaf active { |
| 283 | type boolean; |
| 284 | config false; |
| 285 | description |
| 286 | "Alarm is active."; |
| 287 | } |
| 288 | leaf threshold { |
| 289 | type uint32; |
| 290 | config false; |
| 291 | description |
| 292 | "The alarm threshold."; |
| 293 | } |
| 294 | leaf cap { |
| 295 | type uint32; |
| 296 | config false; |
| 297 | description |
| 298 | "The alarm cap."; |
| 299 | } |
| 300 | leaf severity { |
| 301 | type alarm-severity-bits; |
| 302 | config false; |
| 303 | description |
| 304 | "The alarm severity (or severities) supported for this alarm type."; |
| 305 | } |
| 306 | leaf instance { |
| 307 | type alarm-instance-string; |
| 308 | config false; |
| 309 | description |
| 310 | "The object instance the alarm is raised against."; |
| 311 | } |
| 312 | leaf description { |
| 313 | type cienawstypes:string-maxl-44; |
| 314 | config false; |
| 315 | description |
| 316 | "The alarm description."; |
| 317 | } |
| 318 | } |
| 319 | list statistics { |
| 320 | key "index"; |
| 321 | config false; |
| 322 | description |
| 323 | "Waveserver Alarm Statistics."; |
| 324 | leaf index { |
| 325 | type uint32; |
| 326 | config false; |
| 327 | description |
| 328 | "The alarm statistics table index."; |
| 329 | } |
| 330 | leaf active { |
| 331 | type boolean; |
| 332 | description |
| 333 | "There is alarm active for the alarm type. Acknowledged alarms are not counted."; |
| 334 | } |
| 335 | leaf disabled { |
| 336 | type boolean; |
| 337 | description |
| 338 | "There is alarm disabled for the alarm type."; |
| 339 | } |
| 340 | leaf count { |
| 341 | type uint32; |
| 342 | description |
| 343 | "The count of active alarms for the alarm type. Acknowledged alarms are not counted."; |
| 344 | } |
| 345 | leaf cumulative { |
| 346 | type uint32; |
| 347 | description |
| 348 | "The cumulative count of active alarms for the alarm type "; |
| 349 | } |
| 350 | leaf type { |
| 351 | type cienawstypes:string-maxl-32; |
| 352 | description |
| 353 | "The alarm type."; |
| 354 | } |
| 355 | } |
| 356 | } |
| 357 | rpc waveserver-alarm-acknowledge-active { |
| 358 | description |
| 359 | "Acknowledge an active alarm"; |
| 360 | input { |
| 361 | leaf alarm-instance-id { |
| 362 | type uint32; |
| 363 | description |
| 364 | "The instance ID of the active alarm. If not specified, all alarms will be acknowledged."; |
| 365 | } |
| 366 | } |
| 367 | output { |
| 368 | leaf return-code { |
| 369 | type uint32; |
| 370 | description |
| 371 | "return code: 0 is success; non-zero is failure"; |
| 372 | } |
| 373 | leaf return-string { |
| 374 | type cienawstypes:string-maxl-254; |
| 375 | description |
| 376 | "Return code description"; |
| 377 | } |
| 378 | } |
| 379 | } |
| 380 | rpc waveserver-alarm-clear-history { |
| 381 | description |
| 382 | "Clear the alarm history."; |
| 383 | output { |
| 384 | leaf return-code { |
| 385 | type uint32; |
| 386 | description |
| 387 | "return code: 0 is success; non-zero is failure"; |
| 388 | } |
| 389 | leaf return-string { |
| 390 | type cienawstypes:string-maxl-254; |
| 391 | description |
| 392 | "Return code description"; |
| 393 | } |
| 394 | } |
| 395 | } |
| 396 | } |