module ietf-nmda-notifications {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-nmda-notifications";
prefix ndn;
import ietf-datastores {
prefix ds;
}
import ietf-inet-types { prefix inet; }
import ietf-module-tags { prefix tags;}
import ietf-yang-types { prefix yang;}
import ietf-yang-patch {
prefix ypatch;
}
import ietf-netconf {
prefix nc;
}
import ietf-restconf { prefix rc;}
organization
"IETF NETMOD (Network Modeling) Working Group";
contact
"WG Web:
WG List:
WG Chair: Kent Watsen
Editor: Qin Wu
Editor: Rohit R Ranade
";
description
"This module defines a YANG data model for use with the
NETCONF and RESTCONF protocol that allows the client to
receive additional common event notifications related to NMDA.
Copyright (c) 2012 IETF Trust and the persons identified as
the document authors. 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; see
the RFC itself for full legal notices.";
revision 2018-12-26 {
description
"Initial version.";
reference "RFC xxx: NETCONF Base Notifications for NMDA";
}
typedef session-id-or-zero-type {
type uint32;
description
"NETCONF Session Id or Zero to indicate none";
}
feature error-info {
description
"This feature must
also be enabled for that session if error-info
can be advertised by the server. Otherwise,
this feature must not be enabled.";
}
grouping common-session-parms {
description
"Common session parameters to identify a
management session.";
leaf username {
type string;
mandatory true;
description
"Name of the user for the session.";
}
leaf session-id {
type session-id-or-zero-type;
mandatory true;
description
"Identifier of the session.
A NETCONF session MUST be identified by a non-zero value.
A non-NETCONF session MAY be identified by the value zero.";
}
leaf app-tag {
type tags:tag;
description
"The relationship between username and application tag
can be one to many.";
}
leaf source-host {
type inet:ip-address;
description
"Address of the remote host for the session.";
}
leaf commit-persist-id {
type string;
description
"This parameter is used to identify each commit.
The value of this parameter is a token that must be given
in the 'persist-id' parameter of or
operations in order to confirm or cancel
the persistent confirmed commit.
The token should be a random string.";
reference "RFC 6241, Section 8.3.4.1";
}
}
notification apply-intended-updated {
description
"Generated when a server detects that a
intended configuration applied event has occurred. Indicates
the event and the current state of the intended data applying
procedure in progress.";
reference "RFC 8342, Section 5";
uses common-session-parms;
leaf datastore {
type identityref {
base ds:datastore;
}
default "ds:operational";
description
"Indicates which datastore has changed or which datastore is
target of edit-data operation.";
}
choice filter-spec {
description
"The content filter specification for this request.";
anydata subtree-filter {
description
"This parameter identifies the portions of the
target datastore to retrieve.";
reference
"RFC 6241: Network Configuration Protocol, Section 6.";
}
leaf xpath-filter {
if-feature nc:xpath;
type yang:xpath1.0;
description
"This parameter contains an XPath expression identifying
the portions of the target datastore to retrieve.
If the expression returns a node-set, all nodes in the
node-set are selected by the filter. Otherwise, if the
expression does not return a node-set, then the get-data
operation fails.
The expression is evaluated in the following XPath
context:
o The set of namespace declarations are those in
scope on the 'xpath-filter' leaf element.
o The set of variable bindings is empty.
o The function library is the core function library,
and the XPath functions defined in section 10 in
RFC 7950.
o The context node is the root node of the target
datastore.";
}
}
leaf apply-result {
type enumeration {
enum "ok" {
description
"The intended data is succesfully applied.";
}
enum "fail" {
description
" The intended data is not succesfully applied.";
}
}
description
"Apply result.";
}
list fail-applied-target {
when "../apply-result = 'fail'";
key edit-id;
ordered-by user;
leaf edit-id {
type string;
description
"Response status is for the 'edit' list entry
with this 'edit-id' value.";
}
leaf operation {
type enumeration {
enum create {
description
"The target data node is created using the supplied
value, only if it does not already exist. The
'target' leaf identifies the data node to be
created, not the parent data node.";
}
enum delete {
description
"Delete the target node, only if the data resource
currently exists; otherwise, return an error.";
}
enum insert {
description
"Insert the supplied value into a user-ordered
list or leaf-list entry. The target node must
represent a new data resource. If the 'where'
parameter is set to 'before' or 'after', then
the 'point' parameter identifies the insertion
point for the target node.";
}
enum merge {
description
"The supplied value is merged with the target data
node.";
}
enum move {
description
"Move the target node. Reorder a user-ordered
list or leaf-list. The target node must represent
an existing data resource. If the 'where' parameter
is set to 'before' or 'after', then the 'point'
parameter identifies the insertion point to move
the target node.";
}
enum replace {
description
"The supplied value is used to replace the target
data node.";
}
enum remove {
description
"Delete the target node if it currently exists.";
}
}
mandatory true;
description
"The datastore operation requested for the associated
'edit' entry.";
}
leaf target {
type ypatch:target-resource-offset;
description
"Topmost node associated with the configuration change.
A server SHOULD set this object to the node within
the datastore that is being altered. A server MAY
set this object to one of the ancestors of the actual
node that was changed, or omit this object, if the
exact node is not known.";
}
anydata value {
description
"Value used for this edit operation. The anydata 'value'
contains the target resource associated with the
'target' leaf.
For example, suppose the target node is a YANG container
named foo:
container foo {
leaf a { type string; }
leaf b { type int32; }
}
The 'value' node contains one instance of foo:
some value
42
";
}
uses rc:errors {if-feature error-info;}
description
"List for fail applied targets. The fail applied targets
are only applied when the intended data is not applied.";
}
}
}