1 module ietf-subscribed-notifications {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications";
6 import ietf-inet-types {
9 "RFC 6991: Common YANG Data Types";
11 import ietf-interfaces {
14 "RFC 8343: A YANG Data Model for Interface Management";
16 import ietf-netconf-acm {
19 "RFC 8341: Network Configuration Access Control Model";
21 import ietf-network-instance {
24 "RFC 8529: YANG Data Model for Network Instances";
26 import ietf-restconf {
29 "RFC 8040: RESTCONF Protocol";
31 import ietf-yang-types {
34 "RFC 6991: Common YANG Data Types";
38 "IETF NETCONF (Network Configuration) Working Group";
40 "WG Web: <https:/datatracker.ietf.org/wg/netconf/>
41 WG List: <mailto:netconf@ietf.org>
43 Author: Alexander Clemm
44 <mailto:ludwig@clemm.org>
47 <mailto:evoit@cisco.com>
49 Author: Alberto Gonzalez Prieto
50 <mailto:alberto.gonzalez@microsoft.com>
52 Author: Einar Nilsen-Nygaard
53 <mailto:einarnn@cisco.com>
55 Author: Ambika Prasad Tripathy
56 <mailto:ambtripa@cisco.com>";
58 "This module defines a YANG data model for subscribing to event
59 records and receiving matching content in notification messages.
61 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
62 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
63 'MAY', and 'OPTIONAL' in this document are to be interpreted as
64 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
65 they appear in all capitals, as shown here.
67 Copyright (c) 2019 IETF Trust and the persons identified as
68 authors of the code. All rights reserved.
70 Redistribution and use in source and binary forms, with or
71 without modification, is permitted pursuant to, and subject to
72 the license terms contained in, the Simplified BSD License set
73 forth in Section 4.c of the IETF Trust's Legal Provisions
74 Relating to IETF Documents
75 (https://trustee.ietf.org/license-info).
77 This version of this YANG module is part of RFC 8639; see the
78 RFC itself for full legal notices.";
84 "RFC 8639: A YANG Data Model for Subscriptions to
94 "This feature indicates that configuration of subscriptions is
100 "This feature indicates that a publisher supports the ability
101 to set the Differentiated Services Code Point (DSCP) value in
105 feature encode-json {
107 "This feature indicates that JSON encoding of notification
108 messages is supported.";
113 "This feature indicates that XML encoding of notification
114 messages is supported.";
117 feature interface-designation {
119 "This feature indicates that a publisher supports sourcing all
120 receiver interactions for a configured subscription from a
121 single designated egress interface.";
126 "This feature indicates that a publisher supports absolute
127 dependencies of one subscription's traffic over another
128 as well as weighted bandwidth sharing between subscriptions.
129 Both of these are Quality of Service (QoS) features that allow
130 differentiated treatment of notification messages between a
131 publisher and a specific receiver.";
136 "This feature indicates that historical event record replay is
137 supported. With replay, it is possible for past event records
138 to be streamed in chronological order.";
143 "This feature indicates support for YANG subtree filtering.";
145 "RFC 6241: Network Configuration Protocol (NETCONF),
149 feature supports-vrf {
151 "This feature indicates that a publisher supports VRF
152 configuration for configured subscriptions. VRF support for
153 dynamic subscriptions does not require this feature.";
155 "RFC 8529: YANG Data Model for Network Instances,
161 "This feature indicates support for XPath filtering.";
163 "XML Path Language (XPath) Version 1.0
164 (https://www.w3.org/TR/1999/REC-xpath-19991116)";
171 extension subscription-state-notification {
173 "This statement applies only to notifications. It indicates
174 that the notification is a subscription state change
175 notification. Therefore, it does not participate in a regular
176 event stream and does not need to be specifically subscribed
177 to in order to be received. This statement can only occur as
178 a substatement of the YANG 'notification' statement. This
179 statement is not for use outside of this YANG module.";
185 /* Identities for RPC and notification errors */
187 identity delete-subscription-error {
189 "Base identity for the problem found while attempting to
190 fulfill either a 'delete-subscription' RPC request or a
191 'kill-subscription' RPC request.";
194 identity establish-subscription-error {
196 "Base identity for the problem found while attempting to
197 fulfill an 'establish-subscription' RPC request.";
200 identity modify-subscription-error {
202 "Base identity for the problem found while attempting to
203 fulfill a 'modify-subscription' RPC request.";
206 identity subscription-suspended-reason {
208 "Base identity for the problem condition communicated to a
209 receiver as part of a 'subscription-suspended'
213 identity subscription-terminated-reason {
215 "Base identity for the problem condition communicated to a
216 receiver as part of a 'subscription-terminated'
220 identity dscp-unavailable {
221 base establish-subscription-error;
224 "The publisher is unable to mark notification messages with
225 prioritization information in a way that will be respected
226 during network transit.";
229 identity encoding-unsupported {
230 base establish-subscription-error;
232 "Unable to encode notification messages in the desired
236 identity filter-unavailable {
237 base subscription-terminated-reason;
239 "Referenced filter does not exist. This means a receiver is
240 referencing a filter that doesn't exist or to which it
241 does not have access permissions.";
244 identity filter-unsupported {
245 base establish-subscription-error;
246 base modify-subscription-error;
248 "Cannot parse syntax in the filter. This failure can be from
249 a syntax error or a syntax too complex to be processed by the
253 identity insufficient-resources {
254 base establish-subscription-error;
255 base modify-subscription-error;
256 base subscription-suspended-reason;
258 "The publisher does not have sufficient resources to support
259 the requested subscription. An example might be that
260 allocated CPU is too limited to generate the desired set of
261 notification messages.";
264 identity no-such-subscription {
265 base modify-subscription-error;
266 base delete-subscription-error;
267 base subscription-terminated-reason;
269 "Referenced subscription doesn't exist. This may be as a
270 result of a nonexistent subscription ID, an ID that belongs to
271 another subscriber, or an ID for a configured subscription.";
274 identity replay-unsupported {
275 base establish-subscription-error;
278 "Replay cannot be performed for this subscription. This means
279 the publisher will not provide the requested historic
280 information from the event stream via replay to this
284 identity stream-unavailable {
285 base subscription-terminated-reason;
287 "Not a subscribable event stream. This means the referenced
288 event stream is not available for subscription by the
292 identity suspension-timeout {
293 base subscription-terminated-reason;
295 "Termination of a previously suspended subscription. The
296 publisher has eliminated the subscription, as it exceeded a
297 time limit for suspension.";
300 identity unsupportable-volume {
301 base subscription-suspended-reason;
303 "The publisher does not have the network bandwidth needed to
304 get the volume of generated information intended for a
308 /* Identities for encodings */
310 identity configurable-encoding {
312 "If a transport identity derives from this identity, it means
313 that it supports configurable encodings. An example of a
314 configurable encoding might be a new identity such as
315 'encode-cbor'. Such an identity could use
316 'configurable-encoding' as its base. This would allow a
317 dynamic subscription encoded in JSON (RFC 8259) to request
318 that notification messages be encoded via the Concise Binary
319 Object Representation (CBOR) (RFC 7049). Further details for
320 any specific configurable encoding would be explored in a
321 transport document based on this specification.";
323 "RFC 8259: The JavaScript Object Notation (JSON) Data
325 RFC 7049: Concise Binary Object Representation (CBOR)";
330 "Base identity to represent data encodings.";
333 identity encode-xml {
335 if-feature "encode-xml";
337 "Encode data using XML as described in RFC 7950.";
339 "RFC 7950: The YANG 1.1 Data Modeling Language";
342 identity encode-json {
344 if-feature "encode-json";
346 "Encode data using JSON as described in RFC 7951.";
348 "RFC 7951: JSON Encoding of Data Modeled with YANG";
351 /* Identities for transports */
355 "An identity that represents the underlying mechanism for
356 passing notification messages.";
368 "Specifies a data encoding, e.g., for a data subscription.";
371 typedef stream-filter-ref {
373 path "/sn:filters/sn:stream-filter/sn:name";
376 "This type is used to reference an event stream filter.";
381 path "/sn:streams/sn:stream/sn:name";
384 "This type is used to reference a system-provided
388 typedef subscription-id {
391 "A type for subscription identifiers.";
399 "Specifies the transport used to send notification messages
407 grouping stream-filter-elements {
409 "This grouping defines the base for filters applied to event
413 "The content filter specification for this request.";
414 anydata stream-subtree-filter {
415 if-feature "subtree";
417 "Event stream evaluation criteria encoded in the syntax of
418 a subtree filter as defined in RFC 6241, Section 6.
420 The subtree filter is applied to the representation of
421 individual, delineated event records as contained in the
424 If the subtree filter returns a non-empty node set, the
425 filter matches the event record, and the event record is
426 included in the notification message sent to the
429 "RFC 6241: Network Configuration Protocol (NETCONF),
432 leaf stream-xpath-filter {
436 "Event stream evaluation criteria encoded in the syntax of
437 an XPath 1.0 expression.
439 The XPath expression is evaluated on the representation of
440 individual, delineated event records as contained in
443 The result of the XPath expression is converted to a
444 boolean value using the standard XPath 1.0 rules. If the
445 boolean value is 'true', the filter matches the event
446 record, and the event record is included in the
447 notification message sent to the receivers.
449 The expression is evaluated in the following XPath
452 o The set of namespace declarations is the set of
453 prefix and namespace pairs for all YANG modules
454 implemented by the server, where the prefix is the
455 YANG module name and the namespace is as defined by
456 the 'namespace' statement in the YANG module.
458 If the leaf is encoded in XML, all namespace
459 declarations in scope on the 'stream-xpath-filter'
460 leaf element are added to the set of namespace
461 declarations. If a prefix found in the XML is
462 already present in the set of namespace
463 declarations, the namespace in the XML is used.
465 o The set of variable bindings is empty.
467 o The function library is comprised of the core
468 function library and the XPath functions defined in
469 Section 10 in RFC 7950.
471 o The context node is the root node.";
473 "XML Path Language (XPath) Version 1.0
474 (https://www.w3.org/TR/1999/REC-xpath-19991116)
475 RFC 7950: The YANG 1.1 Data Modeling Language,
481 grouping update-qos {
483 "This grouping describes QoS information concerning a
484 subscription. This information is passed to lower layers
485 for transport prioritization and treatment.";
491 "The desired network transport priority level. This is the
492 priority set on notification messages encapsulating the
493 results of the subscription. This transport priority is
494 shared for all receivers of a given subscription.";
502 "Relative weighting for a subscription. Larger weights get
503 more resources. Allows an underlying transport layer to
504 perform informed load-balance allocations between various
507 "RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2),
512 type subscription-id;
514 "Provides the 'subscription-id' of a parent subscription.
515 The parent subscription has absolute precedence should
516 that parent have push updates ready to egress the publisher.
517 In other words, there should be no streaming of objects from
518 the current subscription if the parent has something ready
521 If a dependency is asserted via configuration or via an RPC
522 but the referenced 'subscription-id' does not exist, the
523 dependency is silently discarded. If a referenced
524 subscription is deleted, this dependency is removed.";
526 "RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2),
531 grouping subscription-policy-modifiable {
533 "This grouping describes all objects that may be changed
538 "Identifies the source of information against which a
539 subscription is being applied as well as specifics on the
540 subset of information desired from that source.";
542 choice stream-filter {
544 "An event stream filter can be applied to a subscription.
545 That filter will either come referenced from a global
546 list or be provided in the subscription itself.";
549 "Apply a filter that has been configured separately.";
550 leaf stream-filter-name {
551 type stream-filter-ref;
554 "References an existing event stream filter that is
555 to be applied to an event stream for the
559 case within-subscription {
561 "A local definition allows a filter to have the same
562 lifecycle as the subscription.";
563 uses stream-filter-elements;
569 type yang:date-and-time;
571 "Identifies a time after which notification messages for a
572 subscription should not be sent. If 'stop-time' is not
573 present, the notification messages will continue until the
574 subscription is terminated. If 'replay-start-time' exists,
575 'stop-time' must be for a subsequent time. If
576 'replay-start-time' doesn't exist, 'stop-time', when
577 established, must be for a future time.";
581 grouping subscription-policy-dynamic {
583 "This grouping describes the only information concerning a
584 subscription that can be passed over the RPCs defined in this
586 uses subscription-policy-modifiable {
587 augment "target/stream" {
589 "Adds additional objects that can be modified by an RPC.";
592 require-instance false;
596 "Indicates the event stream to be considered for
599 leaf replay-start-time {
601 type yang:date-and-time;
604 "Used to trigger the 'replay' feature for a dynamic
605 subscription, where event records that are selected
606 need to be at or after the specified starting time. If
607 'replay-start-time' is not present, this is not a replay
608 subscription and event record push should start
609 immediately. It is never valid to specify start times
610 that are later than or equal to the current time.";
617 grouping subscription-policy {
619 "This grouping describes the full set of policy information
620 concerning both dynamic and configured subscriptions, with the
621 exclusion of both receivers and networking information
622 specific to the publisher, such as what interface should be
623 used to transmit notification messages.";
624 uses subscription-policy-dynamic;
626 if-feature "configured";
629 "For a configured subscription, this leaf specifies the
630 transport used to deliver messages destined for all
631 receivers of that subscription.";
634 when 'not(../transport) or derived-from(../transport,
635 "sn:configurable-encoding")';
638 "The type of encoding for notification messages. For a
639 dynamic subscription, if not included as part of an
640 'establish-subscription' RPC, the encoding will be populated
641 with the encoding used by that RPC. For a configured
642 subscription, if not explicitly configured, the encoding
643 will be the default encoding for an underlying transport.";
646 if-feature "configured";
649 "Open text allowing a configuring entity to embed the
650 originator or other specifics of this subscription.";
658 rpc establish-subscription {
660 "This RPC allows a subscriber to create (and possibly
661 negotiate) a subscription on its own behalf. If successful,
662 the subscription remains in effect for the duration of the
663 subscriber's association with the publisher or until the
664 subscription is terminated. If an error occurs or the
665 publisher cannot meet the terms of a subscription, an RPC
666 error is returned, and the subscription is not created.
667 In that case, the RPC reply's 'error-info' MAY include
668 suggested parameter settings that would have a higher
669 likelihood of succeeding in a subsequent
670 'establish-subscription' request.";
672 uses subscription-policy-dynamic;
676 "The type of encoding for the subscribed data. If not
677 included as part of the RPC, the encoding MUST be set by
678 the publisher to be the encoding used by this RPC.";
683 type subscription-id;
686 "Identifier used for this subscription.";
688 leaf replay-start-time-revision {
690 type yang:date-and-time;
692 "If a replay has been requested, this object represents
693 the earliest time covered by the event buffer for the
694 requested event stream. The value of this object is the
695 'replay-log-aged-time' if it exists. Otherwise, it is
696 the 'replay-log-creation-time'. All buffered event
697 records after this time will be replayed to a receiver.
698 This object will only be sent if the starting time has
699 been revised to be later than the time requested by the
705 rc:yang-data establish-subscription-stream-error-info {
706 container establish-subscription-stream-error-info {
708 "If any 'establish-subscription' RPC parameters are
709 unsupportable against the event stream, a subscription
710 is not created and the RPC error response MUST indicate the
711 reason why the subscription failed to be created. This
712 yang-data MAY be inserted as structured data in a
713 subscription's RPC error response to indicate the reason for
714 the failure. This yang-data MUST be inserted if hints are
715 to be provided back to the subscriber.";
718 base establish-subscription-error;
721 "Indicates the reason why the subscription has failed to
722 be created to a targeted event stream.";
724 leaf filter-failure-hint {
727 "Information describing where and/or why a provided
728 filter was unsupportable for a subscription. The
729 syntax and semantics of this hint are
730 implementation specific.";
735 rpc modify-subscription {
737 "This RPC allows a subscriber to modify a dynamic
738 subscription's parameters. If successful, the changed
739 subscription parameters remain in effect for the duration of
740 the subscription, until the subscription is again modified, or
741 until the subscription is terminated. In the case of an error
742 or an inability to meet the modified parameters, the
743 subscription is not modified and the original subscription
744 parameters remain in effect. In that case, the RPC error MAY
745 include 'error-info' suggested parameter hints that would have
746 a high likelihood of succeeding in a subsequent
747 'modify-subscription' request. A successful
748 'modify-subscription' will return a suspended subscription to
749 the 'active' state.";
752 type subscription-id;
755 "Identifier to use for this subscription.";
757 uses subscription-policy-modifiable;
761 rc:yang-data modify-subscription-stream-error-info {
762 container modify-subscription-stream-error-info {
764 "This yang-data MAY be provided as part of a subscription's
765 RPC error response when there is a failure of a
766 'modify-subscription' RPC that has been made against an
767 event stream. This yang-data MUST be used if hints are to
768 be provided back to the subscriber.";
771 base modify-subscription-error;
774 "Information in a 'modify-subscription' RPC error response
775 that indicates the reason why the subscription to an event
776 stream has failed to be modified.";
778 leaf filter-failure-hint {
781 "Information describing where and/or why a provided
782 filter was unsupportable for a subscription. The syntax
783 and semantics of this hint are
784 implementation specific.";
789 rpc delete-subscription {
791 "This RPC allows a subscriber to delete a subscription that
792 was previously created by that same subscriber using the
793 'establish-subscription' RPC.
795 If an error occurs, the server replies with an 'rpc-error'
796 where the 'error-info' field MAY contain a
797 'delete-subscription-error-info' structure.";
800 type subscription-id;
803 "Identifier of the subscription that is to be deleted.
804 Only subscriptions that were created using
805 'establish-subscription' from the same origin as this RPC
806 can be deleted via this RPC.";
811 rpc kill-subscription {
812 nacm:default-deny-all;
814 "This RPC allows an operator to delete a dynamic subscription
815 without restrictions on the originating subscriber or
816 underlying transport session.
818 If an error occurs, the server replies with an 'rpc-error'
819 where the 'error-info' field MAY contain a
820 'delete-subscription-error-info' structure.";
823 type subscription-id;
826 "Identifier of the subscription that is to be deleted.
827 Only subscriptions that were created using
828 'establish-subscription' can be deleted via this RPC.";
833 rc:yang-data delete-subscription-error-info {
834 container delete-subscription-error-info {
836 "If a 'delete-subscription' RPC or a 'kill-subscription' RPC
837 fails, the subscription is not deleted and the RPC error
838 response MUST indicate the reason for this failure. This
839 yang-data MAY be inserted as structured data in a
840 subscription's RPC error response to indicate the reason
844 base delete-subscription-error;
848 "Indicates the reason why the subscription has failed to be
858 notification replay-completed {
859 sn:subscription-state-notification;
862 "This notification is sent to indicate that all of the replay
863 notifications have been sent.";
865 type subscription-id;
868 "This references the affected subscription.";
872 notification subscription-completed {
873 sn:subscription-state-notification;
874 if-feature "configured";
876 "This notification is sent to indicate that a subscription has
877 finished passing event records, as the 'stop-time' has been
880 type subscription-id;
883 "This references the gracefully completed subscription.";
887 notification subscription-modified {
888 sn:subscription-state-notification;
890 "This notification indicates that a subscription has been
891 modified. Notification messages sent from this point on will
892 conform to the modified terms of the subscription. For
893 completeness, this subscription state change notification
894 includes both modified and unmodified aspects of a
897 type subscription-id;
900 "This references the affected subscription.";
902 uses subscription-policy {
903 refine "target/stream/stream-filter/within-subscription" {
905 "Filter applied to the subscription. If the
906 'stream-filter-name' is populated, the filter in the
907 subscription came from the 'filters' container.
908 Otherwise, it is populated in-line as part of the
914 notification subscription-resumed {
915 sn:subscription-state-notification;
917 "This notification indicates that a subscription that had
918 previously been suspended has resumed. Notifications will
919 once again be sent. In addition, a 'subscription-resumed'
920 indicates that no modification of parameters has occurred
921 since the last time event records have been sent.";
923 type subscription-id;
926 "This references the affected subscription.";
930 notification subscription-started {
931 sn:subscription-state-notification;
932 if-feature "configured";
934 "This notification indicates that a subscription has started
935 and notifications will now be sent.";
937 type subscription-id;
940 "This references the affected subscription.";
942 uses subscription-policy {
943 refine "target/stream/replay-start-time" {
945 "Indicates the time that a replay is using for the
946 streaming of buffered event records. This will be
947 populated with the most recent of the following:
948 the event time of the previous event record sent to a
949 receiver, the 'replay-log-creation-time', the
950 'replay-log-aged-time', or the most recent publisher
953 refine "target/stream/stream-filter/within-subscription" {
955 "Filter applied to the subscription. If the
956 'stream-filter-name' is populated, the filter in the
957 subscription came from the 'filters' container.
958 Otherwise, it is populated in-line as part of the
961 augment "target/stream" {
963 "This augmentation adds additional parameters specific to a
964 'subscription-started' notification.";
965 leaf replay-previous-event-time {
966 when '../replay-start-time';
968 type yang:date-and-time;
970 "If there is at least one event in the replay buffer
971 prior to 'replay-start-time', this gives the time of
972 the event generated immediately prior to the
975 If a receiver previously received event records for
976 this configured subscription, it can compare this time
977 to the last event record previously received. If the
978 two are not the same (perhaps due to a reboot), then a
979 dynamic replay can be initiated to acquire any missing
986 notification subscription-suspended {
987 sn:subscription-state-notification;
989 "This notification indicates that a suspension of the
990 subscription by the publisher has occurred. No further
991 notifications will be sent until the subscription resumes.
992 This notification shall only be sent to receivers of a
993 subscription; it does not constitute a general-purpose
996 type subscription-id;
999 "This references the affected subscription.";
1003 base subscription-suspended-reason;
1007 "Identifies the condition that resulted in the suspension.";
1011 notification subscription-terminated {
1012 sn:subscription-state-notification;
1014 "This notification indicates that a subscription has been
1017 type subscription-id;
1020 "This references the affected subscription.";
1024 base subscription-terminated-reason;
1028 "Identifies the condition that resulted in the termination.";
1039 "Contains information on the built-in event streams provided by
1044 "Identifies the built-in event streams that are supported by
1049 "A handle for a system-provided event stream made up of a
1050 sequential set of event records, each of which is
1051 characterized by its own domain and semantics.";
1056 "A description of the event stream, including such
1057 information as the type of event records that are
1058 available in this event stream.";
1060 leaf replay-support {
1061 if-feature "replay";
1064 "Indicates that event record replay is available on this
1067 leaf replay-log-creation-time {
1068 when '../replay-support';
1069 if-feature "replay";
1070 type yang:date-and-time;
1073 "The timestamp of the creation of the log used to support
1074 the replay function on this event stream. This time
1075 might be earlier than the earliest available information
1076 contained in the log. This object is updated if the log
1077 resets for some reason.";
1079 leaf replay-log-aged-time {
1080 when '../replay-support';
1081 if-feature "replay";
1082 type yang:date-and-time;
1084 "The timestamp associated with the last event record that
1085 has been aged out of the log. This timestamp identifies
1086 how far back in history this replay log extends, if it
1087 doesn't extend back to the 'replay-log-creation-time'.
1088 This object MUST be present if replay is supported and any
1089 event records have been aged out of the log.";
1095 "Contains a list of configurable filters that can be applied to
1096 subscriptions. This facilitates the reuse of complex filters
1098 list stream-filter {
1101 "A list of preconfigured filters that can be applied to
1106 "A name to differentiate between filters.";
1108 uses stream-filter-elements;
1111 container subscriptions {
1113 "Contains the list of currently active subscriptions, i.e.,
1114 subscriptions that are currently in effect, used for
1115 subscription management and monitoring purposes. This
1116 includes subscriptions that have been set up via
1117 RPC primitives as well as subscriptions that have been
1118 established via configuration.";
1122 "The identity and specific parameters of a subscription.
1123 Subscriptions in this list can be created using a control
1124 channel or RPC or can be established through configuration.
1126 If the 'kill-subscription' RPC or configuration operations
1127 are used to delete a subscription, a
1128 'subscription-terminated' message is sent to any active or
1129 suspended receivers.";
1131 type subscription-id;
1133 "Identifier of a subscription; unique in a given
1136 uses subscription-policy {
1137 refine "target/stream/stream" {
1139 "Indicates the event stream to be considered for this
1140 subscription. If an event stream has been removed
1141 and can no longer be referenced by an active
1142 subscription, send a 'subscription-terminated'
1143 notification with 'stream-unavailable' as the reason.
1144 If a configured subscription refers to a nonexistent
1145 event stream, move that subscription to the
1148 refine "transport" {
1150 "For a configured subscription, this leaf specifies the
1151 transport used to deliver messages destined for all
1152 receivers of that subscription. This object is
1153 mandatory for subscriptions in the configuration
1154 datastore. This object (1) is not mandatory for dynamic
1155 subscriptions in the operational state datastore and
1156 (2) should not be present for other types of dynamic
1159 augment "target/stream" {
1161 "Enables objects to be added to a configured stream
1163 leaf configured-replay {
1164 if-feature "configured";
1165 if-feature "replay";
1168 "The presence of this leaf indicates that replay for
1169 the configured subscription should start at the
1170 earliest time in the event log or at the publisher
1171 boot time, whichever is later.";
1175 choice notification-message-origin {
1176 if-feature "configured";
1178 "Identifies the egress interface on the publisher
1179 from which notification messages are to be sent.";
1180 case interface-originated {
1182 "When notification messages are to egress a specific,
1183 designated interface on the publisher.";
1184 leaf source-interface {
1185 if-feature "interface-designation";
1186 type if:interface-ref;
1188 "References the interface for notification messages.";
1191 case address-originated {
1193 "When notification messages are to depart from a
1194 publisher using a specific originating address and/or
1195 routing context information.";
1197 if-feature "supports-vrf";
1199 path "/ni:network-instances/ni:network-instance/ni:name";
1202 "VRF from which notification messages should egress a
1205 leaf source-address {
1206 type inet:ip-address-no-zone;
1208 "The source address for the notification messages.
1209 If a source VRF exists but this object doesn't, a
1210 publisher's default address for that VRF must
1215 leaf configured-subscription-state {
1216 if-feature "configured";
1221 "The subscription is supportable with its current
1227 "The subscription as a whole is unsupportable with its
1228 current parameters.";
1233 "A subscription is inactive, as it has hit a
1234 stop time. It no longer has receivers in the
1235 'active' or 'suspended' state, but the subscription
1236 has not yet been removed from configuration.";
1241 "The presence of this leaf indicates that the subscription
1242 originated from configuration, not through a control
1243 channel or RPC. The value indicates the state of the
1244 subscription as established by the publisher.";
1246 container receivers {
1248 "Set of receivers in a subscription.";
1253 "A host intended as a recipient for the notification
1254 messages of a subscription. For configured
1255 subscriptions, transport-specific network parameters
1256 (or a leafref to those parameters) may be augmented to a
1257 specific receiver in this list.";
1261 "Identifies a unique receiver for a subscription.";
1263 leaf sent-event-records {
1264 type yang:zero-based-counter64;
1267 "The number of event records sent to the receiver. The
1268 count is initialized when a dynamic subscription is
1269 established or when a configured receiver
1270 transitions to the 'valid' state.";
1272 leaf excluded-event-records {
1273 type yang:zero-based-counter64;
1276 "The number of event records explicitly removed via
1277 either an event stream filter or an access control
1278 filter so that they are not passed to a receiver.
1279 This count is set to zero each time
1280 'sent-event-records' is initialized.";
1287 "The receiver is currently being sent any
1288 applicable notification messages for the
1294 "The receiver state is 'suspended', so the
1295 publisher is currently unable to provide
1296 notification messages for the subscription.";
1300 if-feature "configured";
1302 "A subscription has been configured, but a
1303 'subscription-started' subscription state change
1304 notification needs to be successfully received
1305 before notification messages are sent.
1307 If the 'reset' action is invoked for a receiver of
1308 an active configured subscription, the state
1309 must be moved to 'connecting'.";
1313 if-feature "configured";
1315 "A subscription has failed to send a
1316 'subscription-started' state change to the
1317 receiver. Additional connection attempts are not
1318 currently being made.";
1324 "Specifies the state of a subscription from the
1325 perspective of a particular receiver. With this
1326 information, it is possible to determine whether a
1327 publisher is currently generating notification
1328 messages intended for that receiver.";
1331 if-feature "configured";
1333 "Allows the reset of this configured subscription's
1334 receiver to the 'connecting' state. This enables the
1335 connection process to be reinitiated.";
1338 type yang:date-and-time;
1341 "Time at which a publisher returned the receiver to
1342 the 'connecting' state.";