1
0
Fork 0

Adding upstream version 2.0.24.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-18 11:18:17 +01:00
parent e508fcfeb9
commit afb0a8fea7
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
118 changed files with 45084 additions and 0 deletions

View file

@ -0,0 +1,464 @@
<?xml version="1.0" encoding="UTF-8"?>
<module name="ietf-netconf-acm"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:nacm="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"
xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types">
<namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"/>
<prefix value="nacm"/>
<import module="ietf-yang-types">
<prefix value="yang"/>
</import>
<organization>
<text>IETF NETCONF (Network Configuration) Working Group</text>
</organization>
<contact>
<text>WG Web: &lt;https://datatracker.ietf.org/wg/netconf/&gt;
WG List: &lt;mailto:netconf@ietf.org&gt;
Author: Andy Bierman
&lt;mailto:andy@yumaworks.com&gt;
Author: Martin Bjorklund
&lt;mailto:mbj@tail-f.com&gt;</text>
</contact>
<description>
<text>Network Configuration Access Control Model.
Copyright (c) 2012 - 2018 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8341; see
the RFC itself for full legal notices.</text>
</description>
<revision date="2018-02-14">
<description>
<text>Added support for YANG 1.1 actions and notifications tied to
data nodes. Clarified how NACM extensions can be used by
other data models.</text>
</description>
<reference>
<text>RFC 8341: Network Configuration Access Control Model</text>
</reference>
</revision>
<revision date="2012-02-22">
<description>
<text>Initial version.</text>
</description>
<reference>
<text>RFC 6536: Network Configuration Protocol (NETCONF)
Access Control Model</text>
</reference>
</revision>
<extension name="default-deny-write">
<description>
<text>Used to indicate that the data model node
represents a sensitive security system parameter.
If present, the NETCONF server will only allow the designated
'recovery session' to have write access to the node. An
explicit access control rule is required for all other users.
If the NACM module is used, then it must be enabled (i.e.,
/nacm/enable-nacm object equals 'true'), or this extension
is ignored.
The 'default-deny-write' extension MAY appear within a data
definition statement. It is ignored otherwise.</text>
</description>
</extension>
<extension name="default-deny-all">
<description>
<text>Used to indicate that the data model node
controls a very sensitive security system parameter.
If present, the NETCONF server will only allow the designated
'recovery session' to have read, write, or execute access to
the node. An explicit access control rule is required for all
other users.
If the NACM module is used, then it must be enabled (i.e.,
/nacm/enable-nacm object equals 'true'), or this extension
is ignored.
The 'default-deny-all' extension MAY appear within a data
definition statement, 'rpc' statement, or 'notification'
statement. It is ignored otherwise.</text>
</description>
</extension>
<typedef name="user-name-type">
<type name="string">
<length value="1..max"/>
</type>
<description>
<text>General-purpose username string.</text>
</description>
</typedef>
<typedef name="matchall-string-type">
<type name="string">
<pattern value="\*"/>
</type>
<description>
<text>The string containing a single asterisk '*' is used
to conceptually represent all possible values
for the particular leaf using this data type.</text>
</description>
</typedef>
<typedef name="access-operations-type">
<type name="bits">
<bit name="create">
<description>
<text>Any protocol operation that creates a
new data node.</text>
</description>
</bit>
<bit name="read">
<description>
<text>Any protocol operation or notification that
returns the value of a data node.</text>
</description>
</bit>
<bit name="update">
<description>
<text>Any protocol operation that alters an existing
data node.</text>
</description>
</bit>
<bit name="delete">
<description>
<text>Any protocol operation that removes a data node.</text>
</description>
</bit>
<bit name="exec">
<description>
<text>Execution access to the specified protocol operation.</text>
</description>
</bit>
</type>
<description>
<text>Access operation.</text>
</description>
</typedef>
<typedef name="group-name-type">
<type name="string">
<length value="1..max"/>
<pattern value="[^\*].*"/>
</type>
<description>
<text>Name of administrative group to which
users can be assigned.</text>
</description>
</typedef>
<typedef name="action-type">
<type name="enumeration">
<enum name="permit">
<description>
<text>Requested action is permitted.</text>
</description>
</enum>
<enum name="deny">
<description>
<text>Requested action is denied.</text>
</description>
</enum>
</type>
<description>
<text>Action taken by the server when a particular
rule matches.</text>
</description>
</typedef>
<typedef name="node-instance-identifier">
<type name="yang:xpath1.0"/>
<description>
<text>Path expression used to represent a special
data node, action, or notification instance-identifier
string.
A node-instance-identifier value is an
unrestricted YANG instance-identifier expression.
All the same rules as an instance-identifier apply,
except that predicates for keys are optional. If a key
predicate is missing, then the node-instance-identifier
represents all possible server instances for that key.
This XML Path Language (XPath) expression is evaluated in the
following context:
o The set of namespace declarations are those in scope on
the leaf element where this type is used.
o The set of variable bindings contains one variable,
'USER', which contains the name of the user of the
current session.
o The function library is the core function library, but
note that due to the syntax restrictions of an
instance-identifier, no functions are allowed.
o The context node is the root node in the data tree.
The accessible tree includes actions and notifications tied
to data nodes.</text>
</description>
</typedef>
<container name="nacm">
<nacm:default-deny-all/>
<description>
<text>Parameters for NETCONF access control model.</text>
</description>
<leaf name="enable-nacm">
<type name="boolean"/>
<default value="true"/>
<description>
<text>Enables or disables all NETCONF access control
enforcement. If 'true', then enforcement
is enabled. If 'false', then enforcement
is disabled.</text>
</description>
</leaf>
<leaf name="read-default">
<type name="action-type"/>
<default value="permit"/>
<description>
<text>Controls whether read access is granted if
no appropriate rule is found for a
particular read request.</text>
</description>
</leaf>
<leaf name="write-default">
<type name="action-type"/>
<default value="deny"/>
<description>
<text>Controls whether create, update, or delete access
is granted if no appropriate rule is found for a
particular write request.</text>
</description>
</leaf>
<leaf name="exec-default">
<type name="action-type"/>
<default value="permit"/>
<description>
<text>Controls whether exec access is granted if no appropriate
rule is found for a particular protocol operation request.</text>
</description>
</leaf>
<leaf name="enable-external-groups">
<type name="boolean"/>
<default value="true"/>
<description>
<text>Controls whether the server uses the groups reported by the
NETCONF transport layer when it assigns the user to a set of
NACM groups. If this leaf has the value 'false', any group
names reported by the transport layer are ignored by the
server.</text>
</description>
</leaf>
<leaf name="denied-operations">
<type name="yang:zero-based-counter32"/>
<config value="false"/>
<mandatory value="true"/>
<description>
<text>Number of times since the server last restarted that a
protocol operation request was denied.</text>
</description>
</leaf>
<leaf name="denied-data-writes">
<type name="yang:zero-based-counter32"/>
<config value="false"/>
<mandatory value="true"/>
<description>
<text>Number of times since the server last restarted that a
protocol operation request to alter
a configuration datastore was denied.</text>
</description>
</leaf>
<leaf name="denied-notifications">
<type name="yang:zero-based-counter32"/>
<config value="false"/>
<mandatory value="true"/>
<description>
<text>Number of times since the server last restarted that
a notification was dropped for a subscription because
access to the event type was denied.</text>
</description>
</leaf>
<container name="groups">
<description>
<text>NETCONF access control groups.</text>
</description>
<list name="group">
<key value="name"/>
<description>
<text>One NACM group entry. This list will only contain
configured entries, not any entries learned from
any transport protocols.</text>
</description>
<leaf name="name">
<type name="group-name-type"/>
<description>
<text>Group name associated with this entry.</text>
</description>
</leaf>
<leaf-list name="user-name">
<type name="user-name-type"/>
<description>
<text>Each entry identifies the username of
a member of the group associated with
this entry.</text>
</description>
</leaf-list>
</list>
</container>
<list name="rule-list">
<key value="name"/>
<ordered-by value="user"/>
<description>
<text>An ordered collection of access control rules.</text>
</description>
<leaf name="name">
<type name="string">
<length value="1..max"/>
</type>
<description>
<text>Arbitrary name assigned to the rule-list.</text>
</description>
</leaf>
<leaf-list name="group">
<type name="union">
<type name="matchall-string-type"/>
<type name="group-name-type"/>
</type>
<description>
<text>List of administrative groups that will be
assigned the associated access rights
defined by the 'rule' list.
The string '*' indicates that all groups apply to the
entry.</text>
</description>
</leaf-list>
<list name="rule">
<key value="name"/>
<ordered-by value="user"/>
<description>
<text>One access control rule.
Rules are processed in user-defined order until a match is
found. A rule matches if 'module-name', 'rule-type', and
'access-operations' match the request. If a rule
matches, the 'action' leaf determines whether or not
access is granted.</text>
</description>
<leaf name="name">
<type name="string">
<length value="1..max"/>
</type>
<description>
<text>Arbitrary name assigned to the rule.</text>
</description>
</leaf>
<leaf name="module-name">
<type name="union">
<type name="matchall-string-type"/>
<type name="string"/>
</type>
<default value="*"/>
<description>
<text>Name of the module associated with this rule.
This leaf matches if it has the value '*' or if the
object being accessed is defined in the module with the
specified module name.</text>
</description>
</leaf>
<choice name="rule-type">
<description>
<text>This choice matches if all leafs present in the rule
match the request. If no leafs are present, the
choice matches all requests.</text>
</description>
<case name="protocol-operation">
<leaf name="rpc-name">
<type name="union">
<type name="matchall-string-type"/>
<type name="string"/>
</type>
<description>
<text>This leaf matches if it has the value '*' or if
its value equals the requested protocol operation
name.</text>
</description>
</leaf>
</case>
<case name="notification">
<leaf name="notification-name">
<type name="union">
<type name="matchall-string-type"/>
<type name="string"/>
</type>
<description>
<text>This leaf matches if it has the value '*' or if its
value equals the requested notification name.</text>
</description>
</leaf>
</case>
<case name="data-node">
<leaf name="path">
<type name="node-instance-identifier"/>
<mandatory value="true"/>
<description>
<text>Data node instance-identifier associated with the
data node, action, or notification controlled by
this rule.
Configuration data or state data
instance-identifiers start with a top-level
data node. A complete instance-identifier is
required for this type of path value.
The special value '/' refers to all possible
datastore contents.</text>
</description>
</leaf>
</case>
</choice>
<leaf name="access-operations">
<type name="union">
<type name="matchall-string-type"/>
<type name="access-operations-type"/>
</type>
<default value="*"/>
<description>
<text>Access operations associated with this rule.
This leaf matches if it has the value '*' or if the
bit corresponding to the requested operation is set.</text>
</description>
</leaf>
<leaf name="action">
<type name="action-type"/>
<mandatory value="true"/>
<description>
<text>The access control action associated with the
rule. If a rule has been determined to match a
particular request, then this object is used
to determine whether to permit or deny the
request.</text>
</description>
</leaf>
<leaf name="comment">
<type name="string"/>
<description>
<text>A textual description of the access rule.</text>
</description>
</leaf>
</list>
</list>
</container>
</module>

