This module contains conceptual YANG specifications for NETCONF Event Notifications.
Version: 2016-10-27
module ietf-event-notifications { yang-version 1; namespace "urn:ietf:params:xml:ns:yang:ietf-event-notifications"; prefix notif-bis; import ietf-yang-types { prefix yang; } import ietf-inet-types { prefix inet; } import ietf-interfaces { prefix if; } organization "IETF"; contact "WG Web: <http://tools.ietf.org/wg/netconf/> WG List: <mailto:netconf@ietf.org> WG Chair: Mahesh Jethanandani <mailto:mjethanandani@gmail.com> WG Chair: Mehmet Ersue <mailto:mehmet.ersue@nokia.com> Editor: Alexander Clemm <mailto:alex@sympotech.com> Editor: Alberto Gonzalez Prieto <mailto:albertgo@cisco.com> Editor: Eric Voit <mailto:evoit@cisco.com> Editor: Einar Nilsen-Nygaard <mailto:einarnn@cisco.com> Editor: Ambika Prasad Tripathy <mailto:ambtripa@cisco.com> Editor: Sharon Chisholm <mailto:schishol@ciena.com> Editor: Hector Trevino <mailto:htrevino@cisco.com"; description "This module contains conceptual YANG specifications for NETCONF Event Notifications."; revision "2016-10-27" { description "Tweaks to remove two notifications, RPC for create subscription refined with stream default, new grouping to eliminate some dymanically modifiable parameters in modifiy subscription RPC"; reference "draft-ietf-netconf-rfc5277bis-01"; } feature json { description "This feature indicates that JSON encoding of notifications is supported."; } feature configured-subscriptions { description "This feature indicates that management plane configuration of subscription is supported."; } extension control-plane-notif { description "This statement applies only to notifications. It indicates that the notification is a control-plane notification (aka OAM notification). Therefore it does not participate in a regular event stream and does not need to be specifically subscribed to."; } identity stream { description "Base identity to represent a generic stream of event notifications."; } identity NETCONF { base stream; description "Default NETCONF event stream, containing events based on notifications defined as YANG modules that are supported by the system."; } identity subscription-result { description "Base identity for RPC responses to requests surrounding management (e.g. creation, modification, deletion) of subscriptions."; } identity ok { base subscription-result; description "OK - RPC was successful and was performed as requested."; } identity error { base subscription-result; description "RPC was not successful. Base identity for error return codes."; } identity error-no-such-subscription { base error; description "A subscription with the requested subscription ID does not exist."; } identity error-no-such-option { base error; description "A requested parameter setting is not supported."; } identity error-insufficient-resources { base error; description "The publisher has insufficient resources to support the subscription as requested."; } identity error-configured-subscription { base error; description "Cannot apply RPC to a configured subscription, i.e. to a subscription that was not established via RPC."; } identity error-other { base error; description "An unspecified error has occurred (catch all)."; } identity subscription-stream-status { description "Base identity for the status of subscriptions and datastreams."; } identity active { base subscription-stream-status; description "Status is active and healthy."; } identity inactive { base subscription-stream-status; description "Status is inactive, for example outside the interval between start time and stop time."; } identity suspended { base subscription-stream-status; description "The status is suspended, meaning that the publisher is currently unable to provide the negotiated updates for the subscription."; } identity in-error { base subscription-stream-status; description "The status is in error or degraded, meaning that stream and/or subscription is currently unable to provide the negotiated notifications."; } identity subscription-errors { description "Base identity for subscription error status. This identity is not to be confused with error return codes for RPCs"; } identity internal-error { base subscription-errors; description "Subscription failures caused by server internal error."; } identity no-resources { base subscription-errors; description "Lack of resources, e.g. CPU, memory, bandwidth"; } identity subscription-deleted { base subscription-errors; description "The subscription was terminated because the subscription was deleted."; } identity other { base subscription-errors; description "Fallback reason - any other reason"; } identity encodings { description "Base identity to represent data encodings"; } identity encode-xml { base encodings; description "Encode data using XML"; } identity encode-json { base encodings; description "Encode data using JSON"; } identity transport { description "An identity that represents a transport protocol for event notifications"; } identity netconf { base transport; description "Netconf notifications as a transport."; } typedef subscription-id { type uint32; description "A type for subscription identifiers."; } typedef filter-id { type uint32; description "A type to identify filters which can be associated with a subscription."; } typedef subscription-result { type identityref { base subscription-result; } description "The result of a subscription operation"; } typedef subscription-term-reason { type identityref { base subscription-errors; } description "Reason for a publisher to terminate a subscription."; } typedef subscription-susp-reason { type identityref { base subscription-errors; } description "Reason for a publisher to suspend a subscription."; } typedef encoding { type identityref { base encodings; } description "Specifies a data encoding, e.g. for a data subscription."; } typedef subscription-status { type identityref { base subscription-stream-status; } description "Specifies the status of a subscription or datastream."; } typedef transport-protocol { type identityref { base transport; } description "Specifies transport protocol used to send notifications to a receiver."; } typedef push-source { type enumeration { enum "interface-originated" { value 0; description "Notifications will be sent from a specific interface on a publisher"; } enum "address-originated" { value 1; description "Notifications will be sent from a specific address on a publisher"; } } description "Specifies from where notifications will be sourced when being sent by the publisher."; } typedef stream { type identityref { base stream; } description "Specifies a system-provided datastream."; } typedef filter-ref { type leafref { path "/notif-bis:filters/notif-bis:filter/notif-bis:filter-id"; } description "This type is used to reference a filter."; } rpc establish-subscription { description "This RPC allows a subscriber to create (and possibly negotiate) a subscription on its own behalf. If successful, the subscription remains in effect for the duration of the subscriber's association with the publisher, or until the subscription is terminated by virtue of a delete-subscription request. In case an error (as indicated by subscription-result) is returned, the subscription is not created. In that case, the RPC output MAY include suggested parameter settings that would have a high likelihood of succeeding in a subsequent establish-subscription request."; input { leaf stream { type stream; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } } output { leaf subscription-result { type subscription-result; mandatory true; description "Indicates whether subscription is operational, or if a problem was encountered."; } choice result { description "Depending on the subscription result, different data is returned."; case success { description "This case is used when the subscription request was successful and a subscription was created/modified as a result"; leaf subscription-id { type subscription-id; mandatory true; description "Identifier used for this subscription."; } } // case success case no-success { description "This case applies when a subscription request was not successful and no subscription was created (or modified) as a result. In this case, information MAY be returned that indicates suggested parameter settings that would have a high likelihood of succeeding in a subsequent establish-subscription or modify-subscription request."; leaf stream { type stream; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } } // case no-success } // choice result } } // rpc establish-subscription rpc create-subscription { description "This operation initiates an event notification subscription that will send asynchronous event notifications to the initiator of the command until the association terminates. It is not possible to modify or delete a subscription that was created using this operation. It is included for reasons of backward compatibility with RFC 5277 implementations."; input { leaf stream { type stream; default "NETCONF"; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } } } // rpc create-subscription rpc modify-subscription { description "This RPC allows a subscriber to modify a subscription that was previously created using establish-subscription. If successful, the subscription remains in effect for the duration of the subscriber's association with the publisher, or until the subscription is terminated by virtue of a delete-subscription request. In case an error is returned (as indicated by subscription-result), the subscription is not modified and the original subscription parameters remain in effect. In that case, the rpc error response MAY include suggested parameter settings that would have a high likelihood of succeeding in a subsequent modify-subscription request."; input { leaf subscription-id { type subscription-id; description "Identifier to use for this subscription."; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } } output { leaf subscription-result { type subscription-result; mandatory true; description "Indicates whether subscription is operational, or if a problem was encountered."; } choice result { description "Depending on the subscription result, different data is returned."; case success { description "This case is used when the subscription request was successful and a subscription was created/modified as a result"; leaf subscription-id { type subscription-id; mandatory true; description "Identifier used for this subscription."; } } // case success case no-success { description "This case applies when a subscription request was not successful and no subscription was created (or modified) as a result. In this case, information MAY be returned that indicates suggested parameter settings that would have a high likelihood of succeeding in a subsequent establish-subscription or modify-subscription request."; leaf stream { type stream; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } } // case no-success } // choice result } } // rpc modify-subscription rpc delete-subscription { description "This RPC allows a subscriber to delete a subscription that was previously created using establish-subscription."; input { leaf subscription-id { type subscription-id; mandatory true; description "Identifier of the subscription that is to be deleted. Only subscriptions that were created using establish-subscription can be deleted via this RPC."; } } output { leaf subscription-result { type subscription-result; mandatory true; description "Indicates whether subscription is operational, or if a problem was encountered."; } } } // rpc delete-subscription rpc kill-subscription { description "This RPC allows an operator to delete a dynamic subscription without restrictions on the originating subscriber or underlying transport session."; input { leaf identifier { type subscription-id; mandatory true; description "Identifier of the subscription that is to be deleted. Only subscriptions that were created using establish-subscription can be deleted via this RPC."; } } output { leaf subscription-result { type subscription-result; mandatory true; description "Indicates whether subscription is operational, or if a problem was encountered."; } } } // rpc kill-subscription notification replay-complete { notif-bis:control-plane-notif; description "This notification is sent to indicate that all of the replay notifications have been sent. It must not be sent for any other reason."; leaf subscription-id { type subscription-id; mandatory true; description "This references the affected subscription."; } } // notification replay-complete notification notification-complete { notif-bis:control-plane-notif; description "This notification is sent to indicate that a subscription, which includes a stop time, has finished passing events."; leaf subscription-id { type subscription-id; mandatory true; description "This references the affected subscription."; } } // notification notification-complete notification subscription-started { notif-bis:control-plane-notif; description "This notification indicates that a subscription has started and notifications are beginning to be sent. This notification shall only be sent to receivers of a subscription; it does not constitute a general-purpose notification."; leaf subscription-id { type subscription-id; mandatory true; description "This references the affected subscription."; } leaf stream { type stream; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } } // notification subscription-started notification subscription-suspended { notif-bis:control-plane-notif; description "This notification indicates that a suspension of the subscription by the publisher has occurred. No further notifications will be sent until subscription resumes. This notification shall only be sent to receivers of a subscription; it does not constitute a general-purpose notification."; leaf subscription-id { type subscription-id; mandatory true; description "This references the affected subscription."; } leaf reason { type subscription-susp-reason; description "Provides a reason for why the subscription was suspended."; } } // notification subscription-suspended notification subscription-resumed { notif-bis:control-plane-notif; description "This notification indicates that a subscription that had previously been suspended has resumed. Notifications will once again be sent."; leaf subscription-id { type subscription-id; mandatory true; description "This references the affected subscription."; } } // notification subscription-resumed notification subscription-modified { notif-bis:control-plane-notif; description "This notification indicates that a subscription has been modified. Notifications sent from this point on will conform to the modified terms of the subscription."; leaf subscription-id { type subscription-id; mandatory true; description "This references the affected subscription."; } leaf stream { type stream; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } } // notification subscription-modified notification subscription-terminated { notif-bis:control-plane-notif; description "This notification indicates that a subscription has been terminated."; leaf subscription-id { type subscription-id; mandatory true; description "This references the affected subscription."; } leaf reason { type subscription-term-reason; description "Provides a reason for why the subscription was terminated."; } } // notification subscription-terminated container streams { config false; description "This container contains a leaf list of built-in streams that are provided by the system."; leaf-list stream { type stream; description "Identifies the built-in streams that are supported by the system. Built-in streams are associated with their own identities, each of which carries a special semantics. In case configurable custom streams are supported, as indicated by the custom-stream identity, the configuration of those custom streams is provided separately."; } } // container streams container filters { description "This container contains a list of configurable filters that can be applied to subscriptions. This facilitates the reuse of complex filters once defined."; list filter { key "filter-id"; description "A list of configurable filters that can be applied to subscriptions."; leaf filter-id { type filter-id; description "An identifier to differentiate between filters."; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } } // choice filter-type } // list filter } // container filters container subscription-config { if-feature configured-subscriptions; description "Contains the list of subscriptions that are configured, as opposed to established via RPC or other means."; list subscription { key "subscription-id"; description "Content of a subscription."; leaf subscription-id { type subscription-id; description "Identifier to use for this subscription."; } leaf stream { type stream; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } container receivers { description "Set of receivers in a subscription."; list receiver { key "address"; min-elements 1; description "A single host or multipoint address intended as a target for the notifications for a subscription."; leaf address { type inet:host; mandatory true; description "Specifies the address for the traffic to reach a remote host. One of the following must be specified: an ipv4 address, an ipv6 address, or a host name."; } leaf port { type inet:port-number; mandatory true; description "This leaf specifies the port number to use for messages destined for a receiver."; } leaf protocol { type transport-protocol; default "netconf"; description "This leaf specifies the transport protocol used to deliver messages destined for the receiver."; } } // list receiver } // container receivers choice push-source { description "Identifies the egress interface on the Publisher from which notifications will or are being sent."; case interface-originated { description "When the push source is out of an interface on the Publisher established via static configuration."; leaf source-interface { type if:interface-ref; description "References the interface for notifications."; } } // case interface-originated case address-originated { description "When the push source is out of an IP address on the Publisher established via static configuration."; leaf source-vrf { type uint32 { range "16..1048574"; } description "Label of the vrf."; } leaf source-address { type inet:ip-address-no-zone; mandatory true; description "The source address for the notifications."; } } // case address-originated } // choice push-source } // list subscription } // container subscription-config container subscriptions { config false; description "Contains the list of currently active subscriptions, i.e. subscriptions that are currently in effect, used for subscription management and monitoring purposes. This includes subscriptions that have been setup via RPC primitives, e.g. create-subscription, establish- subscription, and modify-subscription, as well as subscriptions that have been established via configuration."; list subscription { key "subscription-id"; config false; description "Content of a subscription. Subscriptions can be created using a control channel or RPC, or be established through configuration."; leaf subscription-id { type subscription-id; description "Identifier of this subscription."; } leaf configured-subscription { if-feature configured-subscriptions; type empty; description "The presence of this leaf indicates that the subscription originated from configuration, not through a control channel or RPC."; } leaf subscription-status { type subscription-status; description "The status of the subscription."; } leaf stream { type stream; description "Indicates which stream of events is of interest. If not present, events in the default NETCONF stream will be sent."; } leaf encoding { type encoding; default "encode-xml"; description "The type of encoding for the subscribed data. Default is XML"; } choice filter-type { description "A filter needs to be a single filter of a given type. Mixing and matching of multiple filters does not occur at the level of this grouping."; anyxml filter { description "Filter per RFC 5277. Notification filter. If a filter element is specified to look for data of a particular value, and the data item is not present within a particular event notification for its value to be checked against, the notification will be filtered out. For example, if one were to check for 'severity=critical' in a configuration event notification where this field was not supported, then the notification would be filtered out. For subtree filtering, a non-empty node set means that the filter matches. For XPath filtering, the mechanisms defined in [XPATH] should be used to convert the returned value to boolean."; } case by-reference { description "Incorporate a filter that has been configured separately."; leaf filter-ref { type filter-ref; description "References filter which is associated with the subscription."; } } // case by-reference } // choice filter-type leaf startTime { type yang:date-and-time; description "Used to trigger the replay feature and indicate that the replay should start at the time specified. If <startTime> is not present, this is not a replay subscription. It is not valid to specify start times that are later than the current time. If the <startTime> specified is earlier than the log can support, the replay will begin with the earliest available notification. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } leaf stopTime { type yang:date-and-time; must "current() > ../startTime" { description "stopTime must be used with and be later than <startTime>"; } description "Used with the optional replay feature to indicate the newest notifications of interest. If <stopTime> is not present, the notifications will continue until the subscription is terminated. Must be used with and be later than <startTime>. Values of <stopTime> in the future are valid. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."; } container receivers { description "Set of receivers in a subscription."; list receiver { key "address"; min-elements 1; description "A single host or multipoint address intended as a target for the notifications for a subscription."; leaf address { type inet:host; mandatory true; description "Specifies the address for the traffic to reach a remote host. One of the following must be specified: an ipv4 address, an ipv6 address, or a host name."; } leaf port { type inet:port-number; mandatory true; description "This leaf specifies the port number to use for messages destined for a receiver."; } leaf protocol { type transport-protocol; default "netconf"; description "This leaf specifies the transport protocol used to deliver messages destined for the receiver."; } } // list receiver } // container receivers choice push-source { description "Identifies the egress interface on the Publisher from which notifications will or are being sent."; case interface-originated { description "When the push source is out of an interface on the Publisher established via static configuration."; leaf source-interface { type if:interface-ref; description "References the interface for notifications."; } } // case interface-originated case address-originated { description "When the push source is out of an IP address on the Publisher established via static configuration."; leaf source-vrf { type uint32 { range "16..1048574"; } description "Label of the vrf."; } leaf source-address { type inet:ip-address-no-zone; mandatory true; description "The source address for the notifications."; } } // case address-originated } // choice push-source } // list subscription } // container subscriptions } // module ietf-event-notifications
© 2023 YumaWorks, Inc. All rights reserved.