idnits 2.17.1 draft-wwx-netmod-event-yang-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 20 instances of too long lines in the document, the longest one being 16 characters in excess of 72. ** The abstract seems to contain references ([RFC7950]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 273 has weird spacing: '...nt-name str...' == Line 282 has weird spacing: '...nterval uin...' == Line 295 has weird spacing: '...mediate emp...' -- The document date (September 30, 2018) is 2032 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFC8342' is mentioned on line 76, but not defined == Missing Reference: 'RFC3877' is mentioned on line 99, but not defined == Missing Reference: 'RFC8340' is mentioned on line 104, but not defined == Missing Reference: 'RFC8040' is mentioned on line 873, but not defined == Missing Reference: 'RFC5246' is mentioned on line 877, but not defined ** Obsolete undefined reference: RFC 5246 (Obsoleted by RFC 8446) == Unused Reference: 'RFC6370' is defined on line 949, but no explicit reference was found in the text == Unused Reference: 'RFC7952' is defined on line 963, but no explicit reference was found in the text ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) Summary: 4 errors (**), 0 flaws (~~), 11 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NETMOD Working Group M. Wang 3 Internet-Draft Q. Wu 4 Intended status: Standards Track Huawei 5 Expires: April 3, 2019 C. Xie 6 China Telecom 7 September 30, 2018 9 A YANG Data model for Event Management 10 draft-wwx-netmod-event-yang-00 12 Abstract 14 This document defines an YANG data model for event management 15 [RFC7950]. The Event YANG provides the ability to monitor state 16 change on the local system or on a remote system and take simple 17 action when a trigger condition on system state is met. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on April 3, 2019. 36 Copyright Notice 38 Copyright (c) 2018 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (https://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. Conventions used in this document . . . . . . . . . . . . . . 2 55 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 56 2.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 57 3. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 4. Relationship to YANG PUSH . . . . . . . . . . . . . . . . . . 3 59 5. Relationship to EVENT MIB . . . . . . . . . . . . . . . . . . 4 60 6. Model Overview . . . . . . . . . . . . . . . . . . . . . . . 5 61 7. EVENT YANG Module . . . . . . . . . . . . . . . . . . . . . . 8 62 8. Security Considerations . . . . . . . . . . . . . . . . . . . 19 63 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 64 10. Normative References . . . . . . . . . . . . . . . . . . . . 20 65 Appendix A. Example of Event . . . . . . . . . . . . . . . . . . 21 66 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 68 1. Introduction 70 This document defines an Event YANG data model [RFC7950]. The Event 71 YANG provides the ability to monitor state changes on the local 72 system or on a remote system and take simple action when a trigger 73 condition on system state is met. 75 The data model in this document is designed to be compliant with the 76 Network Management Datastore Architecture (NMDA) [RFC8342]. 78 2. Conventions used in this document 80 2.1. Terminology 82 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 83 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 84 document are to be interpreted as described in [RFC2119]. In this 85 document, these words will appear with that interpretation only when 86 in ALL CAPS. Lower case uses of these words are not to be 87 interpreted as carrying [RFC2119] significance. 89 This document uses the following terms: 91 Error A deviation of a system from normal operation [RFC3877]. 93 Fault Lasting error or warning condition [RFC3877]. 95 Event Something that happens which may be of interest or trigger the 96 invocation of the rule. A fault, an alarm, a change in network 97 state, network security threat, hardware malfunction, buffer 98 untilization crossing a threshold, network connection setup, an 99 external input to the system, for example [RFC3877]. 101 2.2. Tree Diagrams 103 Tree diagrams used in this document follow the notation defined in 104 [RFC8340]. 106 3. Objectives 108 This section describes some of the design objectives for the Event 109 Data Model: 111 The Event YANG should provide the ability to monitor yang instance on 112 a local or remote system using the NETCONF/RESTCONF, and initiates 113 simple actions whenever a trigger condition is met. For example, a 114 NETCONF subscribed notification can be generated when an instance 115 value exceeds the threshold. 117 Clear and precise identification of Event types and instances. 119 Allow the server to inform the client that certain Events are related 120 to other Events. 122 Allow one event to be able to trigger another external event or 123 generate derived events. 125 The event data model defined in this document can be implemented on a 126 system that also implements EVENT-MIB; thus, the mapping between the 127 event data model and ENTITY-MIB should be clear. 129 4. Relationship to YANG PUSH 131 YANG-push mechanism provides a subscription service for updates from 132 a datastore. And it support two types of subscriptions which are 133 distinguished by how updates are triggered: periodic and on-change. 135 The On-change PUSH allow receivers to receive updates whenever 136 changes to targeted objects occur. This document specifies a 137 mechanism that provides three trigger conditions: 139 o Existence: When a specific yang instance appears, the trigger 140 fires. E.g. Reserved ports are configured. 142 o Boolean: If the test result is true the trigger fires. The 143 trigger will not fire again until the value has become false and 144 come back to true. And the user can set the type of boolean 145 comparison (e.g. unequal, equal, less, less-or-equal, greater, 146 greater-or-equal, etc), so for example if the boolean comparison 147 type is 'less' the trigger will be fired if the value of YANG 148 Instance is less than the value of Boolean Value. 150 o Threshold: The event that may be triggered when a YANG instance at 151 data-instance list is found. If the first sample after this 152 instance becomes active is greater than or equal to 'rising-value' 153 and the 'startup' is equal to 'rising' then one threshold rising 154 event is triggered for that instance. And if the first sample 155 after this instance becomes active is less than or equal to 156 'falling-value' and the 'startup' is equal to 'falling' then one 157 threshold falling event is triggered for that instance. 159 And the YANG PUSH mechanism more focus on the remote mirroring and 160 monitoring of configuration and operational state. For example, for 161 on change method, the subscriber will receive a notification if the 162 changes appears. The model defines in this document provides a 163 method which allow automatic setting the value of the corresponding 164 instance node when some event is triggered. It esbalishes connection 165 between network service monitoring and network service provision and 166 can use output generated by network service monitoring as input of 167 network service provision and thereby provide automated network 168 management. The details of the usage example is described in 169 Appendix A. 171 5. Relationship to EVENT MIB 173 If the device implements the EVENT-MIB [RFC2981], each entry in the 174 "/events/event/trigger" list is mapped to MteTriggerEntry,MteTriggerE 175 xistenceEntry,MteTriggerBooleanEntry,MteTriggerThresholdEntry,MteObje 176 ctsEntry,MteEventEntry,MteEventSetEntry. respectively. 178 The following table lists the YANG data nodes with corresponding 179 objects in the EVENT-MIB [RFC2981]. 181 +------------------------------|---------------------------------+ 182 | | | 183 | YANG data node in | EVENT-MIB Objects | 184 | ietf-event.yang | (RFC2981) | 185 | | | 186 +----------------------------------------------------------------+ 187 | | | 188 | evt-smp-min | mteResourceSampleMinimum | 189 | | | 190 | evt-smp-instance-max | mteResourceSampleInstanceMaximum| 191 | | | 192 | traget | mteObjectsName | 193 | | | 194 | event-name | mteEventName | 195 | | | 196 | event-description | mteEventComment | 197 | | | 198 | value | mteEventSetValue | 199 | | | 200 | events/event/trigger/name | mteTriggerName | 201 | | | 202 | trigger-description | mteTriggerComment | 203 | | | 204 | frequency | mteTriggerFrequency | 205 | | | 206 | comparison | mteTriggerBooleanComparison | 207 | | | 208 | value | mteTriggerBooleanValue | 209 | | | 210 | rising-event | mteTriggerThresholdRising | 211 | | | 212 | falling-event | mteTriggerThresholdFalling | 213 | | | 214 | delta-rising-event | mteTriggerThresholdDeltaRising | 215 | | | 216 | threshold/startup | mteTriggerThresholdStartup | 217 | | | 218 | existence/enable | mteTriggerExistenceStartup | 219 | | | 220 | boolean/enable | mteTriggerBooleanStartup | 221 | | | 222 -------------------------------|---------------------------------| 224 6. Model Overview 226 The event yang has four lists: trigger, target, event, and action. 227 Triggers define the targets meeting some conditions that lead to 228 events. Events trigger corresponding actions. 230 The trigger list defines what managed objects or targets are to be 231 monitored and how and relates each trigger to an event. In this 232 model, the trigger list provides three trigger conditions: 234 o Existence: When a specific yang instance appears, the trigger 235 fires. 237 o Boolean: If the test result is true the trigger fires. 239 o Threshold: The event that may be triggered when a YANG instance at 240 data-instance list is met the threshold. 242 Each trigger can be seen as a logical test that, if satisfied or 243 evaluated to be true, cause the action to be carried out. 245 The target list defines managed objects that can be added to 246 notifications based or be set to a new value on the trigger, the 247 trigger test type, or the event that resulted in the actions. 249 The event list defines what happens when an event is triggered, i.e., 250 trigger corresponding action, e.g.,sending a notification, setting a 251 value to the managed object or both. 253 The action list consists of updates or innvcations on local managed 254 object attributes and defines a set of actions which will be 255 performed (e.g. notification, set, another event, etc) when 256 corresponding event be triggered. The value to be set can use many 257 variations on rule structure. 259 This document defines the YANG module "ietf-event", which has the 260 following structure: 262 module: ietf-event 263 +--rw events 264 +--rw evt-smp-min? uint32 265 +--rw evt-smp-instance-max? uint32 266 +--rw event* [event-name type] 267 +--rw event-name string 268 +--rw type identityref 269 +--rw event-description? string 270 +--rw target* target 271 +--rw clear? boolean 272 +--rw related-event* [event-name type] 273 | +--rw event-name string 274 | +--rw type identityref 275 +--rw trigger* [name] 276 | +--rw name string 277 | +--rw type? enumeration 278 | +--rw trigger-description? string 279 | +--rw frequency 280 | | +--rw type? identityref 281 | | +--rw periodic 282 | | | +--rw interval uint32 283 | | | +--rw start? yang:date-and-time 284 | | | +--rw end? yang:date-and-time 285 | | +--rw scheduling 286 | | | +--rw month* string 287 | | | +--rw day-of-month* uint8 288 | | | +--rw day-of-week* uint8 289 | | | +--rw hour* uint8 290 | | | +--rw minute* uint8 291 | | | +--rw second* uint8 292 | | | +--rw start? yang:date-and-time 293 | | | +--rw end? yang:date-and-time 294 | | +--rw immediate 295 | | +--rw immediate empty 296 | +--rw (test)? 297 | +--:(existences) 298 | | +--rw existences 299 | | +--rw target* -> /events/event/target 300 | | +--rw enable? boolean 301 | +--:(boolean) 302 | | +--rw boolean 303 | | +--rw comparison? enumeration 304 | | +--rw value? match-value 305 | | +--rw target* -> /events/event/target 306 | | +--rw enable? boolean 307 | +--:(threshold) 308 | +--rw threshold 309 | +--rw rising-value? match-value 310 | +--rw rising-target* -> /events/event/target 311 | +--rw falling-value? match-value 312 | +--rw falling-target* -> /events/event/target 313 | +--rw delta-rising-value? match-value 314 | +--rw delta-rising-target* -> /events/event/target 315 | +--rw startup? enumeration 316 +--rw action* [action-name] 317 +--rw action-name string 318 +---n event-notification 319 | +---- event-name? -> /events/event/event-name 320 | +---- type? -> /events/event/type 321 | +---- target* target 322 +---x set 323 | +---w input 324 | +---w target* target 325 | +---w value? 326 +--rw trigger-event* -> ../../event-name 328 The relation between Event, Trigger, Target and Action is described 329 as follows: 331 +-------------------------------+ 332 | Event | 333 | +-------+ | 334 | |Target | | 335 | +---|---+ | +-------------------------------+ 336 | | | | Event | 337 | +----V---+ +--------+ | | +-------+ | 338 | |Trigger |------->| Action |-------->|Target | | 339 | +--------+ +--------+ | | +---|---+ | 340 +-------------------------------+ | | | 341 | +----|---+ +--------+ | 342 | |Trigger |------- | Action | | 343 | +--------+ +--------+ | 344 +-------------------------------+ 346 One event may trigger another event, but if it does not trigger 347 another event, the right part of above figure should be ignored. 349 7. EVENT YANG Module 351 file "ietf-event@2018-09-18.yang" 353 module ietf-event { 354 yang-version 1.1; 355 namespace "urn:ietf:params:xml:ns:yang:ietf-event"; 356 prefix evt; 358 import ietf-yang-types { 359 prefix yang; 360 } 362 organization 363 "IETF xxx Working Group"; 364 contact 365 "Zitao Wang: wangzitao@huawei.com 366 Qin Wu: bill.wu@huawei.com"; 367 description 368 "This module defines a model for the service topology."; 370 revision 2018-09-18 { 371 description 372 "Initial revision."; 373 reference "foo"; 375 } 377 identity event-type { 378 description 379 "Base identity for event type"; 380 } 382 identity frequency { 383 description 384 "Base identity for frequency"; 385 } 387 identity periodic { 388 base frequency; 389 description 390 "Identity for periodic trigger"; 391 } 393 identity scheduling { 394 base frequency; 395 description 396 "Identity for scheduling trigger"; 397 } 399 identity immediate { 400 base frequency; 401 description 402 "Identity for immediate trigger"; 403 } 405 typedef match-value { 406 type union { 407 type yang:xpath1.0; 408 type yang:object-identifier; 409 type string; 410 } 411 description 412 "This type is used to match resources of type 'target'. 413 Since the type 'target' is a union of different types, 414 the 'match-value' type is also a union of corresponding 415 types."; 416 } 418 typedef target { 419 type union { 420 type instance-identifier; 421 type yang:object-identifier; 422 type yang:uuid; 423 type string; 424 } 425 description 426 "If the target is modelled in YANG, this type will 427 be an instance-identifier. 428 If the target is an SNMP object, the type will be an 429 object-identifier. 430 If the target is anything else, for example a distinguished 431 name or a CIM path, this type will be a string. 432 If the target is identified by a UUID use the uuid 433 type. 434 If the server supports several models, the presedence should 435 be in the order as given in the union definition."; 436 } 438 grouping start-end-grouping { 439 description 440 "A grouping that provides start and end times for 441 Event objects."; 442 leaf start { 443 type yang:date-and-time; 444 description 445 "The date and time when the Event object 446 starts to create triggers."; 447 } 448 leaf end { 449 type yang:date-and-time; 450 description 451 "The date and time when the Event object 452 stops to create triggers. 453 It is generally a good idea to always configure 454 an end time and to refresh the end time as needed 455 to ensure that agents that lose connectivity to 456 their Controller do not continue executing Schedules 457 forever."; 458 } 459 } 461 container events { 462 leaf evt-smp-min { 463 type uint32; 464 description 465 "Sets the minimum value for data instance sampling"; 466 } 467 leaf evt-smp-instance-max { 468 type uint32; 469 description 470 "Sets the maximum value for data instance instance sampling."; 472 } 473 list event { 474 key "event-name type"; 475 leaf event-name { 476 type string; 477 description 478 "Event name"; 479 } 480 leaf type { 481 type identityref { 482 base event-type; 483 } 484 description 485 "Type of event"; 486 } 487 leaf event-description { 488 type string; 489 description 490 "Event description"; 491 } 492 leaf-list target { 493 type target; 494 description 495 "targeted objects"; 496 } 497 leaf clear { 498 type boolean; 499 default "false"; 500 description 501 "A flag indicate whether the event be closed"; 502 } 503 list related-event { 504 key "event-name type"; 505 leaf event-name { 506 type string; 507 description 508 "Event name"; 509 } 510 leaf type { 511 type identityref { 512 base event-type; 513 } 514 description 515 "Type of event"; 516 } 517 description 518 "List for related events"; 519 } 520 list trigger { 521 key "name"; 522 leaf name { 523 type string; 524 description 525 "Trigger name"; 526 } 527 leaf type { 528 type enumeration { 529 enum "existence" { 530 description 531 "Indicates that the trigger type is 'existence'. 532 For 'existence', the specific test is as selected. 533 When an object appears, vanishes 534 or changes value, the trigger fires."; 535 } 536 enum "boolean" { 537 description 538 "Indicates that the trigger type is 'boolean'. 539 If the test result is true the trigger fires. The 540 trigger will not fire again until the value has become false and 541 come back to true."; 542 } 543 enum "threshold" { 544 description 545 "Indicates that the trigger type is 'threshold'. 546 The event that may be triggered when a YANG instance 547 at data-instance list is found. If the first sample after this 548 instance becomes active is greater than or equal to 'rising-value' 549 and the 'startup' is equal to 'rising' then one threshold rising 550 event is triggered for that instance."; 551 } 552 } 553 description 554 "Trigger type"; 555 } 556 leaf trigger-description { 557 type string; 558 description 559 "Trigger description"; 560 } 561 container frequency { 562 leaf type { 563 type identityref { 564 base frequency; 565 } 566 description 567 "Type of trigger frequency"; 569 } 570 container periodic { 571 when "derived-from-or-self(../type, 'periodic')"; 572 description 573 "A periodic timing object triggers periodically 574 according to a regular interval."; 575 leaf interval { 576 type uint32 { 577 range "1..max"; 578 } 579 units "seconds"; 580 mandatory true; 581 description 582 "The number of seconds between two triggers 583 generated by this periodic timing object."; 584 } 585 uses start-end-grouping; 586 } 587 container scheduling { 588 when "derived-from-or-self(../type, 'scheduling')"; 589 description 590 "A scheduling timing object triggers."; 591 leaf-list month { 592 type string; 593 description 594 "A set of months at which this scheduling timing 595 will trigger."; 596 } 597 leaf-list day-of-month { 598 type uint8 { 599 range "0..59"; 600 } 601 description 602 "A set of days of the month at which this 603 scheduling timing will trigger."; 604 } 605 leaf-list day-of-week { 606 type uint8 { 607 range "0..59"; 608 } 609 description 610 "A set of weekdays at which this scheduling timing 611 will trigger."; 612 } 613 leaf-list hour { 614 type uint8 { 615 range "0..59"; 616 } 617 description 618 "A set of hours at which the scheduling timing will 619 trigger."; 620 } 621 leaf-list minute { 622 type uint8 { 623 range "0..59"; 624 } 625 description 626 "A set of minutes at which this scheduling timing 627 will trigger."; 628 } 629 leaf-list second { 630 type uint8 { 631 range "0..59"; 632 } 633 description 634 "A set of seconds at which this calendar timing 635 will trigger."; 636 } 637 uses start-end-grouping; 638 } 639 container immediate { 640 when "derived-from-or-self(../type, 'immediate')"; 641 leaf immediate { 642 type empty; 643 mandatory true; 644 description 645 "This immediate Event object triggers immediately 646 when it is configured."; 647 } 648 description 649 "This immediate Event object triggers immediately 650 when it is configured."; 651 } 652 description 653 "Container for frequency"; 654 } 655 choice test { 656 description 657 "Choice test"; 658 container existences { 659 leaf-list target { 660 type leafref { 661 path "/events/event/target"; 662 } 663 description 664 "List for target objects"; 666 } 667 leaf enable { 668 type boolean; 669 description 670 "Startup"; 671 } 672 description 673 "Container for existence"; 674 } 675 container boolean { 676 leaf comparison { 677 type enumeration { 678 enum "unequal" { 679 description 680 "Indicates that the comparision type is 'unequal'."; 681 } 682 enum "equal" { 683 description 684 "Indicates that the comparision type is 'equal'."; 685 } 686 enum "leass" { 687 description 688 "Indicates that the comparision type is 'less'."; 689 } 690 enum "less-or-equal" { 691 description 692 "Indicates that the comparision type is 'less or equal'."; 693 } 694 enum "greater" { 695 description 696 "Indicates that the comparision type is 'greater'."; 697 } 698 enum "greater-or-equal" { 699 description 700 "Indicates that the comparision type is 'greater or equal'."; 701 } 702 } 703 description 704 "Comparison type"; 705 } 706 leaf value { 707 type match-value; 708 description 709 "Compartion value"; 710 } 711 leaf-list target { 712 type leafref { 713 path "/events/event/target"; 715 } 716 description 717 "List for target objects"; 718 } 719 leaf enable { 720 type boolean; 721 description 722 "Startup"; 723 } 724 description 725 "Container for boolean test"; 726 } 727 container threshold { 728 leaf rising-value { 729 type match-value; 730 description 731 "Sets the rising threshold to the specified value, ] 732 When the current sampled value is greater than or equal to 733 this threshold, and the value at the last sampling interval 734 was less than this threshold, the event is triggered. "; 735 } 736 leaf-list rising-target { 737 type leafref { 738 path "/events/event/target"; 739 } 740 description 741 "List for target objects"; 742 } 743 leaf falling-value { 744 type match-value; 745 description 746 "Sets the falling threshold to the specified value"; 747 } 748 leaf-list falling-target { 749 type leafref { 750 path "/events/event/target"; 751 } 752 description 753 "List for target objects"; 754 } 755 leaf delta-rising-value { 756 type match-value; 757 description 758 "Sets the delta rising threshold to the specified value"; 759 } 760 leaf-list delta-rising-target { 761 type leafref { 762 path "/events/event/target"; 764 } 765 description 766 "List for target objects"; 767 } 768 leaf startup { 769 type enumeration { 770 enum "rising" { 771 description 772 "If the first sample after this 773 instance becomes active is greater than or equal to 'rising-value' 774 and the 'startup' is equal to 'rising' then one threshold rising 775 event is triggered for that instance."; 776 } 777 enum "falling" { 778 description 779 "If the first sample 780 after this instance becomes active is less than or equal to 781 'falling-value' and the 'startup' is equal to 'falling' then one 782 threshold falling event is triggered for that instance."; 783 } 784 enum "rising-or-falling" { 785 description 786 "That event is 787 also triggered if the first sample after this entry becomes 788 active is less than or equal or rising than to this threshold and 789 'startup' is equal to 'rising-or-falling'."; 790 } 791 } 792 description 793 "Startup"; 794 } 795 description 796 "Container for threshold"; 797 } 798 } 799 description 800 "List for trigger"; 801 } 802 list action { 803 key "action-name"; 804 leaf action-name { 805 type string; 806 description 807 "Action name"; 808 } 809 notification event-notification { 810 leaf event-name { 811 type leafref { 812 path "/events/event/event-name"; 813 } 814 description 815 "Report the event name"; 816 } 817 leaf type { 818 type leafref { 819 path "/events/event/type"; 820 } 821 description 822 "Report the event type"; 823 } 824 leaf-list target { 825 type target; 826 description 827 "Report the target objects"; 828 } 829 description 830 "This notification is used to report that an operator 831 acted upon an Event."; 832 } 833 action set { 834 input { 835 leaf-list target { 836 type target; 837 description 838 "Report the target objects"; 839 } 840 anydata value { 841 description 842 "Inline set content."; 843 } 844 } 845 } 846 leaf-list trigger-event { 847 type leafref { 848 path "../../event-name"; 849 } 850 description 851 "This action trigger another event"; 852 } 853 description 854 "List for Actions"; 855 } 856 description 857 "List for Events"; 858 } 859 description 860 "YANG data module for defining event triggers 861 and actions for network management purposes"; 862 } 863 } 865 867 8. Security Considerations 869 The YANG modules defined in this document MAY be accessed via the 870 RESTCONF protocol [RFC8040] or NETCONF protocol ([RFC6241]). The 871 lowest RESTCONF or NETCONF layer requires that the transport-layer 872 protocol provides both data integrity and confidentiality, see 873 Section 2 in [RFC8040] and [RFC6241]. The lowest NETCONF layer is 874 the secure transport layer, and the mandatory-to-implement secure 875 transport is Secure Shell (SSH)[RFC6242] . The lowest RESTCONF layer 876 is HTTPS, and the mandatory-to-implement secure transport is TLS 877 [RFC5246]. 879 The NETCONF access control model [RFC6536] provides the means to 880 restrict access for particular NETCONF or RESTCONF users to a 881 preconfigured subset of all available NETCONF or RESTCONF protocol 882 operations and content. 884 There are a number of data nodes defined in this YANG module that are 885 writable/creatable/deletable (i.e., config true, which is the 886 default). These data nodes may be considered sensitive or vulnerable 887 in some network environments. Write operations (e.g., edit-config) 888 to these data nodes without proper protection can have a negative 889 effect on network operations. These are the subtrees and data nodes 890 and their sensitivity/vulnerability: 892 o /events/event/event-name 894 o /events/event/target 896 o /events/action/set/target 898 o /events/event/trigger/name 900 9. IANA Considerations 902 This document registers a URI in the IETF XML registry [RFC3688]. 903 Following the format in [RFC3688], the following registration is 904 requested to be made: 906 --------------------------------------------------------------------- 907 URI: urn:ietf:params:xml:ns:yang:ietf-event 908 Registrant Contact: The IESG. 909 XML: N/A, the requested URI is an XML namespace. 910 --------------------------------------------------------------------- 912 This document registers a YANG module in the YANG Module Names 913 registry [RFC6020]. 915 --------------------------------------------------------------------- 916 Name: ietf-event 917 Namespace: urn:ietf:params:xml:ns:yang:ietf-event 918 Prefix: evt 919 Reference: RFC xxxx 920 --------------------------------------------------------------------- 922 10. Normative References 924 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 925 Requirement Levels", March 1997. 927 [RFC2981] Kavasseri, R., Ed., "Event MIB", RFC 2981, 928 DOI 10.17487/RFC2981, October 2000, 929 . 931 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 932 DOI 10.17487/RFC3688, January 2004, 933 . 935 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 936 the Network Configuration Protocol (NETCONF)", RFC 6020, 937 DOI 10.17487/RFC6020, October 2010, 938 . 940 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 941 and A. Bierman, Ed., "Network Configuration Protocol 942 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 943 . 945 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 946 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 947 . 949 [RFC6370] Bocci, M., Swallow, G., and E. Gray, "MPLS Transport 950 Profile (MPLS-TP) Identifiers", RFC 6370, 951 DOI 10.17487/RFC6370, September 2011, 952 . 954 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 955 Protocol (NETCONF) Access Control Model", RFC 6536, 956 DOI 10.17487/RFC6536, March 2012, 957 . 959 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 960 RFC 7950, DOI 10.17487/RFC7950, August 2016, 961 . 963 [RFC7952] Lhotka, L., "Defining and Using Metadata with YANG", 964 RFC 7952, DOI 10.17487/RFC7952, August 2016, 965 . 967 Appendix A. Example of Event 969 For example, some service requires to monitoring the "in-errors" 970 state of the interface, and if the value of "in-errors" exceeds the 971 threshold, the event should reset the interface's enabled value to 972 false: 974 975 976 interface-state-exception 977 interface-exception 978 /if:interfaces/if:interface[if:name='eth1'] 979 /if:interfaces/if:interface[if:name='eth2'] 980 /if:interfaces/if:interface[if:name='eth3'] 981 982 evaluate-in-errors 983 evaluate the number of 984 the packets that contained errors 985 986 10m 987 threshold 988 989 990 rising 991 100 992 /if:interfaces/if:interface[if:name='eth1'] 993 /if:statistic/if:in-errors 994 /if:interfaces/if:interface[if:name='eth2'] 995 /if:statistic/if:in-errors 996 997 998 999 1000 interface-exception 1001 1002 interface-state-exception 1003 interface-exception 1004 /if:interfaces/if:interface[if:name='eth1'] 1005 1006 1007 /if:interfaces/if:interface[if:name='eth1'] 1008 1009 1010 1011 eth1 1012 false 1013 1014 1015 1016 1017 1018 1019 1021 Authors' Addresses 1023 Michael Wang 1024 Huawei Technologies,Co.,Ltd 1025 101 Software Avenue, Yuhua District 1026 Nanjing 210012 1027 China 1029 Email: wangzitao@huawei.com 1031 Qin Wu 1032 Huawei 1033 101 Software Avenue, Yuhua District 1034 Nanjing, Jiangsu 210012 1035 China 1037 Email: bill.wu@huawei.com 1039 Chongfeng Xie 1040 China Telecom 1042 Email: xiechf@ctbri.com.cn