View file

@ -0,0 +1,600 @@
<?xml version="1.0" encoding="UTF-8"?>
<module name="ietf-netconf-monitoring"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:ncm="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"
xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"
xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types">
<namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"/>
<prefix value="ncm"/>
<import module="ietf-yang-types">
<prefix value="yang"/>
</import>
<import module="ietf-inet-types">
<prefix value="inet"/>
</import>
<organization>
<text>IETF NETCONF (Network Configuration) Working Group</text>
</organization>
<contact>
<text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt;
WG List: &lt;mailto:netconf@ietf.org&gt;
WG Chair: Mehmet Ersue
&lt;mailto:mehmet.ersue@nsn.com&gt;
WG Chair: Bert Wijnen
&lt;mailto:bertietf@bwijnen.net&gt;
Editor: Mark Scott
&lt;mailto:mark.scott@ericsson.com&gt;
Editor: Martin Bjorklund
&lt;mailto:mbj@tail-f.com&gt;</text>
</contact>
<description>
<text>NETCONF Monitoring Module.
All elements in this module are read-only.
Copyright (c) 2010 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 6022; see
the RFC itself for full legal notices.</text>
</description>
<revision date="2010-10-04">
<description>
<text>Initial revision.</text>
</description>
<reference>
<text>RFC 6022: YANG Module for NETCONF Monitoring</text>
</reference>
</revision>
<typedef name="netconf-datastore-type">
<type name="enumeration">
<enum name="running"/>
<enum name="candidate"/>
<enum name="startup"/>
</type>
<description>
<text>Enumeration of possible NETCONF datastore types.</text>
</description>
<reference>
<text>RFC 4741: NETCONF Configuration Protocol</text>
</reference>
</typedef>
<identity name="transport">
<description>
<text>Base identity for NETCONF transport types.</text>
</description>
</identity>
<identity name="netconf-ssh">
<base name="transport"/>
<description>
<text>NETCONF over Secure Shell (SSH).</text>
</description>
<reference>
<text>RFC 4742: Using the NETCONF Configuration Protocol
over Secure SHell (SSH)</text>
</reference>
</identity>
<identity name="netconf-soap-over-beep">
<base name="transport"/>
<description>
<text>NETCONF over Simple Object Access Protocol (SOAP) over
Blocks Extensible Exchange Protocol (BEEP).</text>
</description>
<reference>
<text>RFC 4743: Using NETCONF over the Simple Object
Access Protocol (SOAP)</text>
</reference>
</identity>
<identity name="netconf-soap-over-https">
<base name="transport"/>
<description>
<text>NETCONF over Simple Object Access Protocol (SOAP)
over Hypertext Transfer Protocol Secure (HTTPS).</text>
</description>
<reference>
<text>RFC 4743: Using NETCONF over the Simple Object
Access Protocol (SOAP)</text>
</reference>
</identity>
<identity name="netconf-beep">
<base name="transport"/>
<description>
<text>NETCONF over Blocks Extensible Exchange Protocol (BEEP).</text>
</description>
<reference>
<text>RFC 4744: Using the NETCONF Protocol over the
Blocks Extensible Exchange Protocol (BEEP)</text>
</reference>
</identity>
<identity name="netconf-tls">
<base name="transport"/>
<description>
<text>NETCONF over Transport Layer Security (TLS).</text>
</description>
<reference>
<text>RFC 5539: NETCONF over Transport Layer Security (TLS)</text>
</reference>
</identity>
<identity name="schema-format">
<description>
<text>Base identity for data model schema languages.</text>
</description>
</identity>
<identity name="xsd">
<base name="schema-format"/>
<description>
<text>W3C XML Schema Definition.</text>
</description>
<reference>
<text>W3C REC REC-xmlschema-1-20041028:
XML Schema Part 1: Structures</text>
</reference>
</identity>
<identity name="yang">
<base name="schema-format"/>
<description>
<text>The YANG data modeling language for NETCONF.</text>
</description>
<reference>
<text>RFC 6020: YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)</text>
</reference>
</identity>
<identity name="yin">
<base name="schema-format"/>
<description>
<text>The YIN syntax for YANG.</text>
</description>
<reference>
<text>RFC 6020: YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)</text>
</reference>
</identity>
<identity name="rng">
<base name="schema-format"/>
<description>
<text>Regular Language for XML Next Generation (RELAX NG).</text>
</description>
<reference>
<text>ISO/IEC 19757-2:2008: RELAX NG</text>
</reference>
</identity>
<identity name="rnc">
<base name="schema-format"/>
<description>
<text>Relax NG Compact Syntax</text>
</description>
<reference>
<text>ISO/IEC 19757-2:2008: RELAX NG</text>
</reference>
</identity>
<grouping name="common-counters">
<description>
<text>Counters that exist both per session, and also globally,
accumulated from all sessions.</text>
</description>
<leaf name="in-rpcs">
<type name="yang:zero-based-counter32"/>
<description>
<text>Number of correct &lt;rpc&gt; messages received.</text>
</description>
</leaf>
<leaf name="in-bad-rpcs">
<type name="yang:zero-based-counter32"/>
<description>
<text>Number of messages received when an &lt;rpc&gt; message was expected,
that were not correct &lt;rpc&gt; messages. This includes XML parse
errors and errors on the rpc layer.</text>
</description>
</leaf>
<leaf name="out-rpc-errors">
<type name="yang:zero-based-counter32"/>
<description>
<text>Number of &lt;rpc-reply&gt; messages sent that contained an
&lt;rpc-error&gt; element.</text>
</description>
</leaf>
<leaf name="out-notifications">
<type name="yang:zero-based-counter32"/>
<description>
<text>Number of &lt;notification&gt; messages sent.</text>
</description>
</leaf>
</grouping>
<container name="netconf-state">
<config value="false"/>
<description>
<text>The netconf-state container is the root of the monitoring
data model.</text>
</description>
<container name="capabilities">
<description>
<text>Contains the list of NETCONF capabilities supported by the
server.</text>
</description>
<leaf-list name="capability">
<type name="inet:uri"/>
<description>
<text>List of NETCONF capabilities supported by the server.</text>
</description>
</leaf-list>
</container>
<container name="datastores">
<description>
<text>Contains the list of NETCONF configuration datastores.</text>
</description>
<list name="datastore">
<key value="name"/>
<description>
<text>List of NETCONF configuration datastores supported by
the NETCONF server and related information.</text>
</description>
<leaf name="name">
<type name="netconf-datastore-type"/>
<description>
<text>Name of the datastore associated with this list entry.</text>
</description>
</leaf>
<container name="locks">
<presence value="This container is present only if the datastore&#10;is locked."/>
<description>
<text>The NETCONF &lt;lock&gt; and &lt;partial-lock&gt; operations allow
a client to lock specific resources in a datastore. The
NETCONF server will prevent changes to the locked
resources by all sessions except the one that acquired
the lock(s).
Monitoring information is provided for each datastore
entry including details such as the session that acquired
the lock, the type of lock (global or partial) and the
list of locked resources. Multiple locks per datastore
are supported.</text>
</description>
<grouping name="lock-info">
<description>
<text>Lock related parameters, common to both global and
partial locks.</text>
</description>
<leaf name="locked-by-session">
<type name="uint32"/>
<mandatory value="true"/>
<description>
<text>The session ID of the session that has locked
this resource. Both a global lock and a partial
lock MUST contain the NETCONF session-id.
If the lock is held by a session that is not managed
by the NETCONF server (e.g., a CLI session), a session
id of 0 (zero) is reported.</text>
</description>
<reference>
<text>RFC 4741: NETCONF Configuration Protocol</text>
</reference>
</leaf>
<leaf name="locked-time">
<type name="yang:date-and-time"/>
<mandatory value="true"/>
<description>
<text>The date and time of when the resource was
locked.</text>
</description>
</leaf>
</grouping>
<choice name="lock-type">
<description>
<text>Indicates if a global lock or a set of partial locks
are set.</text>
</description>
<container name="global-lock">
<description>
<text>Present if the global lock is set.</text>
</description>
<uses name="lock-info"/>
</container>
<list name="partial-lock">
<key value="lock-id"/>
<description>
<text>List of partial locks.</text>
</description>
<reference>
<text>RFC 5717: Partial Lock Remote Procedure Call (RPC) for
NETCONF</text>
</reference>
<leaf name="lock-id">
<type name="uint32"/>
<description>
<text>This is the lock id returned in the &lt;partial-lock&gt;
response.</text>
</description>
</leaf>
<uses name="lock-info"/>
<leaf-list name="select">
<type name="yang:xpath1.0"/>
<min-elements value="1"/>
<description>
<text>The xpath expression that was used to request
the lock. The select expression indicates the
original intended scope of the lock.</text>
</description>
</leaf-list>
<leaf-list name="locked-node">
<type name="instance-identifier"/>
<description>
<text>The list of instance-identifiers (i.e., the
locked nodes).
The scope of the partial lock is defined by the list
of locked nodes.</text>
</description>
</leaf-list>
</list>
</choice>
</container>
</list>
</container>
<container name="schemas">
<description>
<text>Contains the list of data model schemas supported by the
server.</text>
</description>
<list name="schema">
<key value="identifier version format"/>
<description>
<text>List of data model schemas supported by the server.</text>
</description>
<leaf name="identifier">
<type name="string"/>
<description>
<text>Identifier to uniquely reference the schema. The
identifier is used in the &lt;get-schema&gt; operation and may
be used for other purposes such as file retrieval.
For modeling languages that support or require a data
model name (e.g., YANG module name) the identifier MUST
match that name. For YANG data models, the identifier is
the name of the module or submodule. In other cases, an
identifier such as a filename MAY be used instead.</text>
</description>
</leaf>
<leaf name="version">
<type name="string"/>
<description>
<text>Version of the schema supported. Multiple versions MAY be
supported simultaneously by a NETCONF server. Each
version MUST be reported individually in the schema list,
i.e., with same identifier, possibly different location,
but different version.
For YANG data models, version is the value of the most
recent YANG 'revision' statement in the module or
submodule, or the empty string if no 'revision' statement
is present.</text>
</description>
</leaf>
<leaf name="format">
<type name="identityref">
<base name="schema-format"/>
</type>
<description>
<text>The data modeling language the schema is written
in (currently xsd, yang, yin, rng, or rnc).
For YANG data models, 'yang' format MUST be supported and
'yin' format MAY also be provided.</text>
</description>
</leaf>
<leaf name="namespace">
<type name="inet:uri"/>
<mandatory value="true"/>
<description>
<text>The XML namespace defined by the data model.
For YANG data models, this is the module's namespace.
If the list entry describes a submodule, this field
contains the namespace of the module to which the
submodule belongs.</text>
</description>
</leaf>
<leaf-list name="location">
<type name="union">
<type name="enumeration">
<enum name="NETCONF"/>
</type>
<type name="inet:uri"/>
</type>
<description>
<text>One or more locations from which the schema can be
retrieved. This list SHOULD contain at least one
entry per schema.
A schema entry may be located on a remote file system
(e.g., reference to file system for ftp retrieval) or
retrieved directly from a server supporting the
&lt;get-schema&gt; operation (denoted by the value 'NETCONF').</text>
</description>
</leaf-list>
</list>
</container>
<container name="sessions">
<description>
<text>The sessions container includes session-specific data for
NETCONF management sessions. The session list MUST include
all currently active NETCONF sessions.</text>
</description>
<list name="session">
<key value="session-id"/>
<description>
<text>All NETCONF sessions managed by the NETCONF server
MUST be reported in this list.</text>
</description>
<leaf name="session-id">
<type name="uint32">
<range value="1..max"/>
</type>
<description>
<text>Unique identifier for the session. This value is the
NETCONF session identifier, as defined in RFC 4741.</text>
</description>
<reference>
<text>RFC 4741: NETCONF Configuration Protocol</text>
</reference>
</leaf>
<leaf name="transport">
<type name="identityref">
<base name="transport"/>
</type>
<mandatory value="true"/>
<description>
<text>Identifies the transport for each session, e.g.,
'netconf-ssh', 'netconf-soap', etc.</text>
</description>
</leaf>
<leaf name="username">
<type name="string"/>
<mandatory value="true"/>
<description>
<text>The username is the client identity that was authenticated
by the NETCONF transport protocol. The algorithm used to
derive the username is NETCONF transport protocol specific
and in addition specific to the authentication mechanism
used by the NETCONF transport protocol.</text>
</description>
</leaf>
<leaf name="source-host">
<type name="inet:host"/>
<description>
<text>Host identifier of the NETCONF client. The value
returned is implementation specific (e.g., hostname,
IPv4 address, IPv6 address)</text>
</description>
</leaf>
<leaf name="login-time">
<type name="yang:date-and-time"/>
<mandatory value="true"/>
<description>
<text>Time at the server at which the session was established.</text>
</description>
</leaf>
<uses name="common-counters">
<description>
<text>Per-session counters. Zero based with following reset
behaviour:
- at start of a session
- when max value is reached</text>
</description>
</uses>
</list>
</container>
<container name="statistics">
<description>
<text>Statistical data pertaining to the NETCONF server.</text>
</description>
<leaf name="netconf-start-time">
<type name="yang:date-and-time"/>
<description>
<text>Date and time at which the management subsystem was
started.</text>
</description>
</leaf>
<leaf name="in-bad-hellos">
<type name="yang:zero-based-counter32"/>
<description>
<text>Number of sessions silently dropped because an
invalid &lt;hello&gt; message was received. This includes &lt;hello&gt;
messages with a 'session-id' attribute, bad namespace, and
bad capability declarations.</text>
</description>
</leaf>
<leaf name="in-sessions">
<type name="yang:zero-based-counter32"/>
<description>
<text>Number of sessions started. This counter is incremented
when a &lt;hello&gt; message with a &lt;session-id&gt; is sent.
'in-sessions' - 'in-bad-hellos' =
'number of correctly started netconf sessions'</text>
</description>
</leaf>
<leaf name="dropped-sessions">
<type name="yang:zero-based-counter32"/>
<description>
<text>Number of sessions that were abnormally terminated, e.g.,
due to idle timeout or transport close. This counter is not
incremented when a session is properly closed by a
&lt;close-session&gt; operation, or killed by a &lt;kill-session&gt;
operation.</text>
</description>
</leaf>
<uses name="common-counters">
<description>
<text>Global counters, accumulated from all sessions.
Zero based with following reset behaviour:
- re-initialization of NETCONF server
- when max value is reached</text>
</description>
</uses>
</container>
</container>
<rpc name="get-schema">
<description>
<text>This operation is used to retrieve a schema from the
NETCONF server.
Positive Response:
The NETCONF server returns the requested schema.
Negative Response:
If requested schema does not exist, the &lt;error-tag&gt; is
'invalid-value'.
If more than one schema matches the requested parameters, the
&lt;error-tag&gt; is 'operation-failed', and &lt;error-app-tag&gt; is
'data-not-unique'.</text>
</description>
<input>
<leaf name="identifier">
<type name="string"/>
<mandatory value="true"/>
<description>
<text>Identifier for the schema list entry.</text>
</description>
</leaf>
<leaf name="version">
<type name="string"/>
<description>
<text>Version of the schema requested. If this parameter is not
present, and more than one version of the schema exists on
the server, a 'data-not-unique' error is returned, as
described above.</text>
</description>
</leaf>
<leaf name="format">
<type name="identityref">
<base name="schema-format"/>
</type>
<description>
<text>The data modeling language of the schema. If this
parameter is not present, and more than one formats of
the schema exists on the server, a 'data-not-unique' error
is returned, as described above.</text>
</description>
</leaf>
</input>
<output>
<anyxml name="data">
<description>
<text>Contains the schema content.</text>
</description>
</anyxml>
</output>
</rpc>
</module>

