* Added -o "<option>=<value>" command-line option to all programs: backend, cli, netconf, restconf.
* Added -p <dir> command-line option to all programs: backend, cli, netconf, restconf. * Moved and updated all standard ietf and iana yang files from example and yang/ to `yang/standard`. * Renamed example yang from example.yang -> clixon-example.yang
This commit is contained in:
parent
f48c8f45c6
commit
0267afcb21
80 changed files with 2473 additions and 9505 deletions
69
yang/clixon/Makefile.in
Normal file
69
yang/clixon/Makefile.in
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
#
|
||||
# Copyright (C) 2009-2019 Olof Hagsand and Benny Holmgren
|
||||
#
|
||||
# This file is part of CLIXON
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# the GNU General Public License Version 3 or later (the "GPL"),
|
||||
# in which case the provisions of the GPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of the GPL, and not to allow others to
|
||||
# use your version of this file under the terms of Apache License version 2,
|
||||
# indicate your decision by deleting the provisions above and replace them with
|
||||
# the notice and other provisions required by the GPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the Apache License version 2 or the GPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
#
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
prefix = @prefix@
|
||||
bindir = @bindir@
|
||||
includedir = @includedir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
CLIXON_DATADIR = @CLIXON_DATADIR@
|
||||
|
||||
YANGSPECS = clixon-config@2018-10-21.yang
|
||||
YANGSPECS += clixon-lib@2019-01-02.yang
|
||||
YANGSPECS += clixon-rfc5277@2008-07-01.yang
|
||||
|
||||
APPNAME = clixon # subdir ehere these files are installed
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile *~ .depend
|
||||
|
||||
install: $(YANGSPECS)
|
||||
install -d -m 0755 $(DESTDIR)$(CLIXON_DATADIR)
|
||||
install -m 0644 $(YANGSPECS) $(DESTDIR)$(CLIXON_DATADIR)
|
||||
|
||||
uninstall:
|
||||
(cd $(DESTDIR)$(CLIXON_DATADIR); rm -rf *.yang)
|
||||
|
||||
install-include:
|
||||
|
||||
depend:
|
||||
|
||||
|
||||
#include .depend
|
||||
|
||||
459
yang/clixon/clixon-config@2018-10-21.yang
Normal file
459
yang/clixon/clixon-config@2018-10-21.yang
Normal file
|
|
@ -0,0 +1,459 @@
|
|||
module clixon-config {
|
||||
yang-version 1.1;
|
||||
namespace "http://clicon.org/config";
|
||||
prefix cc;
|
||||
|
||||
organization
|
||||
"Clicon / Clixon";
|
||||
|
||||
contact
|
||||
"Olof Hagsand <olof@hagsand.se>";
|
||||
|
||||
description
|
||||
"Clixon configuration file
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Copyright (C) 2009-2019 Olof Hagsand and Benny Holmgren
|
||||
|
||||
This file is part of CLIXON
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the \"License\");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an \"AS IS\" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
the GNU General Public License Version 3 or later (the \"GPL\"),
|
||||
in which case the provisions of the GPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of the GPL, and not to allow others to
|
||||
use your version of this file under the terms of Apache License version 2,
|
||||
indicate your decision by deleting the provisions above and replace them with
|
||||
the notice and other provisions required by the GPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the Apache License version 2 or the GPL.
|
||||
|
||||
***** END LICENSE BLOCK *****";
|
||||
|
||||
revision 2018-10-21 {
|
||||
description
|
||||
"Released in Clixon 3.8";
|
||||
}
|
||||
typedef startup_mode{
|
||||
description
|
||||
"Which method to boot/start clicon backend.
|
||||
The methods differ in how they reach a running state
|
||||
Which source database to commit from, if any.";
|
||||
type enumeration{
|
||||
enum none{
|
||||
description
|
||||
"Do not touch running state
|
||||
Typically after crash when running state and db are synched";
|
||||
}
|
||||
enum init{
|
||||
description
|
||||
"Initialize running state.
|
||||
Start with a completely clean running state";
|
||||
}
|
||||
enum running{
|
||||
description
|
||||
"Commit running db configuration into running state
|
||||
After reboot if a persistent running db exists";
|
||||
}
|
||||
enum startup{
|
||||
description
|
||||
"Commit startup configuration into running state
|
||||
After reboot when no persistent running db exists";
|
||||
}
|
||||
}
|
||||
}
|
||||
typedef xmldb_format{
|
||||
description
|
||||
"Format of TEXT xml database format.";
|
||||
type enumeration{
|
||||
enum xml{
|
||||
description "Save and load xmldb as XML";
|
||||
}
|
||||
enum json{
|
||||
description "Save and load xmldb as JSON";
|
||||
}
|
||||
}
|
||||
}
|
||||
typedef cli_genmodel_type{
|
||||
description
|
||||
"How to generate CLI from YANG model,
|
||||
eg list a{ key x; leaf x; leaf y;}";
|
||||
type enumeration{
|
||||
enum NONE{
|
||||
description "No extra keywords: a <x> <y>";
|
||||
}
|
||||
enum VARS{
|
||||
description "Keywords on non-key variables: a <x> y <y>";
|
||||
}
|
||||
enum ALL{
|
||||
description "Keywords on all variables: a x <x> y <y>";
|
||||
}
|
||||
}
|
||||
}
|
||||
typedef nacm_mode{
|
||||
description
|
||||
"Mode of RFC8341 Network Configuration Access Control Model.
|
||||
It is unclear from the RFC whether NACM rules are internal
|
||||
in a configuration (ie embedded in regular config) or external/OOB
|
||||
in s separate, specific NACM-config";
|
||||
type enumeration{
|
||||
enum disabled{
|
||||
description "NACM is disabled";
|
||||
}
|
||||
enum internal{
|
||||
description "NACM is enabled and available in the regular config";
|
||||
}
|
||||
enum external{
|
||||
description "NACM is enabled and available in a separate config";
|
||||
}
|
||||
}
|
||||
}
|
||||
container config {
|
||||
leaf-list CLICON_FEATURE {
|
||||
description
|
||||
"Supported features as used by YANG feature/if-feature
|
||||
value is: <module>:<feature>, where <module> and <feature>
|
||||
are either names, or the special character '*'.
|
||||
*:* means enable all features
|
||||
<module>:* means enable all features in the specified module
|
||||
*:<feature> means enable the specific feature in all modules";
|
||||
type string;
|
||||
}
|
||||
leaf CLICON_CONFIGFILE{
|
||||
type string;
|
||||
description
|
||||
"Location of configuration-file for default values (this file)";
|
||||
}
|
||||
leaf-list CLICON_YANG_DIR {
|
||||
ordered-by user;
|
||||
type string;
|
||||
description
|
||||
"Yang directory path for finding module and submodule files.
|
||||
A list of these options should be in the configuration.
|
||||
When loading a Yang module, Clixon searches this list in the order
|
||||
they appear. Ensure that CLIXON_DATADIR(default
|
||||
/usr/local/share/clixon) is present in the path";
|
||||
}
|
||||
leaf CLICON_YANG_MAIN_FILE {
|
||||
type string;
|
||||
description
|
||||
"If specified load a yang module in a specific absolute filename";
|
||||
}
|
||||
leaf CLICON_YANG_MAIN_DIR {
|
||||
type string;
|
||||
description
|
||||
"If given, load all modules in this directory (all .yang files)
|
||||
See also CLICON_YANG_DIR which specifies a path of dirs";
|
||||
}
|
||||
leaf CLICON_YANG_MODULE_MAIN {
|
||||
type string;
|
||||
description
|
||||
"Option used to construct initial yang file:
|
||||
<module>[@<revision>]";
|
||||
}
|
||||
leaf CLICON_YANG_MODULE_REVISION {
|
||||
type string;
|
||||
description
|
||||
"Option used to construct initial yang file:
|
||||
<module>[@<revision>]";
|
||||
}
|
||||
leaf CLICON_BACKEND_DIR {
|
||||
type string;
|
||||
description
|
||||
"Location of backend .so plugins. Load all .so
|
||||
plugins in this dir as backend plugins";
|
||||
}
|
||||
leaf CLICON_BACKEND_REGEXP {
|
||||
type string;
|
||||
description
|
||||
"Regexp of matching backend plugins in CLICON_BACKEND_DIR";
|
||||
default "(.so)$";
|
||||
}
|
||||
leaf CLICON_NETCONF_DIR {
|
||||
type string;
|
||||
description "Location of netconf (frontend) .so plugins";
|
||||
}
|
||||
leaf CLICON_RESTCONF_DIR {
|
||||
type string;
|
||||
description
|
||||
"Location of restconf (frontend) .so plugins. Load all .so
|
||||
plugins in this dir as restconf code plugins";
|
||||
}
|
||||
leaf CLICON_RESTCONF_PATH {
|
||||
type string;
|
||||
default "/www-data/fastcgi_restconf.sock";
|
||||
description
|
||||
"FastCGI unix socket. Should be specified in webserver
|
||||
Eg in nginx: fastcgi_pass unix:/www-data/clicon_restconf.sock";
|
||||
}
|
||||
leaf CLICON_RESTCONF_PRETTY {
|
||||
type boolean;
|
||||
default true;
|
||||
description
|
||||
"Restconf return value pretty print.
|
||||
Restconf clients may add HTTP header:
|
||||
Accept: application/yang-data+json, or
|
||||
Accept: application/yang-data+xml
|
||||
to get return value in XML or JSON.
|
||||
RFC 8040 examples print XML and JSON in pretty-printed form.
|
||||
Setting this value to false makes restconf return not pretty-printed
|
||||
which may be desirable for performance or tests";
|
||||
}
|
||||
leaf CLICON_CLI_DIR {
|
||||
type string;
|
||||
description
|
||||
"Location of cli frontend .so plugins. Load all .so
|
||||
plugins in this dir as CLI object plugins";
|
||||
}
|
||||
leaf CLICON_CLISPEC_DIR {
|
||||
type string;
|
||||
description
|
||||
"Location of frontend .cli cligen spec files. Load all .cli
|
||||
files in this dir as CLI specification files";
|
||||
}
|
||||
leaf CLICON_CLISPEC_FILE {
|
||||
type string;
|
||||
description "Specific frontend .cli cligen spec file.";
|
||||
}
|
||||
leaf CLICON_CLI_MODE {
|
||||
type string;
|
||||
default "base";
|
||||
description
|
||||
"Startup CLI mode. This should match a CLICON_MODE set in
|
||||
one of the clispec files";
|
||||
}
|
||||
leaf CLICON_CLI_GENMODEL {
|
||||
type int32;
|
||||
default 1;
|
||||
description
|
||||
"If set, generate CLI specification for CLI completion of
|
||||
loaded Yang modules. This CLI tree can be accessed in CLI
|
||||
spec files using the tree reference syntax (eg @datamodel).
|
||||
See also CLICON_CLI_MODEL_TREENAME.";
|
||||
}
|
||||
leaf CLICON_CLI_MODEL_TREENAME {
|
||||
type string;
|
||||
default "datamodel";
|
||||
description
|
||||
"If CLICON_CLI_GENMODEL is set, CLI specs can reference the
|
||||
model syntax using this reference.
|
||||
Example: set @datamodel, cli_set();";
|
||||
}
|
||||
leaf CLICON_CLI_GENMODEL_COMPLETION {
|
||||
type int32;
|
||||
default 1;
|
||||
description "Generate code for CLI completion of existing db symbols";
|
||||
}
|
||||
leaf CLICON_CLI_GENMODEL_TYPE {
|
||||
type cli_genmodel_type;
|
||||
default "VARS";
|
||||
description "How to generate and show CLI syntax: VARS|ALL";
|
||||
}
|
||||
leaf CLICON_CLI_VARONLY {
|
||||
type int32;
|
||||
default 1;
|
||||
description
|
||||
"Dont include keys in cvec in cli vars callbacks,
|
||||
ie a & k in 'a <b> k <c>' ignored";
|
||||
}
|
||||
leaf CLICON_CLI_LINESCROLLING {
|
||||
type int32;
|
||||
default 1;
|
||||
description
|
||||
"Set to 0 if you want CLI to wrap to next line.
|
||||
Set to 1 if you want CLI to scroll sideways when approaching
|
||||
right margin";
|
||||
}
|
||||
leaf CLICON_SOCK_FAMILY {
|
||||
type string;
|
||||
default "UNIX";
|
||||
description
|
||||
"Address family for communicating with clixon_backend
|
||||
(UNIX|IPv4|IPv6)";
|
||||
}
|
||||
leaf CLICON_SOCK {
|
||||
type string;
|
||||
mandatory true;
|
||||
description
|
||||
"If family above is AF_UNIX: Unix socket for communicating
|
||||
with clixon_backend. If family is AF_INET: IPv4 address";
|
||||
}
|
||||
leaf CLICON_SOCK_PORT {
|
||||
type int32;
|
||||
default 4535;
|
||||
description
|
||||
"Inet socket port for communicating with clixon_backend
|
||||
(only IPv4|IPv6)";
|
||||
}
|
||||
leaf CLICON_SOCK_GROUP {
|
||||
type string;
|
||||
default "clicon";
|
||||
description "Group membership to access clixon_backend unix socket";
|
||||
}
|
||||
leaf CLICON_BACKEND_PIDFILE {
|
||||
type string;
|
||||
mandatory true;
|
||||
description "Process-id file of backend daemon";
|
||||
}
|
||||
leaf CLICON_AUTOCOMMIT {
|
||||
type int32;
|
||||
default 0;
|
||||
description
|
||||
"Set if all configuration changes are committed automatically
|
||||
on every edit change. Explicit commit commands unnecessary";
|
||||
}
|
||||
leaf CLICON_XMLDB_DIR {
|
||||
type string;
|
||||
mandatory true;
|
||||
description
|
||||
"Directory where \"running\", \"candidate\" and \"startup\" are placed";
|
||||
}
|
||||
leaf CLICON_XMLDB_PLUGIN {
|
||||
type string;
|
||||
mandatory true;
|
||||
description
|
||||
"XMLDB datastore plugin filename
|
||||
(see datastore/ and clixon_xml_db.[ch])";
|
||||
}
|
||||
leaf CLICON_XMLDB_CACHE {
|
||||
type boolean;
|
||||
default true;
|
||||
description
|
||||
"XMLDB datastore cache.
|
||||
If set, XML candidate/running parsed tree is stored in memory
|
||||
If not set, candidate/running is always accessed via disk.";
|
||||
}
|
||||
leaf CLICON_XMLDB_FORMAT {
|
||||
type xmldb_format;
|
||||
default xml;
|
||||
description "XMLDB datastore format.";
|
||||
}
|
||||
leaf CLICON_XMLDB_PRETTY {
|
||||
type boolean;
|
||||
default true;
|
||||
description
|
||||
"XMLDB datastore pretty print.
|
||||
If set, insert spaces and line-feeds making the XML/JSON human
|
||||
readable. If not set, make the XML/JSON more compact.";
|
||||
}
|
||||
leaf CLICON_XML_NS_STRICT {
|
||||
type boolean;
|
||||
default true;
|
||||
description
|
||||
"If not set, make non-strict laze namespace checks, by iterating
|
||||
through modules to find the matching datanode
|
||||
or rpc if no xmlns attribute specifies namespace.
|
||||
This is lazy semantics of finding namespaces, which means you
|
||||
do not need to explicitly give the namespace if the symbol exists
|
||||
in some loaded module.
|
||||
Example: <x/> is enough, instead of <x xmlns='urn:example:clixon'/>
|
||||
But it is wrong, but is the way Clixon originally was written.
|
||||
Strict semantics is the default.";
|
||||
}
|
||||
leaf CLICON_USE_STARTUP_CONFIG {
|
||||
type int32;
|
||||
default 0;
|
||||
description
|
||||
"Enabled uses \"startup\" configuration on boot. It is called
|
||||
startup_db and exists in XMLDB_DIR.
|
||||
NOTE: Obsolete with 1.3.3 and CLICON_STARTUP_MODE";
|
||||
}
|
||||
leaf CLICON_STARTUP_MODE {
|
||||
type startup_mode;
|
||||
description "Which method to boot/start clicon backend";
|
||||
}
|
||||
leaf CLICON_TRANSACTION_MOD {
|
||||
type boolean;
|
||||
default false;
|
||||
description "If set, modifications in validation and commit
|
||||
callbacks are written back into the datastore";
|
||||
}
|
||||
leaf CLICON_NACM_MODE {
|
||||
type nacm_mode;
|
||||
default disabled;
|
||||
description "RFC8341 network access configuration control model
|
||||
(NACM) mode: disabled, in regular (internal) config
|
||||
or separate external file given by CLICON_NACM_FILE";
|
||||
}
|
||||
leaf CLICON_NACM_FILE {
|
||||
type string;
|
||||
description "RFC8341 NACM external configuration file";
|
||||
}
|
||||
leaf CLICON_MODULE_LIBRARY_RFC7895 {
|
||||
type boolean;
|
||||
default true;
|
||||
description "Enable RFC 7895 YANG Module library support as state
|
||||
data. If enabled, module info will appear when doing
|
||||
netconf get or restconf GET";
|
||||
}
|
||||
leaf CLICON_MODULE_SET_ID {
|
||||
type string;
|
||||
default "0";
|
||||
description "If RFC 7895 YANG Module library enabled:
|
||||
Contains a server-specific identifier representing
|
||||
the current set of modules and submodules. The
|
||||
server MUST change the value of this leaf if the
|
||||
information represented by the 'module' list instances
|
||||
has changed.";
|
||||
}
|
||||
leaf CLICON_STREAM_DISCOVERY_RFC5277 {
|
||||
type boolean;
|
||||
default false;
|
||||
description "Enable event stream discovery as described in RFC 5277
|
||||
sections 3.2. If enabled, available streams will appear
|
||||
when doing netconf get or restconf GET";
|
||||
}
|
||||
leaf CLICON_STREAM_DISCOVERY_RFC8040 {
|
||||
type boolean;
|
||||
default false;
|
||||
description "Enable event stream discovery as described in RFC 5277
|
||||
sections 3.2. If enabled, available streams will appear
|
||||
when doing netconf get or restconf GET";
|
||||
}
|
||||
leaf CLICON_STREAM_PATH {
|
||||
type string;
|
||||
default "streams";
|
||||
description "Stream path appended to CLICON_STREAM_URL to form
|
||||
stream subscription URL.";
|
||||
}
|
||||
leaf CLICON_STREAM_URL {
|
||||
type string;
|
||||
default "https://localhost";
|
||||
description "Prepend this to CLICON_STREAM_PATH to form URL.
|
||||
See RFC 8040 Sec 9.3 location leaf:
|
||||
'Contains a URL that represents the entry point for
|
||||
establishing notification delivery via server-sent events.'
|
||||
Prepend this constant to name of stream.
|
||||
Example: https://localhost/streams/NETCONF. Note this is the
|
||||
external URL, not local behind a reverse-proxy.
|
||||
Note that -s <stream> command-line option to clixon_restconf
|
||||
should correspond to last path of url (eg 'streams')";
|
||||
}
|
||||
leaf CLICON_STREAM_PUB {
|
||||
type string;
|
||||
description "For stream publish using eg nchan, the base address
|
||||
to publish to. Example value: http://localhost/pub
|
||||
Example: stream NETCONF would then be pushed to
|
||||
http://localhost/pub/NETCONF.
|
||||
Note this may be a local/provate URL behind reverse-proxy.
|
||||
If not given, do NOT enable stream publishing using NCHAN.";
|
||||
}
|
||||
leaf CLICON_STREAM_RETENTION {
|
||||
type uint32;
|
||||
default 3600;
|
||||
units s;
|
||||
description "Retention for stream replay buffers in seconds, ie how much
|
||||
data to store before dropping. 0 means no retention";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
55
yang/clixon/clixon-lib@2019-01-02.yang
Normal file
55
yang/clixon/clixon-lib@2019-01-02.yang
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
module clixon-lib {
|
||||
yang-version 1.1;
|
||||
namespace "http://clicon.org/lib";
|
||||
prefix cl;
|
||||
|
||||
organization
|
||||
"Clicon / Clixon";
|
||||
|
||||
contact
|
||||
"Olof Hagsand <olof@hagsand.se>";
|
||||
|
||||
description
|
||||
"Clixon Netconf extensions for communication between clients and backend.
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Copyright (C) 2009-2019 Olof Hagsand and Benny Holmgren
|
||||
|
||||
This file is part of CLIXON
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the \"License\");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an \"AS IS\" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
the GNU General Public License Version 3 or later (the \"GPL\"),
|
||||
in which case the provisions of the GPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of the GPL, and not to allow others to
|
||||
use your version of this file under the terms of Apache License version 2,
|
||||
indicate your decision by deleting the provisions above and replace them with
|
||||
the notice and other provisions required by the GPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the Apache License version 2 or the GPL.
|
||||
|
||||
***** END LICENSE BLOCK *****";
|
||||
|
||||
revision 2019-01-02 {
|
||||
description
|
||||
"Released in Clixon 3.9";
|
||||
}
|
||||
rpc debug {
|
||||
description "Set debug level of backend.";
|
||||
input {
|
||||
leaf level {
|
||||
type uint32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
139
yang/clixon/clixon-rfc5277@2008-07-01.yang
Normal file
139
yang/clixon/clixon-rfc5277@2008-07-01.yang
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
module clixon-rfc5277 {
|
||||
/* namespace "urn:ietf:params:xml:ns:netconf:notification:1.0";*/
|
||||
namespace "urn:ietf:params:xml:ns:netmod:notification";
|
||||
prefix "ncevent";
|
||||
|
||||
import ietf-yang-types { prefix yang; }
|
||||
import ietf-inet-types { prefix inet; }
|
||||
|
||||
organization
|
||||
"IETF NETCONF (Network Configuration) Working Group";
|
||||
|
||||
description
|
||||
"Note this is a translation from RFC 5277 schema in section 4 to Yang
|
||||
made by Olof Hagsand manually for the Clixon project.
|
||||
RFC 5277 is Copyright (C) The IETF Trust (2008).";
|
||||
|
||||
revision 2008-07-01 {
|
||||
description
|
||||
"Initial revision.";
|
||||
reference
|
||||
"RFC 5277: NETCONF Event Notifications.";
|
||||
}
|
||||
|
||||
container netconf {
|
||||
config false;
|
||||
description
|
||||
"Contains NETCONF protocol monitoring information.";
|
||||
|
||||
container capabilities {
|
||||
description
|
||||
"Contains a list of protocol capability URIs.";
|
||||
|
||||
leaf-list capability {
|
||||
type inet:uri;
|
||||
description
|
||||
"A RESTCONF protocol capability URI.";
|
||||
}
|
||||
}
|
||||
|
||||
container streams {
|
||||
description
|
||||
"Container representing the notification event streams
|
||||
supported by the server.";
|
||||
reference
|
||||
"RFC 5277, Section 3.4, <streams> element.";
|
||||
list stream {
|
||||
key name;
|
||||
description
|
||||
"Each entry describes an event stream supported by
|
||||
the server.";
|
||||
|
||||
leaf name {
|
||||
type string;
|
||||
description
|
||||
"The stream name.";
|
||||
reference
|
||||
"RFC 5277, Section 3.4, <name> element.";
|
||||
}
|
||||
|
||||
leaf description {
|
||||
type string;
|
||||
description
|
||||
"Description of stream content.";
|
||||
reference
|
||||
"RFC 5277, Section 3.4, <description> element.";
|
||||
}
|
||||
|
||||
leaf replay-support {
|
||||
type boolean;
|
||||
default false;
|
||||
description
|
||||
"Indicates if replay buffer is supported for this stream.
|
||||
If 'true', then the server MUST support the 'start-time'
|
||||
and 'stop-time' query parameters for this stream.";
|
||||
reference
|
||||
"RFC 5277, Section 3.4, <replaySupport> element.";
|
||||
}
|
||||
|
||||
leaf replay-log-creation-time {
|
||||
when "../replay-support" {
|
||||
description
|
||||
"Only present if notification replay is supported.";
|
||||
}
|
||||
type yang:date-and-time;
|
||||
description
|
||||
"Indicates the time the replay log for this stream
|
||||
was created.";
|
||||
reference
|
||||
"RFC 5277, Section 3.4, <replayLogCreationTime>
|
||||
element.";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
rpc create-subscription {
|
||||
description
|
||||
"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.";
|
||||
reference "RFC 5277, Section 2.1";
|
||||
input {
|
||||
leaf stream{
|
||||
type string;
|
||||
default "NETCONF";
|
||||
description "An optional parameter, <stream>, that indicates which
|
||||
stream of events is of interest. If not present, events in the
|
||||
default NETCONF stream will be sent.";
|
||||
}
|
||||
leaf filter{
|
||||
type string;
|
||||
description "An optional parameter, <filter>, 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. See section 3.6
|
||||
for more information on filters";
|
||||
}
|
||||
leaf startTime {
|
||||
type yang:date-and-time;
|
||||
description "used to trigger the replay feature
|
||||
and indicate that the replay should start at the time
|
||||
specified. If <startTime> is not present, this is not a replay
|
||||
subscription.";
|
||||
}
|
||||
leaf stopTime {
|
||||
type yang:date-and-time;
|
||||
description "used with the optional
|
||||
replay feature to indicate the newest notifications of
|
||||
interest. If <stopTime> is not present, the notifications will
|
||||
continue until the subscription is terminated.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue