module ietf-yang-instance-data {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-yang-instance-data";
prefix yid ;
import ietf-yang-data-ext { prefix yd; }
import ietf-datastores { prefix ds; }
import ietf-inet-types { prefix inet; }
import ietf-yang-types { prefix yang; }
organization "IETF NETMOD Working Group";
contact
"WG Web:
WG List:
Author: Balazs Lengyel
";
description "The module defines the structure and content of YANG
instance data sets.";
revision 2019-02-20 {
description "Initial revision.";
reference "RFC XXXX: YANG Instance Data Format";
}
yd:yang-data instance-data-format {
container instance-data-set {
description "Auxiliary container to carry meta-data for
the complete instance data set.";
leaf name {
type string;
mandatory true;
description "Name of the YANG instance data set.";
}
choice target-ptr {
description "A pointer to the list of target YANG modules
their revisions, supported features and deviations.";
case inline {
leaf-list inline-target-spec {
type string {
pattern '.+@\d{4}-\d{2}-\d{2}\.yang';
}
min-elements 1;
ordered-by user;
description
"Indicates that target modules are specified inline.
Each value MUST be a YANG Module name including the
revision-date as defined for YANG file names in RFC7950.
E.g. ietf-yang-library@2016-06-21.yang
The first item is either ietf-yang-library or some other
YANG module that contains a list of YANG modules with
their name, revision-date, supported-features and
deviations.
As some versions of ietf-yang-library MAY contain
different module-sets for different datastores, if
multiple module-sets are defined, the instance data set's
meta-data MUST contain the datastore information and
instance data for the ietf-yang-library MUST also contain
information specifying the module-set for the relevant
datastore.
Subsequent items MAY specify YANG modules augmenting the
first module with useful data (e.g. a semantic version).";
}
anydata target-modules {
mandatory true;
description "Instance data corresponding to the YANG modules
specified in the inline-target-spec nodes defining the set
of target YANG modules for this instance-data-set.";
}
}
case uri {
leaf target-uri {
type inet:uri;
description
"A reference to another YANG instance data file.
This instance data file will use the same set of target
YANG modules, revisions, supported features and deviations
as the referenced YANG instance data file.";
}
}
}
leaf description { type string; }
leaf contact {
type string;
description "Contact information for the person or
organization to whom queries concerning this
instance data set should be sent.";
}
leaf organization {
type string;
description "Organization responsible for the instance
data set.";
}
leaf datastore {
type ds:datastore-ref;
description "The identity of the datastore with which the
instance data set is associated. If a single specific
datastore can not be specified, the leaf MUST be absent.
If this leaf is absent, then the datastore to which the
instance data belongs is undefined.";
}
list revision {
key date;
description "Instance data sets that are produced as
a result of some sort of specification or design effort
SHOULD have at least one revision entry. For every
published editorial change, a new one SHOULD be added
in front of the revisions sequence so that all
revisions are in reverse chronological order.
For instance data sets that are read from
or produced by the YANG server or otherwise
subject to frequent updates or changes, revision
SHOULD NOT be present";
leaf date {
type string {
pattern '\d{4}-\d{2}-\d{2}';
}
description "Specifies the date the instance data set
was last modified. Formatted as YYYY-MM-DD";
}
leaf description { type string; }
}
leaf timestamp {
type yang:date-and-time;
description "The date and time when the instance data set
was last modified.
For instance data sets that are read from or produced
by the YANG server or otherwise subject to frequent
updates or changes, timestamp SHOULD be present";
}
anydata content-data {
mandatory true;
description "Contains the real instance data.
The data MUST conform to the relevant YANG Modules.";
}
}
}
}