module yuma-ncx {
yang-version 1;
namespace "http://netconfcentral.org/ns/yuma-ncx";
prefix "ncx";
organization "Netconf Central";
contact
"Andy Bierman <andy at netconfcentral.org>";
description
"This module contains definitions for
Yuma Netconf extensions.
The elements will be present in appinfo elements,
used in YANG to XSD translation.";
revision "2009-12-21" {
description
"Moved secure and very-secure extensions to yuma-nacm.";
}
revision "2009-06-12" {
description
"Add sequence-id element for notifications";
}
revision "2009-04-10" {
description
"Removed rpc-type extension; use 'nacm:secure' instead";
}
revision "2008-08-23" {
description
"Added abstract extension. Marked all objects as abstract
so they will not be included in the NETCONF database.";
}
revision "2008-08-01" {
description
"Added password, hidden, xsdlist, and root extensions.";
}
revision "2008-04-16" {
description
"Added metadata and rpc-type extensions.";
}
revision "2008-03-21" {
description "Added no-duplicates extension.";
}
revision "2008-02-21" {
description "Initial revision.";
}
leaf belongs-to {
type string;
description
"Contains the module name value for a belongs-to-stmt.
Will be present in appinfo for a YANG submodule.";
ncx:abstract;
}
leaf case-name {
type string;
description
"Contains the identifier-str value for a YANG case name.
Will be present in appinfo for all choice case definitions.";
ncx:abstract;
}
leaf choice-name {
type string;
description
"Contains the identifier-str value for a YANG choice name.
Will be present in appinfo for all choice object definitions.";
ncx:abstract;
}
leaf config {
type boolean;
description
"Contains the value from the config-stmt.
Will be present in appinfo for top-level objects
or if config-stmt is present in the object definition.";
ncx:abstract;
}
leaf contact {
type string;
description
"Contains the value from the contact-stmt.
Will be present in appinfo for the module.
if defined in the module.";
ncx:abstract;
}
leaf default {
type string;
description
"Contains the value from the default-stmt.
Will be present in appinfo for a typedef that includes
a default-stmt.";
ncx:abstract;
}
leaf mandatory {
type boolean;
description
"Contains the value from the mandatory-stmt.
Will be present in appinfo if mandatory-stmt is
present in the object definition.";
ncx:abstract;
}
leaf min-elements {
type uint32;
description
"Contains the value from the min-elements-stmt.
Will be present in appinfo for a list or leaf-list
object, if the min-elements-stmt is present
in the object definition.";
ncx:abstract;
}
leaf max-elements {
type union {
type uint32;
type enumeration {
enum "unbounded" {
value 0;
}
}
}
description
"Contains the value from the max-elements-stmt.
Will be present in appinfo for a list or leaf-list
object, if the max-elements-stmt is present
in the object definition.";
ncx:abstract;
}
container must {
presence
"Indicates a must statement is configured.";
description
"Contains the fields from one must-stmt. Will be present
in appinfo for each must-stmt defined within an object.";
leaf xpath {
type string;
mandatory "true";
description
"The xpath statement specifying the system conditions
that must be true for a valid configuration.";
}
leaf description {
type string;
description
"Contains the description-stmt value from the must-stmt,
if present.";
}
uses reference;
leaf error-app-tag {
type string;
description
"Contains the error-app-tag-stmt value from the must-stmt,
if present.";
}
leaf error-message {
type string;
description
"Contains the error-message-stmt value from the must-stmt,
if present.";
}
ncx:abstract;
} // container must
leaf ordered-by {
type enumeration {
enum "system" {
value 0;
}
enum "user" {
value 1;
}
}
description
"Contains the value from the ordered-by.
Will be present in appinfo for all list and leaf-list
object definitions.";
ncx:abstract;
}
leaf organization {
type string;
description
"Contains the value from the organization-stmt.
Will be present in appinfo if oraganization-stmt is
present in the module.";
ncx:abstract;
}
leaf path {
type string;
description
"Contains the path-stmt Xpath expression value for a leafref.
Will be present in appinfo for all leafref typedefs, and
inline type-stmts for leafref leafs and leaf-lists.";
ncx:abstract;
}
leaf position {
type uint32;
description
"Contains the position-stmt value for a bit definition.
Will be present in appinfo for all 'bits' typedefs, and
inline type-stmts for leafs and leaf-lists.";
ncx:abstract;
}
grouping reference {
container reference {
presence
"Indicates a reference statement is configured.";
description
"Contains information from the reference-stmt. Will
be present in appinfo for objects which contain a
reference-stmt.";
leaf text {
type string;
mandatory "true";
description "Value from the reference-stmt.";
}
leaf url {
type string;
description
"URL for the specified reference. Will be present
if the 'text' field begins with 'RFC xxxx' or 'draft-'";
}
ncx:abstract;
} // container reference
} // grouping reference
uses reference;
container revision {
presence
"Indicates a revision statement is configured.";
description
"Contains the fields from one revision-stmt. Will be present
in appinfo for each revision-stmt defined within the module.";
leaf version {
type string;
mandatory "true";
description
"Contains the date string value from the revision-stmt.";
ncx:abstract;
}
leaf description {
type string;
mandatory "true";
description
"Contains the description-stmt value from the revision-stmt.";
ncx:abstract;
}
ncx:abstract;
} // container revision
leaf rpc-output {
type string;
description
"Contains the XSD type name value for the RPC output data
for one RPC method. Will be present in appinfo for
all rpc definitions which contain an output-stmt.";
ncx:abstract;
}
leaf source {
type string;
description
"Contains the complete filespec of the source file used
for the XSD translation. Will be present in the appinfo
for the module header.";
ncx:abstract;
}
leaf units {
type string;
description
"Contains the units-stmt value for a type or leaf.
Will be present in appinfo for typedefs, and
inline type-stmts for leafs and leaf-lists,
which contain a units-stmt.";
ncx:abstract;
}
leaf value {
type int32;
description
"Contains the value-stmt value for an enum definition.
Will be present in appinfo for all 'enumeration'
typedefs, and inline type-stmts for leafs and leaf-lists.";
ncx:abstract;
}
anyxml any {
ncx:hidden;
ncx:abstract;
}
container struct {
ncx:hidden;
ncx:abstract;
} // container struct
leaf string {
type string;
ncx:hidden;
ncx:abstract;
}
leaf empty {
type empty;
ncx:hidden;
ncx:abstract;
}
container root {
ncx:hidden;
ncx:abstract;
ncx:root;
} // container root
leaf binary {
type binary;
ncx:hidden;
ncx:abstract;
}
leaf bad-value {
type string;
description
"Contains the value that was associated with the error.
Usually added to 'invalid-value' errors, but may be present
for other errors as well.";
ncx:abstract;
}
leaf error-number {
type uint32 {
range "1 .. max";
}
description
"Contains the internal error code associated with the error.
Added for all error types.";
ncx:abstract;
}
extension abstract {
description
"Used with object definitions to indicate that they
do not represent CLI or NETCONF configuration database
data instances. Instead, the node is simply an object
identifier, an 'error-info' extension, or some other
abstract data structure.";
}
extension cli {
description
"Used within a container definition to indicate it is
only used as a conceptual container for a set of CLI parameters.
A top-level container containing this extension will not
be included in any NETCONF configuration databases.";
}
extension default-parm {
argument "parm" {
yin-element "true" {
}
description
"Used within a CLI container or rpc definition to specify a
leaf parameter within the CLI container or rpc input
section, that is used as the default if no parameter name
is entered.
These values must not begin with a dash (-) or
double dash (--) sequence or they will be mistaken
for CLI parameter names.
This option is somewhat risky because any unrecognized
parameter without any prefix (- or --) will be tried
as the default parameter type, instead of catching
the unknown parameter error. It can also be useful though,
for assigning file name parameters through shell expansion,
or if there is only one parameter.";
}
extension hidden {
description
"Used to prevent publication of a YANG data object.
Will be ignored for typedefs and other constructs.
If present, that node and any sub-nodes will be ignored
when generating HTML documentation or cYANG output.
The yangdump -f=copy mode will not be affected by
this extension. ";
}
extension metadata {
argument "syntax-string" {
yin-element "true" {
}
description
"Used to define an XML attribute to be associated with a
data-def-stmt node. Only optional metadata can be
defined. Errors for missing XML attributes (except
as specified by the YANG language) will not be
checked automatically.
The syntax string has the following format:
[prefix:]typename attribute-name
Any YANG typedef of builtin type can be specified as
the type name, except 'empty'.
Example from get command in netconf.yang:
ncx:metadata 'FilterType type'; ";
}
extension no-duplicates {
description
"Used to indicate that no duplicate values are allowed
in an ncx:xsdlist leaf or leaf-list object.";
}
extension password {
description
"Used to indicate the data type for the leaf is really
a password. Only the encrypted version of the password
is allowed to be generated in any output.";
}
extension root {
description
"Used within a container definition to indicate it is
really a root container for a conceptual NETCONF database,
instead of just an empty container. This is needed
for yuma to correctly process any RPC method
that contains a 'config' parameter.";
}
extension xsdlist {
argument "type" {
yin-element "true" {
}
description
"Used to indicate the leaf string type is really an
XSD list, which is a series of whitespace separated
strings. The type argument represents the data type
to use for the list members, for validation purposes.
Allowed to be present within the type sub-section
for a string.";
}
extension xpath {
description
"Used to indicate that the content of a data type
is an XPath expression. This is needed to properly
evaluate the namespace prefixes within the expression.
The xpath extension may appear within the type-stmt,
within a typedef, leaf, or leaf-list. The builtin
data type must be 'string', or the 'xpath' extension
will be ignored.
All data using the 'instance-identifier' built-in type
will automatically be processed as an XPath string,
so the xpath extension is not needed in that case.";
}
extension qname {
description
"Used to indicate that the content of a data type
is a Qualified Name. This is needed to properly
evaluate the namespace prefix, if used.
The qname extension may appear within the type-stmt,
within a typedef, leaf, or leaf-list. The builtin
data type must be 'string', or the 'qname' extension
will be ignored.";
}
extension schema-instance {
description
"Used to indicate that the typedef or type statement
for a string data type really identifies a
special schema-instance node, not a generic string.
A schema-instance value string is an unrestricted YANG
instance-identifier expression. All the same rules
as an instance-identifier apply except:
* predicates for keys are optional;
The dataRule will apply to all instances
of any missing key leaf predicate.
This extension will be ignored unless it is present
in the type-stmt of a typedef-stmt, leaf-stmt,
or leaf-list-stmt, or directly within a leaf-stmt or
leaf-list-stmt.";
}
} // module yuma-ncx