module ietf-notification-capabilities {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-notification-capabilities";
prefix inc;
import ietf-yang-push {
prefix yp;
reference
"RFC 8641: Subscription to YANG Notifications for Datastore
Updates";
}
import ietf-system-capabilities {
prefix sysc;
reference
"RFC XXXX: YANG Modules for describing System Capabilities
and Yang-Push Notification Capabilities";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
Editor: Balazs Lengyel
";
description
"This module specifies YANG-Push [RFC 8641] related publisher
capabilities.
The module contains
- specification of which data nodes support on-change or
periodic notifications.
- capabilities related to the throughput of notification data
the publisher can support. (Note that for a specific
subscription the publisher MAY still allow only longer periods
or smaller updates depending on e.g., actual load conditions.)
Capability values can be specified on system/publisher level,
datastore level or for specific data nodes of a specific
datastore (and their contained sub-trees), as defined in the
ietf-system-capabilities module.
If, different data nodes covered by a single subscription
have different values for a specific capability, then using
values that are only acceptable for some of these data nodes,
but not for others, may result in the rejection of the
subscription.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.
Copyright (c) 2020 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.";
revision 2020-03-23 {
description
"Initial version";
reference
"RFC XXX: YANG-Push Notification Capabilities";
}
grouping subscription-capabilities {
description
"Capabilities related to YANG-Push subscriptions
and notifications";
container subscription-capabilities {
description
"Capabilities related to YANG-Push subscriptions
and notifications";
typedef notification-support {
type bits {
bit config-changes {
description
"The publisher is capable of sending
notifications for config=true nodes for the relevant
scope and subscription type.";
}
bit state-changes {
description
"The publisher is capable of sending
notifications for config=false nodes for the relevant
scope and subscription type.";
}
}
description
"Type for defining whether on-change or
periodic notifications are supported for none, only
config=true, only config=false or all data nodes.
If the bit config-changes or state-changes is set
for a datastore or a set of nodes that does not contain
nodes with the indicated config value,
this has no effect, as if no support was declared.
E.g. indicating support for state-changes for
a candidate datastore has no effect.";
}
leaf max-nodes-per-update {
type uint32 {
range "1..max";
}
description
"Maximum number of data nodes that can be sent
in an update. The publisher MAY support more data nodes,
but SHOULD support at least this number.
May be used to avoid the update-too-big error
during subscription.";
reference "The update-too-big error/identity in RFC 8641";
}
leaf periodic-notifications-supported {
type notification-support;
description
"Specifies whether the publisher is capable of
sending periodic notifications for the selected
data nodes and the subtree below them.";
reference
"Periodic subscription concept in RFC 8641";
}
choice update-period {
description
"Supported update period value or values for
periodic subscriptions.";
leaf minimum-update-period {
type uint32;
units "centiseconds";
description
"Indicates the minimal update period that is
supported for a periodic subscription.
A subscription request to the selected data
nodes with a smaller period than what this leaf
specifies will result in a 'period-unsupported' error.";
reference
"The period leaf in RFC 8641 ietf-yang-push YANG module";
}
leaf-list supported-update-period {
type uint32;
units "centiseconds";
description
"Supported update period values for a
periodic subscription.
A subscription request to the selected data nodes with a
period not included in the leaf-list will result in a
'period-unsupported' error.";
reference
"The period leaf in RFC 8641 ietf-yang-push YANG module";
}
}
leaf on-change-supported {
if-feature "yp:on-change";
type notification-support;
description
"Specifies whether the publisher is capable of
sending on-change notifications for the selected
data nodes and the subtree below them.";
reference
"On-change concept in RFC 8641";
}
leaf minimum-dampening-period {
if-feature "yp:on-change";
type uint32;
units "centiseconds";
description
"The minimum dampening-period supported for on-change
subscriptions for the selected data nodes.
If this value is present and greater than zero,
that implies dampening is mandatory.";
reference
"The dampening-period leaf in RFC 8641 ietf-yang-push
YANG module";
}
leaf-list supported-excluded-change-type {
if-feature "yp:on-change";
type union {
type enumeration {
enum none {
value -2;
description
"None of the change types can be excluded.";
}
enum all {
value -1;
description
"Any combination of change types can be excluded.";
}
}
type yp:change-type;
}
description
"The change types that can be excluded in
YANG-Push subscriptions.";
reference
"The change-type typedef in RFC 8641 ietf-yang-push
YANG module";
}
}
}
augment "/sysc:system-capabilities" {
description
"Add system level capabilities";
uses subscription-capabilities {
refine
"subscription-capabilities/supported-excluded-change-type" {
default "none";
}
}
}
augment "/sysc:system-capabilities/sysc:datastore-capabilities"
+ "/sysc:per-node-capabilities" {
description
"Add datastore and node level capabilities";
uses subscription-capabilities {
refine
"subscription-capabilities/supported-excluded-change-type" {
default "none";
}
}
}
}