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