View file

@ -0,0 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?>
<module name="ietf-netconf-notifications"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:ncn="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"
xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"/>
<prefix value="ncn"/>
<import module="ietf-inet-types">
<prefix value="inet"/>
</import>
<import module="ietf-netconf">
<prefix value="nc"/>
</import>
<organization>
<text>IETF NETCONF (Network Configuration Protocol) Working Group</text>
</organization>
<contact>
<text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt;
WG List: &lt;mailto:netconf@ietf.org&gt;
WG Chair: Bert Wijnen
&lt;mailto:bertietf@bwijnen.net&gt;
WG Chair: Mehmet Ersue
&lt;mailto:mehmet.ersue@nsn.com&gt;
Editor: Andy Bierman
&lt;mailto:andy@netconfcentral.org&gt;</text>
</contact>
<description>
<text>This module defines a YANG data model for use with the
NETCONF protocol that allows the NETCONF client to
receive common NETCONF base event notifications.
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 6470; see
the RFC itself for full legal notices.</text>
</description>
<revision date="2012-02-06">
<description>
<text>Initial version.</text>
</description>
<reference>
<text>RFC 6470: NETCONF Base Notifications</text>
</reference>
</revision>
<grouping name="common-session-parms">
<description>
<text>Common session parameters to identify a
management session.</text>
</description>
<leaf name="username">
<type name="string"/>
<mandatory value="true"/>
<description>
<text>Name of the user for the session.</text>
</description>
</leaf>
<leaf name="session-id">
<type name="nc:session-id-or-zero-type"/>
<mandatory value="true"/>
<description>
<text>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.</text>
</description>
</leaf>
<leaf name="source-host">
<type name="inet:ip-address"/>
<description>
<text>Address of the remote host for the session.</text>
</description>
</leaf>
</grouping>
<grouping name="changed-by-parms">
<description>
<text>Common parameters to identify the source
of a change event, such as a configuration
or capability change.</text>
</description>
<container name="changed-by">
<description>
<text>Indicates the source of the change.
If caused by internal action, then the
empty leaf 'server' will be present.
If caused by a management session, then
the name, remote host address, and session ID
of the session that made the change will be reported.</text>
</description>
<choice name="server-or-user">
<mandatory value="true"/>
<leaf name="server">
<type name="empty"/>
<description>
<text>If present, the change was caused
by the server.</text>
</description>
</leaf>
<case name="by-user">
<uses name="common-session-parms"/>
</case>
</choice>
</container>
</grouping>
<notification name="netconf-config-change">
<description>
<text>Generated when the NETCONF server detects that the
&lt;running&gt; or &lt;startup&gt; configuration datastore
has been changed by a management session.
The notification summarizes the edits that
have been detected.
The server MAY choose to also generate this
notification while loading a datastore during the
boot process for the device.</text>
</description>
<uses name="changed-by-parms"/>
<leaf name="datastore">
<type name="enumeration">
<enum name="running">
<description>
<text>The &lt;running&gt; datastore has changed.</text>
</description>
</enum>
<enum name="startup">
<description>
<text>The &lt;startup&gt; datastore has changed</text>
</description>
</enum>
</type>
<default value="running"/>
<description>
<text>Indicates which configuration datastore has changed.</text>
</description>
</leaf>
<list name="edit">
<description>
<text>An edit record SHOULD be present for each distinct
edit operation that the server has detected on
the target datastore. This list MAY be omitted
if the detailed edit operations are not known.
The server MAY report entries in this list for
changes not made by a NETCONF session (e.g., CLI).</text>
</description>
<leaf name="target">
<type name="instance-identifier"/>
<description>
<text>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.</text>
</description>
</leaf>
<leaf name="operation">
<type name="nc:edit-operation-type"/>
<description>
<text>Type of edit operation performed.
A server MUST set this object to the NETCONF edit
operation performed on the target datastore.</text>
</description>
</leaf>
</list>
</notification>
<notification name="netconf-capability-change">
<description>
<text>Generated when the NETCONF server detects that
the server capabilities have changed.
Indicates which capabilities have been added, deleted,
and/or modified. The manner in which a server
capability is changed is outside the scope of this
document.</text>
</description>
<uses name="changed-by-parms"/>
<leaf-list name="added-capability">
<type name="inet:uri"/>
<description>
<text>List of capabilities that have just been added.</text>
</description>
</leaf-list>
<leaf-list name="deleted-capability">
<type name="inet:uri"/>
<description>
<text>List of capabilities that have just been deleted.</text>
</description>
</leaf-list>
<leaf-list name="modified-capability">
<type name="inet:uri"/>
<description>
<text>List of capabilities that have just been modified.
A capability is considered to be modified if the
base URI for the capability has not changed, but
one or more of the parameters encoded at the end of
the capability URI have changed.
The new modified value of the complete URI is returned.</text>
</description>
</leaf-list>
</notification>
<notification name="netconf-session-start">
<description>
<text>Generated when a NETCONF server detects that a
NETCONF session has started. A server MAY generate
this event for non-NETCONF management sessions.
Indicates the identity of the user that started
the session.</text>
</description>
<uses name="common-session-parms"/>
</notification>
<notification name="netconf-session-end">
<description>
<text>Generated when a NETCONF server detects that a
NETCONF session has terminated.
A server MAY optionally generate this event for
non-NETCONF management sessions. Indicates the
identity of the user that owned the session,
and why the session was terminated.</text>
</description>
<uses name="common-session-parms"/>
<leaf name="killed-by">
<when condition="../termination-reason = 'killed'"/>
<type name="nc:session-id-type"/>
<description>
<text>The ID of the session that directly caused this session
to be abnormally terminated. If this session was abnormally
terminated by a non-NETCONF session unknown to the server,
then this leaf will not be present.</text>
</description>
</leaf>
<leaf name="termination-reason">
<type name="enumeration">
<enum name="closed">
<description>
<text>The session was terminated by the client in normal
fashion, e.g., by the NETCONF &lt;close-session&gt;
protocol operation.</text>
</description>
</enum>
<enum name="killed">
<description>
<text>The session was terminated in abnormal
fashion, e.g., by the NETCONF &lt;kill-session&gt;
protocol operation.</text>
</description>
</enum>
<enum name="dropped">
<description>
<text>The session was terminated because the transport layer
connection was unexpectedly closed.</text>
</description>
</enum>
<enum name="timeout">
<description>
<text>The session was terminated because of inactivity,
e.g., waiting for the &lt;hello&gt; message or &lt;rpc&gt;
messages.</text>
</description>
</enum>
<enum name="bad-hello">
<description>
<text>The client's &lt;hello&gt; message was invalid.</text>
</description>
</enum>
<enum name="other">
<description>
<text>The session was terminated for some other reason.</text>
</description>
</enum>
</type>
<mandatory value="true"/>
<description>
<text>Reason the session was terminated.</text>
</description>
</leaf>
</notification>
<notification name="netconf-confirmed-commit">
<description>
<text>Generated when a NETCONF server detects that a
confirmed-commit event has occurred. Indicates the event
and the current state of the confirmed-commit procedure
in progress.</text>
</description>
<reference>
<text>RFC 6241, Section 8.4</text>
</reference>
<uses name="common-session-parms">
<when condition="confirm-event != 'timeout'"/>
</uses>
<leaf name="confirm-event">
<type name="enumeration">
<enum name="start">
<description>
<text>The confirmed-commit procedure has started.</text>
</description>
</enum>
<enum name="cancel">
<description>
<text>The confirmed-commit procedure has been canceled,
e.g., due to the session being terminated, or an
explicit &lt;cancel-commit&gt; operation.</text>
</description>
</enum>
<enum name="timeout">
<description>
<text>The confirmed-commit procedure has been canceled
due to the confirm-timeout interval expiring.
The common session parameters will not be present
in this sub-mode.</text>
</description>
</enum>
<enum name="extend">
<description>
<text>The confirmed-commit timeout has been extended,
e.g., by a new &lt;confirmed-commit&gt; operation.</text>
</description>
</enum>
<enum name="complete">
<description>
<text>The confirmed-commit procedure has been completed.</text>
</description>
</enum>
</type>
<mandatory value="true"/>
<description>
<text>Indicates the event that caused the notification.</text>
</description>
</leaf>
<leaf name="timeout">
<when condition="../confirm-event = 'start' or ../confirm-event = 'extend'"/>
<type name="uint32"/>
<units name="seconds"/>
<description>
<text>The configured timeout value if the event type
is 'start' or 'extend'. This value represents
the approximate number of seconds from the event
time when the 'timeout' event might occur.</text>
</description>
</leaf>
</notification>
</module>

View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<module name="ietf-netconf-with-defaults"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:ncwd="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"/>
<prefix value="ncwd"/>
<import module="ietf-netconf">
<prefix value="nc"/>
</import>
<organization>
<text>IETF NETCONF (Network Configuration Protocol) Working Group</text>
</organization>
<contact>
<text>WG Web: &lt;http://tools.ietf.org/wg/netconf/&gt;
WG List: &lt;netconf@ietf.org&gt;
WG Chair: Bert Wijnen
&lt;bertietf@bwijnen.net&gt;
WG Chair: Mehmet Ersue
&lt;mehmet.ersue@nsn.com&gt;
Editor: Andy Bierman
&lt;andy.bierman@brocade.com&gt;
Editor: Balazs Lengyel
&lt;balazs.lengyel@ericsson.com&gt;</text>
</contact>
<description>
<text>This module defines an extension to the NETCONF protocol
that allows the NETCONF client to control how default
values are handled by the server in particular NETCONF
operations.
Copyright (c) 2011 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 6243; see
the RFC itself for full legal notices.</text>
</description>
<revision date="2011-06-01">
<description>
<text>Initial version.</text>
</description>
<reference>
<text>RFC 6243: With-defaults Capability for NETCONF</text>
</reference>
</revision>
<typedef name="with-defaults-mode">
<description>
<text>Possible modes to report default data.</text>
</description>
<reference>
<text>RFC 6243; Section 3.</text>
</reference>
<type name="enumeration">
<enum name="report-all">
<description>
<text>All default data is reported.</text>
</description>
<reference>
<text>RFC 6243; Section 3.1</text>
</reference>
</enum>
<enum name="report-all-tagged">
<description>
<text>All default data is reported.
Any nodes considered to be default data
will contain a 'default' XML attribute,
set to 'true' or '1'.</text>
</description>
<reference>
<text>RFC 6243; Section 3.4</text>
</reference>
</enum>
<enum name="trim">
<description>
<text>Values are not reported if they contain the default.</text>
</description>
<reference>
<text>RFC 6243; Section 3.2</text>
</reference>
</enum>
<enum name="explicit">
<description>
<text>Report values that contain the definition of
explicitly set data.</text>
</description>
<reference>
<text>RFC 6243; Section 3.3</text>
</reference>
</enum>
</type>
</typedef>
<grouping name="with-defaults-parameters">
<description>
<text>Contains the &lt;with-defaults&gt; parameter for control
of defaults in NETCONF retrieval operations.</text>
</description>
<leaf name="with-defaults">
<description>
<text>The explicit defaults processing mode requested.</text>
</description>
<reference>
<text>RFC 6243; Section 4.5.1</text>
</reference>
<type name="with-defaults-mode"/>
</leaf>
</grouping>
<augment target-node="/nc:get-config/nc:input">
<description>
<text>Adds the &lt;with-defaults&gt; parameter to the
input of the NETCONF &lt;get-config&gt; operation.</text>
</description>
<reference>
<text>RFC 6243; Section 4.5.1</text>
</reference>
<uses name="with-defaults-parameters"/>
</augment>
<augment target-node="/nc:get/nc:input">
<description>
<text>Adds the &lt;with-defaults&gt; parameter to
the input of the NETCONF &lt;get&gt; operation.</text>
</description>
<reference>
<text>RFC 6243; Section 4.5.1</text>
</reference>
<uses name="with-defaults-parameters"/>
</augment>
<augment target-node="/nc:copy-config/nc:input">
<description>
<text>Adds the &lt;with-defaults&gt; parameter to
the input of the NETCONF &lt;copy-config&gt; operation.</text>
</description>
<reference>
<text>RFC 6243; Section 4.5.1</text>
</reference>
<uses name="with-defaults-parameters"/>
</augment>
</module>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,16 @@
module module-a-dv {
namespace "urn:jmu:params:xml:ns:yang:module-a-dv";
prefix dv;
import module-a {
prefix a;
}
description
"Contains some deviations to module-a";
deviation "/a:top/a:hidden" {
deviate not-supported;
}
}

