module ietf-udp-notif {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-udp-notif";
prefix un;
import ietf-subscribed-notifications {
prefix sn;
reference
"RFC 8639: Subscription to YANG Notifications";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
organization "IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
Authors: Guangying Zheng
Tianran Zhou
Thomas Graf
Pierre Francois
Paolo Lucente
";
description
"Defines UDP-Notif as a supported transport for subscribed
event notifications.
Copyright (c) 2018 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see the RFC
itself for full legal notices.";
revision 2020-04-27 {
description
"Initial version";
reference
"RFC XXXX: UDP-based Notifications for Streaming Telemetry";
}
identity udp-notif {
base sn:transport;
description
"UDP-Notif is used as transport for notification messages
and state change notifications.";
}
identity encode-cbor {
base sn:encoding;
description
"Encode data using CBOR as described in RFC 7049.";
reference
"RFC 7049: Concise Binary Object Representation";
}
identity encode-gpb {
base sn:encoding;
description
"Encode data using GPB.";
}
grouping target-receiver {
description
"Provides a reusable description of a UDP-Notif target receiver.";
leaf address {
type inet:ip-address;
mandatory true;
description
"IP address of target UDP-Notif receiver, which can be an
IPv4 address or an IPV6 address.";
}
leaf port {
type inet:port-number;
mandatory true;
description
"Port number of target UDP-Notif receiver, if not specified,
the system should use default port number.";
}
leaf enable-fragment {
type boolean;
default false;
description
"The switch for the fragment feature. When disabled, the
publisher will not allow fragment for a very large data";
}
leaf max-fragment-size {
when "../enable-fragment = true";
type uint32;
description "UDP-Notif provides a configurable max-fragment-size
to control the size of each message.";
}
}
augment "/sn:subscriptions/sn:subscription/sn:receivers/sn:receiver" {
description
"This augmentation allows UDP-Notif specific parameters to be
exposed for a subscription.";
uses target-receiver;
}
}