module ietf-yang-annotations {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-annotations";
prefix "yann";
import ietf-yang-metadata {
prefix "md";
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web:
WG List:
WG Chair: Thomas Nadeau
WG Chair: Juergen Schoenwaelder
Editor: Ladislav Lhotka
";
description
"This module defines generally useful metadata annotations for
data modelled with YANG.
Copyright (c) 2014 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; see the
RFC itself for full legal notices.";
revision 2014-11-28 {
description
"Initial revision.";
reference
"RFC XXXX: Common Metadata Annotations for Data Modelled with
YANG.";
}
md:annotation "inactive" {
type boolean;
description
"A client uses this annotation for deactivating a subtree in a
configuration datastore.
If a server advertises support for this annotation, then a
client MAY attach it to any data node instance in any
configuration datastore via standard editing methods. If its
value is 'true', then the server MUST behave as if the subtree
rooted at this data node was not present. If its value is
'false' the server MUST behave as if the annotation is not
present.";
}
md:annotation "type" {
description
"This annotation is used for indicating the actual type for a
value of a leaf with the 'union' type, or a type derived from
'union' (henceforth denoted as 'a union type').
The value of this annotation can be
- the name of a YANG built-in type,
- the name of a derived type prepended with the name of the
YANG module where the type is defined and the colon
character (':').
If a server advertises support for this annotation, then:
- A client MAY attach this annotation to a leaf of a union
type when creating or modifying the value of this leaf in a
configuration datastore, or when such a leaf is contained in
RPC request parameters. The server MUST take this
information into account when interpreting the type of the
received value.
- If a client doesn't do so, the server SHOULD attach this
annotation to a leaf of a union type upon its creation or
modification in a configuration datastore.
- The server SHOULD attach this annotation to all leafs of a
union type that are sent to a client as state data, in an
RPC reply, or in a notification.
In all cases mentioned above, the receiving party SHALL ignore
this annotation if it is attached to an instance of a data
node that is not a leaf of a union type.
A server supporting this annotation SHALL report an error if
- the type specified in the annotation is not among member
types of the annotated leaf's type,
- the value of the annotated leaf is not valid for the type
specified by the annotation.";
}
}