View file

@ -0,0 +1,21 @@
module module-a-dv2 {
namespace "urn:jmu:params:xml:ns:yang:module-a-dv2";
prefix dv2;
import module-a {
prefix a;
}
description
"Contains some deviations to module-a";
deviation "/a:top/a:type" {
deviate add {
default "admin";
must "count(.) = 1";
}
}
}

View file

@ -0,0 +1,23 @@
module module-a {
namespace "urn:jmu:params:xml:ns:yang:module-a";
prefix a;
description "This is a simple user module";
container top {
leaf name {
type string;
}
leaf type {
type string;
}
leaf hidden {
type boolean;
}
}
}

View file

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<module name="nc-notifications"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:manageEvent="urn:ietf:params:xml:ns:netmod:notification"
xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"
xmlns:ncEvent="urn:ietf:params:xml:ns:netconf:notification:1.0">
<namespace uri="urn:ietf:params:xml:ns:netmod:notification"/>
<prefix value="manageEvent"/>
<import module="ietf-yang-types">
<prefix value="yang"/>
</import>
<import module="notifications">
<prefix value="ncEvent"/>
</import>
<organization>
<text>IETF NETCONF WG</text>
</organization>
<contact>
<text>netconf@ietf.org</text>
</contact>
<description>
<text>Conversion of the 'manageEvent' XSD in the NETCONF
Notifications RFC.</text>
</description>
<reference>
<text>RFC 5277</text>
</reference>
<revision date="2008-07-14">
<description>
<text>RFC 5277 version.</text>
</description>
</revision>
<container name="netconf">
<description>
<text>Top-level element in the notification namespace</text>
</description>
<config value="false"/>
<container name="streams">
<description>
<text>The list of event streams supported by the system. When
a query is issued, the returned set of streams is
determined based on user privileges.</text>
</description>
<list name="stream">
<description>
<text>Stream name, description and other information.</text>
</description>
<key value="name"/>
<min-elements value="1"/>
<leaf name="name">
<description>
<text>The name of the event stream. If this is the default
NETCONF stream, this must have the value 'NETCONF'.</text>
</description>
<type name="ncEvent:streamNameType"/>
</leaf>
<leaf name="description">
<description>
<text>A description of the event stream, including such
information as the type of events that are sent over
this stream.</text>
</description>
<type name="string"/>
<mandatory value="true"/>
</leaf>
<leaf name="replaySupport">
<description>
<text>A description of the event stream, including such
information as the type of events that are sent over
this stream.</text>
</description>
<type name="boolean"/>
<mandatory value="true"/>
</leaf>
<leaf name="replayLogCreationTime">
<description>
<text>The timestamp of the creation of the log used to support
the replay function on this stream. Note that this might
be earlier then the earliest available notification in
the log. This object is updated if the log resets for
some reason. This object MUST be present if replay is
supported.</text>
</description>
<type name="yang:date-and-time"/>
</leaf>
</list>
</container>
</container>
<notification name="replayComplete">
<description>
<text>This notification is sent to signal the end of a replay
portion of a subscription.</text>
</description>
</notification>
<notification name="notificationComplete">
<description>
<text>This notification is sent to signal the end of a notification
subscription. It is sent in the case that stopTime was
specified during the creation of the subscription..</text>
</description>
</notification>
</module>

