module ietf-yang-structural-mount {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-structural-mount";
prefix yangmnt;
import ietf-yang-types {
prefix yang;
}
import ietf-yang-library {
prefix yanglib;
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web:
WG List:
WG Chair: Thomas Nadeau
WG Chair: Juergen Schoenwaelder
WG Chair: Kent Watsen
Editor: Martin Bjorklund
";
// RFC Ed.: replace XXXX with actual RFC number and remove this
// note.
description
"This module defines a YANG extension statement that can be used
to incorporate data models defined in other YANG modules in a
module. It also defines a operational state data so that
clients can learn which data models a server implements for the
mount points.
Copyright (c) 2016 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).
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
'OPTIONAL' in the module text are to be interpreted as described
in RFC 2119 (http://tools.ietf.org/html/rfc2119).
This version of this YANG module is part of RFC XXXX
(http://tools.ietf.org/html/rfcXXXX); see the RFC itself for
full legal notices.";
// RFC Ed.: update the date below with the date of RFC publication
// and remove this note.
revision 2016-02-26 {
description
"Initial revision.";
reference
"RFC XXXX: YANG Structural Mount";
}
/*
* Extension statements
*/
extension mount-point {
argument name;
description
"The argument 'name' is a yang-identifier. The name of
the mount point MUST be unique within the module where it
is defined.
The 'mount-point' statement can be present in 'container' and
'list'.
If a mount point is defined in a grouping, its name is bound
to the module where the grouping is used. Note that this
implies that such a grouping can be used at most once in a
module.
A mount point defines a place in the node hierarchy where
other data models may be attached. A server that implements
a module with a mount point, populates the
/mount-points/mount-point list with detailed information on
which data models are mounted at each mount point.
The 'mount-yang-library' extension may be used as a
substatement to 'mount-point'.";
}
extension mount-yang-library {
description
"The presence of this statement as a substatement to
'mount-point' indicates that the data model defined in the
module 'ietf-yang-library' is mounted. When this statement is
present, a client can discover the mounted YANG modules by
reading from the mounted 'ietf-yang-library' data.
This statement is useful if the mount point is defined in a
list and different list entries may mount a different
set of modules.";
}
/*
* Operational state data nodes
*/
container mount-points {
config false;
description
"Contains information about which mount points are implemented
in the server, and their data models.";
list mount-point {
key "module name";
description
"Contains information about which data models are implemented
for the mountpoint 'name' defined in 'module'.";
leaf module {
type yang:yang-identifier;
description
"The name of the module where the mount point is defined.";
}
leaf name {
type yang:yang-identifier;
description
"The name of the mount point.";
}
choice data-model {
mandatory true;
description
"Indicates which data models the server implements
for this mount point.
It is expected that this choice may be augmented with other
data model discovery mechansisms.";
leaf inline-yang-library {
type empty;
description
"This leaf indicates that the server has mounted
'ietf-yang-library' at the mount point, and that the
instantiation of 'ietf-yang-library' contains the
information about which modules are mounted.
This is useful if the mount point is defined in a
list and different list entries may mount a different
set of modules.";
}
container modules {
description
"The 'module' list contains the set of modules that are
mounted at the mount point.";
uses yanglib:module-list;
}
}
}
}
}