View file

@ -0,0 +1,10 @@
module notif1 {
namespace "n1";
prefix "n1";
notification n1 {
leaf first {
type string;
}
}
}

View file

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<module name="notifications"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:ncEvent="urn:ietf:params:xml:ns:netconf:notification:1.0"
xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types">
<namespace uri="urn:ietf:params:xml:ns:netconf:notification:1.0"/>
<prefix value="ncEvent"/>
<import module="ietf-yang-types">
<prefix value="yang"/>
</import>
<organization>
<text>IETF NETCONF WG</text>
</organization>
<contact>
<text>netconf@ops.ietf.org</text>
</contact>
<description>
<text>Conversion of the 'ncEvent' XSD in the
NETCONF Notifications RFC.</text>
</description>
<reference>
<text>RFC 5277.</text>
</reference>
<revision date="2008-07-14">
<description>
<text>RFC 5277 version.</text>
</description>
</revision>
<typedef name="streamNameType">
<description>
<text>The name of an event stream.</text>
</description>
<type name="string"/>
</typedef>
<rpc name="create-subscription">
<description>
<text>The command to create a notification subscription. It
takes as argument the name of the notification stream
and filter. Both of those options limit the content of
the subscription. In addition, there are two time-related
parameters, startTime and stopTime, which can be used to
select the time interval of interest to the notification
replay feature.</text>
</description>
<input>
<leaf name="stream">
<description>
<text>An optional parameter that indicates which stream of events
is of interest. If not present, then events in the default
NETCONF stream will be sent.</text>
</description>
<type name="streamNameType"/>
<default value="NETCONF"/>
</leaf>
<anyxml name="filter">
<description>
<text>An optional parameter that indicates which subset of all
possible events is of interest. The format of this
parameter is the same as that of the filter parameter
in the NETCONF protocol operations. If not present,
all events not precluded by other parameters will
be sent.</text>
</description>
</anyxml>
<leaf name="startTime">
<description>
<text>A parameter used to trigger the replay feature and
indicates that the replay should start at the time
specified. If start time is not present, this is not a
replay subscription.</text>
</description>
<type name="yang:date-and-time"/>
</leaf>
<leaf name="stopTime">
<description>
<text>An optional parameter used with the optional replay
feature to indicate the newest notifications of
interest. If stop time is not present, the notifications
will continue until the subscription is terminated.
Must be used with startTime.</text>
</description>
<type name="yang:date-and-time"/>
</leaf>
</input>
</rpc>
<container name="notification">
<description>
<text>internal struct to start a notification</text>
</description>
<config value="false"/>
<leaf name="eventTime">
<mandatory value="true"/>
<type name="yang:date-and-time"/>
</leaf>
</container>
</module>