<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://yuma123.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vladimir</id>
	<title>Yuma123 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://yuma123.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vladimir"/>
	<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php/Special:Contributions/Vladimir"/>
	<updated>2026-08-06T00:18:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=429</id>
		<title>Debian packaging of yuma123</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=429"/>
		<updated>2025-03-26T10:48:39Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* 2016-07-19 ITP filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831753&lt;br /&gt;
* 2016-08-01 2.8-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-01 RFS filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833187&lt;br /&gt;
* 2016-08-08 2.8+dfsg-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-20 2.9-1 package approved and uploaded by reviewer https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1446847.html&lt;br /&gt;
* 2016-11-10 https://packages.debian.org/source/sid/yuma123 (after waiting in https://ftp-master.debian.org/new.html)&lt;br /&gt;
* 2016-11-28 Moved to testing https://lists.debian.org/debian-testing-changes/2016/11/msg00047.html&lt;br /&gt;
* 2017-10-01 RFS for 2.10-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877368&lt;br /&gt;
* 2018-08-21 RFS for 2.11-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906877&lt;br /&gt;
* 2018-09-15 package reviewed issues fixed and moved to https://ftp-master.debian.org/new.html&lt;br /&gt;
* 2021-08-19 RFS for 2.12-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992470&lt;br /&gt;
* 2021-08-27 Moved to testing https://lists.debian.org/debian-testing-changes/2021/08/msg00040.html&lt;br /&gt;
* 2022-12-05 RFS for 2.13-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1025483&lt;br /&gt;
* 2025-03-24 RFS for 2.14-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101190&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=428</id>
		<title>IETF Hackathons</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=428"/>
		<updated>2025-03-16T08:50:37Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[IETF 122 Hackathon]]&lt;br /&gt;
* [[IETF 113 Hackathon]]&lt;br /&gt;
* [[IETF 112 Hackathon]]&lt;br /&gt;
* [[IETF 111 Hackathon]]&lt;br /&gt;
* [[IETF 110 Hackathon]]&lt;br /&gt;
* [[IETF 109 Hackathon]]&lt;br /&gt;
* [[IETF 106 Hackathon]]&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=427</id>
		<title>Debian packaging of yuma123</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=427"/>
		<updated>2022-12-05T17:24:55Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* 2016-07-19 ITP filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831753&lt;br /&gt;
* 2016-08-01 2.8-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-01 RFS filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833187&lt;br /&gt;
* 2016-08-08 2.8+dfsg-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-20 2.9-1 package approved and uploaded by reviewer https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1446847.html&lt;br /&gt;
* 2016-11-10 https://packages.debian.org/source/sid/yuma123 (after waiting in https://ftp-master.debian.org/new.html)&lt;br /&gt;
* 2016-11-28 Moved to testing https://lists.debian.org/debian-testing-changes/2016/11/msg00047.html&lt;br /&gt;
* 2017-10-01 RFS for 2.10-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877368&lt;br /&gt;
* 2018-08-21 RFS for 2.11-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906877&lt;br /&gt;
* 2018-09-15 package reviewed issues fixed and moved to https://ftp-master.debian.org/new.html&lt;br /&gt;
* 2021-08-19 RFS for 2.12-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992470&lt;br /&gt;
* 2021-08-27 Moved to testing https://lists.debian.org/debian-testing-changes/2021/08/msg00040.html&lt;br /&gt;
* 2022-12-05 RFS for 2.13-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1025483&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=426</id>
		<title>Yuma Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=426"/>
		<updated>2022-05-19T18:19:35Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Installation Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YUMA Package Installation&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source Project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the Yuma User Manual for a complete introduction to Yuma.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma NETCONF client and server programs. It covers the installation of the Yuma packages.&lt;br /&gt;
&lt;br /&gt;
= Installation Requirements =&lt;br /&gt;
The following requirements must be met for Yuma to be installed.&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
There are no binary packages distributed at this time. Binaries can be compiled from source and installed using Autotools/Automake or built as Debian package from source using the Debian package management tools.&lt;br /&gt;
The build scripts are tested on the following platforms:&lt;br /&gt;
&lt;br /&gt;
* Debian &amp;quot;stable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== External Packages ==&lt;br /&gt;
The following programs and libraries need to be available for Yuma to work.&lt;br /&gt;
&lt;br /&gt;
=== libxml2 ===&lt;br /&gt;
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libssh2 ===&lt;br /&gt;
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== ncurses ===&lt;br /&gt;
The '''ncurses''' library is needed by the yuma package for some terminal support. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
It is called '''libncurses5''' on Ubuntu systems. &lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== zlib ===&lt;br /&gt;
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libreadline ===&lt;br /&gt;
The '''libreadline''' library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libreadline-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
= Getting the source =&lt;br /&gt;
 ~&amp;gt; git clone git://git.code.sf.net/p/yuma123/git yuma123&lt;br /&gt;
 ~&amp;gt; cd yuma123&lt;br /&gt;
&lt;br /&gt;
= Building and Installation =&lt;br /&gt;
You can either use the Debian/Ubuntu package management tools or directly the Autotools build scripts if the platform you have is not Debian based or you need more flexibility.&lt;br /&gt;
== Alternative 1:  Debian/Ubuntu *.deb package build and installation steps ==&lt;br /&gt;
Check if you have any unmet dependencies:&lt;br /&gt;
 yuma123&amp;gt; dpkg-checkbuilddeps&lt;br /&gt;
 dpkg-checkbuilddeps: Unmet build dependencies: libssh2-1-dev libxml2-dev &lt;br /&gt;
Install the missing packages:&lt;br /&gt;
 yuma123&amp;gt; sudo apt-get install libssh2-1-dev libxml2-dev&lt;br /&gt;
Build the *.deb:&lt;br /&gt;
 yuma123&amp;gt; dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
The generated *.deb package e.g. ../yuma123_2.5-1_i386.deb can be installed:&lt;br /&gt;
 yuma123&amp;gt; sudo dpkg -i ../yuma123_2.5-1_i386.deb&lt;br /&gt;
&lt;br /&gt;
== Alternative 2: Autotools build and installation steps==&lt;br /&gt;
Assuming you have no unresolved dependencies:&lt;br /&gt;
 yuma123&amp;gt; autoreconf -i -f&lt;br /&gt;
 yuma123&amp;gt; ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr&lt;br /&gt;
 yuma123&amp;gt; make&lt;br /&gt;
 yuma123&amp;gt; sudo make install&lt;br /&gt;
&lt;br /&gt;
= Installed Files =&lt;br /&gt;
* '''/usr/bin''' directory contains the following programs:&lt;br /&gt;
**yangcli&lt;br /&gt;
**yangrpc-example&lt;br /&gt;
* '''/usr/sbin''' directory contains the following server programs:&lt;br /&gt;
** netconfd&lt;br /&gt;
** netconf-subsystem&lt;br /&gt;
* '''/usr/lib '''directory contains the following files:&lt;br /&gt;
** libyumancx.so&lt;br /&gt;
** libyumaagt.so&lt;br /&gt;
** libyumamgr.so&lt;br /&gt;
** libyangrpc.so&lt;br /&gt;
* '''/usr/lib/yuma''' directory contains the following file:&lt;br /&gt;
** libhelloworld.so&lt;br /&gt;
** libtoaster.so&lt;br /&gt;
* '''/usr/share/yuma/modules''' directory contains all the YANG modules:&lt;br /&gt;
**yang/&lt;br /&gt;
**ietf/&lt;br /&gt;
**netconfcentral/&lt;br /&gt;
**ietf-draft/&lt;br /&gt;
**helloworld.yang&lt;br /&gt;
* '''/usr/share/doc/yuma123''' directory (*.deb only) containing the following files:&lt;br /&gt;
** copyright&lt;br /&gt;
** changelog.Debian.gz&lt;br /&gt;
* '''/usr/include/yuma '''directory contains H files needed to compile SIL code so it can be loaded into the server at runtime:&lt;br /&gt;
** ncx/*.h&lt;br /&gt;
** agt/*.h&lt;br /&gt;
** platform/*.h&lt;br /&gt;
** yangrpc/*.h&lt;br /&gt;
&lt;br /&gt;
= Next Steps =&lt;br /&gt;
== More Documentation ==&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
Each program also has extensive help information available with the''' --help''' CLI parameter. For example:&lt;br /&gt;
&lt;br /&gt;
* '''yangcli --help'''&lt;br /&gt;
* '''netconfd --help'''&lt;br /&gt;
&lt;br /&gt;
== Running the Yuma Programs ==&lt;br /&gt;
=== yangcli  ===&lt;br /&gt;
If you are just using the Yuma client applications, then there is no further mandatory setup required.&lt;br /&gt;
&lt;br /&gt;
* If a work directory is used, then the '''$YUMA_HOME '''environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* If Yuma is installed in a location other than the default location described above, then the '''$YUMA_INSTALL''' environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* The following binary applications are available:&lt;br /&gt;
** '''/usr/bin/yangcli''': NETCONF-over-SSH client application&lt;br /&gt;
&lt;br /&gt;
=== netconfd and netconf-subsystem ===&lt;br /&gt;
The Yuma server does not automatically start running when installed. This will be supported in a future release.&lt;br /&gt;
&lt;br /&gt;
The following steps must be taken to start the '''netconfd''' server:&lt;br /&gt;
&lt;br /&gt;
* You must modify the '''/etc/ssh/sshd_config''' file, and add the 'netconf' subsystem, as described in the user manual.If the yuma package was installed in a non-default location, then the path to the netconf-subsystem will be different than the example below. The following commands must be present:&lt;br /&gt;
     &lt;br /&gt;
     '''Port 22'''&lt;br /&gt;
     '''Port 830'''&lt;br /&gt;
     '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
* Start the '''netconfd''' server, as described in the [[Yuma User Manual]] or the  [[Yuma Quickstart Guide]]. This can be in the foreground or the background. If it is in the background, then the ''''--log'''' CLI parameter should be provided, as shown below:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; /'''usr/sbin/netconfd --log=$HOME/mylog &amp;amp;'''&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Restart the SSH server. This is a platform-specific task. Refer to the '''sshd''' manual page for your system for more details. This step may need to be run as root or with the 'sudo' program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debian/Ubuntu:&lt;br /&gt;
     &lt;br /&gt;
     mydir&amp;gt; sudo  /etc/init.d/ssh restart   &lt;br /&gt;
&lt;br /&gt;
Fedora 12 version:&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; sudo /etc/rc.d/init.d/sshd restart&lt;br /&gt;
&lt;br /&gt;
==== Starting multiple netconfd instances ====&lt;br /&gt;
You can start multiple instances by specifying different --port/--ncxserver-sockname/--startup parameter tuples:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
for port in 10831 10832 10833&lt;br /&gt;
do&lt;br /&gt;
    cd /root/${port}&lt;br /&gt;
    rm -f ncxserver.sock&lt;br /&gt;
    netconfd --startup=startup-cfg.xml --ncxserver-sockname=/tmp/ncxserver-${port}.sock --port=${port} 1&amp;gt;netconfd.log 2&amp;gt;netconfd.stderr.log &amp;amp;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can either start dedicated sshd instance for each netconfd instance or you can use single sshd with the following configuration in /etc/ssh/sshd_config:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Port 10831&lt;br /&gt;
Port 10832&lt;br /&gt;
Port 10833&lt;br /&gt;
Subsystem netconf &amp;quot;/usr/sbin/netconf-subsystem --ncxserver-sockname=10831@/tmp/ncxserver-10831.sock --ncxserver-sockname=10832@/tmp/ncxserver-10832.sock --ncxserver-sockname=10833@/tmp/ncxserver-10833.sock&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=425</id>
		<title>Yuma Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=425"/>
		<updated>2022-05-19T14:19:35Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Starting multiple netconfd instances */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Installation Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YUMA Package Installation&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source Project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the Yuma User Manual for a complete introduction to Yuma.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma NETCONF client and server programs. It covers the installation of the Yuma packages.&lt;br /&gt;
&lt;br /&gt;
= Installation Requirements =&lt;br /&gt;
The following requirements must be met for Yuma to be installed.&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
There are no binary packages distributed at this time. Binaries can be compiled from source and installed using Autotools/Automake or built as Debian package from source using the Debian package management tools.&lt;br /&gt;
The build scripts are tested on the following platforms:&lt;br /&gt;
&lt;br /&gt;
* Debian &amp;quot;stable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== External Packages ==&lt;br /&gt;
The following programs and libraries need to be available for Yuma to work.&lt;br /&gt;
&lt;br /&gt;
=== libxml2 ===&lt;br /&gt;
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libssh2 ===&lt;br /&gt;
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== ncurses ===&lt;br /&gt;
The '''ncurses''' library is needed by the yuma package for some terminal support. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
It is called '''libncurses5''' on Ubuntu systems. &lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== zlib ===&lt;br /&gt;
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libreadline ===&lt;br /&gt;
The '''libreadline''' library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libreadline-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
= Getting the source =&lt;br /&gt;
 ~&amp;gt; git clone git://git.code.sf.net/p/yuma123/git yuma123&lt;br /&gt;
 ~&amp;gt; cd yuma123&lt;br /&gt;
&lt;br /&gt;
= Building and Installation =&lt;br /&gt;
You can either use the Debian/Ubuntu package management tools or directly the Autotools build scripts if the platform you have is not Debian based or you need more flexibility.&lt;br /&gt;
== Alternative 1:  Debian/Ubuntu *.deb package build and installation steps ==&lt;br /&gt;
Check if you have any unmet dependencies:&lt;br /&gt;
 yuma123&amp;gt; dpkg-checkbuilddeps&lt;br /&gt;
 dpkg-checkbuilddeps: Unmet build dependencies: libssh2-1-dev libxml2-dev &lt;br /&gt;
Install the missing packages:&lt;br /&gt;
 yuma123&amp;gt; sudo apt-get install libssh2-1-dev libxml2-dev&lt;br /&gt;
Build the *.deb:&lt;br /&gt;
 yuma123&amp;gt; dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
The generated *.deb package e.g. ../yuma123_2.5-1_i386.deb can be installed:&lt;br /&gt;
 yuma123&amp;gt; sudo dpkg -i ../yuma123_2.5-1_i386.deb&lt;br /&gt;
&lt;br /&gt;
== Alternative 2: Autotools build and installation steps==&lt;br /&gt;
Assuming you have no unresolved dependencies:&lt;br /&gt;
 yuma123&amp;gt; autoreconf -i -f&lt;br /&gt;
 yuma123&amp;gt; ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr&lt;br /&gt;
 yuma123&amp;gt; make&lt;br /&gt;
 yuma123&amp;gt; sudo make install&lt;br /&gt;
&lt;br /&gt;
= Installed Files =&lt;br /&gt;
* '''/usr/bin''' directory contains the following programs:&lt;br /&gt;
**yangcli&lt;br /&gt;
**yangrpc-example&lt;br /&gt;
* '''/usr/sbin''' directory contains the following server programs:&lt;br /&gt;
** netconfd&lt;br /&gt;
** netconf-subsystem&lt;br /&gt;
* '''/usr/lib '''directory contains the following files:&lt;br /&gt;
** libyumancx.so&lt;br /&gt;
** libyumaagt.so&lt;br /&gt;
** libyumamgr.so&lt;br /&gt;
** libyangrpc.so&lt;br /&gt;
* '''/usr/lib/yuma''' directory contains the following file:&lt;br /&gt;
** libhelloworld.so&lt;br /&gt;
** libtoaster.so&lt;br /&gt;
* '''/usr/share/yuma/modules''' directory contains all the YANG modules:&lt;br /&gt;
**yang/&lt;br /&gt;
**ietf/&lt;br /&gt;
**netconfcentral/&lt;br /&gt;
**ietf-draft/&lt;br /&gt;
**helloworld.yang&lt;br /&gt;
* '''/usr/share/doc/yuma123''' directory (*.deb only) containing the following files:&lt;br /&gt;
** copyright&lt;br /&gt;
** changelog.Debian.gz&lt;br /&gt;
* '''/usr/include/yuma '''directory contains H files needed to compile SIL code so it can be loaded into the server at runtime:&lt;br /&gt;
** ncx/*.h&lt;br /&gt;
** agt/*.h&lt;br /&gt;
** platform/*.h&lt;br /&gt;
** yangrpc/*.h&lt;br /&gt;
&lt;br /&gt;
= Next Steps =&lt;br /&gt;
== More Documentation ==&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
Each program also has extensive help information available with the''' --help''' CLI parameter. For example:&lt;br /&gt;
&lt;br /&gt;
* '''yangcli --help'''&lt;br /&gt;
* '''netconfd --help'''&lt;br /&gt;
&lt;br /&gt;
== Running the Yuma Programs ==&lt;br /&gt;
=== yangcli  ===&lt;br /&gt;
If you are just using the Yuma client applications, then there is no further mandatory setup required.&lt;br /&gt;
&lt;br /&gt;
* If a work directory is used, then the '''$YUMA_HOME '''environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* If Yuma is installed in a location other than the default location described above, then the '''$YUMA_INSTALL''' environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* The following binary applications are available:&lt;br /&gt;
** '''/usr/bin/yangcli''': NETCONF-over-SSH client application&lt;br /&gt;
&lt;br /&gt;
=== netconfd and netconf-subsystem ===&lt;br /&gt;
The Yuma server does not automatically start running when installed. This will be supported in a future release.&lt;br /&gt;
&lt;br /&gt;
The following steps must be taken to start the '''netconfd''' server:&lt;br /&gt;
&lt;br /&gt;
* You must modify the '''/etc/ssh/sshd_config''' file, and add the 'netconf' subsystem, as described in the user manual.If the yuma package was installed in a non-default location, then the path to the netconf-subsystem will be different than the example below. The following commands must be present:&lt;br /&gt;
     &lt;br /&gt;
     '''Port 22'''&lt;br /&gt;
     '''Port 830'''&lt;br /&gt;
     '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
* Start the '''netconfd''' server, as described in the [[Yuma User Manual]] or the  [[Yuma Quickstart Guide]]. This can be in the foreground or the background. If it is in the background, then the ''''--log'''' CLI parameter should be provided, as shown below:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; /'''usr/sbin/netconfd --log=$HOME/mylog &amp;amp;'''&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Restart the SSH server. This is a platform-specific task. Refer to the '''sshd''' manual page for your system for more details. This step may need to be run as root or with the 'sudo' program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debian/Ubuntu:&lt;br /&gt;
     &lt;br /&gt;
     mydir&amp;gt; sudo  /etc/init.d/ssh restart   &lt;br /&gt;
&lt;br /&gt;
Fedora 12 version:&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; sudo /etc/rc.d/init.d/sshd restart&lt;br /&gt;
&lt;br /&gt;
==== Starting multiple netconfd instances ====&lt;br /&gt;
You can start multiple instances by specifying different --port/--ncxserver-sockname/--startup parameter tuples:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
for port in 10831 10832 10833&lt;br /&gt;
do&lt;br /&gt;
    cd /root/${port}&lt;br /&gt;
    rm -f ncxserver.sock&lt;br /&gt;
    netconfd --startup=startup-cfg.xml --ncxserver-sockname=ncxserver.sock --port=${port} 1&amp;gt;netconfd.log 2&amp;gt;netconfd.stderr.log &amp;amp;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can either start dedicated sshd instance for each netconfd instance or you can use single sshd with the following configuration in /etc/ssh/sshd_config:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Subsystem netconf &amp;quot;/usr/sbin/netconf-subsystem --ncxserver-sockname=10831@/root/10831/ncxserver.sock&amp;quot; --ncxserver-sockname=10832@/root/10832/ncxserver.sock --ncxserver-sockname=10833@/root/10833/ncxserver.sock&amp;quot;&lt;br /&gt;
Port 10831&lt;br /&gt;
Port 10832&lt;br /&gt;
Port 10832&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=424</id>
		<title>Yuma Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=424"/>
		<updated>2022-05-19T14:17:03Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* multiple netconfd instances */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Installation Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YUMA Package Installation&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source Project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the Yuma User Manual for a complete introduction to Yuma.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma NETCONF client and server programs. It covers the installation of the Yuma packages.&lt;br /&gt;
&lt;br /&gt;
= Installation Requirements =&lt;br /&gt;
The following requirements must be met for Yuma to be installed.&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
There are no binary packages distributed at this time. Binaries can be compiled from source and installed using Autotools/Automake or built as Debian package from source using the Debian package management tools.&lt;br /&gt;
The build scripts are tested on the following platforms:&lt;br /&gt;
&lt;br /&gt;
* Debian &amp;quot;stable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== External Packages ==&lt;br /&gt;
The following programs and libraries need to be available for Yuma to work.&lt;br /&gt;
&lt;br /&gt;
=== libxml2 ===&lt;br /&gt;
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libssh2 ===&lt;br /&gt;
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== ncurses ===&lt;br /&gt;
The '''ncurses''' library is needed by the yuma package for some terminal support. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
It is called '''libncurses5''' on Ubuntu systems. &lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== zlib ===&lt;br /&gt;
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libreadline ===&lt;br /&gt;
The '''libreadline''' library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libreadline-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
= Getting the source =&lt;br /&gt;
 ~&amp;gt; git clone git://git.code.sf.net/p/yuma123/git yuma123&lt;br /&gt;
 ~&amp;gt; cd yuma123&lt;br /&gt;
&lt;br /&gt;
= Building and Installation =&lt;br /&gt;
You can either use the Debian/Ubuntu package management tools or directly the Autotools build scripts if the platform you have is not Debian based or you need more flexibility.&lt;br /&gt;
== Alternative 1:  Debian/Ubuntu *.deb package build and installation steps ==&lt;br /&gt;
Check if you have any unmet dependencies:&lt;br /&gt;
 yuma123&amp;gt; dpkg-checkbuilddeps&lt;br /&gt;
 dpkg-checkbuilddeps: Unmet build dependencies: libssh2-1-dev libxml2-dev &lt;br /&gt;
Install the missing packages:&lt;br /&gt;
 yuma123&amp;gt; sudo apt-get install libssh2-1-dev libxml2-dev&lt;br /&gt;
Build the *.deb:&lt;br /&gt;
 yuma123&amp;gt; dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
The generated *.deb package e.g. ../yuma123_2.5-1_i386.deb can be installed:&lt;br /&gt;
 yuma123&amp;gt; sudo dpkg -i ../yuma123_2.5-1_i386.deb&lt;br /&gt;
&lt;br /&gt;
== Alternative 2: Autotools build and installation steps==&lt;br /&gt;
Assuming you have no unresolved dependencies:&lt;br /&gt;
 yuma123&amp;gt; autoreconf -i -f&lt;br /&gt;
 yuma123&amp;gt; ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr&lt;br /&gt;
 yuma123&amp;gt; make&lt;br /&gt;
 yuma123&amp;gt; sudo make install&lt;br /&gt;
&lt;br /&gt;
= Installed Files =&lt;br /&gt;
* '''/usr/bin''' directory contains the following programs:&lt;br /&gt;
**yangcli&lt;br /&gt;
**yangrpc-example&lt;br /&gt;
* '''/usr/sbin''' directory contains the following server programs:&lt;br /&gt;
** netconfd&lt;br /&gt;
** netconf-subsystem&lt;br /&gt;
* '''/usr/lib '''directory contains the following files:&lt;br /&gt;
** libyumancx.so&lt;br /&gt;
** libyumaagt.so&lt;br /&gt;
** libyumamgr.so&lt;br /&gt;
** libyangrpc.so&lt;br /&gt;
* '''/usr/lib/yuma''' directory contains the following file:&lt;br /&gt;
** libhelloworld.so&lt;br /&gt;
** libtoaster.so&lt;br /&gt;
* '''/usr/share/yuma/modules''' directory contains all the YANG modules:&lt;br /&gt;
**yang/&lt;br /&gt;
**ietf/&lt;br /&gt;
**netconfcentral/&lt;br /&gt;
**ietf-draft/&lt;br /&gt;
**helloworld.yang&lt;br /&gt;
* '''/usr/share/doc/yuma123''' directory (*.deb only) containing the following files:&lt;br /&gt;
** copyright&lt;br /&gt;
** changelog.Debian.gz&lt;br /&gt;
* '''/usr/include/yuma '''directory contains H files needed to compile SIL code so it can be loaded into the server at runtime:&lt;br /&gt;
** ncx/*.h&lt;br /&gt;
** agt/*.h&lt;br /&gt;
** platform/*.h&lt;br /&gt;
** yangrpc/*.h&lt;br /&gt;
&lt;br /&gt;
= Next Steps =&lt;br /&gt;
== More Documentation ==&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
Each program also has extensive help information available with the''' --help''' CLI parameter. For example:&lt;br /&gt;
&lt;br /&gt;
* '''yangcli --help'''&lt;br /&gt;
* '''netconfd --help'''&lt;br /&gt;
&lt;br /&gt;
== Running the Yuma Programs ==&lt;br /&gt;
=== yangcli  ===&lt;br /&gt;
If you are just using the Yuma client applications, then there is no further mandatory setup required.&lt;br /&gt;
&lt;br /&gt;
* If a work directory is used, then the '''$YUMA_HOME '''environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* If Yuma is installed in a location other than the default location described above, then the '''$YUMA_INSTALL''' environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* The following binary applications are available:&lt;br /&gt;
** '''/usr/bin/yangcli''': NETCONF-over-SSH client application&lt;br /&gt;
&lt;br /&gt;
=== netconfd and netconf-subsystem ===&lt;br /&gt;
The Yuma server does not automatically start running when installed. This will be supported in a future release.&lt;br /&gt;
&lt;br /&gt;
The following steps must be taken to start the '''netconfd''' server:&lt;br /&gt;
&lt;br /&gt;
* You must modify the '''/etc/ssh/sshd_config''' file, and add the 'netconf' subsystem, as described in the user manual.If the yuma package was installed in a non-default location, then the path to the netconf-subsystem will be different than the example below. The following commands must be present:&lt;br /&gt;
     &lt;br /&gt;
     '''Port 22'''&lt;br /&gt;
     '''Port 830'''&lt;br /&gt;
     '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
* Start the '''netconfd''' server, as described in the [[Yuma User Manual]] or the  [[Yuma Quickstart Guide]]. This can be in the foreground or the background. If it is in the background, then the ''''--log'''' CLI parameter should be provided, as shown below:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; /'''usr/sbin/netconfd --log=$HOME/mylog &amp;amp;'''&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Restart the SSH server. This is a platform-specific task. Refer to the '''sshd''' manual page for your system for more details. This step may need to be run as root or with the 'sudo' program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debian/Ubuntu:&lt;br /&gt;
     &lt;br /&gt;
     mydir&amp;gt; sudo  /etc/init.d/ssh restart   &lt;br /&gt;
&lt;br /&gt;
Fedora 12 version:&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; sudo /etc/rc.d/init.d/sshd restart&lt;br /&gt;
&lt;br /&gt;
==== Starting multiple netconfd instances ====&lt;br /&gt;
You can start multiple instances by specifying different --port/--ncxserver-sockname/--startup parameter tuples:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
for port in 10831 10832 10833&lt;br /&gt;
do&lt;br /&gt;
    cd /root/${port}&lt;br /&gt;
    rm -f ncxserver.sock&lt;br /&gt;
    /usr/sbin/netconfd --startup=startup-cfg.xml --superuser=user --ncxserver-sockname=ncxserver.sock --port=${port} 1&amp;gt;netconfd.log 2&amp;gt;netconfd.stderr.log &amp;amp;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can either start dedicated sshd instance for each netconfd instance or you can use single sshd with the following configuration in /etc/ssh/sshd_config:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Subsystem netconf &amp;quot;/usr/sbin/netconf-subsystem --ncxserver-sockname=10831@/root/10831/ncxserver.sock&amp;quot; --ncxserver-sockname=10832@/root/10832/ncxserver.sock --ncxserver-sockname=10833@/root/10833/ncxserver.sock&amp;quot;&lt;br /&gt;
Port 10831&lt;br /&gt;
Port 10832&lt;br /&gt;
Port 10832&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=423</id>
		<title>Yuma Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=423"/>
		<updated>2022-05-19T14:15:50Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* multiple netconfd instances */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Installation Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YUMA Package Installation&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source Project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the Yuma User Manual for a complete introduction to Yuma.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma NETCONF client and server programs. It covers the installation of the Yuma packages.&lt;br /&gt;
&lt;br /&gt;
= Installation Requirements =&lt;br /&gt;
The following requirements must be met for Yuma to be installed.&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
There are no binary packages distributed at this time. Binaries can be compiled from source and installed using Autotools/Automake or built as Debian package from source using the Debian package management tools.&lt;br /&gt;
The build scripts are tested on the following platforms:&lt;br /&gt;
&lt;br /&gt;
* Debian &amp;quot;stable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== External Packages ==&lt;br /&gt;
The following programs and libraries need to be available for Yuma to work.&lt;br /&gt;
&lt;br /&gt;
=== libxml2 ===&lt;br /&gt;
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libssh2 ===&lt;br /&gt;
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== ncurses ===&lt;br /&gt;
The '''ncurses''' library is needed by the yuma package for some terminal support. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
It is called '''libncurses5''' on Ubuntu systems. &lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== zlib ===&lt;br /&gt;
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libreadline ===&lt;br /&gt;
The '''libreadline''' library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libreadline-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
= Getting the source =&lt;br /&gt;
 ~&amp;gt; git clone git://git.code.sf.net/p/yuma123/git yuma123&lt;br /&gt;
 ~&amp;gt; cd yuma123&lt;br /&gt;
&lt;br /&gt;
= Building and Installation =&lt;br /&gt;
You can either use the Debian/Ubuntu package management tools or directly the Autotools build scripts if the platform you have is not Debian based or you need more flexibility.&lt;br /&gt;
== Alternative 1:  Debian/Ubuntu *.deb package build and installation steps ==&lt;br /&gt;
Check if you have any unmet dependencies:&lt;br /&gt;
 yuma123&amp;gt; dpkg-checkbuilddeps&lt;br /&gt;
 dpkg-checkbuilddeps: Unmet build dependencies: libssh2-1-dev libxml2-dev &lt;br /&gt;
Install the missing packages:&lt;br /&gt;
 yuma123&amp;gt; sudo apt-get install libssh2-1-dev libxml2-dev&lt;br /&gt;
Build the *.deb:&lt;br /&gt;
 yuma123&amp;gt; dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
The generated *.deb package e.g. ../yuma123_2.5-1_i386.deb can be installed:&lt;br /&gt;
 yuma123&amp;gt; sudo dpkg -i ../yuma123_2.5-1_i386.deb&lt;br /&gt;
&lt;br /&gt;
== Alternative 2: Autotools build and installation steps==&lt;br /&gt;
Assuming you have no unresolved dependencies:&lt;br /&gt;
 yuma123&amp;gt; autoreconf -i -f&lt;br /&gt;
 yuma123&amp;gt; ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr&lt;br /&gt;
 yuma123&amp;gt; make&lt;br /&gt;
 yuma123&amp;gt; sudo make install&lt;br /&gt;
&lt;br /&gt;
= Installed Files =&lt;br /&gt;
* '''/usr/bin''' directory contains the following programs:&lt;br /&gt;
**yangcli&lt;br /&gt;
**yangrpc-example&lt;br /&gt;
* '''/usr/sbin''' directory contains the following server programs:&lt;br /&gt;
** netconfd&lt;br /&gt;
** netconf-subsystem&lt;br /&gt;
* '''/usr/lib '''directory contains the following files:&lt;br /&gt;
** libyumancx.so&lt;br /&gt;
** libyumaagt.so&lt;br /&gt;
** libyumamgr.so&lt;br /&gt;
** libyangrpc.so&lt;br /&gt;
* '''/usr/lib/yuma''' directory contains the following file:&lt;br /&gt;
** libhelloworld.so&lt;br /&gt;
** libtoaster.so&lt;br /&gt;
* '''/usr/share/yuma/modules''' directory contains all the YANG modules:&lt;br /&gt;
**yang/&lt;br /&gt;
**ietf/&lt;br /&gt;
**netconfcentral/&lt;br /&gt;
**ietf-draft/&lt;br /&gt;
**helloworld.yang&lt;br /&gt;
* '''/usr/share/doc/yuma123''' directory (*.deb only) containing the following files:&lt;br /&gt;
** copyright&lt;br /&gt;
** changelog.Debian.gz&lt;br /&gt;
* '''/usr/include/yuma '''directory contains H files needed to compile SIL code so it can be loaded into the server at runtime:&lt;br /&gt;
** ncx/*.h&lt;br /&gt;
** agt/*.h&lt;br /&gt;
** platform/*.h&lt;br /&gt;
** yangrpc/*.h&lt;br /&gt;
&lt;br /&gt;
= Next Steps =&lt;br /&gt;
== More Documentation ==&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
Each program also has extensive help information available with the''' --help''' CLI parameter. For example:&lt;br /&gt;
&lt;br /&gt;
* '''yangcli --help'''&lt;br /&gt;
* '''netconfd --help'''&lt;br /&gt;
&lt;br /&gt;
== Running the Yuma Programs ==&lt;br /&gt;
=== yangcli  ===&lt;br /&gt;
If you are just using the Yuma client applications, then there is no further mandatory setup required.&lt;br /&gt;
&lt;br /&gt;
* If a work directory is used, then the '''$YUMA_HOME '''environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* If Yuma is installed in a location other than the default location described above, then the '''$YUMA_INSTALL''' environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* The following binary applications are available:&lt;br /&gt;
** '''/usr/bin/yangcli''': NETCONF-over-SSH client application&lt;br /&gt;
&lt;br /&gt;
=== netconfd and netconf-subsystem ===&lt;br /&gt;
The Yuma server does not automatically start running when installed. This will be supported in a future release.&lt;br /&gt;
&lt;br /&gt;
The following steps must be taken to start the '''netconfd''' server:&lt;br /&gt;
&lt;br /&gt;
* You must modify the '''/etc/ssh/sshd_config''' file, and add the 'netconf' subsystem, as described in the user manual.If the yuma package was installed in a non-default location, then the path to the netconf-subsystem will be different than the example below. The following commands must be present:&lt;br /&gt;
     &lt;br /&gt;
     '''Port 22'''&lt;br /&gt;
     '''Port 830'''&lt;br /&gt;
     '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
* Start the '''netconfd''' server, as described in the [[Yuma User Manual]] or the  [[Yuma Quickstart Guide]]. This can be in the foreground or the background. If it is in the background, then the ''''--log'''' CLI parameter should be provided, as shown below:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; /'''usr/sbin/netconfd --log=$HOME/mylog &amp;amp;'''&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Restart the SSH server. This is a platform-specific task. Refer to the '''sshd''' manual page for your system for more details. This step may need to be run as root or with the 'sudo' program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debian/Ubuntu:&lt;br /&gt;
     &lt;br /&gt;
     mydir&amp;gt; sudo  /etc/init.d/ssh restart   &lt;br /&gt;
&lt;br /&gt;
Fedora 12 version:&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; sudo /etc/rc.d/init.d/sshd restart&lt;br /&gt;
&lt;br /&gt;
==== multiple netconfd instances ====&lt;br /&gt;
You can start multiple instances by specifying different --port/--ncxserver-sockname/--startup parameter tuples:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
for port in 10831 10832 10833&lt;br /&gt;
do&lt;br /&gt;
    cd /root/${port}&lt;br /&gt;
    rm -f ncxserver.sock&lt;br /&gt;
    /usr/sbin/netconfd --startup=startup-cfg.xml --superuser=user --ncxserver-sockname=ncxserver.sock --port=${port} 1&amp;gt;netconfd.log 2&amp;gt;netconfd.stderr.log &amp;amp;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can either start dedicated sshd instance for each netconfd instance or you can use single sshd with the following configuration in /etc/ssh/sshd_config:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Subsystem netconf &amp;quot;/usr/sbin/netconf-subsystem --ncxserver-sockname=10831@/root/10831/ncxserver.sock&amp;quot; --ncxserver-sockname=10832@/root/10832/ncxserver.sock --ncxserver-sockname=10833@/root/10833/ncxserver.sock&amp;quot;&lt;br /&gt;
Port 10831&lt;br /&gt;
Port 10832&lt;br /&gt;
Port 10832&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=422</id>
		<title>Yuma Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=422"/>
		<updated>2022-05-19T14:09:01Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Running the Yuma Programs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Installation Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YUMA Package Installation&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source Project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the Yuma User Manual for a complete introduction to Yuma.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma NETCONF client and server programs. It covers the installation of the Yuma packages.&lt;br /&gt;
&lt;br /&gt;
= Installation Requirements =&lt;br /&gt;
The following requirements must be met for Yuma to be installed.&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
There are no binary packages distributed at this time. Binaries can be compiled from source and installed using Autotools/Automake or built as Debian package from source using the Debian package management tools.&lt;br /&gt;
The build scripts are tested on the following platforms:&lt;br /&gt;
&lt;br /&gt;
* Debian &amp;quot;stable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== External Packages ==&lt;br /&gt;
The following programs and libraries need to be available for Yuma to work.&lt;br /&gt;
&lt;br /&gt;
=== libxml2 ===&lt;br /&gt;
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libssh2 ===&lt;br /&gt;
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== ncurses ===&lt;br /&gt;
The '''ncurses''' library is needed by the yuma package for some terminal support. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
It is called '''libncurses5''' on Ubuntu systems. &lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== zlib ===&lt;br /&gt;
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libreadline ===&lt;br /&gt;
The '''libreadline''' library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libreadline-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
= Getting the source =&lt;br /&gt;
 ~&amp;gt; git clone git://git.code.sf.net/p/yuma123/git yuma123&lt;br /&gt;
 ~&amp;gt; cd yuma123&lt;br /&gt;
&lt;br /&gt;
= Building and Installation =&lt;br /&gt;
You can either use the Debian/Ubuntu package management tools or directly the Autotools build scripts if the platform you have is not Debian based or you need more flexibility.&lt;br /&gt;
== Alternative 1:  Debian/Ubuntu *.deb package build and installation steps ==&lt;br /&gt;
Check if you have any unmet dependencies:&lt;br /&gt;
 yuma123&amp;gt; dpkg-checkbuilddeps&lt;br /&gt;
 dpkg-checkbuilddeps: Unmet build dependencies: libssh2-1-dev libxml2-dev &lt;br /&gt;
Install the missing packages:&lt;br /&gt;
 yuma123&amp;gt; sudo apt-get install libssh2-1-dev libxml2-dev&lt;br /&gt;
Build the *.deb:&lt;br /&gt;
 yuma123&amp;gt; dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
The generated *.deb package e.g. ../yuma123_2.5-1_i386.deb can be installed:&lt;br /&gt;
 yuma123&amp;gt; sudo dpkg -i ../yuma123_2.5-1_i386.deb&lt;br /&gt;
&lt;br /&gt;
== Alternative 2: Autotools build and installation steps==&lt;br /&gt;
Assuming you have no unresolved dependencies:&lt;br /&gt;
 yuma123&amp;gt; autoreconf -i -f&lt;br /&gt;
 yuma123&amp;gt; ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr&lt;br /&gt;
 yuma123&amp;gt; make&lt;br /&gt;
 yuma123&amp;gt; sudo make install&lt;br /&gt;
&lt;br /&gt;
= Installed Files =&lt;br /&gt;
* '''/usr/bin''' directory contains the following programs:&lt;br /&gt;
**yangcli&lt;br /&gt;
**yangrpc-example&lt;br /&gt;
* '''/usr/sbin''' directory contains the following server programs:&lt;br /&gt;
** netconfd&lt;br /&gt;
** netconf-subsystem&lt;br /&gt;
* '''/usr/lib '''directory contains the following files:&lt;br /&gt;
** libyumancx.so&lt;br /&gt;
** libyumaagt.so&lt;br /&gt;
** libyumamgr.so&lt;br /&gt;
** libyangrpc.so&lt;br /&gt;
* '''/usr/lib/yuma''' directory contains the following file:&lt;br /&gt;
** libhelloworld.so&lt;br /&gt;
** libtoaster.so&lt;br /&gt;
* '''/usr/share/yuma/modules''' directory contains all the YANG modules:&lt;br /&gt;
**yang/&lt;br /&gt;
**ietf/&lt;br /&gt;
**netconfcentral/&lt;br /&gt;
**ietf-draft/&lt;br /&gt;
**helloworld.yang&lt;br /&gt;
* '''/usr/share/doc/yuma123''' directory (*.deb only) containing the following files:&lt;br /&gt;
** copyright&lt;br /&gt;
** changelog.Debian.gz&lt;br /&gt;
* '''/usr/include/yuma '''directory contains H files needed to compile SIL code so it can be loaded into the server at runtime:&lt;br /&gt;
** ncx/*.h&lt;br /&gt;
** agt/*.h&lt;br /&gt;
** platform/*.h&lt;br /&gt;
** yangrpc/*.h&lt;br /&gt;
&lt;br /&gt;
= Next Steps =&lt;br /&gt;
== More Documentation ==&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
Each program also has extensive help information available with the''' --help''' CLI parameter. For example:&lt;br /&gt;
&lt;br /&gt;
* '''yangcli --help'''&lt;br /&gt;
* '''netconfd --help'''&lt;br /&gt;
&lt;br /&gt;
== Running the Yuma Programs ==&lt;br /&gt;
=== yangcli  ===&lt;br /&gt;
If you are just using the Yuma client applications, then there is no further mandatory setup required.&lt;br /&gt;
&lt;br /&gt;
* If a work directory is used, then the '''$YUMA_HOME '''environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* If Yuma is installed in a location other than the default location described above, then the '''$YUMA_INSTALL''' environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* The following binary applications are available:&lt;br /&gt;
** '''/usr/bin/yangcli''': NETCONF-over-SSH client application&lt;br /&gt;
&lt;br /&gt;
=== netconfd and netconf-subsystem ===&lt;br /&gt;
The Yuma server does not automatically start running when installed. This will be supported in a future release.&lt;br /&gt;
&lt;br /&gt;
The following steps must be taken to start the '''netconfd''' server:&lt;br /&gt;
&lt;br /&gt;
* You must modify the '''/etc/ssh/sshd_config''' file, and add the 'netconf' subsystem, as described in the user manual.If the yuma package was installed in a non-default location, then the path to the netconf-subsystem will be different than the example below. The following commands must be present:&lt;br /&gt;
     &lt;br /&gt;
     '''Port 22'''&lt;br /&gt;
     '''Port 830'''&lt;br /&gt;
     '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
* Start the '''netconfd''' server, as described in the [[Yuma User Manual]] or the  [[Yuma Quickstart Guide]]. This can be in the foreground or the background. If it is in the background, then the ''''--log'''' CLI parameter should be provided, as shown below:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; /'''usr/sbin/netconfd --log=$HOME/mylog &amp;amp;'''&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Restart the SSH server. This is a platform-specific task. Refer to the '''sshd''' manual page for your system for more details. This step may need to be run as root or with the 'sudo' program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debian/Ubuntu:&lt;br /&gt;
     &lt;br /&gt;
     mydir&amp;gt; sudo  /etc/init.d/ssh restart   &lt;br /&gt;
&lt;br /&gt;
Fedora 12 version:&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; sudo /etc/rc.d/init.d/sshd restart&lt;br /&gt;
&lt;br /&gt;
==== multiple netconfd instances ====&lt;br /&gt;
You can start multiple instances by specifying different --port/--ncxserver:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
for port in 10831 10832 10833&lt;br /&gt;
do&lt;br /&gt;
    cd /root/${port}&lt;br /&gt;
    rm -f ncxserver.sock&lt;br /&gt;
    /usr/sbin/netconfd --startup=startup-cfg.xml --superuser=user --ncxserver-sockname=ncxserver.sock --port=${port} 1&amp;gt;netconfd.log 2&amp;gt;netconfd.stderr.log &amp;amp;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_113_Hackathon&amp;diff=421</id>
		<title>IETF 113 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_113_Hackathon&amp;diff=421"/>
		<updated>2022-03-16T11:40:52Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Presentations==&lt;br /&gt;
Proxy meetup for hands-on demonstration at Bitraf, Oslo 2022-03-19 17:00 UTC&lt;br /&gt;
&lt;br /&gt;
==Yuma123 projects participating==&lt;br /&gt;
&lt;br /&gt;
* https://www.hackster.io/lightside-instruments/network-programmability-kit-for-ultra96-07435c&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_113_Hackathon&amp;diff=420</id>
		<title>IETF 113 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_113_Hackathon&amp;diff=420"/>
		<updated>2022-03-16T11:36:26Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Proxy meetup for hands-on demonstration at Bitraf, Oslo 2022-03-19 17:00 UTC&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_113_Hackathon&amp;diff=419</id>
		<title>IETF 113 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_113_Hackathon&amp;diff=419"/>
		<updated>2022-03-16T11:33:07Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with &amp;quot;* Proxy meetup for hands-on demonstrations at Bitraf, Oslo 2022-03-19 17:00 UTC&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Proxy meetup for hands-on demonstrations at Bitraf, Oslo 2022-03-19 17:00 UTC&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=418</id>
		<title>IETF Hackathons</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=418"/>
		<updated>2022-03-16T11:28:35Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[IETF 113 Hackathon]]&lt;br /&gt;
* [[IETF 112 Hackathon]]&lt;br /&gt;
* [[IETF 111 Hackathon]]&lt;br /&gt;
* [[IETF 110 Hackathon]]&lt;br /&gt;
* [[IETF 109 Hackathon]]&lt;br /&gt;
* [[IETF 106 Hackathon]]&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=417</id>
		<title>IETF 112 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=417"/>
		<updated>2021-11-08T15:40:16Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Organized hands-on workshop for the project at Bitraf, Oslo 2021-11-03 17:00 UTC gained 1 new member of the team - Torfinn&lt;br /&gt;
&lt;br /&gt;
Our goal was to implement the last 2 sec. 26 benchmarks to the RFC2544 python implementation based on YANG/NETCONF interface specified in [https://datatracker.ietf.org/doc/draft-vassilev-bmwg-network-interconnect-tester/ draft-vassilev-bmwg-network-interconnect-tester]&lt;br /&gt;
&lt;br /&gt;
These are in fact often not implemented in commercial implementations. Especially the last one which requires automated mechanism to restart or powercycle the DUT that the benchmark implementation can control.&lt;br /&gt;
&lt;br /&gt;
We designed YANG/NETCONF interface for a power distribution unit and implemented open-source/hardware device which we used to powercycle the DUT and measure the down time. Which turned to be a great demo for configuration with YANG/NETCONF without involving complex models. Here is the output of accessing the device with one YANG automated NETCONF client ( yangcli ) and switching off port 2 of the PDU which is connected to the DUT.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ apt-get install yangcli&lt;br /&gt;
$ yangcli --server=lightside-instruments.com --ncport=10841 --user=user --password=ietf112 --echo-requests=true --echo-replies=true --display-mode=xml&lt;br /&gt;
...&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; xget-config source=running /&lt;br /&gt;
&lt;br /&gt;
RPC Request 3 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;get-config xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;source&amp;gt;&lt;br /&gt;
    &amp;lt;running/&amp;gt;&lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;filter type=&amp;quot;xpath&amp;quot; select=&amp;quot;/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/get-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC Data Reply 3 for session 2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rpc-reply xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data&amp;gt;&lt;br /&gt;
    &amp;lt;nacm xmlns=&amp;quot;urn:ietf:params:xml:ns:yang:ietf-netconf-acm&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;power-distribution-unit xmlns=&amp;quot;http://lightide-instruments.com/ns/power-distribution-unit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;0&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;2&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;4&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/power-distribution-unit&amp;gt;&lt;br /&gt;
  &amp;lt;/data&amp;gt;&lt;br /&gt;
&amp;lt;/rpc-reply&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; delete /power-distribution-unit/output/&lt;br /&gt;
&lt;br /&gt;
Filling list /power-distribution-unit/output:&lt;br /&gt;
Filling key leaf /power-distribution-unit/output/index:&lt;br /&gt;
Enter uint32 value for leaf &amp;lt;index&amp;gt;&lt;br /&gt;
yangcli user@lightside-instruments.com:delete&amp;gt; 2&lt;br /&gt;
&lt;br /&gt;
RPC Request 4 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;edit-config xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;target&amp;gt;&lt;br /&gt;
    &amp;lt;candidate/&amp;gt;&lt;br /&gt;
  &amp;lt;/target&amp;gt;&lt;br /&gt;
  &amp;lt;default-operation&amp;gt;merge&amp;lt;/default-operation&amp;gt;&lt;br /&gt;
  &amp;lt;test-option&amp;gt;set&amp;lt;/test-option&amp;gt;&lt;br /&gt;
  &amp;lt;config&amp;gt;&lt;br /&gt;
    &amp;lt;power-distribution-unit xmlns=&amp;quot;http://lightide-instruments.com/ns/power-distribution-unit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;output &lt;br /&gt;
        xmlns:nc=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&lt;br /&gt;
        nc:operation=&amp;quot;delete&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;2&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/power-distribution-unit&amp;gt;&lt;br /&gt;
  &amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/edit-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC OK Reply 4 for session 2:&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; commit&lt;br /&gt;
&lt;br /&gt;
RPC Request 5 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;commit xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC OK Reply 5 for session 2:&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=416</id>
		<title>IETF 112 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=416"/>
		<updated>2021-11-08T15:34:59Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Organized hands on workshop for the project at Bitraf, Oslo 2021-11-03 17:00 UTC gained 1 new member of the team - Torfin&lt;br /&gt;
&lt;br /&gt;
Our goal was to implement the last 2 sec. 26 benchmarks to the RFC2544 python implementation based on YANG/NETCONF interface specified in [https://datatracker.ietf.org/doc/draft-vassilev-bmwg-network-interconnect-tester/ draft-vassilev-bmwg-network-interconnect-tester]&lt;br /&gt;
&lt;br /&gt;
These are in fact often not implemented in commercial implementations. Especially the last one which requires means to restart or powercycle the DUT.&lt;br /&gt;
&lt;br /&gt;
We implement YANG/NETCONF interface for a power distribution unit which we use to powercycle the DUT and measure the down time. Which turned to be a great demo for configuration with YANG/NETCONF. Here is the output of accessing the device with yangcli and switching off port 2 of the PDU which is connected to the DUT.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ apt-get install yangcli&lt;br /&gt;
$ yangcli --server=lightside-instruments.com --ncport=10841 --user=user --password=ietf112 --echo-requests=true --echo-replies=true --display-mode=xml&lt;br /&gt;
...&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; xget-config source=running /&lt;br /&gt;
&lt;br /&gt;
RPC Request 3 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;get-config xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;source&amp;gt;&lt;br /&gt;
    &amp;lt;running/&amp;gt;&lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;filter type=&amp;quot;xpath&amp;quot; select=&amp;quot;/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/get-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC Data Reply 3 for session 2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rpc-reply xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data&amp;gt;&lt;br /&gt;
    &amp;lt;nacm xmlns=&amp;quot;urn:ietf:params:xml:ns:yang:ietf-netconf-acm&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;power-distribution-unit xmlns=&amp;quot;http://lightide-instruments.com/ns/power-distribution-unit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;0&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;2&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;4&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/power-distribution-unit&amp;gt;&lt;br /&gt;
  &amp;lt;/data&amp;gt;&lt;br /&gt;
&amp;lt;/rpc-reply&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; delete /power-distribution-unit/output/&lt;br /&gt;
&lt;br /&gt;
Filling list /power-distribution-unit/output:&lt;br /&gt;
Filling key leaf /power-distribution-unit/output/index:&lt;br /&gt;
Enter uint32 value for leaf &amp;lt;index&amp;gt;&lt;br /&gt;
yangcli user@lightside-instruments.com:delete&amp;gt; 2&lt;br /&gt;
&lt;br /&gt;
RPC Request 4 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;edit-config xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;target&amp;gt;&lt;br /&gt;
    &amp;lt;candidate/&amp;gt;&lt;br /&gt;
  &amp;lt;/target&amp;gt;&lt;br /&gt;
  &amp;lt;default-operation&amp;gt;merge&amp;lt;/default-operation&amp;gt;&lt;br /&gt;
  &amp;lt;test-option&amp;gt;set&amp;lt;/test-option&amp;gt;&lt;br /&gt;
  &amp;lt;config&amp;gt;&lt;br /&gt;
    &amp;lt;power-distribution-unit xmlns=&amp;quot;http://lightide-instruments.com/ns/power-distribution-unit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;output &lt;br /&gt;
        xmlns:nc=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&lt;br /&gt;
        nc:operation=&amp;quot;delete&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;2&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/power-distribution-unit&amp;gt;&lt;br /&gt;
  &amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/edit-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC OK Reply 4 for session 2:&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; commit&lt;br /&gt;
&lt;br /&gt;
RPC Request 5 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;commit xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC OK Reply 5 for session 2:&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=415</id>
		<title>IETF 112 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=415"/>
		<updated>2021-11-08T15:25:21Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Organized presentation at Bitraf, Oslo 2021-11-03 17:00 UTC gained 1 member of the team&lt;br /&gt;
&lt;br /&gt;
Our goal was to implement the last 2 sec. 26 benchmarks to the RFC2544 python implementation based on YANG/NETCONF interface specified in [https://datatracker.ietf.org/doc/draft-vassilev-bmwg-network-interconnect-tester/ draft-vassilev-bmwg-network-interconnect-tester]&lt;br /&gt;
&lt;br /&gt;
These are in fact often not implemented in commercial implementations. Especially the last one which requires means to restart or powercycle the DUT.&lt;br /&gt;
&lt;br /&gt;
We implement YANG/NETCONF interface for a power distribution unit which we use to powercycle the DUT and measure the down time. Which turned to be a great demo for configuration with YANG/NETCONF. Here is the output of accessing the device with yangcli and switching off port 2 of the PDU which is connected to the DUT.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ apt-get install yangcli&lt;br /&gt;
$ yangcli --server=lightside-instruments.com --ncport=10841 --user=user --password=ietf112 --echo-requests=true --echo-replies=true --display-mode=xml&lt;br /&gt;
...&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; xget-config source=running /&lt;br /&gt;
&lt;br /&gt;
RPC Request 3 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;get-config xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;source&amp;gt;&lt;br /&gt;
    &amp;lt;running/&amp;gt;&lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;filter type=&amp;quot;xpath&amp;quot; select=&amp;quot;/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/get-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC Data Reply 3 for session 2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rpc-reply xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data&amp;gt;&lt;br /&gt;
    &amp;lt;nacm xmlns=&amp;quot;urn:ietf:params:xml:ns:yang:ietf-netconf-acm&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;power-distribution-unit xmlns=&amp;quot;http://lightide-instruments.com/ns/power-distribution-unit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;0&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;2&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
      &amp;lt;output&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;4&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/power-distribution-unit&amp;gt;&lt;br /&gt;
  &amp;lt;/data&amp;gt;&lt;br /&gt;
&amp;lt;/rpc-reply&amp;gt;&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; delete /power-distribution-unit/output/&lt;br /&gt;
&lt;br /&gt;
Filling list /power-distribution-unit/output:&lt;br /&gt;
Filling key leaf /power-distribution-unit/output/index:&lt;br /&gt;
Enter uint32 value for leaf &amp;lt;index&amp;gt;&lt;br /&gt;
yangcli user@lightside-instruments.com:delete&amp;gt; 2&lt;br /&gt;
&lt;br /&gt;
RPC Request 4 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;edit-config xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;target&amp;gt;&lt;br /&gt;
    &amp;lt;candidate/&amp;gt;&lt;br /&gt;
  &amp;lt;/target&amp;gt;&lt;br /&gt;
  &amp;lt;default-operation&amp;gt;merge&amp;lt;/default-operation&amp;gt;&lt;br /&gt;
  &amp;lt;test-option&amp;gt;set&amp;lt;/test-option&amp;gt;&lt;br /&gt;
  &amp;lt;config&amp;gt;&lt;br /&gt;
    &amp;lt;power-distribution-unit xmlns=&amp;quot;http://lightide-instruments.com/ns/power-distribution-unit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;output &lt;br /&gt;
        xmlns:nc=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;&lt;br /&gt;
        nc:operation=&amp;quot;delete&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;index&amp;gt;2&amp;lt;/index&amp;gt;&lt;br /&gt;
      &amp;lt;/output&amp;gt;&lt;br /&gt;
    &amp;lt;/power-distribution-unit&amp;gt;&lt;br /&gt;
  &amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/edit-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC OK Reply 4 for session 2:&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt; commit&lt;br /&gt;
&lt;br /&gt;
RPC Request 5 for session 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;commit xmlns=&amp;quot;urn:ietf:params:xml:ns:netconf:base:1.0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RPC OK Reply 5 for session 2:&lt;br /&gt;
&lt;br /&gt;
yangcli user@lightside-instruments.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=414</id>
		<title>IETF 112 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=414"/>
		<updated>2021-11-03T12:23:08Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Scheduled presentation at Bitraf, Oslo 2021-11-03 17:00 UTC&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=413</id>
		<title>IETF 112 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_112_Hackathon&amp;diff=413"/>
		<updated>2021-11-03T12:22:50Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with &amp;quot;* Scheduled presentation in Bitraf, Oslo 2021-11-03 17:00 UTC&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Scheduled presentation in Bitraf, Oslo 2021-11-03 17:00 UTC&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=412</id>
		<title>IETF Hackathons</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=412"/>
		<updated>2021-11-03T12:22:00Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[IETF 112 Hackathon]]&lt;br /&gt;
* [[IETF 111 Hackathon]]&lt;br /&gt;
* [[IETF 110 Hackathon]]&lt;br /&gt;
* [[IETF 109 Hackathon]]&lt;br /&gt;
* [[IETF 106 Hackathon]]&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=411</id>
		<title>Debian packaging of yuma123</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=411"/>
		<updated>2021-09-09T07:28:39Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* 2016-07-19 ITP filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831753&lt;br /&gt;
* 2016-08-01 2.8-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-01 RFS filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833187&lt;br /&gt;
* 2016-08-08 2.8+dfsg-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-20 2.9-1 package approved and uploaded by reviewer https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1446847.html&lt;br /&gt;
* 2016-11-10 https://packages.debian.org/source/sid/yuma123 (after waiting in https://ftp-master.debian.org/new.html)&lt;br /&gt;
* 2016-11-28 Moved to testing https://lists.debian.org/debian-testing-changes/2016/11/msg00047.html&lt;br /&gt;
* 2017-10-01 RFS for 2.10-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877368&lt;br /&gt;
* 2018-08-21 RFS for 2.11-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906877&lt;br /&gt;
* 2018-09-15 package reviewed issues fixed and moved to https://ftp-master.debian.org/new.html&lt;br /&gt;
* 2021-08-19 RFS for 2.12-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992470&lt;br /&gt;
* 2021-08-27 Moved to testing https://lists.debian.org/debian-testing-changes/2021/08/msg00040.html&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=410</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=410"/>
		<updated>2021-08-19T23:25:16Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Documentation==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Document name&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Installation Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Quickstart Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma User Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma netconfd Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangcli Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdiff Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdump Manual]]&lt;br /&gt;
|- &lt;br /&gt;
|[[Yuma Developer Manual]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Events==&lt;br /&gt;
* [[IETF Hackathons]]&lt;br /&gt;
* [[ECOC 2018 - Demo session]]&lt;br /&gt;
* [[OMNeT++ Summit 2018 - Hackathon]]&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
* [[Debian packaging of yuma123]]&lt;br /&gt;
* [[Reporting issues and debugging]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=409</id>
		<title>IETF Hackathons</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_Hackathons&amp;diff=409"/>
		<updated>2021-08-19T23:24:37Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with &amp;quot;* IETF 111 Hackathon * IETF 110 Hackathon * IETF 109 Hackathon * IETF 106 Hackathon * IETF 105 Hackathon * IETF 104 Hackathon * IETF 102 Hackathon...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[IETF 111 Hackathon]]&lt;br /&gt;
* [[IETF 110 Hackathon]]&lt;br /&gt;
* [[IETF 109 Hackathon]]&lt;br /&gt;
* [[IETF 106 Hackathon]]&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=408</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=408"/>
		<updated>2021-08-19T23:24:28Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Documentation==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Document name&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Installation Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Quickstart Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma User Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma netconfd Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangcli Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdiff Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdump Manual]]&lt;br /&gt;
|- &lt;br /&gt;
|[[Yuma Developer Manual]]&lt;br /&gt;
|}&lt;br /&gt;
* [[IETF Hackathons]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other events==&lt;br /&gt;
* [[ECOC 2018 - Demo session]]&lt;br /&gt;
* [[OMNeT++ Summit 2018 - Hackathon]]&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
* [[Debian packaging of yuma123]]&lt;br /&gt;
* [[Reporting issues and debugging]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_111_Hackathon&amp;diff=407</id>
		<title>IETF 111 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_111_Hackathon&amp;diff=407"/>
		<updated>2021-08-19T23:23:32Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with &amp;quot;'''BMWG - YANG model and implementation of Network Interconnect Tester'''     * Champion(s)       * Vladimir Vassilev (vladimir at lightside-instruments.com)     * Project(s)...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''BMWG - YANG model and implementation of Network Interconnect Tester'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev (vladimir at lightside-instruments.com)&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Model and implementation of YANG/NETCONF managed RFC2544 capable Network Interconnect Tester&lt;br /&gt;
    * Specifications:&lt;br /&gt;
      * ​https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
    * Repositories&lt;br /&gt;
      * Scripting - [https://github.com/vlvassilev/litenc/tree/master/tntapi/example/ietf-network-interconnect-tester YANG/NETCONF benchmark orchestration code]&lt;br /&gt;
      * Software - [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-traffic-generator YANG/NETCONF device side code]&lt;br /&gt;
      * Firmware - [https://github.com/vlvassilev/network-interconnect-tester-cores/tree/master/lib/hw/lsi/cores/traffic_generator_gmii HDL]&lt;br /&gt;
      * Hardware - [https://github.com/vlvassilev/spark board design]&lt;br /&gt;
    * Getting started - ([https://www.hackster.io/lightside-instruments/network-programmability-kit-for-ultra96-07435c walk-through])&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=406</id>
		<title>Debian packaging of yuma123</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Debian_packaging_of_yuma123&amp;diff=406"/>
		<updated>2021-08-19T23:18:27Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* 2016-07-19 ITP filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831753&lt;br /&gt;
* 2016-08-01 2.8-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-01 RFS filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833187&lt;br /&gt;
* 2016-08-08 2.8+dfsg-1 package published: https://mentors.debian.net/package/yuma123&lt;br /&gt;
* 2016-08-20 2.9-1 package approved and uploaded by reviewer https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1446847.html&lt;br /&gt;
* 2016-11-10 https://packages.debian.org/source/sid/yuma123 (after waiting in https://ftp-master.debian.org/new.html)&lt;br /&gt;
* 2016-11-28 Moved to testing https://lists.debian.org/debian-testing-changes/2016/11/msg00047.html&lt;br /&gt;
* 2017-10-01 RFS for 2.10-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877368&lt;br /&gt;
* 2018-08-21 RFS for 2.11-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906877&lt;br /&gt;
* 2018-09-15 package reviewed issues fixed and moved to https://ftp-master.debian.org/new.html&lt;br /&gt;
* 2021-08-19 RFS for 2.12-1 filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992470&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_110_Hackathon&amp;diff=405</id>
		<title>IETF 110 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_110_Hackathon&amp;diff=405"/>
		<updated>2021-08-19T23:16:28Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with &amp;quot;'''BMWG - YANG model and implementation of Network Interconnect Tester'''     * Champion(s)       * Vladimir Vassilev (vladimir at lightside-instruments.com)     * Project(s)...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''BMWG - YANG model and implementation of Network Interconnect Tester'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev (vladimir at lightside-instruments.com)&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Model and implementation of YANG/NETCONF managed RFC2544 capable Network Interconnect Tester&lt;br /&gt;
    * Specifications:&lt;br /&gt;
      * ​https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
    * Repositories&lt;br /&gt;
      * Scripting - [https://github.com/vlvassilev/litenc/tree/master/tntapi/example/ietf-network-interconnect-tester YANG/NETCONF benchmark orchestration code]&lt;br /&gt;
      * Software - [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-traffic-generator YANG/NETCONF device side code]&lt;br /&gt;
      * Firmware - [https://github.com/vlvassilev/network-interconnect-tester-cores/tree/master/lib/hw/lsi/cores/traffic_generator_gmii HDL]&lt;br /&gt;
      * Hardware - [https://github.com/vlvassilev/spark board design]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=404</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=404"/>
		<updated>2021-08-19T23:13:59Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* IETF Hackathons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Documentation==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Document name&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Installation Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Quickstart Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma User Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma netconfd Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangcli Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdiff Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdump Manual]]&lt;br /&gt;
|- &lt;br /&gt;
|[[Yuma Developer Manual]]&lt;br /&gt;
|}&lt;br /&gt;
==IETF Hackathons==&lt;br /&gt;
* [[IETF 111 Hackathon]]&lt;br /&gt;
* [[IETF 110 Hackathon]]&lt;br /&gt;
* [[IETF 109 Hackathon]]&lt;br /&gt;
* [[IETF 106 Hackathon]]&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;br /&gt;
&lt;br /&gt;
==Other events==&lt;br /&gt;
* [[ECOC 2018 - Demo session]]&lt;br /&gt;
* [[OMNeT++ Summit 2018 - Hackathon]]&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
* [[Debian packaging of yuma123]]&lt;br /&gt;
* [[Reporting issues and debugging]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_109_Hackathon&amp;diff=403</id>
		<title>IETF 109 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_109_Hackathon&amp;diff=403"/>
		<updated>2020-11-02T11:40:01Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with &amp;quot;==Plan== From https://trac.ietf.org/trac/ietf/meeting/wiki/109hackathon :   '''BMWG - YANG model and implementation of Network Interconnect Tester'''     * Champion(s)       *...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/109hackathon :&lt;br /&gt;
&lt;br /&gt;
 '''BMWG - YANG model and implementation of Network Interconnect Tester'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev (vladimir at lightside-instruments.com)&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Model and implementation of YANG/NETCONF managed RFC2544 capable Network Interconnect Tester&lt;br /&gt;
    * Specifications:&lt;br /&gt;
      * ​https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
    * Repositories&lt;br /&gt;
      * Software - [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-traffic-generator YANG/NETCONF specific code]&lt;br /&gt;
      * Firmware - [https://github.com/vlvassilev/network-interconnect-tester-cores/tree/master/lib/hw/lsi/cores/traffic_generator_gmii HDL]&lt;br /&gt;
      * Hardware - [https://github.com/vlvassilev/spark hardware design]&lt;br /&gt;
==Progress==&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=402</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=402"/>
		<updated>2020-11-02T11:38:11Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* IETF Hackathons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Documentation==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Document name&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Installation Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Quickstart Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma User Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma netconfd Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangcli Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdiff Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdump Manual]]&lt;br /&gt;
|- &lt;br /&gt;
|[[Yuma Developer Manual]]&lt;br /&gt;
|}&lt;br /&gt;
==IETF Hackathons==&lt;br /&gt;
* [[IETF 109 Hackathon]]&lt;br /&gt;
* [[IETF 106 Hackathon]]&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;br /&gt;
&lt;br /&gt;
==Other events==&lt;br /&gt;
* [[ECOC 2018 - Demo session]]&lt;br /&gt;
* [[OMNeT++ Summit 2018 - Hackathon]]&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
* [[Debian packaging of yuma123]]&lt;br /&gt;
* [[Reporting issues and debugging]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=401</id>
		<title>Yuma Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Installation_Guide&amp;diff=401"/>
		<updated>2019-12-03T02:56:48Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Supported Platforms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Installation Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YUMA Package Installation&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 – 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 – 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source Project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the Yuma User Manual for a complete introduction to Yuma.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma NETCONF client and server programs. It covers the installation of the Yuma packages.&lt;br /&gt;
&lt;br /&gt;
= Installation Requirements =&lt;br /&gt;
The following requirements must be met for Yuma to be installed.&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
There are no binary packages distributed at this time. Binaries can be compiled from source and installed using Autotools/Automake or built as Debian package from source using the Debian package management tools.&lt;br /&gt;
The build scripts are tested on the following platforms:&lt;br /&gt;
&lt;br /&gt;
* Debian &amp;quot;stable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== External Packages ==&lt;br /&gt;
The following programs and libraries need to be available for Yuma to work.&lt;br /&gt;
&lt;br /&gt;
=== libxml2 ===&lt;br /&gt;
The '''libxml2''' package is needed by the yuma package for some of the XML parsing functions. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libxml2-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libssh2 ===&lt;br /&gt;
The '''libssh2''' package is needed by the yuma package for the '''yangcli''' program to connect to NETCONF servers using the SSH protocol. This package is called '''libssh2-1''' on Ubuntu platforms. This package is '''not''' installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libssh2-1-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== ncurses ===&lt;br /&gt;
The '''ncurses''' library is needed by the yuma package for some terminal support. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
It is called '''libncurses5''' on Ubuntu systems. &lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libncurses5-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== zlib ===&lt;br /&gt;
The '''zlib''' library is needed by the yuma package for some compression support, used by other libraries that yuma imports. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libz-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
=== libreadline ===&lt;br /&gt;
The '''libreadline''' library is needed by the yuma package for command line handling. This package is installed by the default Linux installation process.&lt;br /&gt;
&lt;br /&gt;
To build yuma sources, also install the developer version of this package. It is called '''libreadline-dev '''on Debian systems.&lt;br /&gt;
&lt;br /&gt;
= Getting the source =&lt;br /&gt;
 ~&amp;gt; git clone git://git.code.sf.net/p/yuma123/git yuma123&lt;br /&gt;
 ~&amp;gt; cd yuma123&lt;br /&gt;
&lt;br /&gt;
= Building and Installation =&lt;br /&gt;
You can either use the Debian/Ubuntu package management tools or directly the Autotools build scripts if the platform you have is not Debian based or you need more flexibility.&lt;br /&gt;
== Alternative 1:  Debian/Ubuntu *.deb package build and installation steps ==&lt;br /&gt;
Check if you have any unmet dependencies:&lt;br /&gt;
 yuma123&amp;gt; dpkg-checkbuilddeps&lt;br /&gt;
 dpkg-checkbuilddeps: Unmet build dependencies: libssh2-1-dev libxml2-dev &lt;br /&gt;
Install the missing packages:&lt;br /&gt;
 yuma123&amp;gt; sudo apt-get install libssh2-1-dev libxml2-dev&lt;br /&gt;
Build the *.deb:&lt;br /&gt;
 yuma123&amp;gt; dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
The generated *.deb package e.g. ../yuma123_2.5-1_i386.deb can be installed:&lt;br /&gt;
 yuma123&amp;gt; sudo dpkg -i ../yuma123_2.5-1_i386.deb&lt;br /&gt;
&lt;br /&gt;
== Alternative 2: Autotools build and installation steps==&lt;br /&gt;
Assuming you have no unresolved dependencies:&lt;br /&gt;
 yuma123&amp;gt; autoreconf -i -f&lt;br /&gt;
 yuma123&amp;gt; ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr&lt;br /&gt;
 yuma123&amp;gt; make&lt;br /&gt;
 yuma123&amp;gt; sudo make install&lt;br /&gt;
&lt;br /&gt;
= Installed Files =&lt;br /&gt;
* '''/usr/bin''' directory contains the following programs:&lt;br /&gt;
**yangcli&lt;br /&gt;
**yangrpc-example&lt;br /&gt;
* '''/usr/sbin''' directory contains the following server programs:&lt;br /&gt;
** netconfd&lt;br /&gt;
** netconf-subsystem&lt;br /&gt;
* '''/usr/lib '''directory contains the following files:&lt;br /&gt;
** libyumancx.so&lt;br /&gt;
** libyumaagt.so&lt;br /&gt;
** libyumamgr.so&lt;br /&gt;
** libyangrpc.so&lt;br /&gt;
* '''/usr/lib/yuma''' directory contains the following file:&lt;br /&gt;
** libhelloworld.so&lt;br /&gt;
** libtoaster.so&lt;br /&gt;
* '''/usr/share/yuma/modules''' directory contains all the YANG modules:&lt;br /&gt;
**yang/&lt;br /&gt;
**ietf/&lt;br /&gt;
**netconfcentral/&lt;br /&gt;
**ietf-draft/&lt;br /&gt;
**helloworld.yang&lt;br /&gt;
* '''/usr/share/doc/yuma123''' directory (*.deb only) containing the following files:&lt;br /&gt;
** copyright&lt;br /&gt;
** changelog.Debian.gz&lt;br /&gt;
* '''/usr/include/yuma '''directory contains H files needed to compile SIL code so it can be loaded into the server at runtime:&lt;br /&gt;
** ncx/*.h&lt;br /&gt;
** agt/*.h&lt;br /&gt;
** platform/*.h&lt;br /&gt;
** yangrpc/*.h&lt;br /&gt;
&lt;br /&gt;
= Next Steps =&lt;br /&gt;
== More Documentation ==&lt;br /&gt;
&lt;br /&gt;
[[Yuma Quickstart Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
Each program also has extensive help information available with the''' --help''' CLI parameter. For example:&lt;br /&gt;
&lt;br /&gt;
* '''yangcli --help'''&lt;br /&gt;
* '''netconfd --help'''&lt;br /&gt;
&lt;br /&gt;
== Running the Yuma Programs ==&lt;br /&gt;
=== yangcli  ===&lt;br /&gt;
If you are just using the Yuma client applications, then there is no further mandatory setup required.&lt;br /&gt;
&lt;br /&gt;
* If a work directory is used, then the '''$YUMA_HOME '''environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* If Yuma is installed in a location other than the default location described above, then the '''$YUMA_INSTALL''' environment variable needs to be defined. Refer to the user manual for details.&lt;br /&gt;
* The following binary applications are available:&lt;br /&gt;
** '''/usr/bin/yangcli''': NETCONF-over-SSH client application&lt;br /&gt;
&lt;br /&gt;
=== netconfd and netconf-subsystem ===&lt;br /&gt;
The Yuma server does not automatically start running when installed. This will be supported in a future release.&lt;br /&gt;
&lt;br /&gt;
The following steps must be taken to start the '''netconfd''' server:&lt;br /&gt;
&lt;br /&gt;
* You must modify the '''/etc/ssh/sshd_config''' file, and add the 'netconf' subsystem, as described in the user manual.If the yuma package was installed in a non-default location, then the path to the netconf-subsystem will be different than the example below. The following commands must be present:&lt;br /&gt;
     &lt;br /&gt;
     '''Port 22'''&lt;br /&gt;
     '''Port 830'''&lt;br /&gt;
     '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
* Start the '''netconfd''' server, as described in the [[Yuma User Manual]] or the  [[Yuma Quickstart Guide]]. This can be in the foreground or the background. If it is in the background, then the ''''--log'''' CLI parameter should be provided, as shown below:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; /'''usr/sbin/netconfd --log=$HOME/mylog &amp;amp;'''&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Restart the SSH server. This is a platform-specific task. Refer to the '''sshd''' manual page for your system for more details. This step may need to be run as root or with the 'sudo' program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debian/Ubuntu:&lt;br /&gt;
     &lt;br /&gt;
     mydir&amp;gt; sudo  /etc/init.d/ssh restart   &lt;br /&gt;
&lt;br /&gt;
Fedora 12 version:&lt;br /&gt;
 &lt;br /&gt;
     mydir&amp;gt; sudo /etc/rc.d/init.d/sshd restart&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=400</id>
		<title>IETF 106 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=400"/>
		<updated>2019-11-27T13:33:23Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/106hackathon :&lt;br /&gt;
&lt;br /&gt;
 '''BMWG - Implement RFC2544 for NETCONF/YANG managed tester and DUT'''&lt;br /&gt;
   * Champion(s)&lt;br /&gt;
     * Vladimir Vassilev &amp;lt;vladimir at lightside-instruments.com&amp;gt;&lt;br /&gt;
   * Drafts&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
   * Project(s)&lt;br /&gt;
     * Standalone command line application written in Python connecting directly to the DUT and the tester over NETCONF executing the RFC2544 test and reporting the results.&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
* Code - https://github.com/vlvassilev/litenc/blob/master/tntapi/example/ietf-network-interconnect-tester/test-rfc2544-throughput.py&lt;br /&gt;
* Presentation [https://github.com/IETF-Hackathon/ietf106-project-presentations/raw/master/ietf106-hackathon-yang-netconf-managed-network-interconnect-tester.pdf slides PDF] [https://www.youtube.com/watch?v=WsG6xwqxWvA&amp;amp;t=6110 video]&lt;br /&gt;
* Presentation at BMWG session [https://datatracker.ietf.org/meeting/106/materials/slides-106-bmwg-a-yang-data-model-for-network-interconnect-tester-management-01.pdf slides PDF] [https://www.youtube.com/watch?v=OENxLsVa81M&amp;amp;t=4440 video]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=399</id>
		<title>IETF 106 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=399"/>
		<updated>2019-11-27T13:32:30Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/106hackathon :&lt;br /&gt;
&lt;br /&gt;
 '''BMWG - Implement RFC2544 for NETCONF/YANG managed tester and DUT'''&lt;br /&gt;
   * Champion(s)&lt;br /&gt;
     * Vladimir Vassilev &amp;lt;vladimir at lightside-instruments.com&amp;gt;&lt;br /&gt;
   * Drafts&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
   * Project(s)&lt;br /&gt;
     * Standalone command line application written in Python connecting directly to the DUT and the tester over NETCONF executing the RFC2544 test and reporting the results.&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
&lt;br /&gt;
* Presentation [https://github.com/IETF-Hackathon/ietf106-project-presentations/raw/master/ietf106-hackathon-yang-netconf-managed-network-interconnect-tester.pdf slides PDF] [https://www.youtube.com/watch?v=WsG6xwqxWvA&amp;amp;t=6110 video]&lt;br /&gt;
* Presentation at BMWG session [https://datatracker.ietf.org/meeting/106/materials/slides-106-bmwg-a-yang-data-model-for-network-interconnect-tester-management-01.pdf slides PDF] [https://www.youtube.com/watch?v=OENxLsVa81M&amp;amp;t=4440 video]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=398</id>
		<title>IETF 106 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=398"/>
		<updated>2019-10-25T00:32:01Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/106hackathon :&lt;br /&gt;
&lt;br /&gt;
 '''BMWG - Implement RFC2544 for NETCONF/YANG managed tester and DUT'''&lt;br /&gt;
   * Champion(s)&lt;br /&gt;
     * Vladimir Vassilev &amp;lt;vladimir at lightside-instruments.com&amp;gt;&lt;br /&gt;
   * Drafts&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
   * Project(s)&lt;br /&gt;
     * Standalone command line application written in Python connecting directly to the DUT and the tester over NETCONF executing the RFC2544 test and reporting the results.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=397</id>
		<title>IETF 106 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=397"/>
		<updated>2019-10-25T00:31:33Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/106hackathon :&lt;br /&gt;
'''BMWG - Implement RFC2544 for NETCONF/YANG managed tester and DUT'''&lt;br /&gt;
   * Champion(s)&lt;br /&gt;
     * Vladimir Vassilev &amp;lt;vladimir at lightside-instruments.com&amp;gt;&lt;br /&gt;
   * Drafts&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
   * Project(s)&lt;br /&gt;
     * Standalone command line application written in Python connecting directly to the DUT and the tester over NETCONF executing the RFC2544 test and reporting the results.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=396</id>
		<title>IETF 106 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_106_Hackathon&amp;diff=396"/>
		<updated>2019-10-24T23:31:40Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with &amp;quot;==Plan== From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :  '''Implementation of RFC2544 for NETCONF/YANG managed Network Interconnect Tester and DUT'''     * C...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :&lt;br /&gt;
 '''Implementation of RFC2544 for NETCONF/YANG managed Network Interconnect Tester and DUT'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev &amp;lt;vladimir at lightside-instruments.com&amp;gt;&lt;br /&gt;
    * Drafts&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge-01 A YANG Data Model for Network Bridge Management]&lt;br /&gt;
      * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester-02 A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
    * Expected result&lt;br /&gt;
      * Command line application written in Python connecting directly to the DUT and the tester over NETCONF and conducting the RFC2544 testing producing report.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=395</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=395"/>
		<updated>2019-10-24T23:14:06Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* IETF Hackathons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Documentation==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Document name&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Installation Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Quickstart Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma User Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma netconfd Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangcli Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdiff Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdump Manual]]&lt;br /&gt;
|- &lt;br /&gt;
|[[Yuma Developer Manual]]&lt;br /&gt;
|}&lt;br /&gt;
==IETF Hackathons==&lt;br /&gt;
* [[IETF 106 Hackathon]]&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;br /&gt;
&lt;br /&gt;
==Other events==&lt;br /&gt;
* [[ECOC 2018 - Demo session]]&lt;br /&gt;
* [[OMNeT++ Summit 2018 - Hackathon]]&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
* [[Debian packaging of yuma123]]&lt;br /&gt;
* [[Reporting issues and debugging]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=392</id>
		<title>IETF 105 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=392"/>
		<updated>2019-07-21T20:03:45Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :&lt;br /&gt;
 '''Transactional network test framework for flow capable bridge nodes ( OpenFlow, NETCONF )'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev &amp;lt;vladimir at transpacket.com&amp;gt;&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Drafts&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester-00 A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
      * Node side (netconfd)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-traffic-generator traffic-generator and traffic-analyzer modules for Linux]&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-network-bridge flow capable network bridge module OpenFlow-&amp;gt;NETCONF convertor]&lt;br /&gt;
      * Controller side (OpenDaylight)&lt;br /&gt;
        * [https://lists.opendaylight.org/pipermail/opendaylight-users/2018-June/000845.html Plugin for flow capable nodes with YANG/NETCONF interface]&lt;br /&gt;
      * Application side ([https://github.com/vlvassilev/litenc/tree/master/tntapi/example/ietf-network-interconnect-tester python-tntapi], [https://github.com/vlvassilev/litenc python-litenc], yangcli)&lt;br /&gt;
        * RFC2544 implementation&lt;br /&gt;
      * Environment (mininet)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/blob/master/netconf/test/netconfd/mininet Topology instantiation script]&lt;br /&gt;
    * References&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
       * https://github.com/vlvassilev/yuma123/example-modules&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
* SIL module implementing ietf-traffic-generator.yang for netconfd - https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-traffic-generator&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=391</id>
		<title>IETF 105 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=391"/>
		<updated>2019-07-21T18:37:22Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :&lt;br /&gt;
 '''Transactional network test framework for flow capable bridge nodes ( OpenFlow, NETCONF )'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev &amp;lt;vladimir at transpacket.com&amp;gt;&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Drafts&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester-00 A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
      * Node side (netconfd)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-traffic-generator traffic-generator and traffic-analyzer modules for Linux]&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-network-bridge flow capable network bridge module OpenFlow-&amp;gt;NETCONF convertor]&lt;br /&gt;
      * Controller side (OpenDaylight)&lt;br /&gt;
        * [https://lists.opendaylight.org/pipermail/opendaylight-users/2018-June/000845.html Plugin for flow capable nodes with YANG/NETCONF interface]&lt;br /&gt;
      * Application side ([https://github.com/vlvassilev/litenc/tree/master/tntapi/example/ietf-network-interconnect-tester python-tntapi], [https://github.com/vlvassilev/litenc python-litenc], yangcli)&lt;br /&gt;
        * RFC2544 implementation&lt;br /&gt;
      * Environment (mininet)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/blob/master/netconf/test/netconfd/mininet Topology instantiation script]&lt;br /&gt;
    * References&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
       * https://github.com/vlvassilev/yuma123/example-modules&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
* SIL module implementing ietf-traffic-generator.yang for netconfd&lt;br /&gt;
&lt;br /&gt;
YANG tree:&lt;br /&gt;
    |  |  +--:(multi-stream)&lt;br /&gt;
    |  |     +--rw streams&lt;br /&gt;
    |  |        +--rw stream* [id]&lt;br /&gt;
    |  |           +--rw id                   uint32&lt;br /&gt;
    |  |           +--rw frame-size           uint32&lt;br /&gt;
    |  |           +--rw (frame-data-type)?&lt;br /&gt;
    |  |           |  +--:(raw-frame-data)&lt;br /&gt;
    |  |           |     +--rw frame-data?    string&lt;br /&gt;
    |  |           +--rw interframe-gap       uint32&lt;br /&gt;
    |  |           +--rw interburst-gap?      uint32&lt;br /&gt;
    |  |           +--rw frames-per-burst?    uint32&lt;br /&gt;
    |  |           +--rw frames-per-stream    uint32&lt;br /&gt;
    |  |           +--rw interstream-gap      uint32&lt;br /&gt;
    |  |           +--rw src-mac-address?     yang:mac-address {ethernet}?&lt;br /&gt;
    |  |           +--rw dst-mac-address?     yang:mac-address {ethernet}?&lt;br /&gt;
    |  |           +--rw ether-type?          uint16 {ethernet}?&lt;br /&gt;
    |  |           +--rw (encapsulation)? {ethernet}?&lt;br /&gt;
    |  |              +--:(vlan)&lt;br /&gt;
    |  |                 +--rw vlan {ethernet-vlan}?&lt;br /&gt;
    |  |                    +--rw id      uint16&lt;br /&gt;
    |  |                    +--rw tpid?   uint16&lt;br /&gt;
    |  |                    +--rw pcp?    uint8&lt;br /&gt;
    |  |                    +--rw cfi?    uint8&lt;br /&gt;
    |  +--rw total-frames?             uint64&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C implementation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static void traffic_generator_delete(val_value_t* traffic_generator_val)&lt;br /&gt;
{&lt;br /&gt;
    char cmd_buf[512];&lt;br /&gt;
    val_value_t* name_val;&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;traffic_generator_delete:\n&amp;quot;);&lt;br /&gt;
    val_dump_value(traffic_generator_val,NCX_DEF_INDENT);&lt;br /&gt;
    name_val = val_find_child(traffic_generator_val-&amp;gt;parent,&amp;quot;ietf-interfaces&amp;quot;,&amp;quot;name&amp;quot;);&lt;br /&gt;
    assert(name_val);&lt;br /&gt;
&lt;br /&gt;
    sprintf(cmd_buf, &amp;quot;pkill -f 'traffic-generator %s blah'&amp;quot;, VAL_STRING(name_val));&lt;br /&gt;
    system(cmd_buf);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static void traffic_generator_create(val_value_t* traffic_generator_val)&lt;br /&gt;
{&lt;br /&gt;
    char cmd_buf[512];&lt;br /&gt;
    val_value_t* name_val;&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;traffic_generator_create:\n&amp;quot;);&lt;br /&gt;
    val_dump_value(traffic_generator_val,NCX_DEF_INDENT);&lt;br /&gt;
    name_val = val_find_child(traffic_generator_val-&amp;gt;parent,&amp;quot;ietf-interfaces&amp;quot;,&amp;quot;name&amp;quot;);&lt;br /&gt;
    assert(name_val);&lt;br /&gt;
&lt;br /&gt;
    sprintf(cmd_buf, &amp;quot;traffic-generator %s blah &amp;amp;&amp;quot;, VAL_STRING(name_val));&lt;br /&gt;
    system(cmd_buf);&lt;br /&gt;
}&lt;br /&gt;
    /* 2 step (delete/add) interface configuration */&lt;br /&gt;
&lt;br /&gt;
    /* 1. deactivation loop - deletes all deleted or modified interface/traffic-generator -s */&lt;br /&gt;
    if(interfaces_cur_val!=NULL) {&lt;br /&gt;
        for (interface_cur_val = val_get_first_child(interfaces_cur_val);&lt;br /&gt;
             interface_cur_val != NULL;&lt;br /&gt;
             interface_cur_val = val_get_next_child(interface_cur_val)) {&lt;br /&gt;
            traffic_generator_cur_val = val_find_child(interface_cur_val, TG_MOD, &amp;quot;traffic-generator&amp;quot;);&lt;br /&gt;
            if(traffic_generator_cur_val==NULL) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            traffic_generator_new_val = val123_find_match(config_new_val, traffic_generator_cur_val);&lt;br /&gt;
            if(traffic_generator_new_val==NULL || 0!=val_compare_ex(traffic_generator_cur_val,traffic_generator_new_val,TRUE)) {&lt;br /&gt;
                traffic_generator_delete(traffic_generator_cur_val);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* 2. activation loop - adds all new or modified interface/traffic-generator -s */&lt;br /&gt;
    if(interfaces_new_val!=NULL) {&lt;br /&gt;
        for (interface_new_val = val_get_first_child(interfaces_new_val);&lt;br /&gt;
             interface_new_val != NULL;&lt;br /&gt;
             interface_new_val = val_get_next_child(interface_new_val)) {&lt;br /&gt;
            traffic_generator_new_val = val_find_child(interface_new_val, TG_MOD, &amp;quot;traffic-generator&amp;quot;);&lt;br /&gt;
            if(traffic_generator_new_val==NULL) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            traffic_generator_cur_val = val123_find_match(config_cur_val, traffic_generator_new_val);&lt;br /&gt;
            if(traffic_generator_cur_val==NULL || 0!=val_compare_ex(traffic_generator_new_val,traffic_generator_cur_val,TRUE)) {&lt;br /&gt;
                traffic_generator_create(traffic_generator_new_val);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
typedef struct burst_t_ {&lt;br /&gt;
    uint32_t frame_length;&lt;br /&gt;
    uint8_t* raw_frame_data;&lt;br /&gt;
    uint32_t interframe_gap;&lt;br /&gt;
    uint32_t frames_per_burst;&lt;br /&gt;
    uint32_t interburst_gap;&lt;br /&gt;
} burst_t;&lt;br /&gt;
&lt;br /&gt;
typedef struct stream_t_ {&lt;br /&gt;
    unsigned int bursts_per_stream;&lt;br /&gt;
    unsigned int burst_index;&lt;br /&gt;
    uint32_t interstream_gap;&lt;br /&gt;
    burst_t* bursts;&lt;br /&gt;
} stream_t;&lt;br /&gt;
&lt;br /&gt;
typedef struct traffic_generator_t_ {&lt;br /&gt;
    uint64_t total_frames;&lt;br /&gt;
    uint64_t total_frame_index;&lt;br /&gt;
    uint64_t sec;&lt;br /&gt;
    uint32_t nsec;&lt;br /&gt;
    float ns_per_octet;&lt;br /&gt;
    stream_t* streams;&lt;br /&gt;
    unsigned int streams_num;&lt;br /&gt;
    unsigned int stream_index;&lt;br /&gt;
    unsigned int burst_index;&lt;br /&gt;
    unsigned int frame_index;&lt;br /&gt;
} traffic_generator_t;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
traffic_generator_t* traffic_generator_init(const char* config_str);&lt;br /&gt;
int traffic_generator_get_frame(traffic_generator_t* tg, uint32_t* frame_length, uint8_t** frame, uint64_t* tx_time_sec, uint32_t* tx_time_nsec);&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
    while(1) {&lt;br /&gt;
        ret = traffic_generator_get_frame(tg, &amp;amp;frame_len, &amp;amp;frame_buf, &amp;amp;tx_time_sec, &amp;amp;tx_time_nsec);&lt;br /&gt;
        if(ret!=0) {&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        clock_gettime( CLOCK_MONOTONIC, &amp;amp;now);&lt;br /&gt;
        rel.tv_sec = tx_time_sec;        /* seconds */&lt;br /&gt;
        rel.tv_nsec = tx_time_nsec;      /* nanoseconds */&lt;br /&gt;
        timespec_add(&amp;amp;rel, &amp;amp;epoch, &amp;amp;abs);&lt;br /&gt;
        timespec_sub(&amp;amp;now, &amp;amp;abs, &amp;amp;req);&lt;br /&gt;
        ret=nanosleep(&amp;amp;req,&amp;amp;rem);&lt;br /&gt;
        //assert(ret==0);&lt;br /&gt;
        ret = raw_socket_send(&amp;amp;raw_socket, frame_buf, frame_len);&lt;br /&gt;
        assert(ret==0);&lt;br /&gt;
&lt;br /&gt;
        if(now.tv_sec&amp;gt;print_sec) {&lt;br /&gt;
            print_sec=now.tv_sec;&lt;br /&gt;
            printf(&amp;quot;%llu\n&amp;quot;,frm);&lt;br /&gt;
        }&lt;br /&gt;
        frm++;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=390</id>
		<title>IETF 105 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=390"/>
		<updated>2019-07-21T18:34:12Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :&lt;br /&gt;
 '''Transactional network test framework for flow capable bridge nodes ( OpenFlow, NETCONF )'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev &amp;lt;vladimir at transpacket.com&amp;gt;&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Drafts&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester-00 A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
      * Node side (netconfd)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-traffic-generator traffic-generator and traffic-analyzer modules for Linux]&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-network-bridge flow capable network bridge module OpenFlow-&amp;gt;NETCONF convertor]&lt;br /&gt;
      * Controller side (OpenDaylight)&lt;br /&gt;
        * [https://lists.opendaylight.org/pipermail/opendaylight-users/2018-June/000845.html Plugin for flow capable nodes with YANG/NETCONF interface]&lt;br /&gt;
      * Application side ([https://github.com/vlvassilev/litenc/tree/master/tntapi/example/ietf-network-interconnect-tester python-tntapi], [https://github.com/vlvassilev/litenc python-litenc], yangcli)&lt;br /&gt;
        * RFC2544 implementation&lt;br /&gt;
      * Environment (mininet)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/blob/master/netconf/test/netconfd/mininet Topology instantiation script]&lt;br /&gt;
    * References&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
       * https://github.com/vlvassilev/yuma123/example-modules&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
* SIL module implementing ietf-traffic-generator.yang for netconfd&lt;br /&gt;
&lt;br /&gt;
YANG tree:&lt;br /&gt;
    |  |  +--:(multi-stream)&lt;br /&gt;
    |  |     +--rw streams&lt;br /&gt;
    |  |        +--rw stream* [id]&lt;br /&gt;
    |  |           +--rw id                   uint32&lt;br /&gt;
    |  |           +--rw frame-size           uint32&lt;br /&gt;
    |  |           +--rw (frame-data-type)?&lt;br /&gt;
    |  |           |  +--:(raw-frame-data)&lt;br /&gt;
    |  |           |     +--rw frame-data?    string&lt;br /&gt;
    |  |           +--rw interframe-gap       uint32&lt;br /&gt;
    |  |           +--rw interburst-gap?      uint32&lt;br /&gt;
    |  |           +--rw frames-per-burst?    uint32&lt;br /&gt;
    |  |           +--rw frames-per-stream    uint32&lt;br /&gt;
    |  |           +--rw interstream-gap      uint32&lt;br /&gt;
    |  |           +--rw src-mac-address?     yang:mac-address {ethernet}?&lt;br /&gt;
    |  |           +--rw dst-mac-address?     yang:mac-address {ethernet}?&lt;br /&gt;
    |  |           +--rw ether-type?          uint16 {ethernet}?&lt;br /&gt;
    |  |           +--rw (encapsulation)? {ethernet}?&lt;br /&gt;
    |  |              +--:(vlan)&lt;br /&gt;
    |  |                 +--rw vlan {ethernet-vlan}?&lt;br /&gt;
    |  |                    +--rw id      uint16&lt;br /&gt;
    |  |                    +--rw tpid?   uint16&lt;br /&gt;
    |  |                    +--rw pcp?    uint8&lt;br /&gt;
    |  |                    +--rw cfi?    uint8&lt;br /&gt;
    |  +--rw total-frames?             uint64&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C implementation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    /* 2 step (delete/add) interface configuration */&lt;br /&gt;
&lt;br /&gt;
    /* 1. deactivation loop - deletes all deleted or modified interface/traffic-generator -s */&lt;br /&gt;
    if(interfaces_cur_val!=NULL) {&lt;br /&gt;
        for (interface_cur_val = val_get_first_child(interfaces_cur_val);&lt;br /&gt;
             interface_cur_val != NULL;&lt;br /&gt;
             interface_cur_val = val_get_next_child(interface_cur_val)) {&lt;br /&gt;
            traffic_generator_cur_val = val_find_child(interface_cur_val, TG_MOD, &amp;quot;traffic-generator&amp;quot;);&lt;br /&gt;
            if(traffic_generator_cur_val==NULL) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            traffic_generator_new_val = val123_find_match(config_new_val, traffic_generator_cur_val);&lt;br /&gt;
            if(traffic_generator_new_val==NULL || 0!=val_compare_ex(traffic_generator_cur_val,traffic_generator_new_val,TRUE)) {&lt;br /&gt;
                traffic_generator_delete(traffic_generator_cur_val);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* 2. activation loop - adds all new or modified interface/traffic-generator -s */&lt;br /&gt;
    if(interfaces_new_val!=NULL) {&lt;br /&gt;
        for (interface_new_val = val_get_first_child(interfaces_new_val);&lt;br /&gt;
             interface_new_val != NULL;&lt;br /&gt;
             interface_new_val = val_get_next_child(interface_new_val)) {&lt;br /&gt;
            traffic_generator_new_val = val_find_child(interface_new_val, TG_MOD, &amp;quot;traffic-generator&amp;quot;);&lt;br /&gt;
            if(traffic_generator_new_val==NULL) {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
            traffic_generator_cur_val = val123_find_match(config_cur_val, traffic_generator_new_val);&lt;br /&gt;
            if(traffic_generator_cur_val==NULL || 0!=val_compare_ex(traffic_generator_new_val,traffic_generator_cur_val,TRUE)) {&lt;br /&gt;
                traffic_generator_create(traffic_generator_new_val);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
typedef struct burst_t_ {&lt;br /&gt;
    uint32_t frame_length;&lt;br /&gt;
    uint8_t* raw_frame_data;&lt;br /&gt;
    uint32_t interframe_gap;&lt;br /&gt;
    uint32_t frames_per_burst;&lt;br /&gt;
    uint32_t interburst_gap;&lt;br /&gt;
} burst_t;&lt;br /&gt;
&lt;br /&gt;
typedef struct stream_t_ {&lt;br /&gt;
    unsigned int bursts_per_stream;&lt;br /&gt;
    unsigned int burst_index;&lt;br /&gt;
    uint32_t interstream_gap;&lt;br /&gt;
    burst_t* bursts;&lt;br /&gt;
} stream_t;&lt;br /&gt;
&lt;br /&gt;
typedef struct traffic_generator_t_ {&lt;br /&gt;
    uint64_t total_frames;&lt;br /&gt;
    uint64_t total_frame_index;&lt;br /&gt;
    uint64_t sec;&lt;br /&gt;
    uint32_t nsec;&lt;br /&gt;
    float ns_per_octet;&lt;br /&gt;
    stream_t* streams;&lt;br /&gt;
    unsigned int streams_num;&lt;br /&gt;
    unsigned int stream_index;&lt;br /&gt;
    unsigned int burst_index;&lt;br /&gt;
    unsigned int frame_index;&lt;br /&gt;
} traffic_generator_t;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
traffic_generator_t* traffic_generator_init(const char* config_str);&lt;br /&gt;
int traffic_generator_get_frame(traffic_generator_t* tg, uint32_t* frame_length, uint8_t** frame, uint64_t* tx_time_sec, uint32_t* tx_time_nsec);&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
    while(1) {&lt;br /&gt;
        ret = traffic_generator_get_frame(tg, &amp;amp;frame_len, &amp;amp;frame_buf, &amp;amp;tx_time_sec, &amp;amp;tx_time_nsec);&lt;br /&gt;
        if(ret!=0) {&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        clock_gettime( CLOCK_MONOTONIC, &amp;amp;now);&lt;br /&gt;
        rel.tv_sec = tx_time_sec;        /* seconds */&lt;br /&gt;
        rel.tv_nsec = tx_time_nsec;      /* nanoseconds */&lt;br /&gt;
        timespec_add(&amp;amp;rel, &amp;amp;epoch, &amp;amp;abs);&lt;br /&gt;
        timespec_sub(&amp;amp;now, &amp;amp;abs, &amp;amp;req);&lt;br /&gt;
        ret=nanosleep(&amp;amp;req,&amp;amp;rem);&lt;br /&gt;
        //assert(ret==0);&lt;br /&gt;
        ret = raw_socket_send(&amp;amp;raw_socket, frame_buf, frame_len);&lt;br /&gt;
        assert(ret==0);&lt;br /&gt;
&lt;br /&gt;
        if(now.tv_sec&amp;gt;print_sec) {&lt;br /&gt;
            print_sec=now.tv_sec;&lt;br /&gt;
            printf(&amp;quot;%llu\n&amp;quot;,frm);&lt;br /&gt;
        }&lt;br /&gt;
        frm++;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=389</id>
		<title>IETF 105 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=389"/>
		<updated>2019-07-21T18:24:33Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :&lt;br /&gt;
 '''Transactional network test framework for flow capable bridge nodes ( OpenFlow, NETCONF )'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev &amp;lt;vladimir at transpacket.com&amp;gt;&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Drafts&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge A YANG Data Model for Network Bridge Management]&lt;br /&gt;
        * [https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester-00 A YANG Data Model for Network Interconnect Tester Management]&lt;br /&gt;
      * Node side (netconfd)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-traffic-generator traffic-generator and traffic-analyzer modules for Linux]&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-network-bridge flow capable network bridge module OpenFlow-&amp;gt;NETCONF convertor]&lt;br /&gt;
      * Controller side (OpenDaylight)&lt;br /&gt;
        * [https://lists.opendaylight.org/pipermail/opendaylight-users/2018-June/000845.html Plugin for flow capable nodes with YANG/NETCONF interface]&lt;br /&gt;
      * Application side ([https://github.com/vlvassilev/litenc/tree/master/tntapi/example/ietf-network-interconnect-tester python-tntapi], [https://github.com/vlvassilev/litenc python-litenc], yangcli)&lt;br /&gt;
        * RFC2544 implementation&lt;br /&gt;
      * Environment (mininet)&lt;br /&gt;
        * [https://github.com/vlvassilev/yuma123/blob/master/netconf/test/netconfd/mininet Topology instantiation script]&lt;br /&gt;
    * References&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
       * https://github.com/vlvassilev/yuma123/example-modules&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=388</id>
		<title>IETF 105 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_105_Hackathon&amp;diff=388"/>
		<updated>2019-07-18T20:34:13Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: Created page with '==Plan== From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :  '''Transactional network test framework for flow capable bridge nodes ( OpenFlow, NETCONF )'''     * Ch…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/105hackathon :&lt;br /&gt;
 '''Transactional network test framework for flow capable bridge nodes ( OpenFlow, NETCONF )'''&lt;br /&gt;
    * Champion(s)&lt;br /&gt;
      * Vladimir Vassilev &amp;lt;vladimir at transpacket.com&amp;gt;&lt;br /&gt;
    * Project(s)&lt;br /&gt;
      * Node side (netconfd)&lt;br /&gt;
        * traffic-generator and traffic-analyzer modules for Linux&lt;br /&gt;
        * flow capable network bridge module Linux&lt;br /&gt;
      * Controller side (OpenDaylight)&lt;br /&gt;
        * Plugin for flow capable nodes with YANG/NETCONF interface&lt;br /&gt;
      * Application side (python-tntapi, python-litenc, yangcli)&lt;br /&gt;
        * RFC2544 implementation&lt;br /&gt;
      * Environment (mininet)&lt;br /&gt;
        * Topology instantiation script&lt;br /&gt;
    * References&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-netmod-network-bridge&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=387</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Main_Page&amp;diff=387"/>
		<updated>2019-07-02T07:18:01Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* IETF Hackathons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Documentation==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Document name&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Installation Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma Quickstart Guide]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma User Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma netconfd Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangcli Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdiff Manual]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Yuma yangdump Manual]]&lt;br /&gt;
|- &lt;br /&gt;
|[[Yuma Developer Manual]]&lt;br /&gt;
|}&lt;br /&gt;
==IETF Hackathons==&lt;br /&gt;
* [[IETF 105 Hackathon]]&lt;br /&gt;
* [[IETF 104 Hackathon]]&lt;br /&gt;
* [[IETF 102 Hackathon]]&lt;br /&gt;
* [[IETF 101 Hackathon]]&lt;br /&gt;
* [[IETF 100 Hackathon]]&lt;br /&gt;
* [[IETF 99 Hackathon]]&lt;br /&gt;
* [[IETF 98 Hackathon - implement YANG 1.1, ietf-yang-library.yang, ietf-netconf-notifications.yang, stability and interoperability, release 2.10]]&lt;br /&gt;
* [[IETF 97 Hackathon ietf-alarms model implementation for yuma123 report]]&lt;br /&gt;
* [[IETF 96 Hackcathon yuma123 project report]]&lt;br /&gt;
&lt;br /&gt;
==Other events==&lt;br /&gt;
* [[ECOC 2018 - Demo session]]&lt;br /&gt;
* [[OMNeT++ Summit 2018 - Hackathon]]&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
* [[Debian packaging of yuma123]]&lt;br /&gt;
* [[Reporting issues and debugging]]&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=386</id>
		<title>Yuma Quickstart Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=386"/>
		<updated>2019-05-02T11:44:08Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* NETCONF Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Quickstart Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Client/Server Quickstart Guide&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 - 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 - 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
This document assumes you have successfully set up the software as described in the printed document:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the [[Yuma User Manual]] for a complete introduction to Yuma Tools.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma Tools programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma Tools NETCONF client and server programs. It covers the basic usage of the '''yangcli''' client application and the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
== What is NETCONF and YANG? ==&lt;br /&gt;
The Yuma Tools suite provides automated support for development and usage of network management information. Information is exchanged in XML encoding within a session between a client and a server.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;Network Configuration Protocol&amp;quot; (NETCONF) is used to provide the management sessions, operations, and database framework available on the server. The operations, notifications, and the database contents supported by a particular NETCONF server are extensible, and defined with a modular and easy-to-learn language called YANG. The database is used to contain YANG data structures which represent the configuration of the device containing the NETCONF server. This configuration can be saved in non-volatile storage so the configuration can be restored upon reboot.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;YANG Data Modeling Language&amp;quot; is used to define the syntax and semantics of the NETCONF operations, notification events, and database content. Machine and human readable semantics and constraints are used by YANG tools (including Yuma Tools) to automate behavior within the NETCONF protocol for clients and servers.&lt;br /&gt;
&lt;br /&gt;
For people familiar with SNMP and SMIv2, NETCONF is like an XML-based, high-level version of SNMP, and a YANG module is like a MIB module, except MIB tables can be nested and much more complex than in SMIv2. Instead of Enterprise IDs and OBJECT-IDENTIFIERs, YANG uses XML namespaces and XPath path expressions to identify module ownership and contents within the protocol PDUs.&lt;br /&gt;
&lt;br /&gt;
== How Does an Operator Use NETCONF and YANG? ==&lt;br /&gt;
An operator uses a NETCONF session almost like it was a CLI session, except there are structured, schema-defined requests and responses, encoded in XML. YANG modules are like MIB modules for CLI content. Instead of ad-hoc unstructured documentation like CLI, NETCONF uses a data definition language to define management modules. The actual modules that a server supports will vary, just like MIB (SMIv2) modules.&lt;br /&gt;
&lt;br /&gt;
The NETCONF protocol is available for many different transports. The most popular is the SSH2 protocol. The 'netconf' subsystem is used (on TCP port 830) to start a special SSH session with the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
Using NETCONF over SSH is just like using CLI over SSH to manage a networking device, except the messages are exchanged in XML, not plain-text. SSH user names and passwords are used for session authentication and authorization.&lt;br /&gt;
&lt;br /&gt;
NETCONF is designed to provide a programmatic interface, so it is usually used with a management application, instead of a direct (raw) SSH terminal application. The '''yangcli''' program within Yuma Tools is a YANG-driven NETCONF client application that supports scripts, XPath, and many automated features to simplify management of NETCONF servers.&lt;br /&gt;
&lt;br /&gt;
Once a session is started, similar to a CLI session, the operator issues commands (NETCONF operations) to the server, and the server performs each requested operation in order, and returns a status message and/or some data to the client. &amp;lt;nowiki&amp;gt;Notifications can also be received, if the session has requested them with the &amp;lt;create-subscription&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session starts, a &amp;lt;hello&amp;gt; message is sent by the server that has all the NETCONF capabilities and YANG modules supported by the server. &amp;lt;/nowiki&amp;gt;Capabilities are optional protocol mechanisms, beyond those defined in the base protocol (RFC 4741, RFC 6241). &amp;lt;nowiki&amp;gt;The client application knows what operations, notification events, and database contents are supported on the server, based on the information in the &amp;lt;hello&amp;gt; message.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NETCONF has a set of basic database (CRUD) operations for managing the configuration database. In addition, any YANG module can define new protocol operations and notification events.&lt;br /&gt;
&lt;br /&gt;
== How Does a Developer Use NETCONF and YANG? ==&lt;br /&gt;
A NETCONF server developer decides what modules need to be supported by the NETCONF server, and implements the device instrumentation code for those modules.&lt;br /&gt;
&lt;br /&gt;
Much of the NETCONF protocol related code is handled by the NETCONF stack, based on the YANG module contents. Therefore, the most important task for a developer is designing a good YANG module.&lt;br /&gt;
&lt;br /&gt;
After the YANG module is written, the device instrumentation code for the YANG module is then added by the developer. The code uses the Yuma API to register callbacks and access the YANG database. The 'callback code' is called from the NETCONF stack when database operation requests for the object(s) in the YANG module are received by the server.&lt;br /&gt;
&lt;br /&gt;
Once this library is completed, the YANG module and its binary server instrumentation library (SIL) can be loaded into the NETCONF server at run-time. There is no need to recompile the '''netconfd''' server, or even reboot it.&lt;br /&gt;
&lt;br /&gt;
= Getting Started with toaster.yang =&lt;br /&gt;
This section will demonstrate the basic operation of Yuma Tools to use a NETCONF session to manage a remote device with a YANG data model. The Yuma Tools programs and libraries must already be installed. Refer to the Yuma Tools Installation Guide if this has not yet been done.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' client program and '''netconfd''' server program do not need to be installed on the same machine. For simplicity, the server address 'localhost' is used in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is libtoaster? ==&lt;br /&gt;
There is a sample server instrumentation library (SIL) included, named libtoaster. [https://sourceforge.net/p/yuma123/git/ci/master/tree/libtoaster/src/toaster.c toaster.c] is the module-specific server instrumentation code for the management data defined in [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/netconfcentral/toaster.yang toaster.yang ]. This is based on the original TOASTER-MIB by Epilogue. This YANG module provides simple operations to make toast, and some simple NETCONF database objects to enable and monitor the toaster.&lt;br /&gt;
&lt;br /&gt;
The new YANG version of the TOASTER-MIB is different is some ways:&lt;br /&gt;
&lt;br /&gt;
* extensible YANG identities are used to identify the bread type, instead of a hard-wired enumerated list.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;protocol operations (&amp;lt;make-toast&amp;gt; and &amp;lt;cancel-toast&amp;gt;) are used instead of an 'up/down' switch within the database. &amp;lt;/nowiki&amp;gt;NETCONF databases are intended to contain persistent data structures, and 'actions' such as starting or stopping the toaster are done with new protocol operations, instead of editing the database with the standard operations.&lt;br /&gt;
* A simple configuration 'presence container' object is used to enable and disable the toaster service, instead of hard-wiring the toaster service availability.&lt;br /&gt;
* A notification is generated when the toast is done or canceled. This notification can be used instead of polling the toaster status object.&lt;br /&gt;
&lt;br /&gt;
== Other examples: ietf-interfaces and ietf-system ==&lt;br /&gt;
The partial SIL implementations of the stadard ietf-system.yang and ietf-interfaces.yang models are included as examples and should work out of the box for standard Linux distributions.&lt;br /&gt;
&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-interfaces.yang ietf-interfaces.yang ] ([https://tools.ietf.org/rfc/rfc7223.txt rfc7223]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-interfaces/ietf-interfaces.c ietf-interfaces.c]&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-system.yang ietf-system.yang] ([https://tools.ietf.org/rfc/rfc7317.txt rfc7317]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-system/ietf-system.c ietf-system.c]&lt;br /&gt;
&lt;br /&gt;
One can start (provided you have already compiled installed and configured netconfd and the modules) netconfd and load the YANG models with the installed SIL implementations like this:&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/netconfd --module=ietf-system --module=ietf-interfaces&lt;br /&gt;
&lt;br /&gt;
== Start the netconfd server ==&lt;br /&gt;
If the '''netconfd''' server is already running, then skip this section.&lt;br /&gt;
&lt;br /&gt;
Details for all the '''netconfd''' configuration parameters can be found in the [[Yuma netconfd Manual]].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the server will accept sessions on TCP port 830&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the target database is &amp;lt;candidate&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;no &amp;lt;startup&amp;gt; database (mirrored NV-save)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;validate&amp;gt; operation is supported&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the access control mode is 'enforcing'&lt;br /&gt;
* the super user account name is 'superuser'&lt;br /&gt;
* the server will search startup-cfg.xml using the default search path&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the default &amp;lt;with-defaults&amp;gt; behavior is 'explicit'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* notification replay is enabled with a buffer size of 1000 events and a maximum message burst per session of 10 notifications&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;hello&amp;gt; exchange timeout is 10 minutes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the session idle timeout is 1 hour&lt;br /&gt;
* the default session indent amount is 2 spaces&lt;br /&gt;
* the default session line-size is 72 characters&lt;br /&gt;
* violation of strict YANG XML ordering will not cause errors&lt;br /&gt;
* logging level 'info' is enabled and sent to STDOUT&lt;br /&gt;
&lt;br /&gt;
=== SSH Server ===&lt;br /&gt;
To start the NETCONF server, make sure that the '''sshd''' server is running, and the following configuration is included in '''/etc/ssh/sshd_config.'''&lt;br /&gt;
&lt;br /&gt;
 '''Port 22'''&lt;br /&gt;
 '''Port 830'''&lt;br /&gt;
 '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
The 'Subsystem' command may be different if '''netconf-subsystem''' has been installed in a different location than '''/usr/local/sbin'''. The 'Port 22' command is needed to make sure the SSH server will accept SSH sessions in addition to NETCONF sessions.&lt;br /&gt;
&lt;br /&gt;
=== NETCONF Server ===&lt;br /&gt;
For this example, the superuser account needs to be enabled. This is done with a CLI parameter, and the user name 'joe' is used. Replace 'joe' with your username.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the foreground:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ '''/usr/sbin/netconfd --superuser=joe'''&lt;br /&gt;
 Starting netconfd...&lt;br /&gt;
 Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
 Copyright (c) 2013-2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
 &lt;br /&gt;
 agt: Startup config loaded OK&lt;br /&gt;
      Source: /home/joe/.yuma/startup-cfg.xml&lt;br /&gt;
 &lt;br /&gt;
 Running netconfd server (2.12-0)&lt;br /&gt;
&lt;br /&gt;
If no startup configuration is available, then the server defaults will be used instead. Any message about 'startup-cfg.xml' not found can be ignored. It just means the server booted with the factory default configuration.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the background:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe --log=~/mylog &amp;amp;&lt;br /&gt;
 joe@joesserver:~$&lt;br /&gt;
&lt;br /&gt;
This example shows that a logfile in the user's home directory called 'mylog' will be used for all server log messages. The '&amp;amp;' at the end causes the command to be run in the background.&lt;br /&gt;
&lt;br /&gt;
== Start the yangcli client ==&lt;br /&gt;
Once the NETCONF server is running, it will accept client sessions If running '''netconfd''' interactively on localhost, then start a new terminal window to continue.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the client will attempt to start sessions on TCP port 830&lt;br /&gt;
* the client will attempt to automatically complete partial commands&lt;br /&gt;
* the command line history will be automatically loaded upon startup, and saved upon exit&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the client will attempt to automatically load any YANG modules advertised in the server &amp;lt;hello&amp;gt; message&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the client will check before using invalid parameter values&lt;br /&gt;
* the plain display mode will be used, with 72 characters per line&lt;br /&gt;
* each nest level of displayed data will be indented 2 spaces &lt;br /&gt;
* the XML order of messages sent to the server will be corrected, as needed&lt;br /&gt;
* the logging level of 'info' is set, and log messages are sent to STDOUT&lt;br /&gt;
* the client will wait 30 seconds for responses&lt;br /&gt;
&lt;br /&gt;
=== Run yangcli ===&lt;br /&gt;
The yangcli program should be found in the PATH environment variable.&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ '''yangcli'''&lt;br /&gt;
&lt;br /&gt;
=== Startup Screen ===&lt;br /&gt;
The startup screen shows the following information:&lt;br /&gt;
&lt;br /&gt;
* program version and copyright&lt;br /&gt;
* tab key can be used for command and parameter completion&lt;br /&gt;
* basic help instructions&lt;br /&gt;
* basic statement instructions&lt;br /&gt;
&lt;br /&gt;
=== Command Line Editing ===&lt;br /&gt;
The command lines are stored in a history buffer.&lt;br /&gt;
&lt;br /&gt;
Any previous command line (except a password parameter line) can be recalled and used again.&lt;br /&gt;
&lt;br /&gt;
Any command in the command buffer (current or recalled) can be edited. The default key settings are aligned with the emacs editor. Refer to the [[Yuma yangcli Manual]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Escape Commands ===&lt;br /&gt;
Not all parameters need to be entered at one time. If yangcli needs more information, based on the initial command line, then 1 or more missing parameters will be requested, in sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to get help, skip a parameter, or even cancel the entire command during one of these sub-command modes, by using an escape command. This is a 1 or 2 character command, followed by the 'enter' key (as usual to end a command).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Escape Command Summary'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?s&lt;br /&gt;
| skip the current parameter&lt;br /&gt;
|-&lt;br /&gt;
| ?c&lt;br /&gt;
| cancel the current command&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| get help&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| get full help&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Using the '?s' command to skip a parameter may cause the &amp;lt;rpc&amp;gt; request to be invalid.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the setting of the '''--bad-data''' configuration parameter, this may or may not be allowed. The default setting is to warn and confirm. This configuration parameter also affects parameter values that are invalid according to the YANG module definition.&lt;br /&gt;
&lt;br /&gt;
== Getting Context Sensitive Help ==&lt;br /&gt;
The '''yangcli''' program provides context-sensitive help based on the current NETCONF session status and the set of YANG modules currently loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session is active, the set of modules advertised in the &amp;lt;hello&amp;gt; message by the server will be used to generate help text, if available. &amp;lt;/nowiki&amp;gt;The ''''mgrload'''' command can be used to force '''yangcli''' to use different or additional YANG modules.&lt;br /&gt;
&lt;br /&gt;
If the '''yangcli'''&amp;lt;nowiki&amp;gt; program does not have the advertised revision of a particular module available in the module search path, and the NETCONF server supports the standard &amp;lt;get-schema&amp;gt; operation, then the module will be retrieved from the server, and used just for that session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any features or deviations are advertised for a YANG module, then they will be applied to the modules used just for the current session. The help text and the error checking done for the module will be based on this 'patched' module, not the 'plain' module specified in the capability URI string.&lt;br /&gt;
&lt;br /&gt;
=== Tab Key for Command Completion ===&lt;br /&gt;
The 'tab' key can be used at any time to see a list of the possible completions that the command interpreter will accept. The list will be displayed for command names and some command parameters.&lt;br /&gt;
&lt;br /&gt;
When a NETCONF session is active, all the NETCONF operations will be available. Additional commands may also be available if the server advertised any YANG modules containing 'rpc' statements.&lt;br /&gt;
&lt;br /&gt;
=== The '?' and '??' Escape Sequences ===&lt;br /&gt;
If a partial command is entered, or if a data structure is being filled, then the help escape sequences are available to get help about that parameter or data node. Use one question mark for help, and two question marks for maximum help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Escape Sequences'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! sequence&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| Print some help text, but not description statements and some other information.&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| Print maximum help text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following example shows the help text for the 'user' parameter for the 'connect' operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''connect''' &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; '''? '''&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;leaf user [NcxUserName] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
       length: 1..63 &lt;br /&gt;
       &amp;lt;nowiki&amp;gt;pattern: [a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,62} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The type of object, its name, data type, and any restrictions, will be printed.&lt;br /&gt;
&lt;br /&gt;
After that, the previous prompt will be redisplayed.&lt;br /&gt;
&lt;br /&gt;
=== The 'help' Command ===&lt;br /&gt;
The '''help''' command can be used to display all kinds of information about the '''yangcli''' program and the YANG data module contents in use at the time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Command Variants'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help &amp;lt;comand-name&amp;gt;&amp;lt;/nowiki&amp;gt;help command  &amp;lt;nowiki&amp;gt;&amp;lt;command-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help for the specified yangcli command or YANG rpc statement.&lt;br /&gt;
|-&lt;br /&gt;
| help commands&lt;br /&gt;
| Display help text for all commands.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help object &amp;lt;object-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG database top-level object (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| help notification  &amp;lt;nowiki&amp;gt;&amp;lt;notification-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG notification event (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help type &amp;lt;type-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for an exported YANG data type (only if its module is available).&lt;br /&gt;
|}&lt;br /&gt;
Each of the help command variants also accepts a 'help-mode' parameter to control how much help text is displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Output Modes'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! mode&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| --brief&lt;br /&gt;
| Display minimal help text.&lt;br /&gt;
|-&lt;br /&gt;
| --normal&lt;br /&gt;
| Display a lot, but not always all the help text available (default mode).&lt;br /&gt;
|-&lt;br /&gt;
|  --full&lt;br /&gt;
| Display all available help text, including description statements.&lt;br /&gt;
|}&lt;br /&gt;
The following table shows some valid help commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| help help&lt;br /&gt;
| Get normal help for the help command.&lt;br /&gt;
|-&lt;br /&gt;
| help commands brief&lt;br /&gt;
| Get a 1 line description of each command.&lt;br /&gt;
|-&lt;br /&gt;
| help object system full&lt;br /&gt;
| Get all available help for the /system container and all its descendant nodes.&lt;br /&gt;
|-&lt;br /&gt;
| help type NcxIdentifier&lt;br /&gt;
| Get summary and description of the data type called 'NcxIdentifier'.&lt;br /&gt;
|-&lt;br /&gt;
| help notification sysSessionStart&lt;br /&gt;
| Get a summary of the 'sysSessionStart' notification, and each of objects in its payload.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Start a NETCONF session ==&lt;br /&gt;
Each yangcli program instance can run 1 NETCONF session at a time.&lt;br /&gt;
&lt;br /&gt;
If no session is currently active, then the prompt will contain just the program name, indicating that the 'connect' command is available:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== The connect Command ===&lt;br /&gt;
The 'connect' command is used to start a NETCONF session.&lt;br /&gt;
&lt;br /&gt;
There are 3 mandatory parameters for this command:&lt;br /&gt;
&lt;br /&gt;
* '''user''': the system (or SSH) user name to use&lt;br /&gt;
* '''server''': the IP address or DNS name of the NETCONF server to use&lt;br /&gt;
* '''password''': the password string to use&lt;br /&gt;
&lt;br /&gt;
Make sure you have a user name and password already configured on the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
If a partial command is given, then yangcli will prompt for any missing mandatory parameters. In this example, the complete command is given at once:&lt;br /&gt;
&lt;br /&gt;
 yangcli'''&amp;gt;''' '''connect server=localhost user=joe password=yangrocks'''&lt;br /&gt;
&lt;br /&gt;
After this command is entered, '''yangcli''' will generate some informational log messages to the screen.&lt;br /&gt;
&lt;br /&gt;
If the session is started successfully, a summary of the server session capabilities and available modules should be displayed. Also, the command prompt will change to indicate that a NETCONF session is currently active.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At this point any command supported by the server can be entered, in addition to any '''yangcli''' command (except 'connect').&lt;br /&gt;
&lt;br /&gt;
=== Fixing Connection Problems ===&lt;br /&gt;
If the session did not start correctly, check the error messages to fix the problem. Some common problems:&lt;br /&gt;
&lt;br /&gt;
* Make sure the '''netconfd''' program is running.&lt;br /&gt;
* Make sure the '''netconf-subsystem''' program is properly installed.&lt;br /&gt;
* Check if the SSH configuration contains the portion for NETCONF.&lt;br /&gt;
* If the SSH configuration looks correct, then try restarting the SSH server to make sure that configuration file is the one being used.&lt;br /&gt;
* If the SSH server seems to be running correctly, then check if any firewall or other security mechanism is blocking TCP port 830. If so, either enable TCP port 830, or enable port 22 on the NETCONF server (by restarting the server), and include 'port=22' in the 'connect' command parameters.&lt;br /&gt;
* If no firewall or other security measure is blocking TCP port 830, try to establish a normal SSH session with the server.&lt;br /&gt;
* If a normal SSH session works correctly, then check the log messages on the NETCONF server for more information.&lt;br /&gt;
&lt;br /&gt;
== Enable Notification Delivery ==&lt;br /&gt;
In order to receive the 'toastDone' notification event, a notification subscription has to be enabled.&lt;br /&gt;
&lt;br /&gt;
A default NETCONF notification stream can be started with the 'create-subscription' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''create-subscription'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on other activity within the NETCONF server, it is possible other notification events, such as 'sysSessionStart' or 'sysSessionEnd' will be generated. Notifications are displayed in their entirety, but not during 'rpc reply output'. If a command is being entered, the notification will be displayed, and then the command line restored.&lt;br /&gt;
&lt;br /&gt;
== Load the Toaster Module ==&lt;br /&gt;
The toaster module is not a core system module, and is not available automatically.&lt;br /&gt;
&lt;br /&gt;
The module has to be explicitly loaded by the NETCONF client.&lt;br /&gt;
&lt;br /&gt;
To load the server-supported version of the toaster module, use the 'load' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''load toaster'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Data Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    mod-revision 2009-11-20 &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:44:45Z &lt;br /&gt;
       sysCapabilityChange { &lt;br /&gt;
          changed-by { &lt;br /&gt;
             userName joe &lt;br /&gt;
             sessionId 1 &lt;br /&gt;
             remoteHost 127.0.0.1 &lt;br /&gt;
          } &lt;br /&gt;
          added-capability &lt;br /&gt;
           http://netconfcentral.com/ns/toaster?module=toaster&amp;amp;revision=2009-11-20 &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 3 &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the module was successfully loaded, then a data response will be sent, containing the revision date of the toaster module that was loaded. This response will be returned even if the module was already loaded.&lt;br /&gt;
&lt;br /&gt;
Note that the 'sysCapabilityChange' notification event will only be sent if the module has not already been loaded into the server. &amp;lt;nowiki&amp;gt;In this case, it was not advertised in the &amp;lt;hello&amp;gt; message for this session, and the toaster module needs to be loaded manually into yangcli with the 'mgrload' command:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''mgrload toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Load module 'toaster' OK&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable the Toaster ==&lt;br /&gt;
Try to make some toast, using the 'make-toast' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Error Reply 4 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    rpc-error { &lt;br /&gt;
       error-type protocol &lt;br /&gt;
       error-tag resource-denied &lt;br /&gt;
       error-severity error &lt;br /&gt;
       error-app-tag no-access &lt;br /&gt;
       error-message 'resource denied' &lt;br /&gt;
       error-info { &lt;br /&gt;
          error-number 269 &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
What happened?&lt;br /&gt;
&lt;br /&gt;
A 'resource-denied' error was returned instead of 'OK', because the toaster service is not enabled yet. A node has to be created in the NETCONF database before the 'make-toast' command can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lock the Databases ===&lt;br /&gt;
The first step is to lock the NETCONF databases for writing. Locks do not affect read operations.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has a high-level command to deal with locking, called 'get-locks'. It will handle retries for any missing locks, until an overall timeout occurs or all the locks needed are acquired.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' get-locks'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;lock&amp;gt; operations for get-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 get-locks finished OK &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the toaster Container ===&lt;br /&gt;
The toaster module uses a simple YANG 'presence' container to configure the toaster service.&lt;br /&gt;
&lt;br /&gt;
Once the /toaster container is created, the read-only nodes within that container will be maintained by the server, and the toaster service will be enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The first step is to create the /toaster node in the &amp;lt;candidate&amp;gt; configuration database:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' create /toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC OK Reply 5 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Now the /toaster node is created in the &amp;lt;candidate&amp;gt; database.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit the Database Changes ===&lt;br /&gt;
In order to activate these changes, the 'commit' command needs to be issued.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''commit'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 6 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:59:58Z &lt;br /&gt;
       sysConfigChange { &lt;br /&gt;
          userName joe &lt;br /&gt;
          sessionId 1 &lt;br /&gt;
          remoteHost 127.0.0.1 &lt;br /&gt;
          edit { &lt;br /&gt;
             target /toast:toaster &lt;br /&gt;
             operation create &lt;br /&gt;
          } &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 4 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
The 'RPC OK' message indicate that the server successfully commited the configuration.&lt;br /&gt;
&lt;br /&gt;
The 'sysConfigChange' notification indicates what was changed in the running configuration, and who made the change(s).&lt;br /&gt;
&lt;br /&gt;
The toaster server should now be enabled.&lt;br /&gt;
&lt;br /&gt;
=== Unlock the Databases ===&lt;br /&gt;
The database locks need to be released as soon as possible after the edits are completed or discarded.&lt;br /&gt;
&lt;br /&gt;
The high-level command 'release-locks' must be used if 'get-locks' was used to acquire the database locks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''release-locks '''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;unlock&amp;gt; operations for release-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the Toaster State Information ==&lt;br /&gt;
To discover the toaster model and its current status, the 'sget' or 'xget' commands can be used to retrieve just the toaster portion of the conceptual state data available on the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'sget' command is high-level subtree filter handler for the &amp;lt;get&amp;gt; operation:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''sget /toaster'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'xget' command is high-level XPath filter handler for the &amp;lt;get&amp;gt; operation. &amp;lt;/nowiki&amp;gt;It is only available if the NETCONF server supports the ''':xpath '''capability (like '''netconfd''').&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''xget /toaster'''&lt;br /&gt;
&lt;br /&gt;
Both commands should return the same data:&lt;br /&gt;
&lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC Data Reply 7 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    data { &lt;br /&gt;
       toaster { &lt;br /&gt;
          toasterManufacturer 'Acme, Inc.' &lt;br /&gt;
          toasterModelNumber 'Super Toastamatic 2000' &lt;br /&gt;
          toasterStatus up &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
This data shows that the 'Super Toastamatic 2000' is ready to make toast!&lt;br /&gt;
&lt;br /&gt;
== Start Making Toast ==&lt;br /&gt;
Now that the toaster is enabled, the 'make-toast' command should work.&lt;br /&gt;
&lt;br /&gt;
Instead of using the default parameter values, let's make a frozen waffle a little less done than normal:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 8 for session 1: &lt;br /&gt;
&lt;br /&gt;
At this point the toaster timer is running, and the simulated waffle is cooking,&lt;br /&gt;
&lt;br /&gt;
After about 40 seconds, the 'toastDone' notification should be received:&lt;br /&gt;
&lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:20:05Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus done &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 5 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was completed, and is ready to eat.&lt;br /&gt;
&lt;br /&gt;
== Stop Making Toast ==&lt;br /&gt;
What if you change your mind, and want wheat toast instead of a waffle?&lt;br /&gt;
&lt;br /&gt;
Repeat the previous command (Control-P should recall the previous command):&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 9 for session 1: &lt;br /&gt;
&lt;br /&gt;
Now enter the 'cancel-toast' command right away, before the waffle finishes:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''cancel-toast '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 10 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:24:36Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus cancelled &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 6 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was cancelled.&lt;br /&gt;
&lt;br /&gt;
== Close the NETCONF Session ==&lt;br /&gt;
To close the NETCONF session, use the 'close-session' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''close-session''' &lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 11 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 ses: session 1 shut by remote peer &lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the prompt returned to the default form, once the session was dropped by the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
The terminate the yangcli program, use the 'quit' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''quit '''&lt;br /&gt;
 &lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced Topics =&lt;br /&gt;
This section introduces some advanced features of the NETCONF protocol and YANG data modeling language.&lt;br /&gt;
&lt;br /&gt;
== Data Retrieval ==&lt;br /&gt;
=== Basic NETCONF Retrieval Operations ===&lt;br /&gt;
The NETCONF protocol has 2 different retrieval operations:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt;&amp;lt;/nowiki&amp;gt;''': get state data and the running configuration database.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt;&amp;lt;/nowiki&amp;gt;''': get just the specified configuration database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Each of these operations accepts a &amp;lt;filter&amp;gt; parameter, which has 2 forms:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''subtree filter:''' retrieve just the subtrees in the database that match the XML subtrees in the filter.&lt;br /&gt;
* '''XPath filter:''' retrieve just the subtrees that match the result node set produced by evaluating the specified XPath expression against the database. This mode cannot be used unless the ''':xpath''' capability must be advertised by the server.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program supports 3 different forms of each command:&lt;br /&gt;
&lt;br /&gt;
* '''plain''': plain NETCONF operation with user-supplied filter&lt;br /&gt;
* '''subtree'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter subtree XML.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* '''xpath'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter 'select' XML attribute&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Retrieval Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
! example&lt;br /&gt;
|-&lt;br /&gt;
| '''get'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get with-defaults=trim&lt;br /&gt;
|-&lt;br /&gt;
| '''get-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get-config&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get-config source=candidate&lt;br /&gt;
|-&lt;br /&gt;
| '''sget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget /system&lt;br /&gt;
|-&lt;br /&gt;
| '''sget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget-config source=running /nacm/rules &lt;br /&gt;
|-&lt;br /&gt;
| '''xget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| xget &amp;quot;/interfaces-state/interface/statistics&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''xget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;xget-config source=candidate &amp;quot;/interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The retrieval commands return an element named &amp;lt;data&amp;gt; containing the requested XML subtrees.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any identifier nodes (YANG key leafs) are needed to distinguish the data in the reply, they will be added as needed by the server. &amp;lt;nowiki&amp;gt;In the 'xget' example above, the &amp;lt;name&amp;gt; element for each interface would be returned, even though it was not directly requested by the XPath expression.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Default Value Filtering ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The data will also be filtered according to the defaults handling behavior of the server, unless the &amp;lt;with-defaults&amp;gt; parameter is added to the command. &amp;lt;/nowiki&amp;gt;This parameter is only supported if the server advertised the 'with-defaults' capability, If not, the client does not get any indication from the server what type of defaults filtering is being done (if any).&lt;br /&gt;
&lt;br /&gt;
There are 3 types of defaults filtering provided:&lt;br /&gt;
&lt;br /&gt;
* '''report-all''': no filtering -- return all nodes even those the server might normally suppress because they are considerer to be default values by the server.&lt;br /&gt;
* '''trim''': return all nodes except skip any leaf nodes that match the schema defined default value&lt;br /&gt;
* '''explicit''': return all nodes that were set by the client or the server to some value, even if the value happens to be the schema defined default. This is normally the default behavior for the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The defaults handling behavior can be changed just for a specific NETCONF session, using the &amp;lt;set-my-session&amp;gt; operation. &amp;lt;/nowiki&amp;gt;This is only available on the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' set-my-session with-defaults=report-all '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 12 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this example, the 'basic' behavior is changed from 'explicit' to 'report-all', but just for session 1. This setting is temporary, and will not be remembered when the session is terminated. &amp;lt;nowiki&amp;gt;If the &amp;lt;with-defaults&amp;gt; parameter is present, it will be used instead of this value.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Retrieval Operations ===&lt;br /&gt;
Any YANG module can add new operations with the 'rpc' statement.&lt;br /&gt;
&lt;br /&gt;
New retrieval operations may also be added which are associated with a protocol capability.&lt;br /&gt;
&lt;br /&gt;
Just like any other data model content, the operator (or application) needs to understand the YANG file definitions, including the description statements, to understand how each custom retrieval operation works.&lt;br /&gt;
&lt;br /&gt;
There are 2 custom retrieval operations supported by '''netconfd''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Special Retrieval Operations'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! operation&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| '''get-schema'''&lt;br /&gt;
| Retrieve the YANG or YIN source file for one of the modules advertised by the server.This is a standard operation defined in the '''ietf-netconf-monitoring''' module.&lt;br /&gt;
|-&lt;br /&gt;
| '''get-my-session'''&lt;br /&gt;
| Retrieve the customizable settings for my session. This is a proprietary operation defined in the '''yuma-my-session''' module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
Notifications are used in NETCONF to send server event information to the client application.&lt;br /&gt;
&lt;br /&gt;
A session must request notifications with the 'create-subscription' command.&lt;br /&gt;
&lt;br /&gt;
Notifications are grouped into 'streams', but only the 'NETCONF' stream is defined at this time.&lt;br /&gt;
&lt;br /&gt;
A notification subscription request specifies the stream name (and perhaps more parameters).&lt;br /&gt;
&lt;br /&gt;
A NETCONF session on the netconfd server will never expire due to inactivity, while a notification subscription is active. This allows notification processing applications to maintain long-lived connections without worrying about a NETCONF timeout. Note that the SSH server may also be configured to drop idle SSH sessions, whether a notification subscription is active or not.&lt;br /&gt;
&lt;br /&gt;
=== Notification Contents ===&lt;br /&gt;
[[Image:notification-structure.png]]&lt;br /&gt;
&lt;br /&gt;
The 'notification' element is sent from the server to the client, if an event occurs, and the client has created a notification subscription.&lt;br /&gt;
&lt;br /&gt;
The child nodes of this element comprise the notification content, and it is divided into 3 sections:&lt;br /&gt;
&lt;br /&gt;
# '''event generation time-stamp''': This standard NETCONF leaf is always the first child element within the notification element.&lt;br /&gt;
# '''event payload''': The module-specific event payload is represented as a container with the name of the notification. Any data nodes defined within the YANG notification statement appear (in order) as child nodes of the event type container.&lt;br /&gt;
# '''proprietary extensions''': Zero or more vendor-specific elements may appear after the event payload element. For example, the monotonically increasing 'sequence-id' element is added to each notification saved in the '''netconfd''' event log.&lt;br /&gt;
&lt;br /&gt;
=== Notification Replay ===&lt;br /&gt;
[[Image:notification-replay-buffer.png]]&lt;br /&gt;
&lt;br /&gt;
The NETCONF server will maintain an ordered buffer of saved notification events, if the :notification-replay capability is supported by the server. For the '''netconfd''' server, this is a configurable feature, set by the '''--eventlog-size''' parameter.&lt;br /&gt;
&lt;br /&gt;
The '''netconfd''' default is to save the most recent 1000 notification events.&lt;br /&gt;
&lt;br /&gt;
Only system events are saved and are available for retrieval. The 'replayComplete' and 'subscriptionComplete' events are session-specific events, and are therefore not saved in the replay buffer.&lt;br /&gt;
&lt;br /&gt;
The 'create-subscription' command has 2 parameters to request that stored notifications be delivered to the client session:&lt;br /&gt;
&lt;br /&gt;
* '''startTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred after this time are delivered.&lt;br /&gt;
* '''stopTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred before this time are delivered. This parameter can specify a time in the future. When that time has passed, the subscription will be terminated. The stopTime does not cause the server to wait that period of time to generate an event. If the stopTime is in the past, then the subscription will terminate after all the matching event timestamps in the replay buffer have been delivered.&lt;br /&gt;
&lt;br /&gt;
Notifications are delivered in the order they are stored. Each new '''netconfd''' notification contains a monotonically increasing sequence-id (unsigned integer). This can be used to help determine if any configured notification filters are working as expected.&lt;br /&gt;
&lt;br /&gt;
=== The interleave capability ===&lt;br /&gt;
The '''netconfd''' server supports the :interleave capability, which means that all commands (except create-subscription) will be accepted by the server. &amp;lt;nowiki&amp;gt;The client should expect &amp;lt;rpc-reply&amp;gt; and &amp;lt;notification&amp;gt; messages. &amp;lt;/nowiki&amp;gt;The server will always maintain proper message serialization. &amp;lt;nowiki&amp;gt;These messages will always be sent in their entirety, which may impact applications (e.g., a really long &amp;lt;get&amp;gt; response on the same session will delay notification delivery).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the NETCONF server does not support the :interleave capability, then it may only allow the &amp;lt;close-session&amp;gt; operation while the notification subscription is active. &amp;lt;/nowiki&amp;gt;In this case, a new NETCONF session is required to perform any management operations.&lt;br /&gt;
&lt;br /&gt;
This special mode is only applicable while a notification subscription is active. It is possible for a replay subscription to terminate, without terminating the session as well. In this case, the 'notificationComplete' event will be generated, and the session will return to accepting all possible operations.&lt;br /&gt;
&lt;br /&gt;
== Database Editing ==&lt;br /&gt;
NETCONF supports multiple conceptual configuration databases. Only the 'running' database is actually active. All other databases are scratch-pad databases, or some other special-purpose off-line database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Every NETCONF server must allow arbitrary partial (and concurrent) editing to its configuration with the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;Refer to the Yuma Tools User Manual for complete details on this NETCONF operation. The '''yangcli''' program has simplified editing commands, which are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;config&amp;gt; element within an &amp;lt;edit-config&amp;gt; PDU represents the 'root node' (/) in the path expression for each node in the conceptual database. &amp;lt;/nowiki&amp;gt;Each top-level YANG object that is supported and configured will be represented as child nodes to this root node. The conceptual database can be processed as an XML instance document with multiple top nodes (similar to XSLT rules).&lt;br /&gt;
&lt;br /&gt;
Database editing in NETCONF has several variants, but basically, it follows this simple procedure:&lt;br /&gt;
&lt;br /&gt;
# Lock the database(s) that will be affected.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Use &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; on the target database to make changes.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# Activate and save/commit the database edits.&lt;br /&gt;
# Unlock the database(s) that were previously locked.&lt;br /&gt;
&lt;br /&gt;
=== The Target Database ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Usually a NETCONF server supports the &amp;lt;edit-config&amp;gt; operation on only one database, which is either the candidate or the running database. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;This is called the 'target' database, which corresponds to the &amp;lt;target&amp;gt; parameter in the &amp;lt;edit-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the target database is the candidate configuration, then the &amp;lt;edit-config&amp;gt; operation does not always cause all possible database validation checking to be done by the server. &amp;lt;/nowiki&amp;gt;Since the candidate database is just a scratch-pad for (possibly) incremental edits, the server is not required to completely validate its contents. &amp;lt;nowiki&amp;gt;Instead, these 'final validation' tests are only required to be done when the &amp;lt;commit&amp;gt; operation is invoked.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program will automatically handle the target database management, based on the server capabilities reported each session, if the 'save' command is used. &amp;lt;nowiki&amp;gt;The manual procedure (&amp;lt;commit&amp;gt; and/or maybe &amp;lt;copy-config&amp;gt; operations) is also supported, but do not mix them within the same editing session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Database Locking ===&lt;br /&gt;
NETCONF supports database locking so a session can have exclusive write access to the configuration.&lt;br /&gt;
&lt;br /&gt;
These locks are intended to be short-lived, but there is no actual time limit on a lock. If the session terminates for any reason with any locks, they will be released automatically by the server.&lt;br /&gt;
&lt;br /&gt;
All the databases that are involved in the edit should be locked. This always includes the running database, and the candidate and startup databases, if they are supported by the server.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has 2 special commands to handle all locking:&lt;br /&gt;
&lt;br /&gt;
* '''get-locks''': Wait until all database locks have been acquired or the timeout occurs&lt;br /&gt;
* '''release-locks''': Rlease any locks that were obtained with get-locks&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on these commands.&lt;br /&gt;
&lt;br /&gt;
=== Non-Volatile Storage ===&lt;br /&gt;
The startup configuration is the conceptual database used on the next reboot of the NETCONF server. It is important to know whether the NETCONF server supports the :startup capability or not. &amp;lt;nowiki&amp;gt;If yes, then the operator must explicitly save the running database to non-volatile storage (the startup database), using the &amp;lt;copy-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;If no, then the server will keep the running and startup databases synchronized.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program has a high-level 'save' command, used after the editing operations, that will automatically issue the correct protocol operations to complete the edit, and save the changes in non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
The startup database is configurable in the '''netconfd''' server. The '''--with-startup''' configuration parameter controls whether the startup database will be used or not. The --startup parameter can be used to control the initial load of the running configuration in 3 different ways:&lt;br /&gt;
&lt;br /&gt;
# '''no startup''': skip this step and just use factory defaults&lt;br /&gt;
# '''default startup''': look for the default '''startup-cfg.xml''' file in the configured data path.&lt;br /&gt;
# '''specific startup''': use a specified file, either absolute file-spec, or a relative path in the configured data path&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on controlling non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
=== Editing Commands ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation should be used to make configuration changes. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;The &amp;lt;copy-config&amp;gt; operation can also be used, but this is a blunt hammer approach. &amp;lt;/nowiki&amp;gt;Although the '''netconfd''' server will always analyze the edit request and only affect the nodes that actually changed, this is not a requirement in the standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation allows the operator to have precise control of the server. &amp;lt;/nowiki&amp;gt;These database edits are performed by the server using a combination of 3 factors:&lt;br /&gt;
&lt;br /&gt;
# The nodes that currently exist in the target database.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The nodes that exist in the 'source' of the edits (either the inline &amp;lt;config&amp;gt; element or indirectly through the &amp;lt;url&amp;gt; element.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The &amp;lt;default-operation&amp;gt; parameter and any XML attributes in the source XML elements (nc:operation attribute and YANG insert operation attributes).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli'''&amp;lt;nowiki&amp;gt; program provides some high-level commands to automatically handle the complexity of the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;These commands use XPath expressions and a series of interactive prompts (e.g., for the mandatory nodes and key leafs) to fill in the specified data structures, and construct an optimized NETCONF message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Editing Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;command&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;description&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| create&lt;br /&gt;
| Create a new sub-tree, only if it does not already exist&lt;br /&gt;
|-&lt;br /&gt;
| delete&lt;br /&gt;
| Delete an existing sub-tree, only if it exists&lt;br /&gt;
|-&lt;br /&gt;
| merge&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, keeping any existing nodes that are not explicitly contained in the source.&lt;br /&gt;
|-&lt;br /&gt;
| replace&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, deleting any existing nodes that are not explicitly contained in the source. &amp;lt;nowiki&amp;gt;This is the mode used for the &amp;lt;copy-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| insert&lt;br /&gt;
| Insert or move a YANG list or leaf-list entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for details on these commands.&lt;br /&gt;
&lt;br /&gt;
== Access Control ==&lt;br /&gt;
The '''netconfd''' server can be configured to give precise access rights to each user (the SSH user name associated with the NETCONF session). Some important points to remember about access control:&lt;br /&gt;
&lt;br /&gt;
* There are 3 types of access -- read, write, and execute.&lt;br /&gt;
* If a user does not have read access to some data, then it is silently omitted from the reply.&lt;br /&gt;
* The 'access-denied' error is not generated for read requests. &amp;lt;nowiki&amp;gt;It is only generated for write requests to the database, or &amp;lt;rpc&amp;gt; operation execution requests.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* An access request results in 1 of 2 outcomes: permit or deny&lt;br /&gt;
* The server resolves the access request by searching the access control rules. Either an explicit rule will apply, or the default access rights will be checked if no rule is found.&lt;br /&gt;
* The default access rights are configurable, but usually set as follows:&lt;br /&gt;
** read access is permitted&lt;br /&gt;
** write access is denied&lt;br /&gt;
** exec access is permitted&lt;br /&gt;
* The '''nacm:secure''' and '''nacm:very-secure''' extensions can be used by the YANG module author to override the default access rights, and deny access instead. &amp;lt;nowiki&amp;gt;For example, the &amp;lt;reboot&amp;gt; operation is not permitted by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* There is a configurable 'superuser' user name. If desired, a specific user name will be considered the 'super user' and all access control will be bypassed for this user. By default, this is the name 'superuser', not 'root', since root login to the SSH server is not recommended.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
The '''yangcli''' program supports variables for easier reuse and script-based operations.&lt;br /&gt;
&lt;br /&gt;
There are 2 types of variables:&lt;br /&gt;
&lt;br /&gt;
* '''file variables''': the variable name is a file name, and the contents of the variable are stored in this file.&lt;br /&gt;
* '''internal variables''': the variable name is just an internal identifier, and the contents of the variable are stored in memory&lt;br /&gt;
&lt;br /&gt;
Variables are set with assignment statements. Here are some examples:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$backup = get-config source=running'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$bad-data = &amp;quot;warn&amp;quot;'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; $itf = &amp;quot;//interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Note that in order to assign a string value (e.g., $$bad-data = &amp;quot;warn&amp;quot; above), single or double quotes must be used. An unquoted string will be interpreted as a command name, not a simple string value.&lt;br /&gt;
&lt;br /&gt;
Variables are referenced in a similar manner, except the variable is on the right-hand side of the equation. These commands are equivalent in this example:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' @myfile.xml = xget select=$itf'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; @myfile.xml = xget //interface[name='eth0']&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Complex variable substitution is also supported:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' copy-config source=$$backup target=candidate'''&lt;br /&gt;
&lt;br /&gt;
Note that '''yangcli''' will attempt to figure out the structure of the parameter (e.g., 'source' and 'target' above), and adjust the NETCONF operation content. In the example above, since 'source' and 'target' are choices, the real nodes within the cases are examined, and the most appropriate case is selected. &amp;lt;nowiki&amp;gt;The 'source' parameter will contain an in-line &amp;lt;config&amp;gt; element with all the child nodes in the &amp;lt;/nowiki&amp;gt;'''$$backup''' variable, and the target parameter will contain an empty element named '''&amp;lt;nowiki&amp;gt;&amp;lt;candidate&amp;gt;.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several types of internal variables available in the '''yangcli''' program:&lt;br /&gt;
&lt;br /&gt;
* read-only system variables ($$USER)&lt;br /&gt;
* read-write system variables ($$default-operation)&lt;br /&gt;
* global user variables, available at all 'runstack' levels ($$backup)&lt;br /&gt;
* local user variables available in the current 'runstack' level only ($itf)&lt;br /&gt;
&lt;br /&gt;
The command 'show vars' can be used to see the current value of all program variables:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''show vars '''&lt;br /&gt;
CLI Variables&lt;br /&gt;
&lt;br /&gt;
yangcli {&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  feature-enable-default true&lt;br /&gt;
  fixorder true&lt;br /&gt;
  force-target candidate&lt;br /&gt;
  indent 2&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  ncport 830&lt;br /&gt;
  password ****&lt;br /&gt;
  private-key /home/joe/.ssh/id_rsa&lt;br /&gt;
  public-key /home/joe/.ssh/id_rsa.pub&lt;br /&gt;
  server localhost&lt;br /&gt;
  subdirs true&lt;br /&gt;
  tcp-direct-enable false&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  transport ssh&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  warn-idlen 64&lt;br /&gt;
  warn-linelen 0&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Read-only environment variables&lt;br /&gt;
&lt;br /&gt;
  HOME /home/joe&lt;br /&gt;
  HOSTNAME &lt;br /&gt;
  LANG en_US.utf8&lt;br /&gt;
  PWD /home/joe&lt;br /&gt;
  SHELL /bin/bash&lt;br /&gt;
  USER joe&lt;br /&gt;
  YUMA_DATAPATH &lt;br /&gt;
  YUMA_HOME &lt;br /&gt;
  YUMA_MODPATH &lt;br /&gt;
  YUMA_RUNPATH &lt;br /&gt;
&lt;br /&gt;
Read-write system variables&lt;br /&gt;
&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  default-module &lt;br /&gt;
  default-operation merge&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  error-option none&lt;br /&gt;
  fixorder true&lt;br /&gt;
  indent 2&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  optional false&lt;br /&gt;
  server localhost&lt;br /&gt;
  test-option set&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  with-defaults none&lt;br /&gt;
&lt;br /&gt;
Global variables&lt;br /&gt;
&lt;br /&gt;
  backup {&lt;br /&gt;
    interfaces &lt;br /&gt;
    nacm &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Local variables&lt;br /&gt;
&lt;br /&gt;
  itf //interface[name='eth0']&lt;br /&gt;
yangcli joe@localhost&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
Scripts are simply a collection of '''yangcli''' commands and/or assignment statements that are stored in a text file, instead of typed directly. Scripts can call other scripts (except loops are not allowed), and numbered parameters are available (e.g., --P1='fred' passed as parameter, the $1 expands to 'fred' inside the script).&lt;br /&gt;
&lt;br /&gt;
The '''$YUMA_RUNPATH''' environment variable, or the '''--runpath''' configuration variable, can be used to set the directory path to look for script files. There is also a default path for finding files, explained in the Yuma Tools User Manual.&lt;br /&gt;
&lt;br /&gt;
The command ''''list scripts'''' can be used to show the potential script file available in the run path.&lt;br /&gt;
&lt;br /&gt;
The command ''''run foo'''' is used to invoke a script named 'foo' (with no file extension).&lt;br /&gt;
&lt;br /&gt;
If a command fails during a script, execution is halted right away and no more commands in the script are executed. If 'get-locks' was used, then any locks obtained will be automatically released. All script runstack levels will be canceled, not just the current script.&lt;br /&gt;
&lt;br /&gt;
Script syntax will be expanded in a future release to provide loops and conditional statements.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=385</id>
		<title>Yuma Quickstart Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=385"/>
		<updated>2019-05-02T11:42:33Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* NETCONF Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Quickstart Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Client/Server Quickstart Guide&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 - 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 - 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
This document assumes you have successfully set up the software as described in the printed document:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the [[Yuma User Manual]] for a complete introduction to Yuma Tools.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma Tools programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma Tools NETCONF client and server programs. It covers the basic usage of the '''yangcli''' client application and the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
== What is NETCONF and YANG? ==&lt;br /&gt;
The Yuma Tools suite provides automated support for development and usage of network management information. Information is exchanged in XML encoding within a session between a client and a server.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;Network Configuration Protocol&amp;quot; (NETCONF) is used to provide the management sessions, operations, and database framework available on the server. The operations, notifications, and the database contents supported by a particular NETCONF server are extensible, and defined with a modular and easy-to-learn language called YANG. The database is used to contain YANG data structures which represent the configuration of the device containing the NETCONF server. This configuration can be saved in non-volatile storage so the configuration can be restored upon reboot.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;YANG Data Modeling Language&amp;quot; is used to define the syntax and semantics of the NETCONF operations, notification events, and database content. Machine and human readable semantics and constraints are used by YANG tools (including Yuma Tools) to automate behavior within the NETCONF protocol for clients and servers.&lt;br /&gt;
&lt;br /&gt;
For people familiar with SNMP and SMIv2, NETCONF is like an XML-based, high-level version of SNMP, and a YANG module is like a MIB module, except MIB tables can be nested and much more complex than in SMIv2. Instead of Enterprise IDs and OBJECT-IDENTIFIERs, YANG uses XML namespaces and XPath path expressions to identify module ownership and contents within the protocol PDUs.&lt;br /&gt;
&lt;br /&gt;
== How Does an Operator Use NETCONF and YANG? ==&lt;br /&gt;
An operator uses a NETCONF session almost like it was a CLI session, except there are structured, schema-defined requests and responses, encoded in XML. YANG modules are like MIB modules for CLI content. Instead of ad-hoc unstructured documentation like CLI, NETCONF uses a data definition language to define management modules. The actual modules that a server supports will vary, just like MIB (SMIv2) modules.&lt;br /&gt;
&lt;br /&gt;
The NETCONF protocol is available for many different transports. The most popular is the SSH2 protocol. The 'netconf' subsystem is used (on TCP port 830) to start a special SSH session with the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
Using NETCONF over SSH is just like using CLI over SSH to manage a networking device, except the messages are exchanged in XML, not plain-text. SSH user names and passwords are used for session authentication and authorization.&lt;br /&gt;
&lt;br /&gt;
NETCONF is designed to provide a programmatic interface, so it is usually used with a management application, instead of a direct (raw) SSH terminal application. The '''yangcli''' program within Yuma Tools is a YANG-driven NETCONF client application that supports scripts, XPath, and many automated features to simplify management of NETCONF servers.&lt;br /&gt;
&lt;br /&gt;
Once a session is started, similar to a CLI session, the operator issues commands (NETCONF operations) to the server, and the server performs each requested operation in order, and returns a status message and/or some data to the client. &amp;lt;nowiki&amp;gt;Notifications can also be received, if the session has requested them with the &amp;lt;create-subscription&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session starts, a &amp;lt;hello&amp;gt; message is sent by the server that has all the NETCONF capabilities and YANG modules supported by the server. &amp;lt;/nowiki&amp;gt;Capabilities are optional protocol mechanisms, beyond those defined in the base protocol (RFC 4741, RFC 6241). &amp;lt;nowiki&amp;gt;The client application knows what operations, notification events, and database contents are supported on the server, based on the information in the &amp;lt;hello&amp;gt; message.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NETCONF has a set of basic database (CRUD) operations for managing the configuration database. In addition, any YANG module can define new protocol operations and notification events.&lt;br /&gt;
&lt;br /&gt;
== How Does a Developer Use NETCONF and YANG? ==&lt;br /&gt;
A NETCONF server developer decides what modules need to be supported by the NETCONF server, and implements the device instrumentation code for those modules.&lt;br /&gt;
&lt;br /&gt;
Much of the NETCONF protocol related code is handled by the NETCONF stack, based on the YANG module contents. Therefore, the most important task for a developer is designing a good YANG module.&lt;br /&gt;
&lt;br /&gt;
After the YANG module is written, the device instrumentation code for the YANG module is then added by the developer. The code uses the Yuma API to register callbacks and access the YANG database. The 'callback code' is called from the NETCONF stack when database operation requests for the object(s) in the YANG module are received by the server.&lt;br /&gt;
&lt;br /&gt;
Once this library is completed, the YANG module and its binary server instrumentation library (SIL) can be loaded into the NETCONF server at run-time. There is no need to recompile the '''netconfd''' server, or even reboot it.&lt;br /&gt;
&lt;br /&gt;
= Getting Started with toaster.yang =&lt;br /&gt;
This section will demonstrate the basic operation of Yuma Tools to use a NETCONF session to manage a remote device with a YANG data model. The Yuma Tools programs and libraries must already be installed. Refer to the Yuma Tools Installation Guide if this has not yet been done.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' client program and '''netconfd''' server program do not need to be installed on the same machine. For simplicity, the server address 'localhost' is used in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is libtoaster? ==&lt;br /&gt;
There is a sample server instrumentation library (SIL) included, named libtoaster. [https://sourceforge.net/p/yuma123/git/ci/master/tree/libtoaster/src/toaster.c toaster.c] is the module-specific server instrumentation code for the management data defined in [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/netconfcentral/toaster.yang toaster.yang ]. This is based on the original TOASTER-MIB by Epilogue. This YANG module provides simple operations to make toast, and some simple NETCONF database objects to enable and monitor the toaster.&lt;br /&gt;
&lt;br /&gt;
The new YANG version of the TOASTER-MIB is different is some ways:&lt;br /&gt;
&lt;br /&gt;
* extensible YANG identities are used to identify the bread type, instead of a hard-wired enumerated list.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;protocol operations (&amp;lt;make-toast&amp;gt; and &amp;lt;cancel-toast&amp;gt;) are used instead of an 'up/down' switch within the database. &amp;lt;/nowiki&amp;gt;NETCONF databases are intended to contain persistent data structures, and 'actions' such as starting or stopping the toaster are done with new protocol operations, instead of editing the database with the standard operations.&lt;br /&gt;
* A simple configuration 'presence container' object is used to enable and disable the toaster service, instead of hard-wiring the toaster service availability.&lt;br /&gt;
* A notification is generated when the toast is done or canceled. This notification can be used instead of polling the toaster status object.&lt;br /&gt;
&lt;br /&gt;
== Other examples: ietf-interfaces and ietf-system ==&lt;br /&gt;
The partial SIL implementations of the stadard ietf-system.yang and ietf-interfaces.yang models are included as examples and should work out of the box for standard Linux distributions.&lt;br /&gt;
&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-interfaces.yang ietf-interfaces.yang ] ([https://tools.ietf.org/rfc/rfc7223.txt rfc7223]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-interfaces/ietf-interfaces.c ietf-interfaces.c]&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-system.yang ietf-system.yang] ([https://tools.ietf.org/rfc/rfc7317.txt rfc7317]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-system/ietf-system.c ietf-system.c]&lt;br /&gt;
&lt;br /&gt;
One can start (provided you have already compiled installed and configured netconfd and the modules) netconfd and load the YANG models with the installed SIL implementations like this:&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/netconfd --module=ietf-system --module=ietf-interfaces&lt;br /&gt;
&lt;br /&gt;
== Start the netconfd server ==&lt;br /&gt;
If the '''netconfd''' server is already running, then skip this section.&lt;br /&gt;
&lt;br /&gt;
Details for all the '''netconfd''' configuration parameters can be found in the [[Yuma netconfd Manual]].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the server will accept sessions on TCP port 830&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the target database is &amp;lt;candidate&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;no &amp;lt;startup&amp;gt; database (mirrored NV-save)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;validate&amp;gt; operation is supported&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the access control mode is 'enforcing'&lt;br /&gt;
* the super user account name is 'superuser'&lt;br /&gt;
* the server will search startup-cfg.xml using the default search path&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the default &amp;lt;with-defaults&amp;gt; behavior is 'explicit'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* notification replay is enabled with a buffer size of 1000 events and a maximum message burst per session of 10 notifications&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;hello&amp;gt; exchange timeout is 10 minutes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the session idle timeout is 1 hour&lt;br /&gt;
* the default session indent amount is 2 spaces&lt;br /&gt;
* the default session line-size is 72 characters&lt;br /&gt;
* violation of strict YANG XML ordering will not cause errors&lt;br /&gt;
* logging level 'info' is enabled and sent to STDOUT&lt;br /&gt;
&lt;br /&gt;
=== SSH Server ===&lt;br /&gt;
To start the NETCONF server, make sure that the '''sshd''' server is running, and the following configuration is included in '''/etc/ssh/sshd_config.'''&lt;br /&gt;
&lt;br /&gt;
 '''Port 22'''&lt;br /&gt;
 '''Port 830'''&lt;br /&gt;
 '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
The 'Subsystem' command may be different if '''netconf-subsystem''' has been installed in a different location than '''/usr/local/sbin'''. The 'Port 22' command is needed to make sure the SSH server will accept SSH sessions in addition to NETCONF sessions.&lt;br /&gt;
&lt;br /&gt;
=== NETCONF Server ===&lt;br /&gt;
For this example, the superuser account needs to be enabled. This is done with a CLI parameter, and the user name 'joe' is used. Replace 'joe' with your username.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the foreground:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ '''/usr/sbin/netconfd --superuser=joe'''&lt;br /&gt;
 Starting netconfd...&lt;br /&gt;
 Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
 Copyright (c) 2013-2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
 &lt;br /&gt;
 agt: Startup config loaded OK&lt;br /&gt;
      Source: /home/joe/.yuma/startup-cfg.xml&lt;br /&gt;
&lt;br /&gt;
 Running netconfd server (2.12-0)&lt;br /&gt;
&lt;br /&gt;
If no startup configuration is available, then the server defaults will be used instead. Any message about 'startup-cfg.xml' not found can be ignored. It just means the server booted with the factory default configuration.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the background:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe --log=~/mylog &amp;amp;&lt;br /&gt;
 joe@joesserver:~$&lt;br /&gt;
&lt;br /&gt;
This example shows that a logfile in the user's home directory called 'mylog' will be used for all server log messages. The '&amp;amp;' at the end causes the command to be run in the background.&lt;br /&gt;
&lt;br /&gt;
== Start the yangcli client ==&lt;br /&gt;
Once the NETCONF server is running, it will accept client sessions If running '''netconfd''' interactively on localhost, then start a new terminal window to continue.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the client will attempt to start sessions on TCP port 830&lt;br /&gt;
* the client will attempt to automatically complete partial commands&lt;br /&gt;
* the command line history will be automatically loaded upon startup, and saved upon exit&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the client will attempt to automatically load any YANG modules advertised in the server &amp;lt;hello&amp;gt; message&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the client will check before using invalid parameter values&lt;br /&gt;
* the plain display mode will be used, with 72 characters per line&lt;br /&gt;
* each nest level of displayed data will be indented 2 spaces &lt;br /&gt;
* the XML order of messages sent to the server will be corrected, as needed&lt;br /&gt;
* the logging level of 'info' is set, and log messages are sent to STDOUT&lt;br /&gt;
* the client will wait 30 seconds for responses&lt;br /&gt;
&lt;br /&gt;
=== Run yangcli ===&lt;br /&gt;
The yangcli program should be found in the PATH environment variable.&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ '''yangcli'''&lt;br /&gt;
&lt;br /&gt;
=== Startup Screen ===&lt;br /&gt;
The startup screen shows the following information:&lt;br /&gt;
&lt;br /&gt;
* program version and copyright&lt;br /&gt;
* tab key can be used for command and parameter completion&lt;br /&gt;
* basic help instructions&lt;br /&gt;
* basic statement instructions&lt;br /&gt;
&lt;br /&gt;
=== Command Line Editing ===&lt;br /&gt;
The command lines are stored in a history buffer.&lt;br /&gt;
&lt;br /&gt;
Any previous command line (except a password parameter line) can be recalled and used again.&lt;br /&gt;
&lt;br /&gt;
Any command in the command buffer (current or recalled) can be edited. The default key settings are aligned with the emacs editor. Refer to the [[Yuma yangcli Manual]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Escape Commands ===&lt;br /&gt;
Not all parameters need to be entered at one time. If yangcli needs more information, based on the initial command line, then 1 or more missing parameters will be requested, in sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to get help, skip a parameter, or even cancel the entire command during one of these sub-command modes, by using an escape command. This is a 1 or 2 character command, followed by the 'enter' key (as usual to end a command).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Escape Command Summary'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?s&lt;br /&gt;
| skip the current parameter&lt;br /&gt;
|-&lt;br /&gt;
| ?c&lt;br /&gt;
| cancel the current command&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| get help&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| get full help&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Using the '?s' command to skip a parameter may cause the &amp;lt;rpc&amp;gt; request to be invalid.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the setting of the '''--bad-data''' configuration parameter, this may or may not be allowed. The default setting is to warn and confirm. This configuration parameter also affects parameter values that are invalid according to the YANG module definition.&lt;br /&gt;
&lt;br /&gt;
== Getting Context Sensitive Help ==&lt;br /&gt;
The '''yangcli''' program provides context-sensitive help based on the current NETCONF session status and the set of YANG modules currently loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session is active, the set of modules advertised in the &amp;lt;hello&amp;gt; message by the server will be used to generate help text, if available. &amp;lt;/nowiki&amp;gt;The ''''mgrload'''' command can be used to force '''yangcli''' to use different or additional YANG modules.&lt;br /&gt;
&lt;br /&gt;
If the '''yangcli'''&amp;lt;nowiki&amp;gt; program does not have the advertised revision of a particular module available in the module search path, and the NETCONF server supports the standard &amp;lt;get-schema&amp;gt; operation, then the module will be retrieved from the server, and used just for that session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any features or deviations are advertised for a YANG module, then they will be applied to the modules used just for the current session. The help text and the error checking done for the module will be based on this 'patched' module, not the 'plain' module specified in the capability URI string.&lt;br /&gt;
&lt;br /&gt;
=== Tab Key for Command Completion ===&lt;br /&gt;
The 'tab' key can be used at any time to see a list of the possible completions that the command interpreter will accept. The list will be displayed for command names and some command parameters.&lt;br /&gt;
&lt;br /&gt;
When a NETCONF session is active, all the NETCONF operations will be available. Additional commands may also be available if the server advertised any YANG modules containing 'rpc' statements.&lt;br /&gt;
&lt;br /&gt;
=== The '?' and '??' Escape Sequences ===&lt;br /&gt;
If a partial command is entered, or if a data structure is being filled, then the help escape sequences are available to get help about that parameter or data node. Use one question mark for help, and two question marks for maximum help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Escape Sequences'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! sequence&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| Print some help text, but not description statements and some other information.&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| Print maximum help text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following example shows the help text for the 'user' parameter for the 'connect' operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''connect''' &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; '''? '''&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;leaf user [NcxUserName] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
       length: 1..63 &lt;br /&gt;
       &amp;lt;nowiki&amp;gt;pattern: [a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,62} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The type of object, its name, data type, and any restrictions, will be printed.&lt;br /&gt;
&lt;br /&gt;
After that, the previous prompt will be redisplayed.&lt;br /&gt;
&lt;br /&gt;
=== The 'help' Command ===&lt;br /&gt;
The '''help''' command can be used to display all kinds of information about the '''yangcli''' program and the YANG data module contents in use at the time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Command Variants'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help &amp;lt;comand-name&amp;gt;&amp;lt;/nowiki&amp;gt;help command  &amp;lt;nowiki&amp;gt;&amp;lt;command-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help for the specified yangcli command or YANG rpc statement.&lt;br /&gt;
|-&lt;br /&gt;
| help commands&lt;br /&gt;
| Display help text for all commands.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help object &amp;lt;object-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG database top-level object (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| help notification  &amp;lt;nowiki&amp;gt;&amp;lt;notification-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG notification event (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help type &amp;lt;type-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for an exported YANG data type (only if its module is available).&lt;br /&gt;
|}&lt;br /&gt;
Each of the help command variants also accepts a 'help-mode' parameter to control how much help text is displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Output Modes'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! mode&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| --brief&lt;br /&gt;
| Display minimal help text.&lt;br /&gt;
|-&lt;br /&gt;
| --normal&lt;br /&gt;
| Display a lot, but not always all the help text available (default mode).&lt;br /&gt;
|-&lt;br /&gt;
|  --full&lt;br /&gt;
| Display all available help text, including description statements.&lt;br /&gt;
|}&lt;br /&gt;
The following table shows some valid help commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| help help&lt;br /&gt;
| Get normal help for the help command.&lt;br /&gt;
|-&lt;br /&gt;
| help commands brief&lt;br /&gt;
| Get a 1 line description of each command.&lt;br /&gt;
|-&lt;br /&gt;
| help object system full&lt;br /&gt;
| Get all available help for the /system container and all its descendant nodes.&lt;br /&gt;
|-&lt;br /&gt;
| help type NcxIdentifier&lt;br /&gt;
| Get summary and description of the data type called 'NcxIdentifier'.&lt;br /&gt;
|-&lt;br /&gt;
| help notification sysSessionStart&lt;br /&gt;
| Get a summary of the 'sysSessionStart' notification, and each of objects in its payload.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Start a NETCONF session ==&lt;br /&gt;
Each yangcli program instance can run 1 NETCONF session at a time.&lt;br /&gt;
&lt;br /&gt;
If no session is currently active, then the prompt will contain just the program name, indicating that the 'connect' command is available:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== The connect Command ===&lt;br /&gt;
The 'connect' command is used to start a NETCONF session.&lt;br /&gt;
&lt;br /&gt;
There are 3 mandatory parameters for this command:&lt;br /&gt;
&lt;br /&gt;
* '''user''': the system (or SSH) user name to use&lt;br /&gt;
* '''server''': the IP address or DNS name of the NETCONF server to use&lt;br /&gt;
* '''password''': the password string to use&lt;br /&gt;
&lt;br /&gt;
Make sure you have a user name and password already configured on the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
If a partial command is given, then yangcli will prompt for any missing mandatory parameters. In this example, the complete command is given at once:&lt;br /&gt;
&lt;br /&gt;
 yangcli'''&amp;gt;''' '''connect server=localhost user=joe password=yangrocks'''&lt;br /&gt;
&lt;br /&gt;
After this command is entered, '''yangcli''' will generate some informational log messages to the screen.&lt;br /&gt;
&lt;br /&gt;
If the session is started successfully, a summary of the server session capabilities and available modules should be displayed. Also, the command prompt will change to indicate that a NETCONF session is currently active.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At this point any command supported by the server can be entered, in addition to any '''yangcli''' command (except 'connect').&lt;br /&gt;
&lt;br /&gt;
=== Fixing Connection Problems ===&lt;br /&gt;
If the session did not start correctly, check the error messages to fix the problem. Some common problems:&lt;br /&gt;
&lt;br /&gt;
* Make sure the '''netconfd''' program is running.&lt;br /&gt;
* Make sure the '''netconf-subsystem''' program is properly installed.&lt;br /&gt;
* Check if the SSH configuration contains the portion for NETCONF.&lt;br /&gt;
* If the SSH configuration looks correct, then try restarting the SSH server to make sure that configuration file is the one being used.&lt;br /&gt;
* If the SSH server seems to be running correctly, then check if any firewall or other security mechanism is blocking TCP port 830. If so, either enable TCP port 830, or enable port 22 on the NETCONF server (by restarting the server), and include 'port=22' in the 'connect' command parameters.&lt;br /&gt;
* If no firewall or other security measure is blocking TCP port 830, try to establish a normal SSH session with the server.&lt;br /&gt;
* If a normal SSH session works correctly, then check the log messages on the NETCONF server for more information.&lt;br /&gt;
&lt;br /&gt;
== Enable Notification Delivery ==&lt;br /&gt;
In order to receive the 'toastDone' notification event, a notification subscription has to be enabled.&lt;br /&gt;
&lt;br /&gt;
A default NETCONF notification stream can be started with the 'create-subscription' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''create-subscription'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on other activity within the NETCONF server, it is possible other notification events, such as 'sysSessionStart' or 'sysSessionEnd' will be generated. Notifications are displayed in their entirety, but not during 'rpc reply output'. If a command is being entered, the notification will be displayed, and then the command line restored.&lt;br /&gt;
&lt;br /&gt;
== Load the Toaster Module ==&lt;br /&gt;
The toaster module is not a core system module, and is not available automatically.&lt;br /&gt;
&lt;br /&gt;
The module has to be explicitly loaded by the NETCONF client.&lt;br /&gt;
&lt;br /&gt;
To load the server-supported version of the toaster module, use the 'load' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''load toaster'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Data Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    mod-revision 2009-11-20 &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:44:45Z &lt;br /&gt;
       sysCapabilityChange { &lt;br /&gt;
          changed-by { &lt;br /&gt;
             userName joe &lt;br /&gt;
             sessionId 1 &lt;br /&gt;
             remoteHost 127.0.0.1 &lt;br /&gt;
          } &lt;br /&gt;
          added-capability &lt;br /&gt;
           http://netconfcentral.com/ns/toaster?module=toaster&amp;amp;revision=2009-11-20 &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 3 &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the module was successfully loaded, then a data response will be sent, containing the revision date of the toaster module that was loaded. This response will be returned even if the module was already loaded.&lt;br /&gt;
&lt;br /&gt;
Note that the 'sysCapabilityChange' notification event will only be sent if the module has not already been loaded into the server. &amp;lt;nowiki&amp;gt;In this case, it was not advertised in the &amp;lt;hello&amp;gt; message for this session, and the toaster module needs to be loaded manually into yangcli with the 'mgrload' command:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''mgrload toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Load module 'toaster' OK&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable the Toaster ==&lt;br /&gt;
Try to make some toast, using the 'make-toast' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Error Reply 4 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    rpc-error { &lt;br /&gt;
       error-type protocol &lt;br /&gt;
       error-tag resource-denied &lt;br /&gt;
       error-severity error &lt;br /&gt;
       error-app-tag no-access &lt;br /&gt;
       error-message 'resource denied' &lt;br /&gt;
       error-info { &lt;br /&gt;
          error-number 269 &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
What happened?&lt;br /&gt;
&lt;br /&gt;
A 'resource-denied' error was returned instead of 'OK', because the toaster service is not enabled yet. A node has to be created in the NETCONF database before the 'make-toast' command can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lock the Databases ===&lt;br /&gt;
The first step is to lock the NETCONF databases for writing. Locks do not affect read operations.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has a high-level command to deal with locking, called 'get-locks'. It will handle retries for any missing locks, until an overall timeout occurs or all the locks needed are acquired.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' get-locks'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;lock&amp;gt; operations for get-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 get-locks finished OK &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the toaster Container ===&lt;br /&gt;
The toaster module uses a simple YANG 'presence' container to configure the toaster service.&lt;br /&gt;
&lt;br /&gt;
Once the /toaster container is created, the read-only nodes within that container will be maintained by the server, and the toaster service will be enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The first step is to create the /toaster node in the &amp;lt;candidate&amp;gt; configuration database:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' create /toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC OK Reply 5 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Now the /toaster node is created in the &amp;lt;candidate&amp;gt; database.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit the Database Changes ===&lt;br /&gt;
In order to activate these changes, the 'commit' command needs to be issued.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''commit'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 6 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:59:58Z &lt;br /&gt;
       sysConfigChange { &lt;br /&gt;
          userName joe &lt;br /&gt;
          sessionId 1 &lt;br /&gt;
          remoteHost 127.0.0.1 &lt;br /&gt;
          edit { &lt;br /&gt;
             target /toast:toaster &lt;br /&gt;
             operation create &lt;br /&gt;
          } &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 4 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
The 'RPC OK' message indicate that the server successfully commited the configuration.&lt;br /&gt;
&lt;br /&gt;
The 'sysConfigChange' notification indicates what was changed in the running configuration, and who made the change(s).&lt;br /&gt;
&lt;br /&gt;
The toaster server should now be enabled.&lt;br /&gt;
&lt;br /&gt;
=== Unlock the Databases ===&lt;br /&gt;
The database locks need to be released as soon as possible after the edits are completed or discarded.&lt;br /&gt;
&lt;br /&gt;
The high-level command 'release-locks' must be used if 'get-locks' was used to acquire the database locks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''release-locks '''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;unlock&amp;gt; operations for release-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the Toaster State Information ==&lt;br /&gt;
To discover the toaster model and its current status, the 'sget' or 'xget' commands can be used to retrieve just the toaster portion of the conceptual state data available on the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'sget' command is high-level subtree filter handler for the &amp;lt;get&amp;gt; operation:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''sget /toaster'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'xget' command is high-level XPath filter handler for the &amp;lt;get&amp;gt; operation. &amp;lt;/nowiki&amp;gt;It is only available if the NETCONF server supports the ''':xpath '''capability (like '''netconfd''').&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''xget /toaster'''&lt;br /&gt;
&lt;br /&gt;
Both commands should return the same data:&lt;br /&gt;
&lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC Data Reply 7 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    data { &lt;br /&gt;
       toaster { &lt;br /&gt;
          toasterManufacturer 'Acme, Inc.' &lt;br /&gt;
          toasterModelNumber 'Super Toastamatic 2000' &lt;br /&gt;
          toasterStatus up &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
This data shows that the 'Super Toastamatic 2000' is ready to make toast!&lt;br /&gt;
&lt;br /&gt;
== Start Making Toast ==&lt;br /&gt;
Now that the toaster is enabled, the 'make-toast' command should work.&lt;br /&gt;
&lt;br /&gt;
Instead of using the default parameter values, let's make a frozen waffle a little less done than normal:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 8 for session 1: &lt;br /&gt;
&lt;br /&gt;
At this point the toaster timer is running, and the simulated waffle is cooking,&lt;br /&gt;
&lt;br /&gt;
After about 40 seconds, the 'toastDone' notification should be received:&lt;br /&gt;
&lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:20:05Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus done &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 5 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was completed, and is ready to eat.&lt;br /&gt;
&lt;br /&gt;
== Stop Making Toast ==&lt;br /&gt;
What if you change your mind, and want wheat toast instead of a waffle?&lt;br /&gt;
&lt;br /&gt;
Repeat the previous command (Control-P should recall the previous command):&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 9 for session 1: &lt;br /&gt;
&lt;br /&gt;
Now enter the 'cancel-toast' command right away, before the waffle finishes:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''cancel-toast '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 10 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:24:36Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus cancelled &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 6 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was cancelled.&lt;br /&gt;
&lt;br /&gt;
== Close the NETCONF Session ==&lt;br /&gt;
To close the NETCONF session, use the 'close-session' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''close-session''' &lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 11 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 ses: session 1 shut by remote peer &lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the prompt returned to the default form, once the session was dropped by the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
The terminate the yangcli program, use the 'quit' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''quit '''&lt;br /&gt;
 &lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced Topics =&lt;br /&gt;
This section introduces some advanced features of the NETCONF protocol and YANG data modeling language.&lt;br /&gt;
&lt;br /&gt;
== Data Retrieval ==&lt;br /&gt;
=== Basic NETCONF Retrieval Operations ===&lt;br /&gt;
The NETCONF protocol has 2 different retrieval operations:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt;&amp;lt;/nowiki&amp;gt;''': get state data and the running configuration database.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt;&amp;lt;/nowiki&amp;gt;''': get just the specified configuration database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Each of these operations accepts a &amp;lt;filter&amp;gt; parameter, which has 2 forms:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''subtree filter:''' retrieve just the subtrees in the database that match the XML subtrees in the filter.&lt;br /&gt;
* '''XPath filter:''' retrieve just the subtrees that match the result node set produced by evaluating the specified XPath expression against the database. This mode cannot be used unless the ''':xpath''' capability must be advertised by the server.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program supports 3 different forms of each command:&lt;br /&gt;
&lt;br /&gt;
* '''plain''': plain NETCONF operation with user-supplied filter&lt;br /&gt;
* '''subtree'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter subtree XML.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* '''xpath'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter 'select' XML attribute&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Retrieval Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
! example&lt;br /&gt;
|-&lt;br /&gt;
| '''get'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get with-defaults=trim&lt;br /&gt;
|-&lt;br /&gt;
| '''get-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get-config&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get-config source=candidate&lt;br /&gt;
|-&lt;br /&gt;
| '''sget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget /system&lt;br /&gt;
|-&lt;br /&gt;
| '''sget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget-config source=running /nacm/rules &lt;br /&gt;
|-&lt;br /&gt;
| '''xget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| xget &amp;quot;/interfaces-state/interface/statistics&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''xget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;xget-config source=candidate &amp;quot;/interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The retrieval commands return an element named &amp;lt;data&amp;gt; containing the requested XML subtrees.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any identifier nodes (YANG key leafs) are needed to distinguish the data in the reply, they will be added as needed by the server. &amp;lt;nowiki&amp;gt;In the 'xget' example above, the &amp;lt;name&amp;gt; element for each interface would be returned, even though it was not directly requested by the XPath expression.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Default Value Filtering ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The data will also be filtered according to the defaults handling behavior of the server, unless the &amp;lt;with-defaults&amp;gt; parameter is added to the command. &amp;lt;/nowiki&amp;gt;This parameter is only supported if the server advertised the 'with-defaults' capability, If not, the client does not get any indication from the server what type of defaults filtering is being done (if any).&lt;br /&gt;
&lt;br /&gt;
There are 3 types of defaults filtering provided:&lt;br /&gt;
&lt;br /&gt;
* '''report-all''': no filtering -- return all nodes even those the server might normally suppress because they are considerer to be default values by the server.&lt;br /&gt;
* '''trim''': return all nodes except skip any leaf nodes that match the schema defined default value&lt;br /&gt;
* '''explicit''': return all nodes that were set by the client or the server to some value, even if the value happens to be the schema defined default. This is normally the default behavior for the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The defaults handling behavior can be changed just for a specific NETCONF session, using the &amp;lt;set-my-session&amp;gt; operation. &amp;lt;/nowiki&amp;gt;This is only available on the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' set-my-session with-defaults=report-all '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 12 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this example, the 'basic' behavior is changed from 'explicit' to 'report-all', but just for session 1. This setting is temporary, and will not be remembered when the session is terminated. &amp;lt;nowiki&amp;gt;If the &amp;lt;with-defaults&amp;gt; parameter is present, it will be used instead of this value.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Retrieval Operations ===&lt;br /&gt;
Any YANG module can add new operations with the 'rpc' statement.&lt;br /&gt;
&lt;br /&gt;
New retrieval operations may also be added which are associated with a protocol capability.&lt;br /&gt;
&lt;br /&gt;
Just like any other data model content, the operator (or application) needs to understand the YANG file definitions, including the description statements, to understand how each custom retrieval operation works.&lt;br /&gt;
&lt;br /&gt;
There are 2 custom retrieval operations supported by '''netconfd''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Special Retrieval Operations'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! operation&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| '''get-schema'''&lt;br /&gt;
| Retrieve the YANG or YIN source file for one of the modules advertised by the server.This is a standard operation defined in the '''ietf-netconf-monitoring''' module.&lt;br /&gt;
|-&lt;br /&gt;
| '''get-my-session'''&lt;br /&gt;
| Retrieve the customizable settings for my session. This is a proprietary operation defined in the '''yuma-my-session''' module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
Notifications are used in NETCONF to send server event information to the client application.&lt;br /&gt;
&lt;br /&gt;
A session must request notifications with the 'create-subscription' command.&lt;br /&gt;
&lt;br /&gt;
Notifications are grouped into 'streams', but only the 'NETCONF' stream is defined at this time.&lt;br /&gt;
&lt;br /&gt;
A notification subscription request specifies the stream name (and perhaps more parameters).&lt;br /&gt;
&lt;br /&gt;
A NETCONF session on the netconfd server will never expire due to inactivity, while a notification subscription is active. This allows notification processing applications to maintain long-lived connections without worrying about a NETCONF timeout. Note that the SSH server may also be configured to drop idle SSH sessions, whether a notification subscription is active or not.&lt;br /&gt;
&lt;br /&gt;
=== Notification Contents ===&lt;br /&gt;
[[Image:notification-structure.png]]&lt;br /&gt;
&lt;br /&gt;
The 'notification' element is sent from the server to the client, if an event occurs, and the client has created a notification subscription.&lt;br /&gt;
&lt;br /&gt;
The child nodes of this element comprise the notification content, and it is divided into 3 sections:&lt;br /&gt;
&lt;br /&gt;
# '''event generation time-stamp''': This standard NETCONF leaf is always the first child element within the notification element.&lt;br /&gt;
# '''event payload''': The module-specific event payload is represented as a container with the name of the notification. Any data nodes defined within the YANG notification statement appear (in order) as child nodes of the event type container.&lt;br /&gt;
# '''proprietary extensions''': Zero or more vendor-specific elements may appear after the event payload element. For example, the monotonically increasing 'sequence-id' element is added to each notification saved in the '''netconfd''' event log.&lt;br /&gt;
&lt;br /&gt;
=== Notification Replay ===&lt;br /&gt;
[[Image:notification-replay-buffer.png]]&lt;br /&gt;
&lt;br /&gt;
The NETCONF server will maintain an ordered buffer of saved notification events, if the :notification-replay capability is supported by the server. For the '''netconfd''' server, this is a configurable feature, set by the '''--eventlog-size''' parameter.&lt;br /&gt;
&lt;br /&gt;
The '''netconfd''' default is to save the most recent 1000 notification events.&lt;br /&gt;
&lt;br /&gt;
Only system events are saved and are available for retrieval. The 'replayComplete' and 'subscriptionComplete' events are session-specific events, and are therefore not saved in the replay buffer.&lt;br /&gt;
&lt;br /&gt;
The 'create-subscription' command has 2 parameters to request that stored notifications be delivered to the client session:&lt;br /&gt;
&lt;br /&gt;
* '''startTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred after this time are delivered.&lt;br /&gt;
* '''stopTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred before this time are delivered. This parameter can specify a time in the future. When that time has passed, the subscription will be terminated. The stopTime does not cause the server to wait that period of time to generate an event. If the stopTime is in the past, then the subscription will terminate after all the matching event timestamps in the replay buffer have been delivered.&lt;br /&gt;
&lt;br /&gt;
Notifications are delivered in the order they are stored. Each new '''netconfd''' notification contains a monotonically increasing sequence-id (unsigned integer). This can be used to help determine if any configured notification filters are working as expected.&lt;br /&gt;
&lt;br /&gt;
=== The interleave capability ===&lt;br /&gt;
The '''netconfd''' server supports the :interleave capability, which means that all commands (except create-subscription) will be accepted by the server. &amp;lt;nowiki&amp;gt;The client should expect &amp;lt;rpc-reply&amp;gt; and &amp;lt;notification&amp;gt; messages. &amp;lt;/nowiki&amp;gt;The server will always maintain proper message serialization. &amp;lt;nowiki&amp;gt;These messages will always be sent in their entirety, which may impact applications (e.g., a really long &amp;lt;get&amp;gt; response on the same session will delay notification delivery).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the NETCONF server does not support the :interleave capability, then it may only allow the &amp;lt;close-session&amp;gt; operation while the notification subscription is active. &amp;lt;/nowiki&amp;gt;In this case, a new NETCONF session is required to perform any management operations.&lt;br /&gt;
&lt;br /&gt;
This special mode is only applicable while a notification subscription is active. It is possible for a replay subscription to terminate, without terminating the session as well. In this case, the 'notificationComplete' event will be generated, and the session will return to accepting all possible operations.&lt;br /&gt;
&lt;br /&gt;
== Database Editing ==&lt;br /&gt;
NETCONF supports multiple conceptual configuration databases. Only the 'running' database is actually active. All other databases are scratch-pad databases, or some other special-purpose off-line database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Every NETCONF server must allow arbitrary partial (and concurrent) editing to its configuration with the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;Refer to the Yuma Tools User Manual for complete details on this NETCONF operation. The '''yangcli''' program has simplified editing commands, which are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;config&amp;gt; element within an &amp;lt;edit-config&amp;gt; PDU represents the 'root node' (/) in the path expression for each node in the conceptual database. &amp;lt;/nowiki&amp;gt;Each top-level YANG object that is supported and configured will be represented as child nodes to this root node. The conceptual database can be processed as an XML instance document with multiple top nodes (similar to XSLT rules).&lt;br /&gt;
&lt;br /&gt;
Database editing in NETCONF has several variants, but basically, it follows this simple procedure:&lt;br /&gt;
&lt;br /&gt;
# Lock the database(s) that will be affected.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Use &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; on the target database to make changes.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# Activate and save/commit the database edits.&lt;br /&gt;
# Unlock the database(s) that were previously locked.&lt;br /&gt;
&lt;br /&gt;
=== The Target Database ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Usually a NETCONF server supports the &amp;lt;edit-config&amp;gt; operation on only one database, which is either the candidate or the running database. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;This is called the 'target' database, which corresponds to the &amp;lt;target&amp;gt; parameter in the &amp;lt;edit-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the target database is the candidate configuration, then the &amp;lt;edit-config&amp;gt; operation does not always cause all possible database validation checking to be done by the server. &amp;lt;/nowiki&amp;gt;Since the candidate database is just a scratch-pad for (possibly) incremental edits, the server is not required to completely validate its contents. &amp;lt;nowiki&amp;gt;Instead, these 'final validation' tests are only required to be done when the &amp;lt;commit&amp;gt; operation is invoked.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program will automatically handle the target database management, based on the server capabilities reported each session, if the 'save' command is used. &amp;lt;nowiki&amp;gt;The manual procedure (&amp;lt;commit&amp;gt; and/or maybe &amp;lt;copy-config&amp;gt; operations) is also supported, but do not mix them within the same editing session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Database Locking ===&lt;br /&gt;
NETCONF supports database locking so a session can have exclusive write access to the configuration.&lt;br /&gt;
&lt;br /&gt;
These locks are intended to be short-lived, but there is no actual time limit on a lock. If the session terminates for any reason with any locks, they will be released automatically by the server.&lt;br /&gt;
&lt;br /&gt;
All the databases that are involved in the edit should be locked. This always includes the running database, and the candidate and startup databases, if they are supported by the server.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has 2 special commands to handle all locking:&lt;br /&gt;
&lt;br /&gt;
* '''get-locks''': Wait until all database locks have been acquired or the timeout occurs&lt;br /&gt;
* '''release-locks''': Rlease any locks that were obtained with get-locks&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on these commands.&lt;br /&gt;
&lt;br /&gt;
=== Non-Volatile Storage ===&lt;br /&gt;
The startup configuration is the conceptual database used on the next reboot of the NETCONF server. It is important to know whether the NETCONF server supports the :startup capability or not. &amp;lt;nowiki&amp;gt;If yes, then the operator must explicitly save the running database to non-volatile storage (the startup database), using the &amp;lt;copy-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;If no, then the server will keep the running and startup databases synchronized.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program has a high-level 'save' command, used after the editing operations, that will automatically issue the correct protocol operations to complete the edit, and save the changes in non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
The startup database is configurable in the '''netconfd''' server. The '''--with-startup''' configuration parameter controls whether the startup database will be used or not. The --startup parameter can be used to control the initial load of the running configuration in 3 different ways:&lt;br /&gt;
&lt;br /&gt;
# '''no startup''': skip this step and just use factory defaults&lt;br /&gt;
# '''default startup''': look for the default '''startup-cfg.xml''' file in the configured data path.&lt;br /&gt;
# '''specific startup''': use a specified file, either absolute file-spec, or a relative path in the configured data path&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on controlling non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
=== Editing Commands ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation should be used to make configuration changes. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;The &amp;lt;copy-config&amp;gt; operation can also be used, but this is a blunt hammer approach. &amp;lt;/nowiki&amp;gt;Although the '''netconfd''' server will always analyze the edit request and only affect the nodes that actually changed, this is not a requirement in the standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation allows the operator to have precise control of the server. &amp;lt;/nowiki&amp;gt;These database edits are performed by the server using a combination of 3 factors:&lt;br /&gt;
&lt;br /&gt;
# The nodes that currently exist in the target database.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The nodes that exist in the 'source' of the edits (either the inline &amp;lt;config&amp;gt; element or indirectly through the &amp;lt;url&amp;gt; element.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The &amp;lt;default-operation&amp;gt; parameter and any XML attributes in the source XML elements (nc:operation attribute and YANG insert operation attributes).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli'''&amp;lt;nowiki&amp;gt; program provides some high-level commands to automatically handle the complexity of the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;These commands use XPath expressions and a series of interactive prompts (e.g., for the mandatory nodes and key leafs) to fill in the specified data structures, and construct an optimized NETCONF message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Editing Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;command&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;description&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| create&lt;br /&gt;
| Create a new sub-tree, only if it does not already exist&lt;br /&gt;
|-&lt;br /&gt;
| delete&lt;br /&gt;
| Delete an existing sub-tree, only if it exists&lt;br /&gt;
|-&lt;br /&gt;
| merge&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, keeping any existing nodes that are not explicitly contained in the source.&lt;br /&gt;
|-&lt;br /&gt;
| replace&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, deleting any existing nodes that are not explicitly contained in the source. &amp;lt;nowiki&amp;gt;This is the mode used for the &amp;lt;copy-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| insert&lt;br /&gt;
| Insert or move a YANG list or leaf-list entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for details on these commands.&lt;br /&gt;
&lt;br /&gt;
== Access Control ==&lt;br /&gt;
The '''netconfd''' server can be configured to give precise access rights to each user (the SSH user name associated with the NETCONF session). Some important points to remember about access control:&lt;br /&gt;
&lt;br /&gt;
* There are 3 types of access -- read, write, and execute.&lt;br /&gt;
* If a user does not have read access to some data, then it is silently omitted from the reply.&lt;br /&gt;
* The 'access-denied' error is not generated for read requests. &amp;lt;nowiki&amp;gt;It is only generated for write requests to the database, or &amp;lt;rpc&amp;gt; operation execution requests.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* An access request results in 1 of 2 outcomes: permit or deny&lt;br /&gt;
* The server resolves the access request by searching the access control rules. Either an explicit rule will apply, or the default access rights will be checked if no rule is found.&lt;br /&gt;
* The default access rights are configurable, but usually set as follows:&lt;br /&gt;
** read access is permitted&lt;br /&gt;
** write access is denied&lt;br /&gt;
** exec access is permitted&lt;br /&gt;
* The '''nacm:secure''' and '''nacm:very-secure''' extensions can be used by the YANG module author to override the default access rights, and deny access instead. &amp;lt;nowiki&amp;gt;For example, the &amp;lt;reboot&amp;gt; operation is not permitted by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* There is a configurable 'superuser' user name. If desired, a specific user name will be considered the 'super user' and all access control will be bypassed for this user. By default, this is the name 'superuser', not 'root', since root login to the SSH server is not recommended.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
The '''yangcli''' program supports variables for easier reuse and script-based operations.&lt;br /&gt;
&lt;br /&gt;
There are 2 types of variables:&lt;br /&gt;
&lt;br /&gt;
* '''file variables''': the variable name is a file name, and the contents of the variable are stored in this file.&lt;br /&gt;
* '''internal variables''': the variable name is just an internal identifier, and the contents of the variable are stored in memory&lt;br /&gt;
&lt;br /&gt;
Variables are set with assignment statements. Here are some examples:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$backup = get-config source=running'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$bad-data = &amp;quot;warn&amp;quot;'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; $itf = &amp;quot;//interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Note that in order to assign a string value (e.g., $$bad-data = &amp;quot;warn&amp;quot; above), single or double quotes must be used. An unquoted string will be interpreted as a command name, not a simple string value.&lt;br /&gt;
&lt;br /&gt;
Variables are referenced in a similar manner, except the variable is on the right-hand side of the equation. These commands are equivalent in this example:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' @myfile.xml = xget select=$itf'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; @myfile.xml = xget //interface[name='eth0']&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Complex variable substitution is also supported:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' copy-config source=$$backup target=candidate'''&lt;br /&gt;
&lt;br /&gt;
Note that '''yangcli''' will attempt to figure out the structure of the parameter (e.g., 'source' and 'target' above), and adjust the NETCONF operation content. In the example above, since 'source' and 'target' are choices, the real nodes within the cases are examined, and the most appropriate case is selected. &amp;lt;nowiki&amp;gt;The 'source' parameter will contain an in-line &amp;lt;config&amp;gt; element with all the child nodes in the &amp;lt;/nowiki&amp;gt;'''$$backup''' variable, and the target parameter will contain an empty element named '''&amp;lt;nowiki&amp;gt;&amp;lt;candidate&amp;gt;.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several types of internal variables available in the '''yangcli''' program:&lt;br /&gt;
&lt;br /&gt;
* read-only system variables ($$USER)&lt;br /&gt;
* read-write system variables ($$default-operation)&lt;br /&gt;
* global user variables, available at all 'runstack' levels ($$backup)&lt;br /&gt;
* local user variables available in the current 'runstack' level only ($itf)&lt;br /&gt;
&lt;br /&gt;
The command 'show vars' can be used to see the current value of all program variables:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''show vars '''&lt;br /&gt;
CLI Variables&lt;br /&gt;
&lt;br /&gt;
yangcli {&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  feature-enable-default true&lt;br /&gt;
  fixorder true&lt;br /&gt;
  force-target candidate&lt;br /&gt;
  indent 2&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  ncport 830&lt;br /&gt;
  password ****&lt;br /&gt;
  private-key /home/joe/.ssh/id_rsa&lt;br /&gt;
  public-key /home/joe/.ssh/id_rsa.pub&lt;br /&gt;
  server localhost&lt;br /&gt;
  subdirs true&lt;br /&gt;
  tcp-direct-enable false&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  transport ssh&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  warn-idlen 64&lt;br /&gt;
  warn-linelen 0&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Read-only environment variables&lt;br /&gt;
&lt;br /&gt;
  HOME /home/joe&lt;br /&gt;
  HOSTNAME &lt;br /&gt;
  LANG en_US.utf8&lt;br /&gt;
  PWD /home/joe&lt;br /&gt;
  SHELL /bin/bash&lt;br /&gt;
  USER joe&lt;br /&gt;
  YUMA_DATAPATH &lt;br /&gt;
  YUMA_HOME &lt;br /&gt;
  YUMA_MODPATH &lt;br /&gt;
  YUMA_RUNPATH &lt;br /&gt;
&lt;br /&gt;
Read-write system variables&lt;br /&gt;
&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  default-module &lt;br /&gt;
  default-operation merge&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  error-option none&lt;br /&gt;
  fixorder true&lt;br /&gt;
  indent 2&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  optional false&lt;br /&gt;
  server localhost&lt;br /&gt;
  test-option set&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  with-defaults none&lt;br /&gt;
&lt;br /&gt;
Global variables&lt;br /&gt;
&lt;br /&gt;
  backup {&lt;br /&gt;
    interfaces &lt;br /&gt;
    nacm &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Local variables&lt;br /&gt;
&lt;br /&gt;
  itf //interface[name='eth0']&lt;br /&gt;
yangcli joe@localhost&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
Scripts are simply a collection of '''yangcli''' commands and/or assignment statements that are stored in a text file, instead of typed directly. Scripts can call other scripts (except loops are not allowed), and numbered parameters are available (e.g., --P1='fred' passed as parameter, the $1 expands to 'fred' inside the script).&lt;br /&gt;
&lt;br /&gt;
The '''$YUMA_RUNPATH''' environment variable, or the '''--runpath''' configuration variable, can be used to set the directory path to look for script files. There is also a default path for finding files, explained in the Yuma Tools User Manual.&lt;br /&gt;
&lt;br /&gt;
The command ''''list scripts'''' can be used to show the potential script file available in the run path.&lt;br /&gt;
&lt;br /&gt;
The command ''''run foo'''' is used to invoke a script named 'foo' (with no file extension).&lt;br /&gt;
&lt;br /&gt;
If a command fails during a script, execution is halted right away and no more commands in the script are executed. If 'get-locks' was used, then any locks obtained will be automatically released. All script runstack levels will be canceled, not just the current script.&lt;br /&gt;
&lt;br /&gt;
Script syntax will be expanded in a future release to provide loops and conditional statements.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=384</id>
		<title>Yuma Quickstart Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=384"/>
		<updated>2019-05-02T11:42:20Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* NETCONF Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Quickstart Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Client/Server Quickstart Guide&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 - 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 - 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
This document assumes you have successfully set up the software as described in the printed document:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the [[Yuma User Manual]] for a complete introduction to Yuma Tools.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma Tools programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma Tools NETCONF client and server programs. It covers the basic usage of the '''yangcli''' client application and the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
== What is NETCONF and YANG? ==&lt;br /&gt;
The Yuma Tools suite provides automated support for development and usage of network management information. Information is exchanged in XML encoding within a session between a client and a server.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;Network Configuration Protocol&amp;quot; (NETCONF) is used to provide the management sessions, operations, and database framework available on the server. The operations, notifications, and the database contents supported by a particular NETCONF server are extensible, and defined with a modular and easy-to-learn language called YANG. The database is used to contain YANG data structures which represent the configuration of the device containing the NETCONF server. This configuration can be saved in non-volatile storage so the configuration can be restored upon reboot.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;YANG Data Modeling Language&amp;quot; is used to define the syntax and semantics of the NETCONF operations, notification events, and database content. Machine and human readable semantics and constraints are used by YANG tools (including Yuma Tools) to automate behavior within the NETCONF protocol for clients and servers.&lt;br /&gt;
&lt;br /&gt;
For people familiar with SNMP and SMIv2, NETCONF is like an XML-based, high-level version of SNMP, and a YANG module is like a MIB module, except MIB tables can be nested and much more complex than in SMIv2. Instead of Enterprise IDs and OBJECT-IDENTIFIERs, YANG uses XML namespaces and XPath path expressions to identify module ownership and contents within the protocol PDUs.&lt;br /&gt;
&lt;br /&gt;
== How Does an Operator Use NETCONF and YANG? ==&lt;br /&gt;
An operator uses a NETCONF session almost like it was a CLI session, except there are structured, schema-defined requests and responses, encoded in XML. YANG modules are like MIB modules for CLI content. Instead of ad-hoc unstructured documentation like CLI, NETCONF uses a data definition language to define management modules. The actual modules that a server supports will vary, just like MIB (SMIv2) modules.&lt;br /&gt;
&lt;br /&gt;
The NETCONF protocol is available for many different transports. The most popular is the SSH2 protocol. The 'netconf' subsystem is used (on TCP port 830) to start a special SSH session with the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
Using NETCONF over SSH is just like using CLI over SSH to manage a networking device, except the messages are exchanged in XML, not plain-text. SSH user names and passwords are used for session authentication and authorization.&lt;br /&gt;
&lt;br /&gt;
NETCONF is designed to provide a programmatic interface, so it is usually used with a management application, instead of a direct (raw) SSH terminal application. The '''yangcli''' program within Yuma Tools is a YANG-driven NETCONF client application that supports scripts, XPath, and many automated features to simplify management of NETCONF servers.&lt;br /&gt;
&lt;br /&gt;
Once a session is started, similar to a CLI session, the operator issues commands (NETCONF operations) to the server, and the server performs each requested operation in order, and returns a status message and/or some data to the client. &amp;lt;nowiki&amp;gt;Notifications can also be received, if the session has requested them with the &amp;lt;create-subscription&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session starts, a &amp;lt;hello&amp;gt; message is sent by the server that has all the NETCONF capabilities and YANG modules supported by the server. &amp;lt;/nowiki&amp;gt;Capabilities are optional protocol mechanisms, beyond those defined in the base protocol (RFC 4741, RFC 6241). &amp;lt;nowiki&amp;gt;The client application knows what operations, notification events, and database contents are supported on the server, based on the information in the &amp;lt;hello&amp;gt; message.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NETCONF has a set of basic database (CRUD) operations for managing the configuration database. In addition, any YANG module can define new protocol operations and notification events.&lt;br /&gt;
&lt;br /&gt;
== How Does a Developer Use NETCONF and YANG? ==&lt;br /&gt;
A NETCONF server developer decides what modules need to be supported by the NETCONF server, and implements the device instrumentation code for those modules.&lt;br /&gt;
&lt;br /&gt;
Much of the NETCONF protocol related code is handled by the NETCONF stack, based on the YANG module contents. Therefore, the most important task for a developer is designing a good YANG module.&lt;br /&gt;
&lt;br /&gt;
After the YANG module is written, the device instrumentation code for the YANG module is then added by the developer. The code uses the Yuma API to register callbacks and access the YANG database. The 'callback code' is called from the NETCONF stack when database operation requests for the object(s) in the YANG module are received by the server.&lt;br /&gt;
&lt;br /&gt;
Once this library is completed, the YANG module and its binary server instrumentation library (SIL) can be loaded into the NETCONF server at run-time. There is no need to recompile the '''netconfd''' server, or even reboot it.&lt;br /&gt;
&lt;br /&gt;
= Getting Started with toaster.yang =&lt;br /&gt;
This section will demonstrate the basic operation of Yuma Tools to use a NETCONF session to manage a remote device with a YANG data model. The Yuma Tools programs and libraries must already be installed. Refer to the Yuma Tools Installation Guide if this has not yet been done.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' client program and '''netconfd''' server program do not need to be installed on the same machine. For simplicity, the server address 'localhost' is used in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is libtoaster? ==&lt;br /&gt;
There is a sample server instrumentation library (SIL) included, named libtoaster. [https://sourceforge.net/p/yuma123/git/ci/master/tree/libtoaster/src/toaster.c toaster.c] is the module-specific server instrumentation code for the management data defined in [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/netconfcentral/toaster.yang toaster.yang ]. This is based on the original TOASTER-MIB by Epilogue. This YANG module provides simple operations to make toast, and some simple NETCONF database objects to enable and monitor the toaster.&lt;br /&gt;
&lt;br /&gt;
The new YANG version of the TOASTER-MIB is different is some ways:&lt;br /&gt;
&lt;br /&gt;
* extensible YANG identities are used to identify the bread type, instead of a hard-wired enumerated list.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;protocol operations (&amp;lt;make-toast&amp;gt; and &amp;lt;cancel-toast&amp;gt;) are used instead of an 'up/down' switch within the database. &amp;lt;/nowiki&amp;gt;NETCONF databases are intended to contain persistent data structures, and 'actions' such as starting or stopping the toaster are done with new protocol operations, instead of editing the database with the standard operations.&lt;br /&gt;
* A simple configuration 'presence container' object is used to enable and disable the toaster service, instead of hard-wiring the toaster service availability.&lt;br /&gt;
* A notification is generated when the toast is done or canceled. This notification can be used instead of polling the toaster status object.&lt;br /&gt;
&lt;br /&gt;
== Other examples: ietf-interfaces and ietf-system ==&lt;br /&gt;
The partial SIL implementations of the stadard ietf-system.yang and ietf-interfaces.yang models are included as examples and should work out of the box for standard Linux distributions.&lt;br /&gt;
&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-interfaces.yang ietf-interfaces.yang ] ([https://tools.ietf.org/rfc/rfc7223.txt rfc7223]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-interfaces/ietf-interfaces.c ietf-interfaces.c]&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-system.yang ietf-system.yang] ([https://tools.ietf.org/rfc/rfc7317.txt rfc7317]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-system/ietf-system.c ietf-system.c]&lt;br /&gt;
&lt;br /&gt;
One can start (provided you have already compiled installed and configured netconfd and the modules) netconfd and load the YANG models with the installed SIL implementations like this:&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/netconfd --module=ietf-system --module=ietf-interfaces&lt;br /&gt;
&lt;br /&gt;
== Start the netconfd server ==&lt;br /&gt;
If the '''netconfd''' server is already running, then skip this section.&lt;br /&gt;
&lt;br /&gt;
Details for all the '''netconfd''' configuration parameters can be found in the [[Yuma netconfd Manual]].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the server will accept sessions on TCP port 830&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the target database is &amp;lt;candidate&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;no &amp;lt;startup&amp;gt; database (mirrored NV-save)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;validate&amp;gt; operation is supported&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the access control mode is 'enforcing'&lt;br /&gt;
* the super user account name is 'superuser'&lt;br /&gt;
* the server will search startup-cfg.xml using the default search path&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the default &amp;lt;with-defaults&amp;gt; behavior is 'explicit'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* notification replay is enabled with a buffer size of 1000 events and a maximum message burst per session of 10 notifications&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;hello&amp;gt; exchange timeout is 10 minutes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the session idle timeout is 1 hour&lt;br /&gt;
* the default session indent amount is 2 spaces&lt;br /&gt;
* the default session line-size is 72 characters&lt;br /&gt;
* violation of strict YANG XML ordering will not cause errors&lt;br /&gt;
* logging level 'info' is enabled and sent to STDOUT&lt;br /&gt;
&lt;br /&gt;
=== SSH Server ===&lt;br /&gt;
To start the NETCONF server, make sure that the '''sshd''' server is running, and the following configuration is included in '''/etc/ssh/sshd_config.'''&lt;br /&gt;
&lt;br /&gt;
 '''Port 22'''&lt;br /&gt;
 '''Port 830'''&lt;br /&gt;
 '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
The 'Subsystem' command may be different if '''netconf-subsystem''' has been installed in a different location than '''/usr/local/sbin'''. The 'Port 22' command is needed to make sure the SSH server will accept SSH sessions in addition to NETCONF sessions.&lt;br /&gt;
&lt;br /&gt;
=== NETCONF Server ===&lt;br /&gt;
For this example, the superuser account needs to be enabled. This is done with a CLI parameter, and the user name 'joe' is used. Replace 'joe' with your username.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the foreground:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ ''''/usr/sbin/netconfd --superuser=joe'''&lt;br /&gt;
 Starting netconfd...&lt;br /&gt;
 Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
 Copyright (c) 2013-2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
 &lt;br /&gt;
 agt: Startup config loaded OK&lt;br /&gt;
      Source: /home/joe/.yuma/startup-cfg.xml&lt;br /&gt;
&lt;br /&gt;
 Running netconfd server (2.12-0)&lt;br /&gt;
&lt;br /&gt;
If no startup configuration is available, then the server defaults will be used instead. Any message about 'startup-cfg.xml' not found can be ignored. It just means the server booted with the factory default configuration.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the background:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe --log=~/mylog &amp;amp;&lt;br /&gt;
 joe@joesserver:~$&lt;br /&gt;
&lt;br /&gt;
This example shows that a logfile in the user's home directory called 'mylog' will be used for all server log messages. The '&amp;amp;' at the end causes the command to be run in the background.&lt;br /&gt;
&lt;br /&gt;
== Start the yangcli client ==&lt;br /&gt;
Once the NETCONF server is running, it will accept client sessions If running '''netconfd''' interactively on localhost, then start a new terminal window to continue.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the client will attempt to start sessions on TCP port 830&lt;br /&gt;
* the client will attempt to automatically complete partial commands&lt;br /&gt;
* the command line history will be automatically loaded upon startup, and saved upon exit&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the client will attempt to automatically load any YANG modules advertised in the server &amp;lt;hello&amp;gt; message&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the client will check before using invalid parameter values&lt;br /&gt;
* the plain display mode will be used, with 72 characters per line&lt;br /&gt;
* each nest level of displayed data will be indented 2 spaces &lt;br /&gt;
* the XML order of messages sent to the server will be corrected, as needed&lt;br /&gt;
* the logging level of 'info' is set, and log messages are sent to STDOUT&lt;br /&gt;
* the client will wait 30 seconds for responses&lt;br /&gt;
&lt;br /&gt;
=== Run yangcli ===&lt;br /&gt;
The yangcli program should be found in the PATH environment variable.&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ '''yangcli'''&lt;br /&gt;
&lt;br /&gt;
=== Startup Screen ===&lt;br /&gt;
The startup screen shows the following information:&lt;br /&gt;
&lt;br /&gt;
* program version and copyright&lt;br /&gt;
* tab key can be used for command and parameter completion&lt;br /&gt;
* basic help instructions&lt;br /&gt;
* basic statement instructions&lt;br /&gt;
&lt;br /&gt;
=== Command Line Editing ===&lt;br /&gt;
The command lines are stored in a history buffer.&lt;br /&gt;
&lt;br /&gt;
Any previous command line (except a password parameter line) can be recalled and used again.&lt;br /&gt;
&lt;br /&gt;
Any command in the command buffer (current or recalled) can be edited. The default key settings are aligned with the emacs editor. Refer to the [[Yuma yangcli Manual]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Escape Commands ===&lt;br /&gt;
Not all parameters need to be entered at one time. If yangcli needs more information, based on the initial command line, then 1 or more missing parameters will be requested, in sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to get help, skip a parameter, or even cancel the entire command during one of these sub-command modes, by using an escape command. This is a 1 or 2 character command, followed by the 'enter' key (as usual to end a command).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Escape Command Summary'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?s&lt;br /&gt;
| skip the current parameter&lt;br /&gt;
|-&lt;br /&gt;
| ?c&lt;br /&gt;
| cancel the current command&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| get help&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| get full help&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Using the '?s' command to skip a parameter may cause the &amp;lt;rpc&amp;gt; request to be invalid.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the setting of the '''--bad-data''' configuration parameter, this may or may not be allowed. The default setting is to warn and confirm. This configuration parameter also affects parameter values that are invalid according to the YANG module definition.&lt;br /&gt;
&lt;br /&gt;
== Getting Context Sensitive Help ==&lt;br /&gt;
The '''yangcli''' program provides context-sensitive help based on the current NETCONF session status and the set of YANG modules currently loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session is active, the set of modules advertised in the &amp;lt;hello&amp;gt; message by the server will be used to generate help text, if available. &amp;lt;/nowiki&amp;gt;The ''''mgrload'''' command can be used to force '''yangcli''' to use different or additional YANG modules.&lt;br /&gt;
&lt;br /&gt;
If the '''yangcli'''&amp;lt;nowiki&amp;gt; program does not have the advertised revision of a particular module available in the module search path, and the NETCONF server supports the standard &amp;lt;get-schema&amp;gt; operation, then the module will be retrieved from the server, and used just for that session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any features or deviations are advertised for a YANG module, then they will be applied to the modules used just for the current session. The help text and the error checking done for the module will be based on this 'patched' module, not the 'plain' module specified in the capability URI string.&lt;br /&gt;
&lt;br /&gt;
=== Tab Key for Command Completion ===&lt;br /&gt;
The 'tab' key can be used at any time to see a list of the possible completions that the command interpreter will accept. The list will be displayed for command names and some command parameters.&lt;br /&gt;
&lt;br /&gt;
When a NETCONF session is active, all the NETCONF operations will be available. Additional commands may also be available if the server advertised any YANG modules containing 'rpc' statements.&lt;br /&gt;
&lt;br /&gt;
=== The '?' and '??' Escape Sequences ===&lt;br /&gt;
If a partial command is entered, or if a data structure is being filled, then the help escape sequences are available to get help about that parameter or data node. Use one question mark for help, and two question marks for maximum help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Escape Sequences'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! sequence&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| Print some help text, but not description statements and some other information.&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| Print maximum help text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following example shows the help text for the 'user' parameter for the 'connect' operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''connect''' &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; '''? '''&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;leaf user [NcxUserName] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
       length: 1..63 &lt;br /&gt;
       &amp;lt;nowiki&amp;gt;pattern: [a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,62} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The type of object, its name, data type, and any restrictions, will be printed.&lt;br /&gt;
&lt;br /&gt;
After that, the previous prompt will be redisplayed.&lt;br /&gt;
&lt;br /&gt;
=== The 'help' Command ===&lt;br /&gt;
The '''help''' command can be used to display all kinds of information about the '''yangcli''' program and the YANG data module contents in use at the time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Command Variants'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help &amp;lt;comand-name&amp;gt;&amp;lt;/nowiki&amp;gt;help command  &amp;lt;nowiki&amp;gt;&amp;lt;command-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help for the specified yangcli command or YANG rpc statement.&lt;br /&gt;
|-&lt;br /&gt;
| help commands&lt;br /&gt;
| Display help text for all commands.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help object &amp;lt;object-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG database top-level object (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| help notification  &amp;lt;nowiki&amp;gt;&amp;lt;notification-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG notification event (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help type &amp;lt;type-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for an exported YANG data type (only if its module is available).&lt;br /&gt;
|}&lt;br /&gt;
Each of the help command variants also accepts a 'help-mode' parameter to control how much help text is displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Output Modes'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! mode&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| --brief&lt;br /&gt;
| Display minimal help text.&lt;br /&gt;
|-&lt;br /&gt;
| --normal&lt;br /&gt;
| Display a lot, but not always all the help text available (default mode).&lt;br /&gt;
|-&lt;br /&gt;
|  --full&lt;br /&gt;
| Display all available help text, including description statements.&lt;br /&gt;
|}&lt;br /&gt;
The following table shows some valid help commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| help help&lt;br /&gt;
| Get normal help for the help command.&lt;br /&gt;
|-&lt;br /&gt;
| help commands brief&lt;br /&gt;
| Get a 1 line description of each command.&lt;br /&gt;
|-&lt;br /&gt;
| help object system full&lt;br /&gt;
| Get all available help for the /system container and all its descendant nodes.&lt;br /&gt;
|-&lt;br /&gt;
| help type NcxIdentifier&lt;br /&gt;
| Get summary and description of the data type called 'NcxIdentifier'.&lt;br /&gt;
|-&lt;br /&gt;
| help notification sysSessionStart&lt;br /&gt;
| Get a summary of the 'sysSessionStart' notification, and each of objects in its payload.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Start a NETCONF session ==&lt;br /&gt;
Each yangcli program instance can run 1 NETCONF session at a time.&lt;br /&gt;
&lt;br /&gt;
If no session is currently active, then the prompt will contain just the program name, indicating that the 'connect' command is available:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== The connect Command ===&lt;br /&gt;
The 'connect' command is used to start a NETCONF session.&lt;br /&gt;
&lt;br /&gt;
There are 3 mandatory parameters for this command:&lt;br /&gt;
&lt;br /&gt;
* '''user''': the system (or SSH) user name to use&lt;br /&gt;
* '''server''': the IP address or DNS name of the NETCONF server to use&lt;br /&gt;
* '''password''': the password string to use&lt;br /&gt;
&lt;br /&gt;
Make sure you have a user name and password already configured on the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
If a partial command is given, then yangcli will prompt for any missing mandatory parameters. In this example, the complete command is given at once:&lt;br /&gt;
&lt;br /&gt;
 yangcli'''&amp;gt;''' '''connect server=localhost user=joe password=yangrocks'''&lt;br /&gt;
&lt;br /&gt;
After this command is entered, '''yangcli''' will generate some informational log messages to the screen.&lt;br /&gt;
&lt;br /&gt;
If the session is started successfully, a summary of the server session capabilities and available modules should be displayed. Also, the command prompt will change to indicate that a NETCONF session is currently active.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At this point any command supported by the server can be entered, in addition to any '''yangcli''' command (except 'connect').&lt;br /&gt;
&lt;br /&gt;
=== Fixing Connection Problems ===&lt;br /&gt;
If the session did not start correctly, check the error messages to fix the problem. Some common problems:&lt;br /&gt;
&lt;br /&gt;
* Make sure the '''netconfd''' program is running.&lt;br /&gt;
* Make sure the '''netconf-subsystem''' program is properly installed.&lt;br /&gt;
* Check if the SSH configuration contains the portion for NETCONF.&lt;br /&gt;
* If the SSH configuration looks correct, then try restarting the SSH server to make sure that configuration file is the one being used.&lt;br /&gt;
* If the SSH server seems to be running correctly, then check if any firewall or other security mechanism is blocking TCP port 830. If so, either enable TCP port 830, or enable port 22 on the NETCONF server (by restarting the server), and include 'port=22' in the 'connect' command parameters.&lt;br /&gt;
* If no firewall or other security measure is blocking TCP port 830, try to establish a normal SSH session with the server.&lt;br /&gt;
* If a normal SSH session works correctly, then check the log messages on the NETCONF server for more information.&lt;br /&gt;
&lt;br /&gt;
== Enable Notification Delivery ==&lt;br /&gt;
In order to receive the 'toastDone' notification event, a notification subscription has to be enabled.&lt;br /&gt;
&lt;br /&gt;
A default NETCONF notification stream can be started with the 'create-subscription' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''create-subscription'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on other activity within the NETCONF server, it is possible other notification events, such as 'sysSessionStart' or 'sysSessionEnd' will be generated. Notifications are displayed in their entirety, but not during 'rpc reply output'. If a command is being entered, the notification will be displayed, and then the command line restored.&lt;br /&gt;
&lt;br /&gt;
== Load the Toaster Module ==&lt;br /&gt;
The toaster module is not a core system module, and is not available automatically.&lt;br /&gt;
&lt;br /&gt;
The module has to be explicitly loaded by the NETCONF client.&lt;br /&gt;
&lt;br /&gt;
To load the server-supported version of the toaster module, use the 'load' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''load toaster'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Data Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    mod-revision 2009-11-20 &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:44:45Z &lt;br /&gt;
       sysCapabilityChange { &lt;br /&gt;
          changed-by { &lt;br /&gt;
             userName joe &lt;br /&gt;
             sessionId 1 &lt;br /&gt;
             remoteHost 127.0.0.1 &lt;br /&gt;
          } &lt;br /&gt;
          added-capability &lt;br /&gt;
           http://netconfcentral.com/ns/toaster?module=toaster&amp;amp;revision=2009-11-20 &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 3 &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the module was successfully loaded, then a data response will be sent, containing the revision date of the toaster module that was loaded. This response will be returned even if the module was already loaded.&lt;br /&gt;
&lt;br /&gt;
Note that the 'sysCapabilityChange' notification event will only be sent if the module has not already been loaded into the server. &amp;lt;nowiki&amp;gt;In this case, it was not advertised in the &amp;lt;hello&amp;gt; message for this session, and the toaster module needs to be loaded manually into yangcli with the 'mgrload' command:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''mgrload toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Load module 'toaster' OK&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable the Toaster ==&lt;br /&gt;
Try to make some toast, using the 'make-toast' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Error Reply 4 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    rpc-error { &lt;br /&gt;
       error-type protocol &lt;br /&gt;
       error-tag resource-denied &lt;br /&gt;
       error-severity error &lt;br /&gt;
       error-app-tag no-access &lt;br /&gt;
       error-message 'resource denied' &lt;br /&gt;
       error-info { &lt;br /&gt;
          error-number 269 &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
What happened?&lt;br /&gt;
&lt;br /&gt;
A 'resource-denied' error was returned instead of 'OK', because the toaster service is not enabled yet. A node has to be created in the NETCONF database before the 'make-toast' command can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lock the Databases ===&lt;br /&gt;
The first step is to lock the NETCONF databases for writing. Locks do not affect read operations.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has a high-level command to deal with locking, called 'get-locks'. It will handle retries for any missing locks, until an overall timeout occurs or all the locks needed are acquired.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' get-locks'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;lock&amp;gt; operations for get-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 get-locks finished OK &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the toaster Container ===&lt;br /&gt;
The toaster module uses a simple YANG 'presence' container to configure the toaster service.&lt;br /&gt;
&lt;br /&gt;
Once the /toaster container is created, the read-only nodes within that container will be maintained by the server, and the toaster service will be enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The first step is to create the /toaster node in the &amp;lt;candidate&amp;gt; configuration database:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' create /toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC OK Reply 5 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Now the /toaster node is created in the &amp;lt;candidate&amp;gt; database.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit the Database Changes ===&lt;br /&gt;
In order to activate these changes, the 'commit' command needs to be issued.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''commit'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 6 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:59:58Z &lt;br /&gt;
       sysConfigChange { &lt;br /&gt;
          userName joe &lt;br /&gt;
          sessionId 1 &lt;br /&gt;
          remoteHost 127.0.0.1 &lt;br /&gt;
          edit { &lt;br /&gt;
             target /toast:toaster &lt;br /&gt;
             operation create &lt;br /&gt;
          } &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 4 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
The 'RPC OK' message indicate that the server successfully commited the configuration.&lt;br /&gt;
&lt;br /&gt;
The 'sysConfigChange' notification indicates what was changed in the running configuration, and who made the change(s).&lt;br /&gt;
&lt;br /&gt;
The toaster server should now be enabled.&lt;br /&gt;
&lt;br /&gt;
=== Unlock the Databases ===&lt;br /&gt;
The database locks need to be released as soon as possible after the edits are completed or discarded.&lt;br /&gt;
&lt;br /&gt;
The high-level command 'release-locks' must be used if 'get-locks' was used to acquire the database locks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''release-locks '''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;unlock&amp;gt; operations for release-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the Toaster State Information ==&lt;br /&gt;
To discover the toaster model and its current status, the 'sget' or 'xget' commands can be used to retrieve just the toaster portion of the conceptual state data available on the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'sget' command is high-level subtree filter handler for the &amp;lt;get&amp;gt; operation:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''sget /toaster'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'xget' command is high-level XPath filter handler for the &amp;lt;get&amp;gt; operation. &amp;lt;/nowiki&amp;gt;It is only available if the NETCONF server supports the ''':xpath '''capability (like '''netconfd''').&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''xget /toaster'''&lt;br /&gt;
&lt;br /&gt;
Both commands should return the same data:&lt;br /&gt;
&lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC Data Reply 7 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    data { &lt;br /&gt;
       toaster { &lt;br /&gt;
          toasterManufacturer 'Acme, Inc.' &lt;br /&gt;
          toasterModelNumber 'Super Toastamatic 2000' &lt;br /&gt;
          toasterStatus up &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
This data shows that the 'Super Toastamatic 2000' is ready to make toast!&lt;br /&gt;
&lt;br /&gt;
== Start Making Toast ==&lt;br /&gt;
Now that the toaster is enabled, the 'make-toast' command should work.&lt;br /&gt;
&lt;br /&gt;
Instead of using the default parameter values, let's make a frozen waffle a little less done than normal:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 8 for session 1: &lt;br /&gt;
&lt;br /&gt;
At this point the toaster timer is running, and the simulated waffle is cooking,&lt;br /&gt;
&lt;br /&gt;
After about 40 seconds, the 'toastDone' notification should be received:&lt;br /&gt;
&lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:20:05Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus done &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 5 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was completed, and is ready to eat.&lt;br /&gt;
&lt;br /&gt;
== Stop Making Toast ==&lt;br /&gt;
What if you change your mind, and want wheat toast instead of a waffle?&lt;br /&gt;
&lt;br /&gt;
Repeat the previous command (Control-P should recall the previous command):&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 9 for session 1: &lt;br /&gt;
&lt;br /&gt;
Now enter the 'cancel-toast' command right away, before the waffle finishes:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''cancel-toast '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 10 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:24:36Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus cancelled &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 6 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was cancelled.&lt;br /&gt;
&lt;br /&gt;
== Close the NETCONF Session ==&lt;br /&gt;
To close the NETCONF session, use the 'close-session' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''close-session''' &lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 11 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 ses: session 1 shut by remote peer &lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the prompt returned to the default form, once the session was dropped by the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
The terminate the yangcli program, use the 'quit' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''quit '''&lt;br /&gt;
 &lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced Topics =&lt;br /&gt;
This section introduces some advanced features of the NETCONF protocol and YANG data modeling language.&lt;br /&gt;
&lt;br /&gt;
== Data Retrieval ==&lt;br /&gt;
=== Basic NETCONF Retrieval Operations ===&lt;br /&gt;
The NETCONF protocol has 2 different retrieval operations:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt;&amp;lt;/nowiki&amp;gt;''': get state data and the running configuration database.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt;&amp;lt;/nowiki&amp;gt;''': get just the specified configuration database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Each of these operations accepts a &amp;lt;filter&amp;gt; parameter, which has 2 forms:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''subtree filter:''' retrieve just the subtrees in the database that match the XML subtrees in the filter.&lt;br /&gt;
* '''XPath filter:''' retrieve just the subtrees that match the result node set produced by evaluating the specified XPath expression against the database. This mode cannot be used unless the ''':xpath''' capability must be advertised by the server.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program supports 3 different forms of each command:&lt;br /&gt;
&lt;br /&gt;
* '''plain''': plain NETCONF operation with user-supplied filter&lt;br /&gt;
* '''subtree'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter subtree XML.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* '''xpath'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter 'select' XML attribute&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Retrieval Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
! example&lt;br /&gt;
|-&lt;br /&gt;
| '''get'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get with-defaults=trim&lt;br /&gt;
|-&lt;br /&gt;
| '''get-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get-config&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get-config source=candidate&lt;br /&gt;
|-&lt;br /&gt;
| '''sget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget /system&lt;br /&gt;
|-&lt;br /&gt;
| '''sget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget-config source=running /nacm/rules &lt;br /&gt;
|-&lt;br /&gt;
| '''xget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| xget &amp;quot;/interfaces-state/interface/statistics&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''xget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;xget-config source=candidate &amp;quot;/interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The retrieval commands return an element named &amp;lt;data&amp;gt; containing the requested XML subtrees.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any identifier nodes (YANG key leafs) are needed to distinguish the data in the reply, they will be added as needed by the server. &amp;lt;nowiki&amp;gt;In the 'xget' example above, the &amp;lt;name&amp;gt; element for each interface would be returned, even though it was not directly requested by the XPath expression.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Default Value Filtering ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The data will also be filtered according to the defaults handling behavior of the server, unless the &amp;lt;with-defaults&amp;gt; parameter is added to the command. &amp;lt;/nowiki&amp;gt;This parameter is only supported if the server advertised the 'with-defaults' capability, If not, the client does not get any indication from the server what type of defaults filtering is being done (if any).&lt;br /&gt;
&lt;br /&gt;
There are 3 types of defaults filtering provided:&lt;br /&gt;
&lt;br /&gt;
* '''report-all''': no filtering -- return all nodes even those the server might normally suppress because they are considerer to be default values by the server.&lt;br /&gt;
* '''trim''': return all nodes except skip any leaf nodes that match the schema defined default value&lt;br /&gt;
* '''explicit''': return all nodes that were set by the client or the server to some value, even if the value happens to be the schema defined default. This is normally the default behavior for the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The defaults handling behavior can be changed just for a specific NETCONF session, using the &amp;lt;set-my-session&amp;gt; operation. &amp;lt;/nowiki&amp;gt;This is only available on the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' set-my-session with-defaults=report-all '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 12 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this example, the 'basic' behavior is changed from 'explicit' to 'report-all', but just for session 1. This setting is temporary, and will not be remembered when the session is terminated. &amp;lt;nowiki&amp;gt;If the &amp;lt;with-defaults&amp;gt; parameter is present, it will be used instead of this value.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Retrieval Operations ===&lt;br /&gt;
Any YANG module can add new operations with the 'rpc' statement.&lt;br /&gt;
&lt;br /&gt;
New retrieval operations may also be added which are associated with a protocol capability.&lt;br /&gt;
&lt;br /&gt;
Just like any other data model content, the operator (or application) needs to understand the YANG file definitions, including the description statements, to understand how each custom retrieval operation works.&lt;br /&gt;
&lt;br /&gt;
There are 2 custom retrieval operations supported by '''netconfd''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Special Retrieval Operations'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! operation&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| '''get-schema'''&lt;br /&gt;
| Retrieve the YANG or YIN source file for one of the modules advertised by the server.This is a standard operation defined in the '''ietf-netconf-monitoring''' module.&lt;br /&gt;
|-&lt;br /&gt;
| '''get-my-session'''&lt;br /&gt;
| Retrieve the customizable settings for my session. This is a proprietary operation defined in the '''yuma-my-session''' module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
Notifications are used in NETCONF to send server event information to the client application.&lt;br /&gt;
&lt;br /&gt;
A session must request notifications with the 'create-subscription' command.&lt;br /&gt;
&lt;br /&gt;
Notifications are grouped into 'streams', but only the 'NETCONF' stream is defined at this time.&lt;br /&gt;
&lt;br /&gt;
A notification subscription request specifies the stream name (and perhaps more parameters).&lt;br /&gt;
&lt;br /&gt;
A NETCONF session on the netconfd server will never expire due to inactivity, while a notification subscription is active. This allows notification processing applications to maintain long-lived connections without worrying about a NETCONF timeout. Note that the SSH server may also be configured to drop idle SSH sessions, whether a notification subscription is active or not.&lt;br /&gt;
&lt;br /&gt;
=== Notification Contents ===&lt;br /&gt;
[[Image:notification-structure.png]]&lt;br /&gt;
&lt;br /&gt;
The 'notification' element is sent from the server to the client, if an event occurs, and the client has created a notification subscription.&lt;br /&gt;
&lt;br /&gt;
The child nodes of this element comprise the notification content, and it is divided into 3 sections:&lt;br /&gt;
&lt;br /&gt;
# '''event generation time-stamp''': This standard NETCONF leaf is always the first child element within the notification element.&lt;br /&gt;
# '''event payload''': The module-specific event payload is represented as a container with the name of the notification. Any data nodes defined within the YANG notification statement appear (in order) as child nodes of the event type container.&lt;br /&gt;
# '''proprietary extensions''': Zero or more vendor-specific elements may appear after the event payload element. For example, the monotonically increasing 'sequence-id' element is added to each notification saved in the '''netconfd''' event log.&lt;br /&gt;
&lt;br /&gt;
=== Notification Replay ===&lt;br /&gt;
[[Image:notification-replay-buffer.png]]&lt;br /&gt;
&lt;br /&gt;
The NETCONF server will maintain an ordered buffer of saved notification events, if the :notification-replay capability is supported by the server. For the '''netconfd''' server, this is a configurable feature, set by the '''--eventlog-size''' parameter.&lt;br /&gt;
&lt;br /&gt;
The '''netconfd''' default is to save the most recent 1000 notification events.&lt;br /&gt;
&lt;br /&gt;
Only system events are saved and are available for retrieval. The 'replayComplete' and 'subscriptionComplete' events are session-specific events, and are therefore not saved in the replay buffer.&lt;br /&gt;
&lt;br /&gt;
The 'create-subscription' command has 2 parameters to request that stored notifications be delivered to the client session:&lt;br /&gt;
&lt;br /&gt;
* '''startTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred after this time are delivered.&lt;br /&gt;
* '''stopTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred before this time are delivered. This parameter can specify a time in the future. When that time has passed, the subscription will be terminated. The stopTime does not cause the server to wait that period of time to generate an event. If the stopTime is in the past, then the subscription will terminate after all the matching event timestamps in the replay buffer have been delivered.&lt;br /&gt;
&lt;br /&gt;
Notifications are delivered in the order they are stored. Each new '''netconfd''' notification contains a monotonically increasing sequence-id (unsigned integer). This can be used to help determine if any configured notification filters are working as expected.&lt;br /&gt;
&lt;br /&gt;
=== The interleave capability ===&lt;br /&gt;
The '''netconfd''' server supports the :interleave capability, which means that all commands (except create-subscription) will be accepted by the server. &amp;lt;nowiki&amp;gt;The client should expect &amp;lt;rpc-reply&amp;gt; and &amp;lt;notification&amp;gt; messages. &amp;lt;/nowiki&amp;gt;The server will always maintain proper message serialization. &amp;lt;nowiki&amp;gt;These messages will always be sent in their entirety, which may impact applications (e.g., a really long &amp;lt;get&amp;gt; response on the same session will delay notification delivery).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the NETCONF server does not support the :interleave capability, then it may only allow the &amp;lt;close-session&amp;gt; operation while the notification subscription is active. &amp;lt;/nowiki&amp;gt;In this case, a new NETCONF session is required to perform any management operations.&lt;br /&gt;
&lt;br /&gt;
This special mode is only applicable while a notification subscription is active. It is possible for a replay subscription to terminate, without terminating the session as well. In this case, the 'notificationComplete' event will be generated, and the session will return to accepting all possible operations.&lt;br /&gt;
&lt;br /&gt;
== Database Editing ==&lt;br /&gt;
NETCONF supports multiple conceptual configuration databases. Only the 'running' database is actually active. All other databases are scratch-pad databases, or some other special-purpose off-line database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Every NETCONF server must allow arbitrary partial (and concurrent) editing to its configuration with the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;Refer to the Yuma Tools User Manual for complete details on this NETCONF operation. The '''yangcli''' program has simplified editing commands, which are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;config&amp;gt; element within an &amp;lt;edit-config&amp;gt; PDU represents the 'root node' (/) in the path expression for each node in the conceptual database. &amp;lt;/nowiki&amp;gt;Each top-level YANG object that is supported and configured will be represented as child nodes to this root node. The conceptual database can be processed as an XML instance document with multiple top nodes (similar to XSLT rules).&lt;br /&gt;
&lt;br /&gt;
Database editing in NETCONF has several variants, but basically, it follows this simple procedure:&lt;br /&gt;
&lt;br /&gt;
# Lock the database(s) that will be affected.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Use &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; on the target database to make changes.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# Activate and save/commit the database edits.&lt;br /&gt;
# Unlock the database(s) that were previously locked.&lt;br /&gt;
&lt;br /&gt;
=== The Target Database ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Usually a NETCONF server supports the &amp;lt;edit-config&amp;gt; operation on only one database, which is either the candidate or the running database. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;This is called the 'target' database, which corresponds to the &amp;lt;target&amp;gt; parameter in the &amp;lt;edit-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the target database is the candidate configuration, then the &amp;lt;edit-config&amp;gt; operation does not always cause all possible database validation checking to be done by the server. &amp;lt;/nowiki&amp;gt;Since the candidate database is just a scratch-pad for (possibly) incremental edits, the server is not required to completely validate its contents. &amp;lt;nowiki&amp;gt;Instead, these 'final validation' tests are only required to be done when the &amp;lt;commit&amp;gt; operation is invoked.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program will automatically handle the target database management, based on the server capabilities reported each session, if the 'save' command is used. &amp;lt;nowiki&amp;gt;The manual procedure (&amp;lt;commit&amp;gt; and/or maybe &amp;lt;copy-config&amp;gt; operations) is also supported, but do not mix them within the same editing session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Database Locking ===&lt;br /&gt;
NETCONF supports database locking so a session can have exclusive write access to the configuration.&lt;br /&gt;
&lt;br /&gt;
These locks are intended to be short-lived, but there is no actual time limit on a lock. If the session terminates for any reason with any locks, they will be released automatically by the server.&lt;br /&gt;
&lt;br /&gt;
All the databases that are involved in the edit should be locked. This always includes the running database, and the candidate and startup databases, if they are supported by the server.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has 2 special commands to handle all locking:&lt;br /&gt;
&lt;br /&gt;
* '''get-locks''': Wait until all database locks have been acquired or the timeout occurs&lt;br /&gt;
* '''release-locks''': Rlease any locks that were obtained with get-locks&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on these commands.&lt;br /&gt;
&lt;br /&gt;
=== Non-Volatile Storage ===&lt;br /&gt;
The startup configuration is the conceptual database used on the next reboot of the NETCONF server. It is important to know whether the NETCONF server supports the :startup capability or not. &amp;lt;nowiki&amp;gt;If yes, then the operator must explicitly save the running database to non-volatile storage (the startup database), using the &amp;lt;copy-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;If no, then the server will keep the running and startup databases synchronized.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program has a high-level 'save' command, used after the editing operations, that will automatically issue the correct protocol operations to complete the edit, and save the changes in non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
The startup database is configurable in the '''netconfd''' server. The '''--with-startup''' configuration parameter controls whether the startup database will be used or not. The --startup parameter can be used to control the initial load of the running configuration in 3 different ways:&lt;br /&gt;
&lt;br /&gt;
# '''no startup''': skip this step and just use factory defaults&lt;br /&gt;
# '''default startup''': look for the default '''startup-cfg.xml''' file in the configured data path.&lt;br /&gt;
# '''specific startup''': use a specified file, either absolute file-spec, or a relative path in the configured data path&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on controlling non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
=== Editing Commands ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation should be used to make configuration changes. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;The &amp;lt;copy-config&amp;gt; operation can also be used, but this is a blunt hammer approach. &amp;lt;/nowiki&amp;gt;Although the '''netconfd''' server will always analyze the edit request and only affect the nodes that actually changed, this is not a requirement in the standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation allows the operator to have precise control of the server. &amp;lt;/nowiki&amp;gt;These database edits are performed by the server using a combination of 3 factors:&lt;br /&gt;
&lt;br /&gt;
# The nodes that currently exist in the target database.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The nodes that exist in the 'source' of the edits (either the inline &amp;lt;config&amp;gt; element or indirectly through the &amp;lt;url&amp;gt; element.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The &amp;lt;default-operation&amp;gt; parameter and any XML attributes in the source XML elements (nc:operation attribute and YANG insert operation attributes).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli'''&amp;lt;nowiki&amp;gt; program provides some high-level commands to automatically handle the complexity of the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;These commands use XPath expressions and a series of interactive prompts (e.g., for the mandatory nodes and key leafs) to fill in the specified data structures, and construct an optimized NETCONF message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Editing Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;command&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;description&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| create&lt;br /&gt;
| Create a new sub-tree, only if it does not already exist&lt;br /&gt;
|-&lt;br /&gt;
| delete&lt;br /&gt;
| Delete an existing sub-tree, only if it exists&lt;br /&gt;
|-&lt;br /&gt;
| merge&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, keeping any existing nodes that are not explicitly contained in the source.&lt;br /&gt;
|-&lt;br /&gt;
| replace&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, deleting any existing nodes that are not explicitly contained in the source. &amp;lt;nowiki&amp;gt;This is the mode used for the &amp;lt;copy-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| insert&lt;br /&gt;
| Insert or move a YANG list or leaf-list entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for details on these commands.&lt;br /&gt;
&lt;br /&gt;
== Access Control ==&lt;br /&gt;
The '''netconfd''' server can be configured to give precise access rights to each user (the SSH user name associated with the NETCONF session). Some important points to remember about access control:&lt;br /&gt;
&lt;br /&gt;
* There are 3 types of access -- read, write, and execute.&lt;br /&gt;
* If a user does not have read access to some data, then it is silently omitted from the reply.&lt;br /&gt;
* The 'access-denied' error is not generated for read requests. &amp;lt;nowiki&amp;gt;It is only generated for write requests to the database, or &amp;lt;rpc&amp;gt; operation execution requests.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* An access request results in 1 of 2 outcomes: permit or deny&lt;br /&gt;
* The server resolves the access request by searching the access control rules. Either an explicit rule will apply, or the default access rights will be checked if no rule is found.&lt;br /&gt;
* The default access rights are configurable, but usually set as follows:&lt;br /&gt;
** read access is permitted&lt;br /&gt;
** write access is denied&lt;br /&gt;
** exec access is permitted&lt;br /&gt;
* The '''nacm:secure''' and '''nacm:very-secure''' extensions can be used by the YANG module author to override the default access rights, and deny access instead. &amp;lt;nowiki&amp;gt;For example, the &amp;lt;reboot&amp;gt; operation is not permitted by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* There is a configurable 'superuser' user name. If desired, a specific user name will be considered the 'super user' and all access control will be bypassed for this user. By default, this is the name 'superuser', not 'root', since root login to the SSH server is not recommended.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
The '''yangcli''' program supports variables for easier reuse and script-based operations.&lt;br /&gt;
&lt;br /&gt;
There are 2 types of variables:&lt;br /&gt;
&lt;br /&gt;
* '''file variables''': the variable name is a file name, and the contents of the variable are stored in this file.&lt;br /&gt;
* '''internal variables''': the variable name is just an internal identifier, and the contents of the variable are stored in memory&lt;br /&gt;
&lt;br /&gt;
Variables are set with assignment statements. Here are some examples:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$backup = get-config source=running'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$bad-data = &amp;quot;warn&amp;quot;'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; $itf = &amp;quot;//interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Note that in order to assign a string value (e.g., $$bad-data = &amp;quot;warn&amp;quot; above), single or double quotes must be used. An unquoted string will be interpreted as a command name, not a simple string value.&lt;br /&gt;
&lt;br /&gt;
Variables are referenced in a similar manner, except the variable is on the right-hand side of the equation. These commands are equivalent in this example:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' @myfile.xml = xget select=$itf'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; @myfile.xml = xget //interface[name='eth0']&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Complex variable substitution is also supported:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' copy-config source=$$backup target=candidate'''&lt;br /&gt;
&lt;br /&gt;
Note that '''yangcli''' will attempt to figure out the structure of the parameter (e.g., 'source' and 'target' above), and adjust the NETCONF operation content. In the example above, since 'source' and 'target' are choices, the real nodes within the cases are examined, and the most appropriate case is selected. &amp;lt;nowiki&amp;gt;The 'source' parameter will contain an in-line &amp;lt;config&amp;gt; element with all the child nodes in the &amp;lt;/nowiki&amp;gt;'''$$backup''' variable, and the target parameter will contain an empty element named '''&amp;lt;nowiki&amp;gt;&amp;lt;candidate&amp;gt;.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several types of internal variables available in the '''yangcli''' program:&lt;br /&gt;
&lt;br /&gt;
* read-only system variables ($$USER)&lt;br /&gt;
* read-write system variables ($$default-operation)&lt;br /&gt;
* global user variables, available at all 'runstack' levels ($$backup)&lt;br /&gt;
* local user variables available in the current 'runstack' level only ($itf)&lt;br /&gt;
&lt;br /&gt;
The command 'show vars' can be used to see the current value of all program variables:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''show vars '''&lt;br /&gt;
CLI Variables&lt;br /&gt;
&lt;br /&gt;
yangcli {&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  feature-enable-default true&lt;br /&gt;
  fixorder true&lt;br /&gt;
  force-target candidate&lt;br /&gt;
  indent 2&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  ncport 830&lt;br /&gt;
  password ****&lt;br /&gt;
  private-key /home/joe/.ssh/id_rsa&lt;br /&gt;
  public-key /home/joe/.ssh/id_rsa.pub&lt;br /&gt;
  server localhost&lt;br /&gt;
  subdirs true&lt;br /&gt;
  tcp-direct-enable false&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  transport ssh&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  warn-idlen 64&lt;br /&gt;
  warn-linelen 0&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Read-only environment variables&lt;br /&gt;
&lt;br /&gt;
  HOME /home/joe&lt;br /&gt;
  HOSTNAME &lt;br /&gt;
  LANG en_US.utf8&lt;br /&gt;
  PWD /home/joe&lt;br /&gt;
  SHELL /bin/bash&lt;br /&gt;
  USER joe&lt;br /&gt;
  YUMA_DATAPATH &lt;br /&gt;
  YUMA_HOME &lt;br /&gt;
  YUMA_MODPATH &lt;br /&gt;
  YUMA_RUNPATH &lt;br /&gt;
&lt;br /&gt;
Read-write system variables&lt;br /&gt;
&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  default-module &lt;br /&gt;
  default-operation merge&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  error-option none&lt;br /&gt;
  fixorder true&lt;br /&gt;
  indent 2&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  optional false&lt;br /&gt;
  server localhost&lt;br /&gt;
  test-option set&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  with-defaults none&lt;br /&gt;
&lt;br /&gt;
Global variables&lt;br /&gt;
&lt;br /&gt;
  backup {&lt;br /&gt;
    interfaces &lt;br /&gt;
    nacm &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Local variables&lt;br /&gt;
&lt;br /&gt;
  itf //interface[name='eth0']&lt;br /&gt;
yangcli joe@localhost&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
Scripts are simply a collection of '''yangcli''' commands and/or assignment statements that are stored in a text file, instead of typed directly. Scripts can call other scripts (except loops are not allowed), and numbered parameters are available (e.g., --P1='fred' passed as parameter, the $1 expands to 'fred' inside the script).&lt;br /&gt;
&lt;br /&gt;
The '''$YUMA_RUNPATH''' environment variable, or the '''--runpath''' configuration variable, can be used to set the directory path to look for script files. There is also a default path for finding files, explained in the Yuma Tools User Manual.&lt;br /&gt;
&lt;br /&gt;
The command ''''list scripts'''' can be used to show the potential script file available in the run path.&lt;br /&gt;
&lt;br /&gt;
The command ''''run foo'''' is used to invoke a script named 'foo' (with no file extension).&lt;br /&gt;
&lt;br /&gt;
If a command fails during a script, execution is halted right away and no more commands in the script are executed. If 'get-locks' was used, then any locks obtained will be automatically released. All script runstack levels will be canceled, not just the current script.&lt;br /&gt;
&lt;br /&gt;
Script syntax will be expanded in a future release to provide loops and conditional statements.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=383</id>
		<title>Yuma Quickstart Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=383"/>
		<updated>2019-05-02T11:41:32Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Run yangcli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Quickstart Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Client/Server Quickstart Guide&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 - 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 - 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
This document assumes you have successfully set up the software as described in the printed document:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the [[Yuma User Manual]] for a complete introduction to Yuma Tools.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma Tools programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma Tools NETCONF client and server programs. It covers the basic usage of the '''yangcli''' client application and the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
== What is NETCONF and YANG? ==&lt;br /&gt;
The Yuma Tools suite provides automated support for development and usage of network management information. Information is exchanged in XML encoding within a session between a client and a server.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;Network Configuration Protocol&amp;quot; (NETCONF) is used to provide the management sessions, operations, and database framework available on the server. The operations, notifications, and the database contents supported by a particular NETCONF server are extensible, and defined with a modular and easy-to-learn language called YANG. The database is used to contain YANG data structures which represent the configuration of the device containing the NETCONF server. This configuration can be saved in non-volatile storage so the configuration can be restored upon reboot.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;YANG Data Modeling Language&amp;quot; is used to define the syntax and semantics of the NETCONF operations, notification events, and database content. Machine and human readable semantics and constraints are used by YANG tools (including Yuma Tools) to automate behavior within the NETCONF protocol for clients and servers.&lt;br /&gt;
&lt;br /&gt;
For people familiar with SNMP and SMIv2, NETCONF is like an XML-based, high-level version of SNMP, and a YANG module is like a MIB module, except MIB tables can be nested and much more complex than in SMIv2. Instead of Enterprise IDs and OBJECT-IDENTIFIERs, YANG uses XML namespaces and XPath path expressions to identify module ownership and contents within the protocol PDUs.&lt;br /&gt;
&lt;br /&gt;
== How Does an Operator Use NETCONF and YANG? ==&lt;br /&gt;
An operator uses a NETCONF session almost like it was a CLI session, except there are structured, schema-defined requests and responses, encoded in XML. YANG modules are like MIB modules for CLI content. Instead of ad-hoc unstructured documentation like CLI, NETCONF uses a data definition language to define management modules. The actual modules that a server supports will vary, just like MIB (SMIv2) modules.&lt;br /&gt;
&lt;br /&gt;
The NETCONF protocol is available for many different transports. The most popular is the SSH2 protocol. The 'netconf' subsystem is used (on TCP port 830) to start a special SSH session with the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
Using NETCONF over SSH is just like using CLI over SSH to manage a networking device, except the messages are exchanged in XML, not plain-text. SSH user names and passwords are used for session authentication and authorization.&lt;br /&gt;
&lt;br /&gt;
NETCONF is designed to provide a programmatic interface, so it is usually used with a management application, instead of a direct (raw) SSH terminal application. The '''yangcli''' program within Yuma Tools is a YANG-driven NETCONF client application that supports scripts, XPath, and many automated features to simplify management of NETCONF servers.&lt;br /&gt;
&lt;br /&gt;
Once a session is started, similar to a CLI session, the operator issues commands (NETCONF operations) to the server, and the server performs each requested operation in order, and returns a status message and/or some data to the client. &amp;lt;nowiki&amp;gt;Notifications can also be received, if the session has requested them with the &amp;lt;create-subscription&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session starts, a &amp;lt;hello&amp;gt; message is sent by the server that has all the NETCONF capabilities and YANG modules supported by the server. &amp;lt;/nowiki&amp;gt;Capabilities are optional protocol mechanisms, beyond those defined in the base protocol (RFC 4741, RFC 6241). &amp;lt;nowiki&amp;gt;The client application knows what operations, notification events, and database contents are supported on the server, based on the information in the &amp;lt;hello&amp;gt; message.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NETCONF has a set of basic database (CRUD) operations for managing the configuration database. In addition, any YANG module can define new protocol operations and notification events.&lt;br /&gt;
&lt;br /&gt;
== How Does a Developer Use NETCONF and YANG? ==&lt;br /&gt;
A NETCONF server developer decides what modules need to be supported by the NETCONF server, and implements the device instrumentation code for those modules.&lt;br /&gt;
&lt;br /&gt;
Much of the NETCONF protocol related code is handled by the NETCONF stack, based on the YANG module contents. Therefore, the most important task for a developer is designing a good YANG module.&lt;br /&gt;
&lt;br /&gt;
After the YANG module is written, the device instrumentation code for the YANG module is then added by the developer. The code uses the Yuma API to register callbacks and access the YANG database. The 'callback code' is called from the NETCONF stack when database operation requests for the object(s) in the YANG module are received by the server.&lt;br /&gt;
&lt;br /&gt;
Once this library is completed, the YANG module and its binary server instrumentation library (SIL) can be loaded into the NETCONF server at run-time. There is no need to recompile the '''netconfd''' server, or even reboot it.&lt;br /&gt;
&lt;br /&gt;
= Getting Started with toaster.yang =&lt;br /&gt;
This section will demonstrate the basic operation of Yuma Tools to use a NETCONF session to manage a remote device with a YANG data model. The Yuma Tools programs and libraries must already be installed. Refer to the Yuma Tools Installation Guide if this has not yet been done.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' client program and '''netconfd''' server program do not need to be installed on the same machine. For simplicity, the server address 'localhost' is used in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is libtoaster? ==&lt;br /&gt;
There is a sample server instrumentation library (SIL) included, named libtoaster. [https://sourceforge.net/p/yuma123/git/ci/master/tree/libtoaster/src/toaster.c toaster.c] is the module-specific server instrumentation code for the management data defined in [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/netconfcentral/toaster.yang toaster.yang ]. This is based on the original TOASTER-MIB by Epilogue. This YANG module provides simple operations to make toast, and some simple NETCONF database objects to enable and monitor the toaster.&lt;br /&gt;
&lt;br /&gt;
The new YANG version of the TOASTER-MIB is different is some ways:&lt;br /&gt;
&lt;br /&gt;
* extensible YANG identities are used to identify the bread type, instead of a hard-wired enumerated list.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;protocol operations (&amp;lt;make-toast&amp;gt; and &amp;lt;cancel-toast&amp;gt;) are used instead of an 'up/down' switch within the database. &amp;lt;/nowiki&amp;gt;NETCONF databases are intended to contain persistent data structures, and 'actions' such as starting or stopping the toaster are done with new protocol operations, instead of editing the database with the standard operations.&lt;br /&gt;
* A simple configuration 'presence container' object is used to enable and disable the toaster service, instead of hard-wiring the toaster service availability.&lt;br /&gt;
* A notification is generated when the toast is done or canceled. This notification can be used instead of polling the toaster status object.&lt;br /&gt;
&lt;br /&gt;
== Other examples: ietf-interfaces and ietf-system ==&lt;br /&gt;
The partial SIL implementations of the stadard ietf-system.yang and ietf-interfaces.yang models are included as examples and should work out of the box for standard Linux distributions.&lt;br /&gt;
&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-interfaces.yang ietf-interfaces.yang ] ([https://tools.ietf.org/rfc/rfc7223.txt rfc7223]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-interfaces/ietf-interfaces.c ietf-interfaces.c]&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-system.yang ietf-system.yang] ([https://tools.ietf.org/rfc/rfc7317.txt rfc7317]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-system/ietf-system.c ietf-system.c]&lt;br /&gt;
&lt;br /&gt;
One can start (provided you have already compiled installed and configured netconfd and the modules) netconfd and load the YANG models with the installed SIL implementations like this:&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/netconfd --module=ietf-system --module=ietf-interfaces&lt;br /&gt;
&lt;br /&gt;
== Start the netconfd server ==&lt;br /&gt;
If the '''netconfd''' server is already running, then skip this section.&lt;br /&gt;
&lt;br /&gt;
Details for all the '''netconfd''' configuration parameters can be found in the [[Yuma netconfd Manual]].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the server will accept sessions on TCP port 830&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the target database is &amp;lt;candidate&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;no &amp;lt;startup&amp;gt; database (mirrored NV-save)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;validate&amp;gt; operation is supported&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the access control mode is 'enforcing'&lt;br /&gt;
* the super user account name is 'superuser'&lt;br /&gt;
* the server will search startup-cfg.xml using the default search path&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the default &amp;lt;with-defaults&amp;gt; behavior is 'explicit'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* notification replay is enabled with a buffer size of 1000 events and a maximum message burst per session of 10 notifications&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;hello&amp;gt; exchange timeout is 10 minutes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the session idle timeout is 1 hour&lt;br /&gt;
* the default session indent amount is 2 spaces&lt;br /&gt;
* the default session line-size is 72 characters&lt;br /&gt;
* violation of strict YANG XML ordering will not cause errors&lt;br /&gt;
* logging level 'info' is enabled and sent to STDOUT&lt;br /&gt;
&lt;br /&gt;
=== SSH Server ===&lt;br /&gt;
To start the NETCONF server, make sure that the '''sshd''' server is running, and the following configuration is included in '''/etc/ssh/sshd_config.'''&lt;br /&gt;
&lt;br /&gt;
 '''Port 22'''&lt;br /&gt;
 '''Port 830'''&lt;br /&gt;
 '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
The 'Subsystem' command may be different if '''netconf-subsystem''' has been installed in a different location than '''/usr/local/sbin'''. The 'Port 22' command is needed to make sure the SSH server will accept SSH sessions in addition to NETCONF sessions.&lt;br /&gt;
&lt;br /&gt;
=== NETCONF Server ===&lt;br /&gt;
For this example, the superuser account needs to be enabled. This is done with a CLI parameter, and the user name 'joe' is used. Replace 'joe' with your username.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the foreground:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe&lt;br /&gt;
Starting netconfd...&lt;br /&gt;
Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
Copyright (c) 2013-2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
agt: Startup config loaded OK&lt;br /&gt;
     Source: /home/joe/.yuma/startup-cfg.xml&lt;br /&gt;
&lt;br /&gt;
Running netconfd server (2.12-0)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If no startup configuration is available, then the server defaults will be used instead. Any message about 'startup-cfg.xml' not found can be ignored. It just means the server booted with the factory default configuration.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the background:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe --log=~/mylog &amp;amp;&lt;br /&gt;
 joe@joesserver:~$&lt;br /&gt;
&lt;br /&gt;
This example shows that a logfile in the user's home directory called 'mylog' will be used for all server log messages. The '&amp;amp;' at the end causes the command to be run in the background.&lt;br /&gt;
&lt;br /&gt;
== Start the yangcli client ==&lt;br /&gt;
Once the NETCONF server is running, it will accept client sessions If running '''netconfd''' interactively on localhost, then start a new terminal window to continue.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the client will attempt to start sessions on TCP port 830&lt;br /&gt;
* the client will attempt to automatically complete partial commands&lt;br /&gt;
* the command line history will be automatically loaded upon startup, and saved upon exit&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the client will attempt to automatically load any YANG modules advertised in the server &amp;lt;hello&amp;gt; message&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the client will check before using invalid parameter values&lt;br /&gt;
* the plain display mode will be used, with 72 characters per line&lt;br /&gt;
* each nest level of displayed data will be indented 2 spaces &lt;br /&gt;
* the XML order of messages sent to the server will be corrected, as needed&lt;br /&gt;
* the logging level of 'info' is set, and log messages are sent to STDOUT&lt;br /&gt;
* the client will wait 30 seconds for responses&lt;br /&gt;
&lt;br /&gt;
=== Run yangcli ===&lt;br /&gt;
The yangcli program should be found in the PATH environment variable.&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ '''yangcli'''&lt;br /&gt;
&lt;br /&gt;
=== Startup Screen ===&lt;br /&gt;
The startup screen shows the following information:&lt;br /&gt;
&lt;br /&gt;
* program version and copyright&lt;br /&gt;
* tab key can be used for command and parameter completion&lt;br /&gt;
* basic help instructions&lt;br /&gt;
* basic statement instructions&lt;br /&gt;
&lt;br /&gt;
=== Command Line Editing ===&lt;br /&gt;
The command lines are stored in a history buffer.&lt;br /&gt;
&lt;br /&gt;
Any previous command line (except a password parameter line) can be recalled and used again.&lt;br /&gt;
&lt;br /&gt;
Any command in the command buffer (current or recalled) can be edited. The default key settings are aligned with the emacs editor. Refer to the [[Yuma yangcli Manual]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Escape Commands ===&lt;br /&gt;
Not all parameters need to be entered at one time. If yangcli needs more information, based on the initial command line, then 1 or more missing parameters will be requested, in sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to get help, skip a parameter, or even cancel the entire command during one of these sub-command modes, by using an escape command. This is a 1 or 2 character command, followed by the 'enter' key (as usual to end a command).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Escape Command Summary'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?s&lt;br /&gt;
| skip the current parameter&lt;br /&gt;
|-&lt;br /&gt;
| ?c&lt;br /&gt;
| cancel the current command&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| get help&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| get full help&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Using the '?s' command to skip a parameter may cause the &amp;lt;rpc&amp;gt; request to be invalid.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the setting of the '''--bad-data''' configuration parameter, this may or may not be allowed. The default setting is to warn and confirm. This configuration parameter also affects parameter values that are invalid according to the YANG module definition.&lt;br /&gt;
&lt;br /&gt;
== Getting Context Sensitive Help ==&lt;br /&gt;
The '''yangcli''' program provides context-sensitive help based on the current NETCONF session status and the set of YANG modules currently loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session is active, the set of modules advertised in the &amp;lt;hello&amp;gt; message by the server will be used to generate help text, if available. &amp;lt;/nowiki&amp;gt;The ''''mgrload'''' command can be used to force '''yangcli''' to use different or additional YANG modules.&lt;br /&gt;
&lt;br /&gt;
If the '''yangcli'''&amp;lt;nowiki&amp;gt; program does not have the advertised revision of a particular module available in the module search path, and the NETCONF server supports the standard &amp;lt;get-schema&amp;gt; operation, then the module will be retrieved from the server, and used just for that session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any features or deviations are advertised for a YANG module, then they will be applied to the modules used just for the current session. The help text and the error checking done for the module will be based on this 'patched' module, not the 'plain' module specified in the capability URI string.&lt;br /&gt;
&lt;br /&gt;
=== Tab Key for Command Completion ===&lt;br /&gt;
The 'tab' key can be used at any time to see a list of the possible completions that the command interpreter will accept. The list will be displayed for command names and some command parameters.&lt;br /&gt;
&lt;br /&gt;
When a NETCONF session is active, all the NETCONF operations will be available. Additional commands may also be available if the server advertised any YANG modules containing 'rpc' statements.&lt;br /&gt;
&lt;br /&gt;
=== The '?' and '??' Escape Sequences ===&lt;br /&gt;
If a partial command is entered, or if a data structure is being filled, then the help escape sequences are available to get help about that parameter or data node. Use one question mark for help, and two question marks for maximum help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Escape Sequences'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! sequence&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| Print some help text, but not description statements and some other information.&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| Print maximum help text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following example shows the help text for the 'user' parameter for the 'connect' operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''connect''' &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; '''? '''&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;leaf user [NcxUserName] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
       length: 1..63 &lt;br /&gt;
       &amp;lt;nowiki&amp;gt;pattern: [a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,62} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The type of object, its name, data type, and any restrictions, will be printed.&lt;br /&gt;
&lt;br /&gt;
After that, the previous prompt will be redisplayed.&lt;br /&gt;
&lt;br /&gt;
=== The 'help' Command ===&lt;br /&gt;
The '''help''' command can be used to display all kinds of information about the '''yangcli''' program and the YANG data module contents in use at the time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Command Variants'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help &amp;lt;comand-name&amp;gt;&amp;lt;/nowiki&amp;gt;help command  &amp;lt;nowiki&amp;gt;&amp;lt;command-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help for the specified yangcli command or YANG rpc statement.&lt;br /&gt;
|-&lt;br /&gt;
| help commands&lt;br /&gt;
| Display help text for all commands.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help object &amp;lt;object-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG database top-level object (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| help notification  &amp;lt;nowiki&amp;gt;&amp;lt;notification-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG notification event (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help type &amp;lt;type-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for an exported YANG data type (only if its module is available).&lt;br /&gt;
|}&lt;br /&gt;
Each of the help command variants also accepts a 'help-mode' parameter to control how much help text is displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Output Modes'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! mode&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| --brief&lt;br /&gt;
| Display minimal help text.&lt;br /&gt;
|-&lt;br /&gt;
| --normal&lt;br /&gt;
| Display a lot, but not always all the help text available (default mode).&lt;br /&gt;
|-&lt;br /&gt;
|  --full&lt;br /&gt;
| Display all available help text, including description statements.&lt;br /&gt;
|}&lt;br /&gt;
The following table shows some valid help commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| help help&lt;br /&gt;
| Get normal help for the help command.&lt;br /&gt;
|-&lt;br /&gt;
| help commands brief&lt;br /&gt;
| Get a 1 line description of each command.&lt;br /&gt;
|-&lt;br /&gt;
| help object system full&lt;br /&gt;
| Get all available help for the /system container and all its descendant nodes.&lt;br /&gt;
|-&lt;br /&gt;
| help type NcxIdentifier&lt;br /&gt;
| Get summary and description of the data type called 'NcxIdentifier'.&lt;br /&gt;
|-&lt;br /&gt;
| help notification sysSessionStart&lt;br /&gt;
| Get a summary of the 'sysSessionStart' notification, and each of objects in its payload.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Start a NETCONF session ==&lt;br /&gt;
Each yangcli program instance can run 1 NETCONF session at a time.&lt;br /&gt;
&lt;br /&gt;
If no session is currently active, then the prompt will contain just the program name, indicating that the 'connect' command is available:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== The connect Command ===&lt;br /&gt;
The 'connect' command is used to start a NETCONF session.&lt;br /&gt;
&lt;br /&gt;
There are 3 mandatory parameters for this command:&lt;br /&gt;
&lt;br /&gt;
* '''user''': the system (or SSH) user name to use&lt;br /&gt;
* '''server''': the IP address or DNS name of the NETCONF server to use&lt;br /&gt;
* '''password''': the password string to use&lt;br /&gt;
&lt;br /&gt;
Make sure you have a user name and password already configured on the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
If a partial command is given, then yangcli will prompt for any missing mandatory parameters. In this example, the complete command is given at once:&lt;br /&gt;
&lt;br /&gt;
 yangcli'''&amp;gt;''' '''connect server=localhost user=joe password=yangrocks'''&lt;br /&gt;
&lt;br /&gt;
After this command is entered, '''yangcli''' will generate some informational log messages to the screen.&lt;br /&gt;
&lt;br /&gt;
If the session is started successfully, a summary of the server session capabilities and available modules should be displayed. Also, the command prompt will change to indicate that a NETCONF session is currently active.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At this point any command supported by the server can be entered, in addition to any '''yangcli''' command (except 'connect').&lt;br /&gt;
&lt;br /&gt;
=== Fixing Connection Problems ===&lt;br /&gt;
If the session did not start correctly, check the error messages to fix the problem. Some common problems:&lt;br /&gt;
&lt;br /&gt;
* Make sure the '''netconfd''' program is running.&lt;br /&gt;
* Make sure the '''netconf-subsystem''' program is properly installed.&lt;br /&gt;
* Check if the SSH configuration contains the portion for NETCONF.&lt;br /&gt;
* If the SSH configuration looks correct, then try restarting the SSH server to make sure that configuration file is the one being used.&lt;br /&gt;
* If the SSH server seems to be running correctly, then check if any firewall or other security mechanism is blocking TCP port 830. If so, either enable TCP port 830, or enable port 22 on the NETCONF server (by restarting the server), and include 'port=22' in the 'connect' command parameters.&lt;br /&gt;
* If no firewall or other security measure is blocking TCP port 830, try to establish a normal SSH session with the server.&lt;br /&gt;
* If a normal SSH session works correctly, then check the log messages on the NETCONF server for more information.&lt;br /&gt;
&lt;br /&gt;
== Enable Notification Delivery ==&lt;br /&gt;
In order to receive the 'toastDone' notification event, a notification subscription has to be enabled.&lt;br /&gt;
&lt;br /&gt;
A default NETCONF notification stream can be started with the 'create-subscription' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''create-subscription'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on other activity within the NETCONF server, it is possible other notification events, such as 'sysSessionStart' or 'sysSessionEnd' will be generated. Notifications are displayed in their entirety, but not during 'rpc reply output'. If a command is being entered, the notification will be displayed, and then the command line restored.&lt;br /&gt;
&lt;br /&gt;
== Load the Toaster Module ==&lt;br /&gt;
The toaster module is not a core system module, and is not available automatically.&lt;br /&gt;
&lt;br /&gt;
The module has to be explicitly loaded by the NETCONF client.&lt;br /&gt;
&lt;br /&gt;
To load the server-supported version of the toaster module, use the 'load' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''load toaster'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Data Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    mod-revision 2009-11-20 &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:44:45Z &lt;br /&gt;
       sysCapabilityChange { &lt;br /&gt;
          changed-by { &lt;br /&gt;
             userName joe &lt;br /&gt;
             sessionId 1 &lt;br /&gt;
             remoteHost 127.0.0.1 &lt;br /&gt;
          } &lt;br /&gt;
          added-capability &lt;br /&gt;
           http://netconfcentral.com/ns/toaster?module=toaster&amp;amp;revision=2009-11-20 &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 3 &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the module was successfully loaded, then a data response will be sent, containing the revision date of the toaster module that was loaded. This response will be returned even if the module was already loaded.&lt;br /&gt;
&lt;br /&gt;
Note that the 'sysCapabilityChange' notification event will only be sent if the module has not already been loaded into the server. &amp;lt;nowiki&amp;gt;In this case, it was not advertised in the &amp;lt;hello&amp;gt; message for this session, and the toaster module needs to be loaded manually into yangcli with the 'mgrload' command:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''mgrload toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Load module 'toaster' OK&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable the Toaster ==&lt;br /&gt;
Try to make some toast, using the 'make-toast' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Error Reply 4 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    rpc-error { &lt;br /&gt;
       error-type protocol &lt;br /&gt;
       error-tag resource-denied &lt;br /&gt;
       error-severity error &lt;br /&gt;
       error-app-tag no-access &lt;br /&gt;
       error-message 'resource denied' &lt;br /&gt;
       error-info { &lt;br /&gt;
          error-number 269 &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
What happened?&lt;br /&gt;
&lt;br /&gt;
A 'resource-denied' error was returned instead of 'OK', because the toaster service is not enabled yet. A node has to be created in the NETCONF database before the 'make-toast' command can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lock the Databases ===&lt;br /&gt;
The first step is to lock the NETCONF databases for writing. Locks do not affect read operations.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has a high-level command to deal with locking, called 'get-locks'. It will handle retries for any missing locks, until an overall timeout occurs or all the locks needed are acquired.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' get-locks'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;lock&amp;gt; operations for get-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 get-locks finished OK &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the toaster Container ===&lt;br /&gt;
The toaster module uses a simple YANG 'presence' container to configure the toaster service.&lt;br /&gt;
&lt;br /&gt;
Once the /toaster container is created, the read-only nodes within that container will be maintained by the server, and the toaster service will be enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The first step is to create the /toaster node in the &amp;lt;candidate&amp;gt; configuration database:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' create /toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC OK Reply 5 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Now the /toaster node is created in the &amp;lt;candidate&amp;gt; database.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit the Database Changes ===&lt;br /&gt;
In order to activate these changes, the 'commit' command needs to be issued.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''commit'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 6 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:59:58Z &lt;br /&gt;
       sysConfigChange { &lt;br /&gt;
          userName joe &lt;br /&gt;
          sessionId 1 &lt;br /&gt;
          remoteHost 127.0.0.1 &lt;br /&gt;
          edit { &lt;br /&gt;
             target /toast:toaster &lt;br /&gt;
             operation create &lt;br /&gt;
          } &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 4 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
The 'RPC OK' message indicate that the server successfully commited the configuration.&lt;br /&gt;
&lt;br /&gt;
The 'sysConfigChange' notification indicates what was changed in the running configuration, and who made the change(s).&lt;br /&gt;
&lt;br /&gt;
The toaster server should now be enabled.&lt;br /&gt;
&lt;br /&gt;
=== Unlock the Databases ===&lt;br /&gt;
The database locks need to be released as soon as possible after the edits are completed or discarded.&lt;br /&gt;
&lt;br /&gt;
The high-level command 'release-locks' must be used if 'get-locks' was used to acquire the database locks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''release-locks '''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;unlock&amp;gt; operations for release-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the Toaster State Information ==&lt;br /&gt;
To discover the toaster model and its current status, the 'sget' or 'xget' commands can be used to retrieve just the toaster portion of the conceptual state data available on the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'sget' command is high-level subtree filter handler for the &amp;lt;get&amp;gt; operation:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''sget /toaster'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'xget' command is high-level XPath filter handler for the &amp;lt;get&amp;gt; operation. &amp;lt;/nowiki&amp;gt;It is only available if the NETCONF server supports the ''':xpath '''capability (like '''netconfd''').&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''xget /toaster'''&lt;br /&gt;
&lt;br /&gt;
Both commands should return the same data:&lt;br /&gt;
&lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC Data Reply 7 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    data { &lt;br /&gt;
       toaster { &lt;br /&gt;
          toasterManufacturer 'Acme, Inc.' &lt;br /&gt;
          toasterModelNumber 'Super Toastamatic 2000' &lt;br /&gt;
          toasterStatus up &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
This data shows that the 'Super Toastamatic 2000' is ready to make toast!&lt;br /&gt;
&lt;br /&gt;
== Start Making Toast ==&lt;br /&gt;
Now that the toaster is enabled, the 'make-toast' command should work.&lt;br /&gt;
&lt;br /&gt;
Instead of using the default parameter values, let's make a frozen waffle a little less done than normal:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 8 for session 1: &lt;br /&gt;
&lt;br /&gt;
At this point the toaster timer is running, and the simulated waffle is cooking,&lt;br /&gt;
&lt;br /&gt;
After about 40 seconds, the 'toastDone' notification should be received:&lt;br /&gt;
&lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:20:05Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus done &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 5 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was completed, and is ready to eat.&lt;br /&gt;
&lt;br /&gt;
== Stop Making Toast ==&lt;br /&gt;
What if you change your mind, and want wheat toast instead of a waffle?&lt;br /&gt;
&lt;br /&gt;
Repeat the previous command (Control-P should recall the previous command):&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 9 for session 1: &lt;br /&gt;
&lt;br /&gt;
Now enter the 'cancel-toast' command right away, before the waffle finishes:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''cancel-toast '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 10 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:24:36Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus cancelled &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 6 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was cancelled.&lt;br /&gt;
&lt;br /&gt;
== Close the NETCONF Session ==&lt;br /&gt;
To close the NETCONF session, use the 'close-session' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''close-session''' &lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 11 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 ses: session 1 shut by remote peer &lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the prompt returned to the default form, once the session was dropped by the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
The terminate the yangcli program, use the 'quit' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''quit '''&lt;br /&gt;
 &lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced Topics =&lt;br /&gt;
This section introduces some advanced features of the NETCONF protocol and YANG data modeling language.&lt;br /&gt;
&lt;br /&gt;
== Data Retrieval ==&lt;br /&gt;
=== Basic NETCONF Retrieval Operations ===&lt;br /&gt;
The NETCONF protocol has 2 different retrieval operations:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt;&amp;lt;/nowiki&amp;gt;''': get state data and the running configuration database.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt;&amp;lt;/nowiki&amp;gt;''': get just the specified configuration database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Each of these operations accepts a &amp;lt;filter&amp;gt; parameter, which has 2 forms:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''subtree filter:''' retrieve just the subtrees in the database that match the XML subtrees in the filter.&lt;br /&gt;
* '''XPath filter:''' retrieve just the subtrees that match the result node set produced by evaluating the specified XPath expression against the database. This mode cannot be used unless the ''':xpath''' capability must be advertised by the server.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program supports 3 different forms of each command:&lt;br /&gt;
&lt;br /&gt;
* '''plain''': plain NETCONF operation with user-supplied filter&lt;br /&gt;
* '''subtree'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter subtree XML.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* '''xpath'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter 'select' XML attribute&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Retrieval Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
! example&lt;br /&gt;
|-&lt;br /&gt;
| '''get'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get with-defaults=trim&lt;br /&gt;
|-&lt;br /&gt;
| '''get-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get-config&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get-config source=candidate&lt;br /&gt;
|-&lt;br /&gt;
| '''sget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget /system&lt;br /&gt;
|-&lt;br /&gt;
| '''sget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget-config source=running /nacm/rules &lt;br /&gt;
|-&lt;br /&gt;
| '''xget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| xget &amp;quot;/interfaces-state/interface/statistics&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''xget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;xget-config source=candidate &amp;quot;/interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The retrieval commands return an element named &amp;lt;data&amp;gt; containing the requested XML subtrees.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any identifier nodes (YANG key leafs) are needed to distinguish the data in the reply, they will be added as needed by the server. &amp;lt;nowiki&amp;gt;In the 'xget' example above, the &amp;lt;name&amp;gt; element for each interface would be returned, even though it was not directly requested by the XPath expression.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Default Value Filtering ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The data will also be filtered according to the defaults handling behavior of the server, unless the &amp;lt;with-defaults&amp;gt; parameter is added to the command. &amp;lt;/nowiki&amp;gt;This parameter is only supported if the server advertised the 'with-defaults' capability, If not, the client does not get any indication from the server what type of defaults filtering is being done (if any).&lt;br /&gt;
&lt;br /&gt;
There are 3 types of defaults filtering provided:&lt;br /&gt;
&lt;br /&gt;
* '''report-all''': no filtering -- return all nodes even those the server might normally suppress because they are considerer to be default values by the server.&lt;br /&gt;
* '''trim''': return all nodes except skip any leaf nodes that match the schema defined default value&lt;br /&gt;
* '''explicit''': return all nodes that were set by the client or the server to some value, even if the value happens to be the schema defined default. This is normally the default behavior for the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The defaults handling behavior can be changed just for a specific NETCONF session, using the &amp;lt;set-my-session&amp;gt; operation. &amp;lt;/nowiki&amp;gt;This is only available on the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' set-my-session with-defaults=report-all '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 12 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this example, the 'basic' behavior is changed from 'explicit' to 'report-all', but just for session 1. This setting is temporary, and will not be remembered when the session is terminated. &amp;lt;nowiki&amp;gt;If the &amp;lt;with-defaults&amp;gt; parameter is present, it will be used instead of this value.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Retrieval Operations ===&lt;br /&gt;
Any YANG module can add new operations with the 'rpc' statement.&lt;br /&gt;
&lt;br /&gt;
New retrieval operations may also be added which are associated with a protocol capability.&lt;br /&gt;
&lt;br /&gt;
Just like any other data model content, the operator (or application) needs to understand the YANG file definitions, including the description statements, to understand how each custom retrieval operation works.&lt;br /&gt;
&lt;br /&gt;
There are 2 custom retrieval operations supported by '''netconfd''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Special Retrieval Operations'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! operation&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| '''get-schema'''&lt;br /&gt;
| Retrieve the YANG or YIN source file for one of the modules advertised by the server.This is a standard operation defined in the '''ietf-netconf-monitoring''' module.&lt;br /&gt;
|-&lt;br /&gt;
| '''get-my-session'''&lt;br /&gt;
| Retrieve the customizable settings for my session. This is a proprietary operation defined in the '''yuma-my-session''' module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
Notifications are used in NETCONF to send server event information to the client application.&lt;br /&gt;
&lt;br /&gt;
A session must request notifications with the 'create-subscription' command.&lt;br /&gt;
&lt;br /&gt;
Notifications are grouped into 'streams', but only the 'NETCONF' stream is defined at this time.&lt;br /&gt;
&lt;br /&gt;
A notification subscription request specifies the stream name (and perhaps more parameters).&lt;br /&gt;
&lt;br /&gt;
A NETCONF session on the netconfd server will never expire due to inactivity, while a notification subscription is active. This allows notification processing applications to maintain long-lived connections without worrying about a NETCONF timeout. Note that the SSH server may also be configured to drop idle SSH sessions, whether a notification subscription is active or not.&lt;br /&gt;
&lt;br /&gt;
=== Notification Contents ===&lt;br /&gt;
[[Image:notification-structure.png]]&lt;br /&gt;
&lt;br /&gt;
The 'notification' element is sent from the server to the client, if an event occurs, and the client has created a notification subscription.&lt;br /&gt;
&lt;br /&gt;
The child nodes of this element comprise the notification content, and it is divided into 3 sections:&lt;br /&gt;
&lt;br /&gt;
# '''event generation time-stamp''': This standard NETCONF leaf is always the first child element within the notification element.&lt;br /&gt;
# '''event payload''': The module-specific event payload is represented as a container with the name of the notification. Any data nodes defined within the YANG notification statement appear (in order) as child nodes of the event type container.&lt;br /&gt;
# '''proprietary extensions''': Zero or more vendor-specific elements may appear after the event payload element. For example, the monotonically increasing 'sequence-id' element is added to each notification saved in the '''netconfd''' event log.&lt;br /&gt;
&lt;br /&gt;
=== Notification Replay ===&lt;br /&gt;
[[Image:notification-replay-buffer.png]]&lt;br /&gt;
&lt;br /&gt;
The NETCONF server will maintain an ordered buffer of saved notification events, if the :notification-replay capability is supported by the server. For the '''netconfd''' server, this is a configurable feature, set by the '''--eventlog-size''' parameter.&lt;br /&gt;
&lt;br /&gt;
The '''netconfd''' default is to save the most recent 1000 notification events.&lt;br /&gt;
&lt;br /&gt;
Only system events are saved and are available for retrieval. The 'replayComplete' and 'subscriptionComplete' events are session-specific events, and are therefore not saved in the replay buffer.&lt;br /&gt;
&lt;br /&gt;
The 'create-subscription' command has 2 parameters to request that stored notifications be delivered to the client session:&lt;br /&gt;
&lt;br /&gt;
* '''startTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred after this time are delivered.&lt;br /&gt;
* '''stopTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred before this time are delivered. This parameter can specify a time in the future. When that time has passed, the subscription will be terminated. The stopTime does not cause the server to wait that period of time to generate an event. If the stopTime is in the past, then the subscription will terminate after all the matching event timestamps in the replay buffer have been delivered.&lt;br /&gt;
&lt;br /&gt;
Notifications are delivered in the order they are stored. Each new '''netconfd''' notification contains a monotonically increasing sequence-id (unsigned integer). This can be used to help determine if any configured notification filters are working as expected.&lt;br /&gt;
&lt;br /&gt;
=== The interleave capability ===&lt;br /&gt;
The '''netconfd''' server supports the :interleave capability, which means that all commands (except create-subscription) will be accepted by the server. &amp;lt;nowiki&amp;gt;The client should expect &amp;lt;rpc-reply&amp;gt; and &amp;lt;notification&amp;gt; messages. &amp;lt;/nowiki&amp;gt;The server will always maintain proper message serialization. &amp;lt;nowiki&amp;gt;These messages will always be sent in their entirety, which may impact applications (e.g., a really long &amp;lt;get&amp;gt; response on the same session will delay notification delivery).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the NETCONF server does not support the :interleave capability, then it may only allow the &amp;lt;close-session&amp;gt; operation while the notification subscription is active. &amp;lt;/nowiki&amp;gt;In this case, a new NETCONF session is required to perform any management operations.&lt;br /&gt;
&lt;br /&gt;
This special mode is only applicable while a notification subscription is active. It is possible for a replay subscription to terminate, without terminating the session as well. In this case, the 'notificationComplete' event will be generated, and the session will return to accepting all possible operations.&lt;br /&gt;
&lt;br /&gt;
== Database Editing ==&lt;br /&gt;
NETCONF supports multiple conceptual configuration databases. Only the 'running' database is actually active. All other databases are scratch-pad databases, or some other special-purpose off-line database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Every NETCONF server must allow arbitrary partial (and concurrent) editing to its configuration with the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;Refer to the Yuma Tools User Manual for complete details on this NETCONF operation. The '''yangcli''' program has simplified editing commands, which are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;config&amp;gt; element within an &amp;lt;edit-config&amp;gt; PDU represents the 'root node' (/) in the path expression for each node in the conceptual database. &amp;lt;/nowiki&amp;gt;Each top-level YANG object that is supported and configured will be represented as child nodes to this root node. The conceptual database can be processed as an XML instance document with multiple top nodes (similar to XSLT rules).&lt;br /&gt;
&lt;br /&gt;
Database editing in NETCONF has several variants, but basically, it follows this simple procedure:&lt;br /&gt;
&lt;br /&gt;
# Lock the database(s) that will be affected.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Use &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; on the target database to make changes.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# Activate and save/commit the database edits.&lt;br /&gt;
# Unlock the database(s) that were previously locked.&lt;br /&gt;
&lt;br /&gt;
=== The Target Database ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Usually a NETCONF server supports the &amp;lt;edit-config&amp;gt; operation on only one database, which is either the candidate or the running database. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;This is called the 'target' database, which corresponds to the &amp;lt;target&amp;gt; parameter in the &amp;lt;edit-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the target database is the candidate configuration, then the &amp;lt;edit-config&amp;gt; operation does not always cause all possible database validation checking to be done by the server. &amp;lt;/nowiki&amp;gt;Since the candidate database is just a scratch-pad for (possibly) incremental edits, the server is not required to completely validate its contents. &amp;lt;nowiki&amp;gt;Instead, these 'final validation' tests are only required to be done when the &amp;lt;commit&amp;gt; operation is invoked.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program will automatically handle the target database management, based on the server capabilities reported each session, if the 'save' command is used. &amp;lt;nowiki&amp;gt;The manual procedure (&amp;lt;commit&amp;gt; and/or maybe &amp;lt;copy-config&amp;gt; operations) is also supported, but do not mix them within the same editing session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Database Locking ===&lt;br /&gt;
NETCONF supports database locking so a session can have exclusive write access to the configuration.&lt;br /&gt;
&lt;br /&gt;
These locks are intended to be short-lived, but there is no actual time limit on a lock. If the session terminates for any reason with any locks, they will be released automatically by the server.&lt;br /&gt;
&lt;br /&gt;
All the databases that are involved in the edit should be locked. This always includes the running database, and the candidate and startup databases, if they are supported by the server.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has 2 special commands to handle all locking:&lt;br /&gt;
&lt;br /&gt;
* '''get-locks''': Wait until all database locks have been acquired or the timeout occurs&lt;br /&gt;
* '''release-locks''': Rlease any locks that were obtained with get-locks&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on these commands.&lt;br /&gt;
&lt;br /&gt;
=== Non-Volatile Storage ===&lt;br /&gt;
The startup configuration is the conceptual database used on the next reboot of the NETCONF server. It is important to know whether the NETCONF server supports the :startup capability or not. &amp;lt;nowiki&amp;gt;If yes, then the operator must explicitly save the running database to non-volatile storage (the startup database), using the &amp;lt;copy-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;If no, then the server will keep the running and startup databases synchronized.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program has a high-level 'save' command, used after the editing operations, that will automatically issue the correct protocol operations to complete the edit, and save the changes in non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
The startup database is configurable in the '''netconfd''' server. The '''--with-startup''' configuration parameter controls whether the startup database will be used or not. The --startup parameter can be used to control the initial load of the running configuration in 3 different ways:&lt;br /&gt;
&lt;br /&gt;
# '''no startup''': skip this step and just use factory defaults&lt;br /&gt;
# '''default startup''': look for the default '''startup-cfg.xml''' file in the configured data path.&lt;br /&gt;
# '''specific startup''': use a specified file, either absolute file-spec, or a relative path in the configured data path&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on controlling non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
=== Editing Commands ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation should be used to make configuration changes. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;The &amp;lt;copy-config&amp;gt; operation can also be used, but this is a blunt hammer approach. &amp;lt;/nowiki&amp;gt;Although the '''netconfd''' server will always analyze the edit request and only affect the nodes that actually changed, this is not a requirement in the standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation allows the operator to have precise control of the server. &amp;lt;/nowiki&amp;gt;These database edits are performed by the server using a combination of 3 factors:&lt;br /&gt;
&lt;br /&gt;
# The nodes that currently exist in the target database.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The nodes that exist in the 'source' of the edits (either the inline &amp;lt;config&amp;gt; element or indirectly through the &amp;lt;url&amp;gt; element.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The &amp;lt;default-operation&amp;gt; parameter and any XML attributes in the source XML elements (nc:operation attribute and YANG insert operation attributes).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli'''&amp;lt;nowiki&amp;gt; program provides some high-level commands to automatically handle the complexity of the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;These commands use XPath expressions and a series of interactive prompts (e.g., for the mandatory nodes and key leafs) to fill in the specified data structures, and construct an optimized NETCONF message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Editing Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;command&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;description&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| create&lt;br /&gt;
| Create a new sub-tree, only if it does not already exist&lt;br /&gt;
|-&lt;br /&gt;
| delete&lt;br /&gt;
| Delete an existing sub-tree, only if it exists&lt;br /&gt;
|-&lt;br /&gt;
| merge&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, keeping any existing nodes that are not explicitly contained in the source.&lt;br /&gt;
|-&lt;br /&gt;
| replace&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, deleting any existing nodes that are not explicitly contained in the source. &amp;lt;nowiki&amp;gt;This is the mode used for the &amp;lt;copy-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| insert&lt;br /&gt;
| Insert or move a YANG list or leaf-list entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for details on these commands.&lt;br /&gt;
&lt;br /&gt;
== Access Control ==&lt;br /&gt;
The '''netconfd''' server can be configured to give precise access rights to each user (the SSH user name associated with the NETCONF session). Some important points to remember about access control:&lt;br /&gt;
&lt;br /&gt;
* There are 3 types of access -- read, write, and execute.&lt;br /&gt;
* If a user does not have read access to some data, then it is silently omitted from the reply.&lt;br /&gt;
* The 'access-denied' error is not generated for read requests. &amp;lt;nowiki&amp;gt;It is only generated for write requests to the database, or &amp;lt;rpc&amp;gt; operation execution requests.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* An access request results in 1 of 2 outcomes: permit or deny&lt;br /&gt;
* The server resolves the access request by searching the access control rules. Either an explicit rule will apply, or the default access rights will be checked if no rule is found.&lt;br /&gt;
* The default access rights are configurable, but usually set as follows:&lt;br /&gt;
** read access is permitted&lt;br /&gt;
** write access is denied&lt;br /&gt;
** exec access is permitted&lt;br /&gt;
* The '''nacm:secure''' and '''nacm:very-secure''' extensions can be used by the YANG module author to override the default access rights, and deny access instead. &amp;lt;nowiki&amp;gt;For example, the &amp;lt;reboot&amp;gt; operation is not permitted by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* There is a configurable 'superuser' user name. If desired, a specific user name will be considered the 'super user' and all access control will be bypassed for this user. By default, this is the name 'superuser', not 'root', since root login to the SSH server is not recommended.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
The '''yangcli''' program supports variables for easier reuse and script-based operations.&lt;br /&gt;
&lt;br /&gt;
There are 2 types of variables:&lt;br /&gt;
&lt;br /&gt;
* '''file variables''': the variable name is a file name, and the contents of the variable are stored in this file.&lt;br /&gt;
* '''internal variables''': the variable name is just an internal identifier, and the contents of the variable are stored in memory&lt;br /&gt;
&lt;br /&gt;
Variables are set with assignment statements. Here are some examples:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$backup = get-config source=running'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$bad-data = &amp;quot;warn&amp;quot;'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; $itf = &amp;quot;//interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Note that in order to assign a string value (e.g., $$bad-data = &amp;quot;warn&amp;quot; above), single or double quotes must be used. An unquoted string will be interpreted as a command name, not a simple string value.&lt;br /&gt;
&lt;br /&gt;
Variables are referenced in a similar manner, except the variable is on the right-hand side of the equation. These commands are equivalent in this example:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' @myfile.xml = xget select=$itf'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; @myfile.xml = xget //interface[name='eth0']&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Complex variable substitution is also supported:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' copy-config source=$$backup target=candidate'''&lt;br /&gt;
&lt;br /&gt;
Note that '''yangcli''' will attempt to figure out the structure of the parameter (e.g., 'source' and 'target' above), and adjust the NETCONF operation content. In the example above, since 'source' and 'target' are choices, the real nodes within the cases are examined, and the most appropriate case is selected. &amp;lt;nowiki&amp;gt;The 'source' parameter will contain an in-line &amp;lt;config&amp;gt; element with all the child nodes in the &amp;lt;/nowiki&amp;gt;'''$$backup''' variable, and the target parameter will contain an empty element named '''&amp;lt;nowiki&amp;gt;&amp;lt;candidate&amp;gt;.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several types of internal variables available in the '''yangcli''' program:&lt;br /&gt;
&lt;br /&gt;
* read-only system variables ($$USER)&lt;br /&gt;
* read-write system variables ($$default-operation)&lt;br /&gt;
* global user variables, available at all 'runstack' levels ($$backup)&lt;br /&gt;
* local user variables available in the current 'runstack' level only ($itf)&lt;br /&gt;
&lt;br /&gt;
The command 'show vars' can be used to see the current value of all program variables:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''show vars '''&lt;br /&gt;
CLI Variables&lt;br /&gt;
&lt;br /&gt;
yangcli {&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  feature-enable-default true&lt;br /&gt;
  fixorder true&lt;br /&gt;
  force-target candidate&lt;br /&gt;
  indent 2&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  ncport 830&lt;br /&gt;
  password ****&lt;br /&gt;
  private-key /home/joe/.ssh/id_rsa&lt;br /&gt;
  public-key /home/joe/.ssh/id_rsa.pub&lt;br /&gt;
  server localhost&lt;br /&gt;
  subdirs true&lt;br /&gt;
  tcp-direct-enable false&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  transport ssh&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  warn-idlen 64&lt;br /&gt;
  warn-linelen 0&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Read-only environment variables&lt;br /&gt;
&lt;br /&gt;
  HOME /home/joe&lt;br /&gt;
  HOSTNAME &lt;br /&gt;
  LANG en_US.utf8&lt;br /&gt;
  PWD /home/joe&lt;br /&gt;
  SHELL /bin/bash&lt;br /&gt;
  USER joe&lt;br /&gt;
  YUMA_DATAPATH &lt;br /&gt;
  YUMA_HOME &lt;br /&gt;
  YUMA_MODPATH &lt;br /&gt;
  YUMA_RUNPATH &lt;br /&gt;
&lt;br /&gt;
Read-write system variables&lt;br /&gt;
&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  default-module &lt;br /&gt;
  default-operation merge&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  error-option none&lt;br /&gt;
  fixorder true&lt;br /&gt;
  indent 2&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  optional false&lt;br /&gt;
  server localhost&lt;br /&gt;
  test-option set&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  with-defaults none&lt;br /&gt;
&lt;br /&gt;
Global variables&lt;br /&gt;
&lt;br /&gt;
  backup {&lt;br /&gt;
    interfaces &lt;br /&gt;
    nacm &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Local variables&lt;br /&gt;
&lt;br /&gt;
  itf //interface[name='eth0']&lt;br /&gt;
yangcli joe@localhost&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
Scripts are simply a collection of '''yangcli''' commands and/or assignment statements that are stored in a text file, instead of typed directly. Scripts can call other scripts (except loops are not allowed), and numbered parameters are available (e.g., --P1='fred' passed as parameter, the $1 expands to 'fred' inside the script).&lt;br /&gt;
&lt;br /&gt;
The '''$YUMA_RUNPATH''' environment variable, or the '''--runpath''' configuration variable, can be used to set the directory path to look for script files. There is also a default path for finding files, explained in the Yuma Tools User Manual.&lt;br /&gt;
&lt;br /&gt;
The command ''''list scripts'''' can be used to show the potential script file available in the run path.&lt;br /&gt;
&lt;br /&gt;
The command ''''run foo'''' is used to invoke a script named 'foo' (with no file extension).&lt;br /&gt;
&lt;br /&gt;
If a command fails during a script, execution is halted right away and no more commands in the script are executed. If 'get-locks' was used, then any locks obtained will be automatically released. All script runstack levels will be canceled, not just the current script.&lt;br /&gt;
&lt;br /&gt;
Script syntax will be expanded in a future release to provide loops and conditional statements.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=382</id>
		<title>Yuma Quickstart Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=382"/>
		<updated>2019-05-02T11:40:50Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* NETCONF Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Quickstart Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Client/Server Quickstart Guide&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 - 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 - 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
This document assumes you have successfully set up the software as described in the printed document:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the [[Yuma User Manual]] for a complete introduction to Yuma Tools.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma Tools programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma Tools NETCONF client and server programs. It covers the basic usage of the '''yangcli''' client application and the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
== What is NETCONF and YANG? ==&lt;br /&gt;
The Yuma Tools suite provides automated support for development and usage of network management information. Information is exchanged in XML encoding within a session between a client and a server.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;Network Configuration Protocol&amp;quot; (NETCONF) is used to provide the management sessions, operations, and database framework available on the server. The operations, notifications, and the database contents supported by a particular NETCONF server are extensible, and defined with a modular and easy-to-learn language called YANG. The database is used to contain YANG data structures which represent the configuration of the device containing the NETCONF server. This configuration can be saved in non-volatile storage so the configuration can be restored upon reboot.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;YANG Data Modeling Language&amp;quot; is used to define the syntax and semantics of the NETCONF operations, notification events, and database content. Machine and human readable semantics and constraints are used by YANG tools (including Yuma Tools) to automate behavior within the NETCONF protocol for clients and servers.&lt;br /&gt;
&lt;br /&gt;
For people familiar with SNMP and SMIv2, NETCONF is like an XML-based, high-level version of SNMP, and a YANG module is like a MIB module, except MIB tables can be nested and much more complex than in SMIv2. Instead of Enterprise IDs and OBJECT-IDENTIFIERs, YANG uses XML namespaces and XPath path expressions to identify module ownership and contents within the protocol PDUs.&lt;br /&gt;
&lt;br /&gt;
== How Does an Operator Use NETCONF and YANG? ==&lt;br /&gt;
An operator uses a NETCONF session almost like it was a CLI session, except there are structured, schema-defined requests and responses, encoded in XML. YANG modules are like MIB modules for CLI content. Instead of ad-hoc unstructured documentation like CLI, NETCONF uses a data definition language to define management modules. The actual modules that a server supports will vary, just like MIB (SMIv2) modules.&lt;br /&gt;
&lt;br /&gt;
The NETCONF protocol is available for many different transports. The most popular is the SSH2 protocol. The 'netconf' subsystem is used (on TCP port 830) to start a special SSH session with the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
Using NETCONF over SSH is just like using CLI over SSH to manage a networking device, except the messages are exchanged in XML, not plain-text. SSH user names and passwords are used for session authentication and authorization.&lt;br /&gt;
&lt;br /&gt;
NETCONF is designed to provide a programmatic interface, so it is usually used with a management application, instead of a direct (raw) SSH terminal application. The '''yangcli''' program within Yuma Tools is a YANG-driven NETCONF client application that supports scripts, XPath, and many automated features to simplify management of NETCONF servers.&lt;br /&gt;
&lt;br /&gt;
Once a session is started, similar to a CLI session, the operator issues commands (NETCONF operations) to the server, and the server performs each requested operation in order, and returns a status message and/or some data to the client. &amp;lt;nowiki&amp;gt;Notifications can also be received, if the session has requested them with the &amp;lt;create-subscription&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session starts, a &amp;lt;hello&amp;gt; message is sent by the server that has all the NETCONF capabilities and YANG modules supported by the server. &amp;lt;/nowiki&amp;gt;Capabilities are optional protocol mechanisms, beyond those defined in the base protocol (RFC 4741, RFC 6241). &amp;lt;nowiki&amp;gt;The client application knows what operations, notification events, and database contents are supported on the server, based on the information in the &amp;lt;hello&amp;gt; message.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NETCONF has a set of basic database (CRUD) operations for managing the configuration database. In addition, any YANG module can define new protocol operations and notification events.&lt;br /&gt;
&lt;br /&gt;
== How Does a Developer Use NETCONF and YANG? ==&lt;br /&gt;
A NETCONF server developer decides what modules need to be supported by the NETCONF server, and implements the device instrumentation code for those modules.&lt;br /&gt;
&lt;br /&gt;
Much of the NETCONF protocol related code is handled by the NETCONF stack, based on the YANG module contents. Therefore, the most important task for a developer is designing a good YANG module.&lt;br /&gt;
&lt;br /&gt;
After the YANG module is written, the device instrumentation code for the YANG module is then added by the developer. The code uses the Yuma API to register callbacks and access the YANG database. The 'callback code' is called from the NETCONF stack when database operation requests for the object(s) in the YANG module are received by the server.&lt;br /&gt;
&lt;br /&gt;
Once this library is completed, the YANG module and its binary server instrumentation library (SIL) can be loaded into the NETCONF server at run-time. There is no need to recompile the '''netconfd''' server, or even reboot it.&lt;br /&gt;
&lt;br /&gt;
= Getting Started with toaster.yang =&lt;br /&gt;
This section will demonstrate the basic operation of Yuma Tools to use a NETCONF session to manage a remote device with a YANG data model. The Yuma Tools programs and libraries must already be installed. Refer to the Yuma Tools Installation Guide if this has not yet been done.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' client program and '''netconfd''' server program do not need to be installed on the same machine. For simplicity, the server address 'localhost' is used in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is libtoaster? ==&lt;br /&gt;
There is a sample server instrumentation library (SIL) included, named libtoaster. [https://sourceforge.net/p/yuma123/git/ci/master/tree/libtoaster/src/toaster.c toaster.c] is the module-specific server instrumentation code for the management data defined in [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/netconfcentral/toaster.yang toaster.yang ]. This is based on the original TOASTER-MIB by Epilogue. This YANG module provides simple operations to make toast, and some simple NETCONF database objects to enable and monitor the toaster.&lt;br /&gt;
&lt;br /&gt;
The new YANG version of the TOASTER-MIB is different is some ways:&lt;br /&gt;
&lt;br /&gt;
* extensible YANG identities are used to identify the bread type, instead of a hard-wired enumerated list.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;protocol operations (&amp;lt;make-toast&amp;gt; and &amp;lt;cancel-toast&amp;gt;) are used instead of an 'up/down' switch within the database. &amp;lt;/nowiki&amp;gt;NETCONF databases are intended to contain persistent data structures, and 'actions' such as starting or stopping the toaster are done with new protocol operations, instead of editing the database with the standard operations.&lt;br /&gt;
* A simple configuration 'presence container' object is used to enable and disable the toaster service, instead of hard-wiring the toaster service availability.&lt;br /&gt;
* A notification is generated when the toast is done or canceled. This notification can be used instead of polling the toaster status object.&lt;br /&gt;
&lt;br /&gt;
== Other examples: ietf-interfaces and ietf-system ==&lt;br /&gt;
The partial SIL implementations of the stadard ietf-system.yang and ietf-interfaces.yang models are included as examples and should work out of the box for standard Linux distributions.&lt;br /&gt;
&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-interfaces.yang ietf-interfaces.yang ] ([https://tools.ietf.org/rfc/rfc7223.txt rfc7223]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-interfaces/ietf-interfaces.c ietf-interfaces.c]&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-system.yang ietf-system.yang] ([https://tools.ietf.org/rfc/rfc7317.txt rfc7317]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-system/ietf-system.c ietf-system.c]&lt;br /&gt;
&lt;br /&gt;
One can start (provided you have already compiled installed and configured netconfd and the modules) netconfd and load the YANG models with the installed SIL implementations like this:&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/netconfd --module=ietf-system --module=ietf-interfaces&lt;br /&gt;
&lt;br /&gt;
== Start the netconfd server ==&lt;br /&gt;
If the '''netconfd''' server is already running, then skip this section.&lt;br /&gt;
&lt;br /&gt;
Details for all the '''netconfd''' configuration parameters can be found in the [[Yuma netconfd Manual]].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the server will accept sessions on TCP port 830&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the target database is &amp;lt;candidate&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;no &amp;lt;startup&amp;gt; database (mirrored NV-save)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;validate&amp;gt; operation is supported&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the access control mode is 'enforcing'&lt;br /&gt;
* the super user account name is 'superuser'&lt;br /&gt;
* the server will search startup-cfg.xml using the default search path&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the default &amp;lt;with-defaults&amp;gt; behavior is 'explicit'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* notification replay is enabled with a buffer size of 1000 events and a maximum message burst per session of 10 notifications&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;hello&amp;gt; exchange timeout is 10 minutes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the session idle timeout is 1 hour&lt;br /&gt;
* the default session indent amount is 2 spaces&lt;br /&gt;
* the default session line-size is 72 characters&lt;br /&gt;
* violation of strict YANG XML ordering will not cause errors&lt;br /&gt;
* logging level 'info' is enabled and sent to STDOUT&lt;br /&gt;
&lt;br /&gt;
=== SSH Server ===&lt;br /&gt;
To start the NETCONF server, make sure that the '''sshd''' server is running, and the following configuration is included in '''/etc/ssh/sshd_config.'''&lt;br /&gt;
&lt;br /&gt;
 '''Port 22'''&lt;br /&gt;
 '''Port 830'''&lt;br /&gt;
 '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
The 'Subsystem' command may be different if '''netconf-subsystem''' has been installed in a different location than '''/usr/local/sbin'''. The 'Port 22' command is needed to make sure the SSH server will accept SSH sessions in addition to NETCONF sessions.&lt;br /&gt;
&lt;br /&gt;
=== NETCONF Server ===&lt;br /&gt;
For this example, the superuser account needs to be enabled. This is done with a CLI parameter, and the user name 'joe' is used. Replace 'joe' with your username.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the foreground:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe&lt;br /&gt;
Starting netconfd...&lt;br /&gt;
Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
Copyright (c) 2013-2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
agt: Startup config loaded OK&lt;br /&gt;
     Source: /home/joe/.yuma/startup-cfg.xml&lt;br /&gt;
&lt;br /&gt;
Running netconfd server (2.12-0)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If no startup configuration is available, then the server defaults will be used instead. Any message about 'startup-cfg.xml' not found can be ignored. It just means the server booted with the factory default configuration.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the background:&lt;br /&gt;
&lt;br /&gt;
 joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe --log=~/mylog &amp;amp;&lt;br /&gt;
 joe@joesserver:~$&lt;br /&gt;
&lt;br /&gt;
This example shows that a logfile in the user's home directory called 'mylog' will be used for all server log messages. The '&amp;amp;' at the end causes the command to be run in the background.&lt;br /&gt;
&lt;br /&gt;
== Start the yangcli client ==&lt;br /&gt;
Once the NETCONF server is running, it will accept client sessions If running '''netconfd''' interactively on localhost, then start a new terminal window to continue.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the client will attempt to start sessions on TCP port 830&lt;br /&gt;
* the client will attempt to automatically complete partial commands&lt;br /&gt;
* the command line history will be automatically loaded upon startup, and saved upon exit&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the client will attempt to automatically load any YANG modules advertised in the server &amp;lt;hello&amp;gt; message&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the client will check before using invalid parameter values&lt;br /&gt;
* the plain display mode will be used, with 72 characters per line&lt;br /&gt;
* each nest level of displayed data will be indented 2 spaces &lt;br /&gt;
* the XML order of messages sent to the server will be corrected, as needed&lt;br /&gt;
* the logging level of 'info' is set, and log messages are sent to STDOUT&lt;br /&gt;
* the client will wait 30 seconds for responses&lt;br /&gt;
&lt;br /&gt;
=== Run yangcli ===&lt;br /&gt;
The yangcli program should be found in the PATH environment variable.&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; '''yangcli'''&lt;br /&gt;
&lt;br /&gt;
If the yangcli program is not found, then try the full path:&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; '''/usr/bin/yangcli'''&lt;br /&gt;
&lt;br /&gt;
=== Startup Screen ===&lt;br /&gt;
The startup screen shows the following information:&lt;br /&gt;
&lt;br /&gt;
* program version and copyright&lt;br /&gt;
* tab key can be used for command and parameter completion&lt;br /&gt;
* basic help instructions&lt;br /&gt;
* basic statement instructions&lt;br /&gt;
&lt;br /&gt;
=== Command Line Editing ===&lt;br /&gt;
The command lines are stored in a history buffer.&lt;br /&gt;
&lt;br /&gt;
Any previous command line (except a password parameter line) can be recalled and used again.&lt;br /&gt;
&lt;br /&gt;
Any command in the command buffer (current or recalled) can be edited. The default key settings are aligned with the emacs editor. Refer to the [[Yuma yangcli Manual]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Escape Commands ===&lt;br /&gt;
Not all parameters need to be entered at one time. If yangcli needs more information, based on the initial command line, then 1 or more missing parameters will be requested, in sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to get help, skip a parameter, or even cancel the entire command during one of these sub-command modes, by using an escape command. This is a 1 or 2 character command, followed by the 'enter' key (as usual to end a command).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Escape Command Summary'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?s&lt;br /&gt;
| skip the current parameter&lt;br /&gt;
|-&lt;br /&gt;
| ?c&lt;br /&gt;
| cancel the current command&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| get help&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| get full help&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Using the '?s' command to skip a parameter may cause the &amp;lt;rpc&amp;gt; request to be invalid.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the setting of the '''--bad-data''' configuration parameter, this may or may not be allowed. The default setting is to warn and confirm. This configuration parameter also affects parameter values that are invalid according to the YANG module definition.&lt;br /&gt;
&lt;br /&gt;
== Getting Context Sensitive Help ==&lt;br /&gt;
The '''yangcli''' program provides context-sensitive help based on the current NETCONF session status and the set of YANG modules currently loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session is active, the set of modules advertised in the &amp;lt;hello&amp;gt; message by the server will be used to generate help text, if available. &amp;lt;/nowiki&amp;gt;The ''''mgrload'''' command can be used to force '''yangcli''' to use different or additional YANG modules.&lt;br /&gt;
&lt;br /&gt;
If the '''yangcli'''&amp;lt;nowiki&amp;gt; program does not have the advertised revision of a particular module available in the module search path, and the NETCONF server supports the standard &amp;lt;get-schema&amp;gt; operation, then the module will be retrieved from the server, and used just for that session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any features or deviations are advertised for a YANG module, then they will be applied to the modules used just for the current session. The help text and the error checking done for the module will be based on this 'patched' module, not the 'plain' module specified in the capability URI string.&lt;br /&gt;
&lt;br /&gt;
=== Tab Key for Command Completion ===&lt;br /&gt;
The 'tab' key can be used at any time to see a list of the possible completions that the command interpreter will accept. The list will be displayed for command names and some command parameters.&lt;br /&gt;
&lt;br /&gt;
When a NETCONF session is active, all the NETCONF operations will be available. Additional commands may also be available if the server advertised any YANG modules containing 'rpc' statements.&lt;br /&gt;
&lt;br /&gt;
=== The '?' and '??' Escape Sequences ===&lt;br /&gt;
If a partial command is entered, or if a data structure is being filled, then the help escape sequences are available to get help about that parameter or data node. Use one question mark for help, and two question marks for maximum help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Escape Sequences'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! sequence&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| Print some help text, but not description statements and some other information.&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| Print maximum help text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following example shows the help text for the 'user' parameter for the 'connect' operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''connect''' &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; '''? '''&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;leaf user [NcxUserName] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
       length: 1..63 &lt;br /&gt;
       &amp;lt;nowiki&amp;gt;pattern: [a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,62} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The type of object, its name, data type, and any restrictions, will be printed.&lt;br /&gt;
&lt;br /&gt;
After that, the previous prompt will be redisplayed.&lt;br /&gt;
&lt;br /&gt;
=== The 'help' Command ===&lt;br /&gt;
The '''help''' command can be used to display all kinds of information about the '''yangcli''' program and the YANG data module contents in use at the time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Command Variants'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help &amp;lt;comand-name&amp;gt;&amp;lt;/nowiki&amp;gt;help command  &amp;lt;nowiki&amp;gt;&amp;lt;command-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help for the specified yangcli command or YANG rpc statement.&lt;br /&gt;
|-&lt;br /&gt;
| help commands&lt;br /&gt;
| Display help text for all commands.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help object &amp;lt;object-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG database top-level object (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| help notification  &amp;lt;nowiki&amp;gt;&amp;lt;notification-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG notification event (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help type &amp;lt;type-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for an exported YANG data type (only if its module is available).&lt;br /&gt;
|}&lt;br /&gt;
Each of the help command variants also accepts a 'help-mode' parameter to control how much help text is displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Output Modes'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! mode&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| --brief&lt;br /&gt;
| Display minimal help text.&lt;br /&gt;
|-&lt;br /&gt;
| --normal&lt;br /&gt;
| Display a lot, but not always all the help text available (default mode).&lt;br /&gt;
|-&lt;br /&gt;
|  --full&lt;br /&gt;
| Display all available help text, including description statements.&lt;br /&gt;
|}&lt;br /&gt;
The following table shows some valid help commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| help help&lt;br /&gt;
| Get normal help for the help command.&lt;br /&gt;
|-&lt;br /&gt;
| help commands brief&lt;br /&gt;
| Get a 1 line description of each command.&lt;br /&gt;
|-&lt;br /&gt;
| help object system full&lt;br /&gt;
| Get all available help for the /system container and all its descendant nodes.&lt;br /&gt;
|-&lt;br /&gt;
| help type NcxIdentifier&lt;br /&gt;
| Get summary and description of the data type called 'NcxIdentifier'.&lt;br /&gt;
|-&lt;br /&gt;
| help notification sysSessionStart&lt;br /&gt;
| Get a summary of the 'sysSessionStart' notification, and each of objects in its payload.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Start a NETCONF session ==&lt;br /&gt;
Each yangcli program instance can run 1 NETCONF session at a time.&lt;br /&gt;
&lt;br /&gt;
If no session is currently active, then the prompt will contain just the program name, indicating that the 'connect' command is available:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== The connect Command ===&lt;br /&gt;
The 'connect' command is used to start a NETCONF session.&lt;br /&gt;
&lt;br /&gt;
There are 3 mandatory parameters for this command:&lt;br /&gt;
&lt;br /&gt;
* '''user''': the system (or SSH) user name to use&lt;br /&gt;
* '''server''': the IP address or DNS name of the NETCONF server to use&lt;br /&gt;
* '''password''': the password string to use&lt;br /&gt;
&lt;br /&gt;
Make sure you have a user name and password already configured on the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
If a partial command is given, then yangcli will prompt for any missing mandatory parameters. In this example, the complete command is given at once:&lt;br /&gt;
&lt;br /&gt;
 yangcli'''&amp;gt;''' '''connect server=localhost user=joe password=yangrocks'''&lt;br /&gt;
&lt;br /&gt;
After this command is entered, '''yangcli''' will generate some informational log messages to the screen.&lt;br /&gt;
&lt;br /&gt;
If the session is started successfully, a summary of the server session capabilities and available modules should be displayed. Also, the command prompt will change to indicate that a NETCONF session is currently active.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At this point any command supported by the server can be entered, in addition to any '''yangcli''' command (except 'connect').&lt;br /&gt;
&lt;br /&gt;
=== Fixing Connection Problems ===&lt;br /&gt;
If the session did not start correctly, check the error messages to fix the problem. Some common problems:&lt;br /&gt;
&lt;br /&gt;
* Make sure the '''netconfd''' program is running.&lt;br /&gt;
* Make sure the '''netconf-subsystem''' program is properly installed.&lt;br /&gt;
* Check if the SSH configuration contains the portion for NETCONF.&lt;br /&gt;
* If the SSH configuration looks correct, then try restarting the SSH server to make sure that configuration file is the one being used.&lt;br /&gt;
* If the SSH server seems to be running correctly, then check if any firewall or other security mechanism is blocking TCP port 830. If so, either enable TCP port 830, or enable port 22 on the NETCONF server (by restarting the server), and include 'port=22' in the 'connect' command parameters.&lt;br /&gt;
* If no firewall or other security measure is blocking TCP port 830, try to establish a normal SSH session with the server.&lt;br /&gt;
* If a normal SSH session works correctly, then check the log messages on the NETCONF server for more information.&lt;br /&gt;
&lt;br /&gt;
== Enable Notification Delivery ==&lt;br /&gt;
In order to receive the 'toastDone' notification event, a notification subscription has to be enabled.&lt;br /&gt;
&lt;br /&gt;
A default NETCONF notification stream can be started with the 'create-subscription' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''create-subscription'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on other activity within the NETCONF server, it is possible other notification events, such as 'sysSessionStart' or 'sysSessionEnd' will be generated. Notifications are displayed in their entirety, but not during 'rpc reply output'. If a command is being entered, the notification will be displayed, and then the command line restored.&lt;br /&gt;
&lt;br /&gt;
== Load the Toaster Module ==&lt;br /&gt;
The toaster module is not a core system module, and is not available automatically.&lt;br /&gt;
&lt;br /&gt;
The module has to be explicitly loaded by the NETCONF client.&lt;br /&gt;
&lt;br /&gt;
To load the server-supported version of the toaster module, use the 'load' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''load toaster'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Data Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    mod-revision 2009-11-20 &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:44:45Z &lt;br /&gt;
       sysCapabilityChange { &lt;br /&gt;
          changed-by { &lt;br /&gt;
             userName joe &lt;br /&gt;
             sessionId 1 &lt;br /&gt;
             remoteHost 127.0.0.1 &lt;br /&gt;
          } &lt;br /&gt;
          added-capability &lt;br /&gt;
           http://netconfcentral.com/ns/toaster?module=toaster&amp;amp;revision=2009-11-20 &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 3 &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the module was successfully loaded, then a data response will be sent, containing the revision date of the toaster module that was loaded. This response will be returned even if the module was already loaded.&lt;br /&gt;
&lt;br /&gt;
Note that the 'sysCapabilityChange' notification event will only be sent if the module has not already been loaded into the server. &amp;lt;nowiki&amp;gt;In this case, it was not advertised in the &amp;lt;hello&amp;gt; message for this session, and the toaster module needs to be loaded manually into yangcli with the 'mgrload' command:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''mgrload toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Load module 'toaster' OK&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable the Toaster ==&lt;br /&gt;
Try to make some toast, using the 'make-toast' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Error Reply 4 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    rpc-error { &lt;br /&gt;
       error-type protocol &lt;br /&gt;
       error-tag resource-denied &lt;br /&gt;
       error-severity error &lt;br /&gt;
       error-app-tag no-access &lt;br /&gt;
       error-message 'resource denied' &lt;br /&gt;
       error-info { &lt;br /&gt;
          error-number 269 &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
What happened?&lt;br /&gt;
&lt;br /&gt;
A 'resource-denied' error was returned instead of 'OK', because the toaster service is not enabled yet. A node has to be created in the NETCONF database before the 'make-toast' command can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lock the Databases ===&lt;br /&gt;
The first step is to lock the NETCONF databases for writing. Locks do not affect read operations.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has a high-level command to deal with locking, called 'get-locks'. It will handle retries for any missing locks, until an overall timeout occurs or all the locks needed are acquired.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' get-locks'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;lock&amp;gt; operations for get-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 get-locks finished OK &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the toaster Container ===&lt;br /&gt;
The toaster module uses a simple YANG 'presence' container to configure the toaster service.&lt;br /&gt;
&lt;br /&gt;
Once the /toaster container is created, the read-only nodes within that container will be maintained by the server, and the toaster service will be enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The first step is to create the /toaster node in the &amp;lt;candidate&amp;gt; configuration database:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' create /toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC OK Reply 5 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Now the /toaster node is created in the &amp;lt;candidate&amp;gt; database.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit the Database Changes ===&lt;br /&gt;
In order to activate these changes, the 'commit' command needs to be issued.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''commit'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 6 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:59:58Z &lt;br /&gt;
       sysConfigChange { &lt;br /&gt;
          userName joe &lt;br /&gt;
          sessionId 1 &lt;br /&gt;
          remoteHost 127.0.0.1 &lt;br /&gt;
          edit { &lt;br /&gt;
             target /toast:toaster &lt;br /&gt;
             operation create &lt;br /&gt;
          } &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 4 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
The 'RPC OK' message indicate that the server successfully commited the configuration.&lt;br /&gt;
&lt;br /&gt;
The 'sysConfigChange' notification indicates what was changed in the running configuration, and who made the change(s).&lt;br /&gt;
&lt;br /&gt;
The toaster server should now be enabled.&lt;br /&gt;
&lt;br /&gt;
=== Unlock the Databases ===&lt;br /&gt;
The database locks need to be released as soon as possible after the edits are completed or discarded.&lt;br /&gt;
&lt;br /&gt;
The high-level command 'release-locks' must be used if 'get-locks' was used to acquire the database locks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''release-locks '''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;unlock&amp;gt; operations for release-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the Toaster State Information ==&lt;br /&gt;
To discover the toaster model and its current status, the 'sget' or 'xget' commands can be used to retrieve just the toaster portion of the conceptual state data available on the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'sget' command is high-level subtree filter handler for the &amp;lt;get&amp;gt; operation:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''sget /toaster'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'xget' command is high-level XPath filter handler for the &amp;lt;get&amp;gt; operation. &amp;lt;/nowiki&amp;gt;It is only available if the NETCONF server supports the ''':xpath '''capability (like '''netconfd''').&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''xget /toaster'''&lt;br /&gt;
&lt;br /&gt;
Both commands should return the same data:&lt;br /&gt;
&lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC Data Reply 7 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    data { &lt;br /&gt;
       toaster { &lt;br /&gt;
          toasterManufacturer 'Acme, Inc.' &lt;br /&gt;
          toasterModelNumber 'Super Toastamatic 2000' &lt;br /&gt;
          toasterStatus up &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
This data shows that the 'Super Toastamatic 2000' is ready to make toast!&lt;br /&gt;
&lt;br /&gt;
== Start Making Toast ==&lt;br /&gt;
Now that the toaster is enabled, the 'make-toast' command should work.&lt;br /&gt;
&lt;br /&gt;
Instead of using the default parameter values, let's make a frozen waffle a little less done than normal:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 8 for session 1: &lt;br /&gt;
&lt;br /&gt;
At this point the toaster timer is running, and the simulated waffle is cooking,&lt;br /&gt;
&lt;br /&gt;
After about 40 seconds, the 'toastDone' notification should be received:&lt;br /&gt;
&lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:20:05Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus done &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 5 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was completed, and is ready to eat.&lt;br /&gt;
&lt;br /&gt;
== Stop Making Toast ==&lt;br /&gt;
What if you change your mind, and want wheat toast instead of a waffle?&lt;br /&gt;
&lt;br /&gt;
Repeat the previous command (Control-P should recall the previous command):&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 9 for session 1: &lt;br /&gt;
&lt;br /&gt;
Now enter the 'cancel-toast' command right away, before the waffle finishes:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''cancel-toast '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 10 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:24:36Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus cancelled &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 6 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was cancelled.&lt;br /&gt;
&lt;br /&gt;
== Close the NETCONF Session ==&lt;br /&gt;
To close the NETCONF session, use the 'close-session' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''close-session''' &lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 11 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 ses: session 1 shut by remote peer &lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the prompt returned to the default form, once the session was dropped by the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
The terminate the yangcli program, use the 'quit' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''quit '''&lt;br /&gt;
 &lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced Topics =&lt;br /&gt;
This section introduces some advanced features of the NETCONF protocol and YANG data modeling language.&lt;br /&gt;
&lt;br /&gt;
== Data Retrieval ==&lt;br /&gt;
=== Basic NETCONF Retrieval Operations ===&lt;br /&gt;
The NETCONF protocol has 2 different retrieval operations:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt;&amp;lt;/nowiki&amp;gt;''': get state data and the running configuration database.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt;&amp;lt;/nowiki&amp;gt;''': get just the specified configuration database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Each of these operations accepts a &amp;lt;filter&amp;gt; parameter, which has 2 forms:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''subtree filter:''' retrieve just the subtrees in the database that match the XML subtrees in the filter.&lt;br /&gt;
* '''XPath filter:''' retrieve just the subtrees that match the result node set produced by evaluating the specified XPath expression against the database. This mode cannot be used unless the ''':xpath''' capability must be advertised by the server.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program supports 3 different forms of each command:&lt;br /&gt;
&lt;br /&gt;
* '''plain''': plain NETCONF operation with user-supplied filter&lt;br /&gt;
* '''subtree'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter subtree XML.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* '''xpath'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter 'select' XML attribute&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Retrieval Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
! example&lt;br /&gt;
|-&lt;br /&gt;
| '''get'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get with-defaults=trim&lt;br /&gt;
|-&lt;br /&gt;
| '''get-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get-config&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get-config source=candidate&lt;br /&gt;
|-&lt;br /&gt;
| '''sget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget /system&lt;br /&gt;
|-&lt;br /&gt;
| '''sget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget-config source=running /nacm/rules &lt;br /&gt;
|-&lt;br /&gt;
| '''xget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| xget &amp;quot;/interfaces-state/interface/statistics&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''xget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;xget-config source=candidate &amp;quot;/interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The retrieval commands return an element named &amp;lt;data&amp;gt; containing the requested XML subtrees.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any identifier nodes (YANG key leafs) are needed to distinguish the data in the reply, they will be added as needed by the server. &amp;lt;nowiki&amp;gt;In the 'xget' example above, the &amp;lt;name&amp;gt; element for each interface would be returned, even though it was not directly requested by the XPath expression.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Default Value Filtering ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The data will also be filtered according to the defaults handling behavior of the server, unless the &amp;lt;with-defaults&amp;gt; parameter is added to the command. &amp;lt;/nowiki&amp;gt;This parameter is only supported if the server advertised the 'with-defaults' capability, If not, the client does not get any indication from the server what type of defaults filtering is being done (if any).&lt;br /&gt;
&lt;br /&gt;
There are 3 types of defaults filtering provided:&lt;br /&gt;
&lt;br /&gt;
* '''report-all''': no filtering -- return all nodes even those the server might normally suppress because they are considerer to be default values by the server.&lt;br /&gt;
* '''trim''': return all nodes except skip any leaf nodes that match the schema defined default value&lt;br /&gt;
* '''explicit''': return all nodes that were set by the client or the server to some value, even if the value happens to be the schema defined default. This is normally the default behavior for the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The defaults handling behavior can be changed just for a specific NETCONF session, using the &amp;lt;set-my-session&amp;gt; operation. &amp;lt;/nowiki&amp;gt;This is only available on the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' set-my-session with-defaults=report-all '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 12 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this example, the 'basic' behavior is changed from 'explicit' to 'report-all', but just for session 1. This setting is temporary, and will not be remembered when the session is terminated. &amp;lt;nowiki&amp;gt;If the &amp;lt;with-defaults&amp;gt; parameter is present, it will be used instead of this value.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Retrieval Operations ===&lt;br /&gt;
Any YANG module can add new operations with the 'rpc' statement.&lt;br /&gt;
&lt;br /&gt;
New retrieval operations may also be added which are associated with a protocol capability.&lt;br /&gt;
&lt;br /&gt;
Just like any other data model content, the operator (or application) needs to understand the YANG file definitions, including the description statements, to understand how each custom retrieval operation works.&lt;br /&gt;
&lt;br /&gt;
There are 2 custom retrieval operations supported by '''netconfd''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Special Retrieval Operations'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! operation&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| '''get-schema'''&lt;br /&gt;
| Retrieve the YANG or YIN source file for one of the modules advertised by the server.This is a standard operation defined in the '''ietf-netconf-monitoring''' module.&lt;br /&gt;
|-&lt;br /&gt;
| '''get-my-session'''&lt;br /&gt;
| Retrieve the customizable settings for my session. This is a proprietary operation defined in the '''yuma-my-session''' module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
Notifications are used in NETCONF to send server event information to the client application.&lt;br /&gt;
&lt;br /&gt;
A session must request notifications with the 'create-subscription' command.&lt;br /&gt;
&lt;br /&gt;
Notifications are grouped into 'streams', but only the 'NETCONF' stream is defined at this time.&lt;br /&gt;
&lt;br /&gt;
A notification subscription request specifies the stream name (and perhaps more parameters).&lt;br /&gt;
&lt;br /&gt;
A NETCONF session on the netconfd server will never expire due to inactivity, while a notification subscription is active. This allows notification processing applications to maintain long-lived connections without worrying about a NETCONF timeout. Note that the SSH server may also be configured to drop idle SSH sessions, whether a notification subscription is active or not.&lt;br /&gt;
&lt;br /&gt;
=== Notification Contents ===&lt;br /&gt;
[[Image:notification-structure.png]]&lt;br /&gt;
&lt;br /&gt;
The 'notification' element is sent from the server to the client, if an event occurs, and the client has created a notification subscription.&lt;br /&gt;
&lt;br /&gt;
The child nodes of this element comprise the notification content, and it is divided into 3 sections:&lt;br /&gt;
&lt;br /&gt;
# '''event generation time-stamp''': This standard NETCONF leaf is always the first child element within the notification element.&lt;br /&gt;
# '''event payload''': The module-specific event payload is represented as a container with the name of the notification. Any data nodes defined within the YANG notification statement appear (in order) as child nodes of the event type container.&lt;br /&gt;
# '''proprietary extensions''': Zero or more vendor-specific elements may appear after the event payload element. For example, the monotonically increasing 'sequence-id' element is added to each notification saved in the '''netconfd''' event log.&lt;br /&gt;
&lt;br /&gt;
=== Notification Replay ===&lt;br /&gt;
[[Image:notification-replay-buffer.png]]&lt;br /&gt;
&lt;br /&gt;
The NETCONF server will maintain an ordered buffer of saved notification events, if the :notification-replay capability is supported by the server. For the '''netconfd''' server, this is a configurable feature, set by the '''--eventlog-size''' parameter.&lt;br /&gt;
&lt;br /&gt;
The '''netconfd''' default is to save the most recent 1000 notification events.&lt;br /&gt;
&lt;br /&gt;
Only system events are saved and are available for retrieval. The 'replayComplete' and 'subscriptionComplete' events are session-specific events, and are therefore not saved in the replay buffer.&lt;br /&gt;
&lt;br /&gt;
The 'create-subscription' command has 2 parameters to request that stored notifications be delivered to the client session:&lt;br /&gt;
&lt;br /&gt;
* '''startTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred after this time are delivered.&lt;br /&gt;
* '''stopTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred before this time are delivered. This parameter can specify a time in the future. When that time has passed, the subscription will be terminated. The stopTime does not cause the server to wait that period of time to generate an event. If the stopTime is in the past, then the subscription will terminate after all the matching event timestamps in the replay buffer have been delivered.&lt;br /&gt;
&lt;br /&gt;
Notifications are delivered in the order they are stored. Each new '''netconfd''' notification contains a monotonically increasing sequence-id (unsigned integer). This can be used to help determine if any configured notification filters are working as expected.&lt;br /&gt;
&lt;br /&gt;
=== The interleave capability ===&lt;br /&gt;
The '''netconfd''' server supports the :interleave capability, which means that all commands (except create-subscription) will be accepted by the server. &amp;lt;nowiki&amp;gt;The client should expect &amp;lt;rpc-reply&amp;gt; and &amp;lt;notification&amp;gt; messages. &amp;lt;/nowiki&amp;gt;The server will always maintain proper message serialization. &amp;lt;nowiki&amp;gt;These messages will always be sent in their entirety, which may impact applications (e.g., a really long &amp;lt;get&amp;gt; response on the same session will delay notification delivery).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the NETCONF server does not support the :interleave capability, then it may only allow the &amp;lt;close-session&amp;gt; operation while the notification subscription is active. &amp;lt;/nowiki&amp;gt;In this case, a new NETCONF session is required to perform any management operations.&lt;br /&gt;
&lt;br /&gt;
This special mode is only applicable while a notification subscription is active. It is possible for a replay subscription to terminate, without terminating the session as well. In this case, the 'notificationComplete' event will be generated, and the session will return to accepting all possible operations.&lt;br /&gt;
&lt;br /&gt;
== Database Editing ==&lt;br /&gt;
NETCONF supports multiple conceptual configuration databases. Only the 'running' database is actually active. All other databases are scratch-pad databases, or some other special-purpose off-line database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Every NETCONF server must allow arbitrary partial (and concurrent) editing to its configuration with the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;Refer to the Yuma Tools User Manual for complete details on this NETCONF operation. The '''yangcli''' program has simplified editing commands, which are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;config&amp;gt; element within an &amp;lt;edit-config&amp;gt; PDU represents the 'root node' (/) in the path expression for each node in the conceptual database. &amp;lt;/nowiki&amp;gt;Each top-level YANG object that is supported and configured will be represented as child nodes to this root node. The conceptual database can be processed as an XML instance document with multiple top nodes (similar to XSLT rules).&lt;br /&gt;
&lt;br /&gt;
Database editing in NETCONF has several variants, but basically, it follows this simple procedure:&lt;br /&gt;
&lt;br /&gt;
# Lock the database(s) that will be affected.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Use &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; on the target database to make changes.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# Activate and save/commit the database edits.&lt;br /&gt;
# Unlock the database(s) that were previously locked.&lt;br /&gt;
&lt;br /&gt;
=== The Target Database ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Usually a NETCONF server supports the &amp;lt;edit-config&amp;gt; operation on only one database, which is either the candidate or the running database. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;This is called the 'target' database, which corresponds to the &amp;lt;target&amp;gt; parameter in the &amp;lt;edit-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the target database is the candidate configuration, then the &amp;lt;edit-config&amp;gt; operation does not always cause all possible database validation checking to be done by the server. &amp;lt;/nowiki&amp;gt;Since the candidate database is just a scratch-pad for (possibly) incremental edits, the server is not required to completely validate its contents. &amp;lt;nowiki&amp;gt;Instead, these 'final validation' tests are only required to be done when the &amp;lt;commit&amp;gt; operation is invoked.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program will automatically handle the target database management, based on the server capabilities reported each session, if the 'save' command is used. &amp;lt;nowiki&amp;gt;The manual procedure (&amp;lt;commit&amp;gt; and/or maybe &amp;lt;copy-config&amp;gt; operations) is also supported, but do not mix them within the same editing session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Database Locking ===&lt;br /&gt;
NETCONF supports database locking so a session can have exclusive write access to the configuration.&lt;br /&gt;
&lt;br /&gt;
These locks are intended to be short-lived, but there is no actual time limit on a lock. If the session terminates for any reason with any locks, they will be released automatically by the server.&lt;br /&gt;
&lt;br /&gt;
All the databases that are involved in the edit should be locked. This always includes the running database, and the candidate and startup databases, if they are supported by the server.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has 2 special commands to handle all locking:&lt;br /&gt;
&lt;br /&gt;
* '''get-locks''': Wait until all database locks have been acquired or the timeout occurs&lt;br /&gt;
* '''release-locks''': Rlease any locks that were obtained with get-locks&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on these commands.&lt;br /&gt;
&lt;br /&gt;
=== Non-Volatile Storage ===&lt;br /&gt;
The startup configuration is the conceptual database used on the next reboot of the NETCONF server. It is important to know whether the NETCONF server supports the :startup capability or not. &amp;lt;nowiki&amp;gt;If yes, then the operator must explicitly save the running database to non-volatile storage (the startup database), using the &amp;lt;copy-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;If no, then the server will keep the running and startup databases synchronized.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program has a high-level 'save' command, used after the editing operations, that will automatically issue the correct protocol operations to complete the edit, and save the changes in non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
The startup database is configurable in the '''netconfd''' server. The '''--with-startup''' configuration parameter controls whether the startup database will be used or not. The --startup parameter can be used to control the initial load of the running configuration in 3 different ways:&lt;br /&gt;
&lt;br /&gt;
# '''no startup''': skip this step and just use factory defaults&lt;br /&gt;
# '''default startup''': look for the default '''startup-cfg.xml''' file in the configured data path.&lt;br /&gt;
# '''specific startup''': use a specified file, either absolute file-spec, or a relative path in the configured data path&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on controlling non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
=== Editing Commands ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation should be used to make configuration changes. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;The &amp;lt;copy-config&amp;gt; operation can also be used, but this is a blunt hammer approach. &amp;lt;/nowiki&amp;gt;Although the '''netconfd''' server will always analyze the edit request and only affect the nodes that actually changed, this is not a requirement in the standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation allows the operator to have precise control of the server. &amp;lt;/nowiki&amp;gt;These database edits are performed by the server using a combination of 3 factors:&lt;br /&gt;
&lt;br /&gt;
# The nodes that currently exist in the target database.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The nodes that exist in the 'source' of the edits (either the inline &amp;lt;config&amp;gt; element or indirectly through the &amp;lt;url&amp;gt; element.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The &amp;lt;default-operation&amp;gt; parameter and any XML attributes in the source XML elements (nc:operation attribute and YANG insert operation attributes).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli'''&amp;lt;nowiki&amp;gt; program provides some high-level commands to automatically handle the complexity of the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;These commands use XPath expressions and a series of interactive prompts (e.g., for the mandatory nodes and key leafs) to fill in the specified data structures, and construct an optimized NETCONF message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Editing Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;command&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;description&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| create&lt;br /&gt;
| Create a new sub-tree, only if it does not already exist&lt;br /&gt;
|-&lt;br /&gt;
| delete&lt;br /&gt;
| Delete an existing sub-tree, only if it exists&lt;br /&gt;
|-&lt;br /&gt;
| merge&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, keeping any existing nodes that are not explicitly contained in the source.&lt;br /&gt;
|-&lt;br /&gt;
| replace&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, deleting any existing nodes that are not explicitly contained in the source. &amp;lt;nowiki&amp;gt;This is the mode used for the &amp;lt;copy-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| insert&lt;br /&gt;
| Insert or move a YANG list or leaf-list entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for details on these commands.&lt;br /&gt;
&lt;br /&gt;
== Access Control ==&lt;br /&gt;
The '''netconfd''' server can be configured to give precise access rights to each user (the SSH user name associated with the NETCONF session). Some important points to remember about access control:&lt;br /&gt;
&lt;br /&gt;
* There are 3 types of access -- read, write, and execute.&lt;br /&gt;
* If a user does not have read access to some data, then it is silently omitted from the reply.&lt;br /&gt;
* The 'access-denied' error is not generated for read requests. &amp;lt;nowiki&amp;gt;It is only generated for write requests to the database, or &amp;lt;rpc&amp;gt; operation execution requests.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* An access request results in 1 of 2 outcomes: permit or deny&lt;br /&gt;
* The server resolves the access request by searching the access control rules. Either an explicit rule will apply, or the default access rights will be checked if no rule is found.&lt;br /&gt;
* The default access rights are configurable, but usually set as follows:&lt;br /&gt;
** read access is permitted&lt;br /&gt;
** write access is denied&lt;br /&gt;
** exec access is permitted&lt;br /&gt;
* The '''nacm:secure''' and '''nacm:very-secure''' extensions can be used by the YANG module author to override the default access rights, and deny access instead. &amp;lt;nowiki&amp;gt;For example, the &amp;lt;reboot&amp;gt; operation is not permitted by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* There is a configurable 'superuser' user name. If desired, a specific user name will be considered the 'super user' and all access control will be bypassed for this user. By default, this is the name 'superuser', not 'root', since root login to the SSH server is not recommended.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
The '''yangcli''' program supports variables for easier reuse and script-based operations.&lt;br /&gt;
&lt;br /&gt;
There are 2 types of variables:&lt;br /&gt;
&lt;br /&gt;
* '''file variables''': the variable name is a file name, and the contents of the variable are stored in this file.&lt;br /&gt;
* '''internal variables''': the variable name is just an internal identifier, and the contents of the variable are stored in memory&lt;br /&gt;
&lt;br /&gt;
Variables are set with assignment statements. Here are some examples:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$backup = get-config source=running'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$bad-data = &amp;quot;warn&amp;quot;'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; $itf = &amp;quot;//interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Note that in order to assign a string value (e.g., $$bad-data = &amp;quot;warn&amp;quot; above), single or double quotes must be used. An unquoted string will be interpreted as a command name, not a simple string value.&lt;br /&gt;
&lt;br /&gt;
Variables are referenced in a similar manner, except the variable is on the right-hand side of the equation. These commands are equivalent in this example:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' @myfile.xml = xget select=$itf'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; @myfile.xml = xget //interface[name='eth0']&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Complex variable substitution is also supported:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' copy-config source=$$backup target=candidate'''&lt;br /&gt;
&lt;br /&gt;
Note that '''yangcli''' will attempt to figure out the structure of the parameter (e.g., 'source' and 'target' above), and adjust the NETCONF operation content. In the example above, since 'source' and 'target' are choices, the real nodes within the cases are examined, and the most appropriate case is selected. &amp;lt;nowiki&amp;gt;The 'source' parameter will contain an in-line &amp;lt;config&amp;gt; element with all the child nodes in the &amp;lt;/nowiki&amp;gt;'''$$backup''' variable, and the target parameter will contain an empty element named '''&amp;lt;nowiki&amp;gt;&amp;lt;candidate&amp;gt;.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several types of internal variables available in the '''yangcli''' program:&lt;br /&gt;
&lt;br /&gt;
* read-only system variables ($$USER)&lt;br /&gt;
* read-write system variables ($$default-operation)&lt;br /&gt;
* global user variables, available at all 'runstack' levels ($$backup)&lt;br /&gt;
* local user variables available in the current 'runstack' level only ($itf)&lt;br /&gt;
&lt;br /&gt;
The command 'show vars' can be used to see the current value of all program variables:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''show vars '''&lt;br /&gt;
CLI Variables&lt;br /&gt;
&lt;br /&gt;
yangcli {&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  feature-enable-default true&lt;br /&gt;
  fixorder true&lt;br /&gt;
  force-target candidate&lt;br /&gt;
  indent 2&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  ncport 830&lt;br /&gt;
  password ****&lt;br /&gt;
  private-key /home/joe/.ssh/id_rsa&lt;br /&gt;
  public-key /home/joe/.ssh/id_rsa.pub&lt;br /&gt;
  server localhost&lt;br /&gt;
  subdirs true&lt;br /&gt;
  tcp-direct-enable false&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  transport ssh&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  warn-idlen 64&lt;br /&gt;
  warn-linelen 0&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Read-only environment variables&lt;br /&gt;
&lt;br /&gt;
  HOME /home/joe&lt;br /&gt;
  HOSTNAME &lt;br /&gt;
  LANG en_US.utf8&lt;br /&gt;
  PWD /home/joe&lt;br /&gt;
  SHELL /bin/bash&lt;br /&gt;
  USER joe&lt;br /&gt;
  YUMA_DATAPATH &lt;br /&gt;
  YUMA_HOME &lt;br /&gt;
  YUMA_MODPATH &lt;br /&gt;
  YUMA_RUNPATH &lt;br /&gt;
&lt;br /&gt;
Read-write system variables&lt;br /&gt;
&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  default-module &lt;br /&gt;
  default-operation merge&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  error-option none&lt;br /&gt;
  fixorder true&lt;br /&gt;
  indent 2&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  optional false&lt;br /&gt;
  server localhost&lt;br /&gt;
  test-option set&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  with-defaults none&lt;br /&gt;
&lt;br /&gt;
Global variables&lt;br /&gt;
&lt;br /&gt;
  backup {&lt;br /&gt;
    interfaces &lt;br /&gt;
    nacm &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Local variables&lt;br /&gt;
&lt;br /&gt;
  itf //interface[name='eth0']&lt;br /&gt;
yangcli joe@localhost&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
Scripts are simply a collection of '''yangcli''' commands and/or assignment statements that are stored in a text file, instead of typed directly. Scripts can call other scripts (except loops are not allowed), and numbered parameters are available (e.g., --P1='fred' passed as parameter, the $1 expands to 'fred' inside the script).&lt;br /&gt;
&lt;br /&gt;
The '''$YUMA_RUNPATH''' environment variable, or the '''--runpath''' configuration variable, can be used to set the directory path to look for script files. There is also a default path for finding files, explained in the Yuma Tools User Manual.&lt;br /&gt;
&lt;br /&gt;
The command ''''list scripts'''' can be used to show the potential script file available in the run path.&lt;br /&gt;
&lt;br /&gt;
The command ''''run foo'''' is used to invoke a script named 'foo' (with no file extension).&lt;br /&gt;
&lt;br /&gt;
If a command fails during a script, execution is halted right away and no more commands in the script are executed. If 'get-locks' was used, then any locks obtained will be automatically released. All script runstack levels will be canceled, not just the current script.&lt;br /&gt;
&lt;br /&gt;
Script syntax will be expanded in a future release to provide loops and conditional statements.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=381</id>
		<title>Yuma Quickstart Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=381"/>
		<updated>2019-05-02T11:37:34Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* NETCONF Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Quickstart Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Client/Server Quickstart Guide&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 - 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 - 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
This document assumes you have successfully set up the software as described in the printed document:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the [[Yuma User Manual]] for a complete introduction to Yuma Tools.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma Tools programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma Tools NETCONF client and server programs. It covers the basic usage of the '''yangcli''' client application and the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
== What is NETCONF and YANG? ==&lt;br /&gt;
The Yuma Tools suite provides automated support for development and usage of network management information. Information is exchanged in XML encoding within a session between a client and a server.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;Network Configuration Protocol&amp;quot; (NETCONF) is used to provide the management sessions, operations, and database framework available on the server. The operations, notifications, and the database contents supported by a particular NETCONF server are extensible, and defined with a modular and easy-to-learn language called YANG. The database is used to contain YANG data structures which represent the configuration of the device containing the NETCONF server. This configuration can be saved in non-volatile storage so the configuration can be restored upon reboot.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;YANG Data Modeling Language&amp;quot; is used to define the syntax and semantics of the NETCONF operations, notification events, and database content. Machine and human readable semantics and constraints are used by YANG tools (including Yuma Tools) to automate behavior within the NETCONF protocol for clients and servers.&lt;br /&gt;
&lt;br /&gt;
For people familiar with SNMP and SMIv2, NETCONF is like an XML-based, high-level version of SNMP, and a YANG module is like a MIB module, except MIB tables can be nested and much more complex than in SMIv2. Instead of Enterprise IDs and OBJECT-IDENTIFIERs, YANG uses XML namespaces and XPath path expressions to identify module ownership and contents within the protocol PDUs.&lt;br /&gt;
&lt;br /&gt;
== How Does an Operator Use NETCONF and YANG? ==&lt;br /&gt;
An operator uses a NETCONF session almost like it was a CLI session, except there are structured, schema-defined requests and responses, encoded in XML. YANG modules are like MIB modules for CLI content. Instead of ad-hoc unstructured documentation like CLI, NETCONF uses a data definition language to define management modules. The actual modules that a server supports will vary, just like MIB (SMIv2) modules.&lt;br /&gt;
&lt;br /&gt;
The NETCONF protocol is available for many different transports. The most popular is the SSH2 protocol. The 'netconf' subsystem is used (on TCP port 830) to start a special SSH session with the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
Using NETCONF over SSH is just like using CLI over SSH to manage a networking device, except the messages are exchanged in XML, not plain-text. SSH user names and passwords are used for session authentication and authorization.&lt;br /&gt;
&lt;br /&gt;
NETCONF is designed to provide a programmatic interface, so it is usually used with a management application, instead of a direct (raw) SSH terminal application. The '''yangcli''' program within Yuma Tools is a YANG-driven NETCONF client application that supports scripts, XPath, and many automated features to simplify management of NETCONF servers.&lt;br /&gt;
&lt;br /&gt;
Once a session is started, similar to a CLI session, the operator issues commands (NETCONF operations) to the server, and the server performs each requested operation in order, and returns a status message and/or some data to the client. &amp;lt;nowiki&amp;gt;Notifications can also be received, if the session has requested them with the &amp;lt;create-subscription&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session starts, a &amp;lt;hello&amp;gt; message is sent by the server that has all the NETCONF capabilities and YANG modules supported by the server. &amp;lt;/nowiki&amp;gt;Capabilities are optional protocol mechanisms, beyond those defined in the base protocol (RFC 4741, RFC 6241). &amp;lt;nowiki&amp;gt;The client application knows what operations, notification events, and database contents are supported on the server, based on the information in the &amp;lt;hello&amp;gt; message.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NETCONF has a set of basic database (CRUD) operations for managing the configuration database. In addition, any YANG module can define new protocol operations and notification events.&lt;br /&gt;
&lt;br /&gt;
== How Does a Developer Use NETCONF and YANG? ==&lt;br /&gt;
A NETCONF server developer decides what modules need to be supported by the NETCONF server, and implements the device instrumentation code for those modules.&lt;br /&gt;
&lt;br /&gt;
Much of the NETCONF protocol related code is handled by the NETCONF stack, based on the YANG module contents. Therefore, the most important task for a developer is designing a good YANG module.&lt;br /&gt;
&lt;br /&gt;
After the YANG module is written, the device instrumentation code for the YANG module is then added by the developer. The code uses the Yuma API to register callbacks and access the YANG database. The 'callback code' is called from the NETCONF stack when database operation requests for the object(s) in the YANG module are received by the server.&lt;br /&gt;
&lt;br /&gt;
Once this library is completed, the YANG module and its binary server instrumentation library (SIL) can be loaded into the NETCONF server at run-time. There is no need to recompile the '''netconfd''' server, or even reboot it.&lt;br /&gt;
&lt;br /&gt;
= Getting Started with toaster.yang =&lt;br /&gt;
This section will demonstrate the basic operation of Yuma Tools to use a NETCONF session to manage a remote device with a YANG data model. The Yuma Tools programs and libraries must already be installed. Refer to the Yuma Tools Installation Guide if this has not yet been done.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' client program and '''netconfd''' server program do not need to be installed on the same machine. For simplicity, the server address 'localhost' is used in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is libtoaster? ==&lt;br /&gt;
There is a sample server instrumentation library (SIL) included, named libtoaster. [https://sourceforge.net/p/yuma123/git/ci/master/tree/libtoaster/src/toaster.c toaster.c] is the module-specific server instrumentation code for the management data defined in [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/netconfcentral/toaster.yang toaster.yang ]. This is based on the original TOASTER-MIB by Epilogue. This YANG module provides simple operations to make toast, and some simple NETCONF database objects to enable and monitor the toaster.&lt;br /&gt;
&lt;br /&gt;
The new YANG version of the TOASTER-MIB is different is some ways:&lt;br /&gt;
&lt;br /&gt;
* extensible YANG identities are used to identify the bread type, instead of a hard-wired enumerated list.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;protocol operations (&amp;lt;make-toast&amp;gt; and &amp;lt;cancel-toast&amp;gt;) are used instead of an 'up/down' switch within the database. &amp;lt;/nowiki&amp;gt;NETCONF databases are intended to contain persistent data structures, and 'actions' such as starting or stopping the toaster are done with new protocol operations, instead of editing the database with the standard operations.&lt;br /&gt;
* A simple configuration 'presence container' object is used to enable and disable the toaster service, instead of hard-wiring the toaster service availability.&lt;br /&gt;
* A notification is generated when the toast is done or canceled. This notification can be used instead of polling the toaster status object.&lt;br /&gt;
&lt;br /&gt;
== Other examples: ietf-interfaces and ietf-system ==&lt;br /&gt;
The partial SIL implementations of the stadard ietf-system.yang and ietf-interfaces.yang models are included as examples and should work out of the box for standard Linux distributions.&lt;br /&gt;
&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-interfaces.yang ietf-interfaces.yang ] ([https://tools.ietf.org/rfc/rfc7223.txt rfc7223]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-interfaces/ietf-interfaces.c ietf-interfaces.c]&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-system.yang ietf-system.yang] ([https://tools.ietf.org/rfc/rfc7317.txt rfc7317]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-system/ietf-system.c ietf-system.c]&lt;br /&gt;
&lt;br /&gt;
One can start (provided you have already compiled installed and configured netconfd and the modules) netconfd and load the YANG models with the installed SIL implementations like this:&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/netconfd --module=ietf-system --module=ietf-interfaces&lt;br /&gt;
&lt;br /&gt;
== Start the netconfd server ==&lt;br /&gt;
If the '''netconfd''' server is already running, then skip this section.&lt;br /&gt;
&lt;br /&gt;
Details for all the '''netconfd''' configuration parameters can be found in the [[Yuma netconfd Manual]].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the server will accept sessions on TCP port 830&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the target database is &amp;lt;candidate&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;no &amp;lt;startup&amp;gt; database (mirrored NV-save)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;validate&amp;gt; operation is supported&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the access control mode is 'enforcing'&lt;br /&gt;
* the super user account name is 'superuser'&lt;br /&gt;
* the server will search startup-cfg.xml using the default search path&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the default &amp;lt;with-defaults&amp;gt; behavior is 'explicit'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* notification replay is enabled with a buffer size of 1000 events and a maximum message burst per session of 10 notifications&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;hello&amp;gt; exchange timeout is 10 minutes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the session idle timeout is 1 hour&lt;br /&gt;
* the default session indent amount is 2 spaces&lt;br /&gt;
* the default session line-size is 72 characters&lt;br /&gt;
* violation of strict YANG XML ordering will not cause errors&lt;br /&gt;
* logging level 'info' is enabled and sent to STDOUT&lt;br /&gt;
&lt;br /&gt;
=== SSH Server ===&lt;br /&gt;
To start the NETCONF server, make sure that the '''sshd''' server is running, and the following configuration is included in '''/etc/ssh/sshd_config.'''&lt;br /&gt;
&lt;br /&gt;
 '''Port 22'''&lt;br /&gt;
 '''Port 830'''&lt;br /&gt;
 '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
The 'Subsystem' command may be different if '''netconf-subsystem''' has been installed in a different location than '''/usr/local/sbin'''. The 'Port 22' command is needed to make sure the SSH server will accept SSH sessions in addition to NETCONF sessions.&lt;br /&gt;
&lt;br /&gt;
=== NETCONF Server ===&lt;br /&gt;
For this example, the superuser account needs to be enabled. This is done with a CLI parameter, and the user name 'joe' is used. Replace 'joe' with your username.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the foreground:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
joe@joesserver:~$ /usr/sbin/netconfd --superuser=joe&lt;br /&gt;
Starting netconfd...&lt;br /&gt;
Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
Copyright (c) 2013-2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
agt: Startup config loaded OK&lt;br /&gt;
     Source: /home/joe/.yuma/startup-cfg.xml&lt;br /&gt;
&lt;br /&gt;
Running netconfd server (2.12-0)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If no startup configuration is available, then the server defaults will be used instead. Any message about 'startup-cfg.xml' not found can be ignored. It just means the server booted with the factory default configuration.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the background:&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; /usr/sbin/netconfd --superuser=joe --log=~/mylog &amp;amp;&lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows that a logfile in the user's home directory called 'mylog' will be used for all server log messages. The '&amp;amp;' at the end causes the command to be run in the background.&lt;br /&gt;
&lt;br /&gt;
== Start the yangcli client ==&lt;br /&gt;
Once the NETCONF server is running, it will accept client sessions If running '''netconfd''' interactively on localhost, then start a new terminal window to continue.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the client will attempt to start sessions on TCP port 830&lt;br /&gt;
* the client will attempt to automatically complete partial commands&lt;br /&gt;
* the command line history will be automatically loaded upon startup, and saved upon exit&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the client will attempt to automatically load any YANG modules advertised in the server &amp;lt;hello&amp;gt; message&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the client will check before using invalid parameter values&lt;br /&gt;
* the plain display mode will be used, with 72 characters per line&lt;br /&gt;
* each nest level of displayed data will be indented 2 spaces &lt;br /&gt;
* the XML order of messages sent to the server will be corrected, as needed&lt;br /&gt;
* the logging level of 'info' is set, and log messages are sent to STDOUT&lt;br /&gt;
* the client will wait 30 seconds for responses&lt;br /&gt;
&lt;br /&gt;
=== Run yangcli ===&lt;br /&gt;
The yangcli program should be found in the PATH environment variable.&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; '''yangcli'''&lt;br /&gt;
&lt;br /&gt;
If the yangcli program is not found, then try the full path:&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; '''/usr/bin/yangcli'''&lt;br /&gt;
&lt;br /&gt;
=== Startup Screen ===&lt;br /&gt;
The startup screen shows the following information:&lt;br /&gt;
&lt;br /&gt;
* program version and copyright&lt;br /&gt;
* tab key can be used for command and parameter completion&lt;br /&gt;
* basic help instructions&lt;br /&gt;
* basic statement instructions&lt;br /&gt;
&lt;br /&gt;
=== Command Line Editing ===&lt;br /&gt;
The command lines are stored in a history buffer.&lt;br /&gt;
&lt;br /&gt;
Any previous command line (except a password parameter line) can be recalled and used again.&lt;br /&gt;
&lt;br /&gt;
Any command in the command buffer (current or recalled) can be edited. The default key settings are aligned with the emacs editor. Refer to the [[Yuma yangcli Manual]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Escape Commands ===&lt;br /&gt;
Not all parameters need to be entered at one time. If yangcli needs more information, based on the initial command line, then 1 or more missing parameters will be requested, in sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to get help, skip a parameter, or even cancel the entire command during one of these sub-command modes, by using an escape command. This is a 1 or 2 character command, followed by the 'enter' key (as usual to end a command).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Escape Command Summary'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?s&lt;br /&gt;
| skip the current parameter&lt;br /&gt;
|-&lt;br /&gt;
| ?c&lt;br /&gt;
| cancel the current command&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| get help&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| get full help&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Using the '?s' command to skip a parameter may cause the &amp;lt;rpc&amp;gt; request to be invalid.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the setting of the '''--bad-data''' configuration parameter, this may or may not be allowed. The default setting is to warn and confirm. This configuration parameter also affects parameter values that are invalid according to the YANG module definition.&lt;br /&gt;
&lt;br /&gt;
== Getting Context Sensitive Help ==&lt;br /&gt;
The '''yangcli''' program provides context-sensitive help based on the current NETCONF session status and the set of YANG modules currently loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session is active, the set of modules advertised in the &amp;lt;hello&amp;gt; message by the server will be used to generate help text, if available. &amp;lt;/nowiki&amp;gt;The ''''mgrload'''' command can be used to force '''yangcli''' to use different or additional YANG modules.&lt;br /&gt;
&lt;br /&gt;
If the '''yangcli'''&amp;lt;nowiki&amp;gt; program does not have the advertised revision of a particular module available in the module search path, and the NETCONF server supports the standard &amp;lt;get-schema&amp;gt; operation, then the module will be retrieved from the server, and used just for that session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any features or deviations are advertised for a YANG module, then they will be applied to the modules used just for the current session. The help text and the error checking done for the module will be based on this 'patched' module, not the 'plain' module specified in the capability URI string.&lt;br /&gt;
&lt;br /&gt;
=== Tab Key for Command Completion ===&lt;br /&gt;
The 'tab' key can be used at any time to see a list of the possible completions that the command interpreter will accept. The list will be displayed for command names and some command parameters.&lt;br /&gt;
&lt;br /&gt;
When a NETCONF session is active, all the NETCONF operations will be available. Additional commands may also be available if the server advertised any YANG modules containing 'rpc' statements.&lt;br /&gt;
&lt;br /&gt;
=== The '?' and '??' Escape Sequences ===&lt;br /&gt;
If a partial command is entered, or if a data structure is being filled, then the help escape sequences are available to get help about that parameter or data node. Use one question mark for help, and two question marks for maximum help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Escape Sequences'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! sequence&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| Print some help text, but not description statements and some other information.&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| Print maximum help text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following example shows the help text for the 'user' parameter for the 'connect' operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''connect''' &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; '''? '''&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;leaf user [NcxUserName] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
       length: 1..63 &lt;br /&gt;
       &amp;lt;nowiki&amp;gt;pattern: [a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,62} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The type of object, its name, data type, and any restrictions, will be printed.&lt;br /&gt;
&lt;br /&gt;
After that, the previous prompt will be redisplayed.&lt;br /&gt;
&lt;br /&gt;
=== The 'help' Command ===&lt;br /&gt;
The '''help''' command can be used to display all kinds of information about the '''yangcli''' program and the YANG data module contents in use at the time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Command Variants'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help &amp;lt;comand-name&amp;gt;&amp;lt;/nowiki&amp;gt;help command  &amp;lt;nowiki&amp;gt;&amp;lt;command-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help for the specified yangcli command or YANG rpc statement.&lt;br /&gt;
|-&lt;br /&gt;
| help commands&lt;br /&gt;
| Display help text for all commands.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help object &amp;lt;object-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG database top-level object (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| help notification  &amp;lt;nowiki&amp;gt;&amp;lt;notification-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG notification event (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help type &amp;lt;type-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for an exported YANG data type (only if its module is available).&lt;br /&gt;
|}&lt;br /&gt;
Each of the help command variants also accepts a 'help-mode' parameter to control how much help text is displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Output Modes'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! mode&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| --brief&lt;br /&gt;
| Display minimal help text.&lt;br /&gt;
|-&lt;br /&gt;
| --normal&lt;br /&gt;
| Display a lot, but not always all the help text available (default mode).&lt;br /&gt;
|-&lt;br /&gt;
|  --full&lt;br /&gt;
| Display all available help text, including description statements.&lt;br /&gt;
|}&lt;br /&gt;
The following table shows some valid help commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| help help&lt;br /&gt;
| Get normal help for the help command.&lt;br /&gt;
|-&lt;br /&gt;
| help commands brief&lt;br /&gt;
| Get a 1 line description of each command.&lt;br /&gt;
|-&lt;br /&gt;
| help object system full&lt;br /&gt;
| Get all available help for the /system container and all its descendant nodes.&lt;br /&gt;
|-&lt;br /&gt;
| help type NcxIdentifier&lt;br /&gt;
| Get summary and description of the data type called 'NcxIdentifier'.&lt;br /&gt;
|-&lt;br /&gt;
| help notification sysSessionStart&lt;br /&gt;
| Get a summary of the 'sysSessionStart' notification, and each of objects in its payload.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Start a NETCONF session ==&lt;br /&gt;
Each yangcli program instance can run 1 NETCONF session at a time.&lt;br /&gt;
&lt;br /&gt;
If no session is currently active, then the prompt will contain just the program name, indicating that the 'connect' command is available:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== The connect Command ===&lt;br /&gt;
The 'connect' command is used to start a NETCONF session.&lt;br /&gt;
&lt;br /&gt;
There are 3 mandatory parameters for this command:&lt;br /&gt;
&lt;br /&gt;
* '''user''': the system (or SSH) user name to use&lt;br /&gt;
* '''server''': the IP address or DNS name of the NETCONF server to use&lt;br /&gt;
* '''password''': the password string to use&lt;br /&gt;
&lt;br /&gt;
Make sure you have a user name and password already configured on the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
If a partial command is given, then yangcli will prompt for any missing mandatory parameters. In this example, the complete command is given at once:&lt;br /&gt;
&lt;br /&gt;
 yangcli'''&amp;gt;''' '''connect server=localhost user=joe password=yangrocks'''&lt;br /&gt;
&lt;br /&gt;
After this command is entered, '''yangcli''' will generate some informational log messages to the screen.&lt;br /&gt;
&lt;br /&gt;
If the session is started successfully, a summary of the server session capabilities and available modules should be displayed. Also, the command prompt will change to indicate that a NETCONF session is currently active.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At this point any command supported by the server can be entered, in addition to any '''yangcli''' command (except 'connect').&lt;br /&gt;
&lt;br /&gt;
=== Fixing Connection Problems ===&lt;br /&gt;
If the session did not start correctly, check the error messages to fix the problem. Some common problems:&lt;br /&gt;
&lt;br /&gt;
* Make sure the '''netconfd''' program is running.&lt;br /&gt;
* Make sure the '''netconf-subsystem''' program is properly installed.&lt;br /&gt;
* Check if the SSH configuration contains the portion for NETCONF.&lt;br /&gt;
* If the SSH configuration looks correct, then try restarting the SSH server to make sure that configuration file is the one being used.&lt;br /&gt;
* If the SSH server seems to be running correctly, then check if any firewall or other security mechanism is blocking TCP port 830. If so, either enable TCP port 830, or enable port 22 on the NETCONF server (by restarting the server), and include 'port=22' in the 'connect' command parameters.&lt;br /&gt;
* If no firewall or other security measure is blocking TCP port 830, try to establish a normal SSH session with the server.&lt;br /&gt;
* If a normal SSH session works correctly, then check the log messages on the NETCONF server for more information.&lt;br /&gt;
&lt;br /&gt;
== Enable Notification Delivery ==&lt;br /&gt;
In order to receive the 'toastDone' notification event, a notification subscription has to be enabled.&lt;br /&gt;
&lt;br /&gt;
A default NETCONF notification stream can be started with the 'create-subscription' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''create-subscription'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on other activity within the NETCONF server, it is possible other notification events, such as 'sysSessionStart' or 'sysSessionEnd' will be generated. Notifications are displayed in their entirety, but not during 'rpc reply output'. If a command is being entered, the notification will be displayed, and then the command line restored.&lt;br /&gt;
&lt;br /&gt;
== Load the Toaster Module ==&lt;br /&gt;
The toaster module is not a core system module, and is not available automatically.&lt;br /&gt;
&lt;br /&gt;
The module has to be explicitly loaded by the NETCONF client.&lt;br /&gt;
&lt;br /&gt;
To load the server-supported version of the toaster module, use the 'load' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''load toaster'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Data Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    mod-revision 2009-11-20 &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:44:45Z &lt;br /&gt;
       sysCapabilityChange { &lt;br /&gt;
          changed-by { &lt;br /&gt;
             userName joe &lt;br /&gt;
             sessionId 1 &lt;br /&gt;
             remoteHost 127.0.0.1 &lt;br /&gt;
          } &lt;br /&gt;
          added-capability &lt;br /&gt;
           http://netconfcentral.com/ns/toaster?module=toaster&amp;amp;revision=2009-11-20 &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 3 &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the module was successfully loaded, then a data response will be sent, containing the revision date of the toaster module that was loaded. This response will be returned even if the module was already loaded.&lt;br /&gt;
&lt;br /&gt;
Note that the 'sysCapabilityChange' notification event will only be sent if the module has not already been loaded into the server. &amp;lt;nowiki&amp;gt;In this case, it was not advertised in the &amp;lt;hello&amp;gt; message for this session, and the toaster module needs to be loaded manually into yangcli with the 'mgrload' command:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''mgrload toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Load module 'toaster' OK&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable the Toaster ==&lt;br /&gt;
Try to make some toast, using the 'make-toast' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Error Reply 4 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    rpc-error { &lt;br /&gt;
       error-type protocol &lt;br /&gt;
       error-tag resource-denied &lt;br /&gt;
       error-severity error &lt;br /&gt;
       error-app-tag no-access &lt;br /&gt;
       error-message 'resource denied' &lt;br /&gt;
       error-info { &lt;br /&gt;
          error-number 269 &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
What happened?&lt;br /&gt;
&lt;br /&gt;
A 'resource-denied' error was returned instead of 'OK', because the toaster service is not enabled yet. A node has to be created in the NETCONF database before the 'make-toast' command can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lock the Databases ===&lt;br /&gt;
The first step is to lock the NETCONF databases for writing. Locks do not affect read operations.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has a high-level command to deal with locking, called 'get-locks'. It will handle retries for any missing locks, until an overall timeout occurs or all the locks needed are acquired.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' get-locks'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;lock&amp;gt; operations for get-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 get-locks finished OK &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the toaster Container ===&lt;br /&gt;
The toaster module uses a simple YANG 'presence' container to configure the toaster service.&lt;br /&gt;
&lt;br /&gt;
Once the /toaster container is created, the read-only nodes within that container will be maintained by the server, and the toaster service will be enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The first step is to create the /toaster node in the &amp;lt;candidate&amp;gt; configuration database:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' create /toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC OK Reply 5 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Now the /toaster node is created in the &amp;lt;candidate&amp;gt; database.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit the Database Changes ===&lt;br /&gt;
In order to activate these changes, the 'commit' command needs to be issued.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''commit'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 6 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:59:58Z &lt;br /&gt;
       sysConfigChange { &lt;br /&gt;
          userName joe &lt;br /&gt;
          sessionId 1 &lt;br /&gt;
          remoteHost 127.0.0.1 &lt;br /&gt;
          edit { &lt;br /&gt;
             target /toast:toaster &lt;br /&gt;
             operation create &lt;br /&gt;
          } &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 4 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
The 'RPC OK' message indicate that the server successfully commited the configuration.&lt;br /&gt;
&lt;br /&gt;
The 'sysConfigChange' notification indicates what was changed in the running configuration, and who made the change(s).&lt;br /&gt;
&lt;br /&gt;
The toaster server should now be enabled.&lt;br /&gt;
&lt;br /&gt;
=== Unlock the Databases ===&lt;br /&gt;
The database locks need to be released as soon as possible after the edits are completed or discarded.&lt;br /&gt;
&lt;br /&gt;
The high-level command 'release-locks' must be used if 'get-locks' was used to acquire the database locks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''release-locks '''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;unlock&amp;gt; operations for release-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the Toaster State Information ==&lt;br /&gt;
To discover the toaster model and its current status, the 'sget' or 'xget' commands can be used to retrieve just the toaster portion of the conceptual state data available on the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'sget' command is high-level subtree filter handler for the &amp;lt;get&amp;gt; operation:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''sget /toaster'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'xget' command is high-level XPath filter handler for the &amp;lt;get&amp;gt; operation. &amp;lt;/nowiki&amp;gt;It is only available if the NETCONF server supports the ''':xpath '''capability (like '''netconfd''').&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''xget /toaster'''&lt;br /&gt;
&lt;br /&gt;
Both commands should return the same data:&lt;br /&gt;
&lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC Data Reply 7 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    data { &lt;br /&gt;
       toaster { &lt;br /&gt;
          toasterManufacturer 'Acme, Inc.' &lt;br /&gt;
          toasterModelNumber 'Super Toastamatic 2000' &lt;br /&gt;
          toasterStatus up &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
This data shows that the 'Super Toastamatic 2000' is ready to make toast!&lt;br /&gt;
&lt;br /&gt;
== Start Making Toast ==&lt;br /&gt;
Now that the toaster is enabled, the 'make-toast' command should work.&lt;br /&gt;
&lt;br /&gt;
Instead of using the default parameter values, let's make a frozen waffle a little less done than normal:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 8 for session 1: &lt;br /&gt;
&lt;br /&gt;
At this point the toaster timer is running, and the simulated waffle is cooking,&lt;br /&gt;
&lt;br /&gt;
After about 40 seconds, the 'toastDone' notification should be received:&lt;br /&gt;
&lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:20:05Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus done &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 5 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was completed, and is ready to eat.&lt;br /&gt;
&lt;br /&gt;
== Stop Making Toast ==&lt;br /&gt;
What if you change your mind, and want wheat toast instead of a waffle?&lt;br /&gt;
&lt;br /&gt;
Repeat the previous command (Control-P should recall the previous command):&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 9 for session 1: &lt;br /&gt;
&lt;br /&gt;
Now enter the 'cancel-toast' command right away, before the waffle finishes:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''cancel-toast '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 10 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:24:36Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus cancelled &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 6 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was cancelled.&lt;br /&gt;
&lt;br /&gt;
== Close the NETCONF Session ==&lt;br /&gt;
To close the NETCONF session, use the 'close-session' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''close-session''' &lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 11 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 ses: session 1 shut by remote peer &lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the prompt returned to the default form, once the session was dropped by the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
The terminate the yangcli program, use the 'quit' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''quit '''&lt;br /&gt;
 &lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced Topics =&lt;br /&gt;
This section introduces some advanced features of the NETCONF protocol and YANG data modeling language.&lt;br /&gt;
&lt;br /&gt;
== Data Retrieval ==&lt;br /&gt;
=== Basic NETCONF Retrieval Operations ===&lt;br /&gt;
The NETCONF protocol has 2 different retrieval operations:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt;&amp;lt;/nowiki&amp;gt;''': get state data and the running configuration database.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt;&amp;lt;/nowiki&amp;gt;''': get just the specified configuration database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Each of these operations accepts a &amp;lt;filter&amp;gt; parameter, which has 2 forms:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''subtree filter:''' retrieve just the subtrees in the database that match the XML subtrees in the filter.&lt;br /&gt;
* '''XPath filter:''' retrieve just the subtrees that match the result node set produced by evaluating the specified XPath expression against the database. This mode cannot be used unless the ''':xpath''' capability must be advertised by the server.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program supports 3 different forms of each command:&lt;br /&gt;
&lt;br /&gt;
* '''plain''': plain NETCONF operation with user-supplied filter&lt;br /&gt;
* '''subtree'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter subtree XML.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* '''xpath'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter 'select' XML attribute&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Retrieval Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
! example&lt;br /&gt;
|-&lt;br /&gt;
| '''get'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get with-defaults=trim&lt;br /&gt;
|-&lt;br /&gt;
| '''get-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get-config&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get-config source=candidate&lt;br /&gt;
|-&lt;br /&gt;
| '''sget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget /system&lt;br /&gt;
|-&lt;br /&gt;
| '''sget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget-config source=running /nacm/rules &lt;br /&gt;
|-&lt;br /&gt;
| '''xget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| xget &amp;quot;/interfaces-state/interface/statistics&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''xget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;xget-config source=candidate &amp;quot;/interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The retrieval commands return an element named &amp;lt;data&amp;gt; containing the requested XML subtrees.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any identifier nodes (YANG key leafs) are needed to distinguish the data in the reply, they will be added as needed by the server. &amp;lt;nowiki&amp;gt;In the 'xget' example above, the &amp;lt;name&amp;gt; element for each interface would be returned, even though it was not directly requested by the XPath expression.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Default Value Filtering ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The data will also be filtered according to the defaults handling behavior of the server, unless the &amp;lt;with-defaults&amp;gt; parameter is added to the command. &amp;lt;/nowiki&amp;gt;This parameter is only supported if the server advertised the 'with-defaults' capability, If not, the client does not get any indication from the server what type of defaults filtering is being done (if any).&lt;br /&gt;
&lt;br /&gt;
There are 3 types of defaults filtering provided:&lt;br /&gt;
&lt;br /&gt;
* '''report-all''': no filtering -- return all nodes even those the server might normally suppress because they are considerer to be default values by the server.&lt;br /&gt;
* '''trim''': return all nodes except skip any leaf nodes that match the schema defined default value&lt;br /&gt;
* '''explicit''': return all nodes that were set by the client or the server to some value, even if the value happens to be the schema defined default. This is normally the default behavior for the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The defaults handling behavior can be changed just for a specific NETCONF session, using the &amp;lt;set-my-session&amp;gt; operation. &amp;lt;/nowiki&amp;gt;This is only available on the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' set-my-session with-defaults=report-all '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 12 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this example, the 'basic' behavior is changed from 'explicit' to 'report-all', but just for session 1. This setting is temporary, and will not be remembered when the session is terminated. &amp;lt;nowiki&amp;gt;If the &amp;lt;with-defaults&amp;gt; parameter is present, it will be used instead of this value.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Retrieval Operations ===&lt;br /&gt;
Any YANG module can add new operations with the 'rpc' statement.&lt;br /&gt;
&lt;br /&gt;
New retrieval operations may also be added which are associated with a protocol capability.&lt;br /&gt;
&lt;br /&gt;
Just like any other data model content, the operator (or application) needs to understand the YANG file definitions, including the description statements, to understand how each custom retrieval operation works.&lt;br /&gt;
&lt;br /&gt;
There are 2 custom retrieval operations supported by '''netconfd''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Special Retrieval Operations'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! operation&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| '''get-schema'''&lt;br /&gt;
| Retrieve the YANG or YIN source file for one of the modules advertised by the server.This is a standard operation defined in the '''ietf-netconf-monitoring''' module.&lt;br /&gt;
|-&lt;br /&gt;
| '''get-my-session'''&lt;br /&gt;
| Retrieve the customizable settings for my session. This is a proprietary operation defined in the '''yuma-my-session''' module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
Notifications are used in NETCONF to send server event information to the client application.&lt;br /&gt;
&lt;br /&gt;
A session must request notifications with the 'create-subscription' command.&lt;br /&gt;
&lt;br /&gt;
Notifications are grouped into 'streams', but only the 'NETCONF' stream is defined at this time.&lt;br /&gt;
&lt;br /&gt;
A notification subscription request specifies the stream name (and perhaps more parameters).&lt;br /&gt;
&lt;br /&gt;
A NETCONF session on the netconfd server will never expire due to inactivity, while a notification subscription is active. This allows notification processing applications to maintain long-lived connections without worrying about a NETCONF timeout. Note that the SSH server may also be configured to drop idle SSH sessions, whether a notification subscription is active or not.&lt;br /&gt;
&lt;br /&gt;
=== Notification Contents ===&lt;br /&gt;
[[Image:notification-structure.png]]&lt;br /&gt;
&lt;br /&gt;
The 'notification' element is sent from the server to the client, if an event occurs, and the client has created a notification subscription.&lt;br /&gt;
&lt;br /&gt;
The child nodes of this element comprise the notification content, and it is divided into 3 sections:&lt;br /&gt;
&lt;br /&gt;
# '''event generation time-stamp''': This standard NETCONF leaf is always the first child element within the notification element.&lt;br /&gt;
# '''event payload''': The module-specific event payload is represented as a container with the name of the notification. Any data nodes defined within the YANG notification statement appear (in order) as child nodes of the event type container.&lt;br /&gt;
# '''proprietary extensions''': Zero or more vendor-specific elements may appear after the event payload element. For example, the monotonically increasing 'sequence-id' element is added to each notification saved in the '''netconfd''' event log.&lt;br /&gt;
&lt;br /&gt;
=== Notification Replay ===&lt;br /&gt;
[[Image:notification-replay-buffer.png]]&lt;br /&gt;
&lt;br /&gt;
The NETCONF server will maintain an ordered buffer of saved notification events, if the :notification-replay capability is supported by the server. For the '''netconfd''' server, this is a configurable feature, set by the '''--eventlog-size''' parameter.&lt;br /&gt;
&lt;br /&gt;
The '''netconfd''' default is to save the most recent 1000 notification events.&lt;br /&gt;
&lt;br /&gt;
Only system events are saved and are available for retrieval. The 'replayComplete' and 'subscriptionComplete' events are session-specific events, and are therefore not saved in the replay buffer.&lt;br /&gt;
&lt;br /&gt;
The 'create-subscription' command has 2 parameters to request that stored notifications be delivered to the client session:&lt;br /&gt;
&lt;br /&gt;
* '''startTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred after this time are delivered.&lt;br /&gt;
* '''stopTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred before this time are delivered. This parameter can specify a time in the future. When that time has passed, the subscription will be terminated. The stopTime does not cause the server to wait that period of time to generate an event. If the stopTime is in the past, then the subscription will terminate after all the matching event timestamps in the replay buffer have been delivered.&lt;br /&gt;
&lt;br /&gt;
Notifications are delivered in the order they are stored. Each new '''netconfd''' notification contains a monotonically increasing sequence-id (unsigned integer). This can be used to help determine if any configured notification filters are working as expected.&lt;br /&gt;
&lt;br /&gt;
=== The interleave capability ===&lt;br /&gt;
The '''netconfd''' server supports the :interleave capability, which means that all commands (except create-subscription) will be accepted by the server. &amp;lt;nowiki&amp;gt;The client should expect &amp;lt;rpc-reply&amp;gt; and &amp;lt;notification&amp;gt; messages. &amp;lt;/nowiki&amp;gt;The server will always maintain proper message serialization. &amp;lt;nowiki&amp;gt;These messages will always be sent in their entirety, which may impact applications (e.g., a really long &amp;lt;get&amp;gt; response on the same session will delay notification delivery).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the NETCONF server does not support the :interleave capability, then it may only allow the &amp;lt;close-session&amp;gt; operation while the notification subscription is active. &amp;lt;/nowiki&amp;gt;In this case, a new NETCONF session is required to perform any management operations.&lt;br /&gt;
&lt;br /&gt;
This special mode is only applicable while a notification subscription is active. It is possible for a replay subscription to terminate, without terminating the session as well. In this case, the 'notificationComplete' event will be generated, and the session will return to accepting all possible operations.&lt;br /&gt;
&lt;br /&gt;
== Database Editing ==&lt;br /&gt;
NETCONF supports multiple conceptual configuration databases. Only the 'running' database is actually active. All other databases are scratch-pad databases, or some other special-purpose off-line database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Every NETCONF server must allow arbitrary partial (and concurrent) editing to its configuration with the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;Refer to the Yuma Tools User Manual for complete details on this NETCONF operation. The '''yangcli''' program has simplified editing commands, which are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;config&amp;gt; element within an &amp;lt;edit-config&amp;gt; PDU represents the 'root node' (/) in the path expression for each node in the conceptual database. &amp;lt;/nowiki&amp;gt;Each top-level YANG object that is supported and configured will be represented as child nodes to this root node. The conceptual database can be processed as an XML instance document with multiple top nodes (similar to XSLT rules).&lt;br /&gt;
&lt;br /&gt;
Database editing in NETCONF has several variants, but basically, it follows this simple procedure:&lt;br /&gt;
&lt;br /&gt;
# Lock the database(s) that will be affected.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Use &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; on the target database to make changes.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# Activate and save/commit the database edits.&lt;br /&gt;
# Unlock the database(s) that were previously locked.&lt;br /&gt;
&lt;br /&gt;
=== The Target Database ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Usually a NETCONF server supports the &amp;lt;edit-config&amp;gt; operation on only one database, which is either the candidate or the running database. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;This is called the 'target' database, which corresponds to the &amp;lt;target&amp;gt; parameter in the &amp;lt;edit-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the target database is the candidate configuration, then the &amp;lt;edit-config&amp;gt; operation does not always cause all possible database validation checking to be done by the server. &amp;lt;/nowiki&amp;gt;Since the candidate database is just a scratch-pad for (possibly) incremental edits, the server is not required to completely validate its contents. &amp;lt;nowiki&amp;gt;Instead, these 'final validation' tests are only required to be done when the &amp;lt;commit&amp;gt; operation is invoked.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program will automatically handle the target database management, based on the server capabilities reported each session, if the 'save' command is used. &amp;lt;nowiki&amp;gt;The manual procedure (&amp;lt;commit&amp;gt; and/or maybe &amp;lt;copy-config&amp;gt; operations) is also supported, but do not mix them within the same editing session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Database Locking ===&lt;br /&gt;
NETCONF supports database locking so a session can have exclusive write access to the configuration.&lt;br /&gt;
&lt;br /&gt;
These locks are intended to be short-lived, but there is no actual time limit on a lock. If the session terminates for any reason with any locks, they will be released automatically by the server.&lt;br /&gt;
&lt;br /&gt;
All the databases that are involved in the edit should be locked. This always includes the running database, and the candidate and startup databases, if they are supported by the server.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has 2 special commands to handle all locking:&lt;br /&gt;
&lt;br /&gt;
* '''get-locks''': Wait until all database locks have been acquired or the timeout occurs&lt;br /&gt;
* '''release-locks''': Rlease any locks that were obtained with get-locks&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on these commands.&lt;br /&gt;
&lt;br /&gt;
=== Non-Volatile Storage ===&lt;br /&gt;
The startup configuration is the conceptual database used on the next reboot of the NETCONF server. It is important to know whether the NETCONF server supports the :startup capability or not. &amp;lt;nowiki&amp;gt;If yes, then the operator must explicitly save the running database to non-volatile storage (the startup database), using the &amp;lt;copy-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;If no, then the server will keep the running and startup databases synchronized.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program has a high-level 'save' command, used after the editing operations, that will automatically issue the correct protocol operations to complete the edit, and save the changes in non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
The startup database is configurable in the '''netconfd''' server. The '''--with-startup''' configuration parameter controls whether the startup database will be used or not. The --startup parameter can be used to control the initial load of the running configuration in 3 different ways:&lt;br /&gt;
&lt;br /&gt;
# '''no startup''': skip this step and just use factory defaults&lt;br /&gt;
# '''default startup''': look for the default '''startup-cfg.xml''' file in the configured data path.&lt;br /&gt;
# '''specific startup''': use a specified file, either absolute file-spec, or a relative path in the configured data path&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on controlling non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
=== Editing Commands ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation should be used to make configuration changes. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;The &amp;lt;copy-config&amp;gt; operation can also be used, but this is a blunt hammer approach. &amp;lt;/nowiki&amp;gt;Although the '''netconfd''' server will always analyze the edit request and only affect the nodes that actually changed, this is not a requirement in the standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation allows the operator to have precise control of the server. &amp;lt;/nowiki&amp;gt;These database edits are performed by the server using a combination of 3 factors:&lt;br /&gt;
&lt;br /&gt;
# The nodes that currently exist in the target database.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The nodes that exist in the 'source' of the edits (either the inline &amp;lt;config&amp;gt; element or indirectly through the &amp;lt;url&amp;gt; element.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The &amp;lt;default-operation&amp;gt; parameter and any XML attributes in the source XML elements (nc:operation attribute and YANG insert operation attributes).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli'''&amp;lt;nowiki&amp;gt; program provides some high-level commands to automatically handle the complexity of the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;These commands use XPath expressions and a series of interactive prompts (e.g., for the mandatory nodes and key leafs) to fill in the specified data structures, and construct an optimized NETCONF message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Editing Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;command&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;description&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| create&lt;br /&gt;
| Create a new sub-tree, only if it does not already exist&lt;br /&gt;
|-&lt;br /&gt;
| delete&lt;br /&gt;
| Delete an existing sub-tree, only if it exists&lt;br /&gt;
|-&lt;br /&gt;
| merge&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, keeping any existing nodes that are not explicitly contained in the source.&lt;br /&gt;
|-&lt;br /&gt;
| replace&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, deleting any existing nodes that are not explicitly contained in the source. &amp;lt;nowiki&amp;gt;This is the mode used for the &amp;lt;copy-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| insert&lt;br /&gt;
| Insert or move a YANG list or leaf-list entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for details on these commands.&lt;br /&gt;
&lt;br /&gt;
== Access Control ==&lt;br /&gt;
The '''netconfd''' server can be configured to give precise access rights to each user (the SSH user name associated with the NETCONF session). Some important points to remember about access control:&lt;br /&gt;
&lt;br /&gt;
* There are 3 types of access -- read, write, and execute.&lt;br /&gt;
* If a user does not have read access to some data, then it is silently omitted from the reply.&lt;br /&gt;
* The 'access-denied' error is not generated for read requests. &amp;lt;nowiki&amp;gt;It is only generated for write requests to the database, or &amp;lt;rpc&amp;gt; operation execution requests.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* An access request results in 1 of 2 outcomes: permit or deny&lt;br /&gt;
* The server resolves the access request by searching the access control rules. Either an explicit rule will apply, or the default access rights will be checked if no rule is found.&lt;br /&gt;
* The default access rights are configurable, but usually set as follows:&lt;br /&gt;
** read access is permitted&lt;br /&gt;
** write access is denied&lt;br /&gt;
** exec access is permitted&lt;br /&gt;
* The '''nacm:secure''' and '''nacm:very-secure''' extensions can be used by the YANG module author to override the default access rights, and deny access instead. &amp;lt;nowiki&amp;gt;For example, the &amp;lt;reboot&amp;gt; operation is not permitted by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* There is a configurable 'superuser' user name. If desired, a specific user name will be considered the 'super user' and all access control will be bypassed for this user. By default, this is the name 'superuser', not 'root', since root login to the SSH server is not recommended.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
The '''yangcli''' program supports variables for easier reuse and script-based operations.&lt;br /&gt;
&lt;br /&gt;
There are 2 types of variables:&lt;br /&gt;
&lt;br /&gt;
* '''file variables''': the variable name is a file name, and the contents of the variable are stored in this file.&lt;br /&gt;
* '''internal variables''': the variable name is just an internal identifier, and the contents of the variable are stored in memory&lt;br /&gt;
&lt;br /&gt;
Variables are set with assignment statements. Here are some examples:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$backup = get-config source=running'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$bad-data = &amp;quot;warn&amp;quot;'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; $itf = &amp;quot;//interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Note that in order to assign a string value (e.g., $$bad-data = &amp;quot;warn&amp;quot; above), single or double quotes must be used. An unquoted string will be interpreted as a command name, not a simple string value.&lt;br /&gt;
&lt;br /&gt;
Variables are referenced in a similar manner, except the variable is on the right-hand side of the equation. These commands are equivalent in this example:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' @myfile.xml = xget select=$itf'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; @myfile.xml = xget //interface[name='eth0']&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Complex variable substitution is also supported:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' copy-config source=$$backup target=candidate'''&lt;br /&gt;
&lt;br /&gt;
Note that '''yangcli''' will attempt to figure out the structure of the parameter (e.g., 'source' and 'target' above), and adjust the NETCONF operation content. In the example above, since 'source' and 'target' are choices, the real nodes within the cases are examined, and the most appropriate case is selected. &amp;lt;nowiki&amp;gt;The 'source' parameter will contain an in-line &amp;lt;config&amp;gt; element with all the child nodes in the &amp;lt;/nowiki&amp;gt;'''$$backup''' variable, and the target parameter will contain an empty element named '''&amp;lt;nowiki&amp;gt;&amp;lt;candidate&amp;gt;.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several types of internal variables available in the '''yangcli''' program:&lt;br /&gt;
&lt;br /&gt;
* read-only system variables ($$USER)&lt;br /&gt;
* read-write system variables ($$default-operation)&lt;br /&gt;
* global user variables, available at all 'runstack' levels ($$backup)&lt;br /&gt;
* local user variables available in the current 'runstack' level only ($itf)&lt;br /&gt;
&lt;br /&gt;
The command 'show vars' can be used to see the current value of all program variables:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''show vars '''&lt;br /&gt;
CLI Variables&lt;br /&gt;
&lt;br /&gt;
yangcli {&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  feature-enable-default true&lt;br /&gt;
  fixorder true&lt;br /&gt;
  force-target candidate&lt;br /&gt;
  indent 2&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  ncport 830&lt;br /&gt;
  password ****&lt;br /&gt;
  private-key /home/joe/.ssh/id_rsa&lt;br /&gt;
  public-key /home/joe/.ssh/id_rsa.pub&lt;br /&gt;
  server localhost&lt;br /&gt;
  subdirs true&lt;br /&gt;
  tcp-direct-enable false&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  transport ssh&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  warn-idlen 64&lt;br /&gt;
  warn-linelen 0&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Read-only environment variables&lt;br /&gt;
&lt;br /&gt;
  HOME /home/joe&lt;br /&gt;
  HOSTNAME &lt;br /&gt;
  LANG en_US.utf8&lt;br /&gt;
  PWD /home/joe&lt;br /&gt;
  SHELL /bin/bash&lt;br /&gt;
  USER joe&lt;br /&gt;
  YUMA_DATAPATH &lt;br /&gt;
  YUMA_HOME &lt;br /&gt;
  YUMA_MODPATH &lt;br /&gt;
  YUMA_RUNPATH &lt;br /&gt;
&lt;br /&gt;
Read-write system variables&lt;br /&gt;
&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  default-module &lt;br /&gt;
  default-operation merge&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  error-option none&lt;br /&gt;
  fixorder true&lt;br /&gt;
  indent 2&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  optional false&lt;br /&gt;
  server localhost&lt;br /&gt;
  test-option set&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  with-defaults none&lt;br /&gt;
&lt;br /&gt;
Global variables&lt;br /&gt;
&lt;br /&gt;
  backup {&lt;br /&gt;
    interfaces &lt;br /&gt;
    nacm &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Local variables&lt;br /&gt;
&lt;br /&gt;
  itf //interface[name='eth0']&lt;br /&gt;
yangcli joe@localhost&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
Scripts are simply a collection of '''yangcli''' commands and/or assignment statements that are stored in a text file, instead of typed directly. Scripts can call other scripts (except loops are not allowed), and numbered parameters are available (e.g., --P1='fred' passed as parameter, the $1 expands to 'fred' inside the script).&lt;br /&gt;
&lt;br /&gt;
The '''$YUMA_RUNPATH''' environment variable, or the '''--runpath''' configuration variable, can be used to set the directory path to look for script files. There is also a default path for finding files, explained in the Yuma Tools User Manual.&lt;br /&gt;
&lt;br /&gt;
The command ''''list scripts'''' can be used to show the potential script file available in the run path.&lt;br /&gt;
&lt;br /&gt;
The command ''''run foo'''' is used to invoke a script named 'foo' (with no file extension).&lt;br /&gt;
&lt;br /&gt;
If a command fails during a script, execution is halted right away and no more commands in the script are executed. If 'get-locks' was used, then any locks obtained will be automatically released. All script runstack levels will be canceled, not just the current script.&lt;br /&gt;
&lt;br /&gt;
Script syntax will be expanded in a future release to provide loops and conditional statements.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=380</id>
		<title>Yuma Quickstart Guide</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=Yuma_Quickstart_Guide&amp;diff=380"/>
		<updated>2019-05-02T11:30:36Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* NETCONF Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''Yuma Quickstart Guide'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;YANG-Based Unified Modular Automation Tools&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Client/Server Quickstart Guide&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Version yuma123-2.11&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Preface =&lt;br /&gt;
== Legal Statements ==&lt;br /&gt;
Copyright 2009 - 2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Copyright 2013 - 2018, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
== Additional Resources ==&lt;br /&gt;
This document assumes you have successfully set up the software as described in the printed document:&lt;br /&gt;
&lt;br /&gt;
[[Yuma Installation Guide]]&lt;br /&gt;
&lt;br /&gt;
Other documentation includes:&lt;br /&gt;
&lt;br /&gt;
[[Yuma User Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma netconfd Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma yangcli Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Yuma Developer Manual]]&lt;br /&gt;
&lt;br /&gt;
There are several sources of free information and tools for use with YANG and/or NETCONF.&lt;br /&gt;
&lt;br /&gt;
The following section lists the resources available at this time.&lt;br /&gt;
&lt;br /&gt;
=== WEB Sites ===&lt;br /&gt;
* '''Netconf Central'''&lt;br /&gt;
** [http://www.netconfcentral.org/ http://www.netconfcentral.org/]&lt;br /&gt;
** Yuma Home Page&lt;br /&gt;
** Free information on NETCONF and YANG, tutorials, on-line YANG module validation and documentation database &lt;br /&gt;
* '''Yuma123 SourceForge open source project'''&lt;br /&gt;
** [http://sourceforge.net/projects/yuma123/ http://sourceforge.net/projects/yuma123/]&lt;br /&gt;
** Download Yuma source and documentation&lt;br /&gt;
* '''Yang Central'''&lt;br /&gt;
** [http://www.yang-central.org/ http://www.yang-central.org]&lt;br /&gt;
** Free information and tutorials on YANG, free YANG tools for download&lt;br /&gt;
* '''NETCONF Working Group Wiki Page'''&lt;br /&gt;
** [http://trac.tools.ietf.org/wg/netconf/trac/wiki http://trac.tools.ietf.org/wg/netconf/trac/wiki]&lt;br /&gt;
** Free information on NETCONF standardization activities and NETCONF implementations&lt;br /&gt;
* '''NETCONF WG Status Page'''&lt;br /&gt;
** http://tools.ietf.org/wg/netconf/&lt;br /&gt;
** IETF Internet draft status for NETCONF documents&lt;br /&gt;
* '''libsmi Home Page'''&lt;br /&gt;
** [http://www.ibr.cs.tu-bs.de/projects/libsmi/ http://www.ibr.cs.tu-bs.de/projects/libsmi/]&lt;br /&gt;
** Free tools such as smidump, to convert SMIv2 to YANG&lt;br /&gt;
* '''YumaWorks'''&lt;br /&gt;
** [http://www.yumaworks.com/ http://www.yumaworks.com]&lt;br /&gt;
** Offers support, training, and consulting for Yuma.&lt;br /&gt;
** Offers YumaPro, a professional version of Yuma that includes concurrency, external database support, sub-agent support, multiple northbound interfaces, and more. API compatible with Yuma. Availability: September, 2012. Licensed.&lt;br /&gt;
* '''Transpacket'''&lt;br /&gt;
** [http://www.transpacket.com/ http://www.transpacket.com]&lt;br /&gt;
** Uses Yuma for configuration and monitoring of its products.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* '''NETCONF Working Group'''&lt;br /&gt;
** http://www.ietf.org/html.charters/netconf-charter.html&lt;br /&gt;
** Technical issues related to the NETCONF protocol are discussed on the NETCONF WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
* '''NETMOD Working Group'''&lt;br /&gt;
** [http://www.ietf.org/html.charters/netmod-charter.html http://www.ietf.org/html.charters/netmod-charter.html]&lt;br /&gt;
** Technical issues related to the YANG language and YANG data types are discussed on the NETMOD WG mailing list. Refer to the instructions on the WEB page for joining the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Conventions Used in this Document ==&lt;br /&gt;
The following formatting conventions are used throughout this document:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Convention&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| '''--foo'''&lt;br /&gt;
| CLI parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''&amp;lt;nowiki&amp;gt;&amp;lt;foo&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
| XML parameter foo&lt;br /&gt;
|-&lt;br /&gt;
| '''foo'''&lt;br /&gt;
| '''yangcli''' command or parameter&lt;br /&gt;
|-&lt;br /&gt;
| '''$FOO'''&lt;br /&gt;
| Environment variable FOO&lt;br /&gt;
|-&lt;br /&gt;
| '''$$foo'''&lt;br /&gt;
| '''yangcli''' global variable foo&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
 some text&lt;br /&gt;
| Example command or PDU&lt;br /&gt;
|-&lt;br /&gt;
| some text&lt;br /&gt;
| Plain text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[[Image:yuma-tools.png]]&lt;br /&gt;
&lt;br /&gt;
Refer to section 3 of the [[Yuma User Manual]] for a complete introduction to Yuma Tools.&lt;br /&gt;
&lt;br /&gt;
This section focuses on the client and server tools within the Yuma Tools programs.&lt;br /&gt;
&lt;br /&gt;
== Intended Audience ==&lt;br /&gt;
This document is intended for users of the Yuma Tools NETCONF client and server programs. It covers the basic usage of the '''yangcli''' client application and the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
== What is NETCONF and YANG? ==&lt;br /&gt;
The Yuma Tools suite provides automated support for development and usage of network management information. Information is exchanged in XML encoding within a session between a client and a server.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;Network Configuration Protocol&amp;quot; (NETCONF) is used to provide the management sessions, operations, and database framework available on the server. The operations, notifications, and the database contents supported by a particular NETCONF server are extensible, and defined with a modular and easy-to-learn language called YANG. The database is used to contain YANG data structures which represent the configuration of the device containing the NETCONF server. This configuration can be saved in non-volatile storage so the configuration can be restored upon reboot.&lt;br /&gt;
&lt;br /&gt;
The IETF &amp;quot;YANG Data Modeling Language&amp;quot; is used to define the syntax and semantics of the NETCONF operations, notification events, and database content. Machine and human readable semantics and constraints are used by YANG tools (including Yuma Tools) to automate behavior within the NETCONF protocol for clients and servers.&lt;br /&gt;
&lt;br /&gt;
For people familiar with SNMP and SMIv2, NETCONF is like an XML-based, high-level version of SNMP, and a YANG module is like a MIB module, except MIB tables can be nested and much more complex than in SMIv2. Instead of Enterprise IDs and OBJECT-IDENTIFIERs, YANG uses XML namespaces and XPath path expressions to identify module ownership and contents within the protocol PDUs.&lt;br /&gt;
&lt;br /&gt;
== How Does an Operator Use NETCONF and YANG? ==&lt;br /&gt;
An operator uses a NETCONF session almost like it was a CLI session, except there are structured, schema-defined requests and responses, encoded in XML. YANG modules are like MIB modules for CLI content. Instead of ad-hoc unstructured documentation like CLI, NETCONF uses a data definition language to define management modules. The actual modules that a server supports will vary, just like MIB (SMIv2) modules.&lt;br /&gt;
&lt;br /&gt;
The NETCONF protocol is available for many different transports. The most popular is the SSH2 protocol. The 'netconf' subsystem is used (on TCP port 830) to start a special SSH session with the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
Using NETCONF over SSH is just like using CLI over SSH to manage a networking device, except the messages are exchanged in XML, not plain-text. SSH user names and passwords are used for session authentication and authorization.&lt;br /&gt;
&lt;br /&gt;
NETCONF is designed to provide a programmatic interface, so it is usually used with a management application, instead of a direct (raw) SSH terminal application. The '''yangcli''' program within Yuma Tools is a YANG-driven NETCONF client application that supports scripts, XPath, and many automated features to simplify management of NETCONF servers.&lt;br /&gt;
&lt;br /&gt;
Once a session is started, similar to a CLI session, the operator issues commands (NETCONF operations) to the server, and the server performs each requested operation in order, and returns a status message and/or some data to the client. &amp;lt;nowiki&amp;gt;Notifications can also be received, if the session has requested them with the &amp;lt;create-subscription&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session starts, a &amp;lt;hello&amp;gt; message is sent by the server that has all the NETCONF capabilities and YANG modules supported by the server. &amp;lt;/nowiki&amp;gt;Capabilities are optional protocol mechanisms, beyond those defined in the base protocol (RFC 4741, RFC 6241). &amp;lt;nowiki&amp;gt;The client application knows what operations, notification events, and database contents are supported on the server, based on the information in the &amp;lt;hello&amp;gt; message.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NETCONF has a set of basic database (CRUD) operations for managing the configuration database. In addition, any YANG module can define new protocol operations and notification events.&lt;br /&gt;
&lt;br /&gt;
== How Does a Developer Use NETCONF and YANG? ==&lt;br /&gt;
A NETCONF server developer decides what modules need to be supported by the NETCONF server, and implements the device instrumentation code for those modules.&lt;br /&gt;
&lt;br /&gt;
Much of the NETCONF protocol related code is handled by the NETCONF stack, based on the YANG module contents. Therefore, the most important task for a developer is designing a good YANG module.&lt;br /&gt;
&lt;br /&gt;
After the YANG module is written, the device instrumentation code for the YANG module is then added by the developer. The code uses the Yuma API to register callbacks and access the YANG database. The 'callback code' is called from the NETCONF stack when database operation requests for the object(s) in the YANG module are received by the server.&lt;br /&gt;
&lt;br /&gt;
Once this library is completed, the YANG module and its binary server instrumentation library (SIL) can be loaded into the NETCONF server at run-time. There is no need to recompile the '''netconfd''' server, or even reboot it.&lt;br /&gt;
&lt;br /&gt;
= Getting Started with toaster.yang =&lt;br /&gt;
This section will demonstrate the basic operation of Yuma Tools to use a NETCONF session to manage a remote device with a YANG data model. The Yuma Tools programs and libraries must already be installed. Refer to the Yuma Tools Installation Guide if this has not yet been done.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' client program and '''netconfd''' server program do not need to be installed on the same machine. For simplicity, the server address 'localhost' is used in the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is libtoaster? ==&lt;br /&gt;
There is a sample server instrumentation library (SIL) included, named libtoaster. [https://sourceforge.net/p/yuma123/git/ci/master/tree/libtoaster/src/toaster.c toaster.c] is the module-specific server instrumentation code for the management data defined in [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/netconfcentral/toaster.yang toaster.yang ]. This is based on the original TOASTER-MIB by Epilogue. This YANG module provides simple operations to make toast, and some simple NETCONF database objects to enable and monitor the toaster.&lt;br /&gt;
&lt;br /&gt;
The new YANG version of the TOASTER-MIB is different is some ways:&lt;br /&gt;
&lt;br /&gt;
* extensible YANG identities are used to identify the bread type, instead of a hard-wired enumerated list.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;protocol operations (&amp;lt;make-toast&amp;gt; and &amp;lt;cancel-toast&amp;gt;) are used instead of an 'up/down' switch within the database. &amp;lt;/nowiki&amp;gt;NETCONF databases are intended to contain persistent data structures, and 'actions' such as starting or stopping the toaster are done with new protocol operations, instead of editing the database with the standard operations.&lt;br /&gt;
* A simple configuration 'presence container' object is used to enable and disable the toaster service, instead of hard-wiring the toaster service availability.&lt;br /&gt;
* A notification is generated when the toast is done or canceled. This notification can be used instead of polling the toaster status object.&lt;br /&gt;
&lt;br /&gt;
== Other examples: ietf-interfaces and ietf-system ==&lt;br /&gt;
The partial SIL implementations of the stadard ietf-system.yang and ietf-interfaces.yang models are included as examples and should work out of the box for standard Linux distributions.&lt;br /&gt;
&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-interfaces.yang ietf-interfaces.yang ] ([https://tools.ietf.org/rfc/rfc7223.txt rfc7223]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-interfaces/ietf-interfaces.c ietf-interfaces.c]&lt;br /&gt;
*Model: [https://sourceforge.net/p/yuma123/git/ci/master/tree/netconf/modules/ietf/ietf-system.yang ietf-system.yang] ([https://tools.ietf.org/rfc/rfc7317.txt rfc7317]) + Implementation: [https://sourceforge.net/p/yuma123/git/ci/master/tree/example-modules/ietf-system/ietf-system.c ietf-system.c]&lt;br /&gt;
&lt;br /&gt;
One can start (provided you have already compiled installed and configured netconfd and the modules) netconfd and load the YANG models with the installed SIL implementations like this:&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/netconfd --module=ietf-system --module=ietf-interfaces&lt;br /&gt;
&lt;br /&gt;
== Start the netconfd server ==&lt;br /&gt;
If the '''netconfd''' server is already running, then skip this section.&lt;br /&gt;
&lt;br /&gt;
Details for all the '''netconfd''' configuration parameters can be found in the [[Yuma netconfd Manual]].&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the server will accept sessions on TCP port 830&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the target database is &amp;lt;candidate&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;no &amp;lt;startup&amp;gt; database (mirrored NV-save)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;validate&amp;gt; operation is supported&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the access control mode is 'enforcing'&lt;br /&gt;
* the super user account name is 'superuser'&lt;br /&gt;
* the server will search startup-cfg.xml using the default search path&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the default &amp;lt;with-defaults&amp;gt; behavior is 'explicit'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* notification replay is enabled with a buffer size of 1000 events and a maximum message burst per session of 10 notifications&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the &amp;lt;hello&amp;gt; exchange timeout is 10 minutes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the session idle timeout is 1 hour&lt;br /&gt;
* the default session indent amount is 2 spaces&lt;br /&gt;
* the default session line-size is 72 characters&lt;br /&gt;
* violation of strict YANG XML ordering will not cause errors&lt;br /&gt;
* logging level 'info' is enabled and sent to STDOUT&lt;br /&gt;
&lt;br /&gt;
=== SSH Server ===&lt;br /&gt;
To start the NETCONF server, make sure that the '''sshd''' server is running, and the following configuration is included in '''/etc/ssh/sshd_config.'''&lt;br /&gt;
&lt;br /&gt;
 '''Port 22'''&lt;br /&gt;
 '''Port 830'''&lt;br /&gt;
 '''Subsystem netconf /usr/sbin/netconf-subsystem'''&lt;br /&gt;
&lt;br /&gt;
The 'Subsystem' command may be different if '''netconf-subsystem''' has been installed in a different location than '''/usr/local/sbin'''. The 'Port 22' command is needed to make sure the SSH server will accept SSH sessions in addition to NETCONF sessions.&lt;br /&gt;
&lt;br /&gt;
=== NETCONF Server ===&lt;br /&gt;
For this example, the superuser account needs to be enabled. This is done with a CLI parameter, and the user name 'joe' is used. Replace 'joe' with your username.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the foreground:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
mydir&amp;gt; /usr/sbin/netconfd --superuser=joe&lt;br /&gt;
Starting netconfd...&lt;br /&gt;
Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.&lt;br /&gt;
Copyright (c) 2013-2017, Vladimir Vassilev, All Rights Reserved.&lt;br /&gt;
&lt;br /&gt;
Warning: Parse &amp;lt;load-config&amp;gt; failed and --startup-error=continue&lt;br /&gt;
agt: Startup config loaded OK&lt;br /&gt;
     Source: /home/vladimir/.yuma/startup-cfg.xml&lt;br /&gt;
&lt;br /&gt;
Running netconfd server (2.10-0)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If no startup configuration is available, then the server defaults will be used instead. Any message about 'startup-cfg.xml' not found can be ignored. It just means the server booted with the factory default configuration.&lt;br /&gt;
&lt;br /&gt;
To start the '''netconfd''' server in the background:&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; /usr/sbin/netconfd --superuser=joe --log=~/mylog &amp;amp;&lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows that a logfile in the user's home directory called 'mylog' will be used for all server log messages. The '&amp;amp;' at the end causes the command to be run in the background.&lt;br /&gt;
&lt;br /&gt;
== Start the yangcli client ==&lt;br /&gt;
Once the NETCONF server is running, it will accept client sessions If running '''netconfd''' interactively on localhost, then start a new terminal window to continue.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Defaults ===&lt;br /&gt;
To keep the example simple, the default settings will be used:&lt;br /&gt;
&lt;br /&gt;
* the client will attempt to start sessions on TCP port 830&lt;br /&gt;
* the client will attempt to automatically complete partial commands&lt;br /&gt;
* the command line history will be automatically loaded upon startup, and saved upon exit&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;the client will attempt to automatically load any YANG modules advertised in the server &amp;lt;hello&amp;gt; message&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* the client will check before using invalid parameter values&lt;br /&gt;
* the plain display mode will be used, with 72 characters per line&lt;br /&gt;
* each nest level of displayed data will be indented 2 spaces &lt;br /&gt;
* the XML order of messages sent to the server will be corrected, as needed&lt;br /&gt;
* the logging level of 'info' is set, and log messages are sent to STDOUT&lt;br /&gt;
* the client will wait 30 seconds for responses&lt;br /&gt;
&lt;br /&gt;
=== Run yangcli ===&lt;br /&gt;
The yangcli program should be found in the PATH environment variable.&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; '''yangcli'''&lt;br /&gt;
&lt;br /&gt;
If the yangcli program is not found, then try the full path:&lt;br /&gt;
&lt;br /&gt;
 mydir&amp;gt; '''/usr/bin/yangcli'''&lt;br /&gt;
&lt;br /&gt;
=== Startup Screen ===&lt;br /&gt;
The startup screen shows the following information:&lt;br /&gt;
&lt;br /&gt;
* program version and copyright&lt;br /&gt;
* tab key can be used for command and parameter completion&lt;br /&gt;
* basic help instructions&lt;br /&gt;
* basic statement instructions&lt;br /&gt;
&lt;br /&gt;
=== Command Line Editing ===&lt;br /&gt;
The command lines are stored in a history buffer.&lt;br /&gt;
&lt;br /&gt;
Any previous command line (except a password parameter line) can be recalled and used again.&lt;br /&gt;
&lt;br /&gt;
Any command in the command buffer (current or recalled) can be edited. The default key settings are aligned with the emacs editor. Refer to the [[Yuma yangcli Manual]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Escape Commands ===&lt;br /&gt;
Not all parameters need to be entered at one time. If yangcli needs more information, based on the initial command line, then 1 or more missing parameters will be requested, in sequence.&lt;br /&gt;
&lt;br /&gt;
It is possible to get help, skip a parameter, or even cancel the entire command during one of these sub-command modes, by using an escape command. This is a 1 or 2 character command, followed by the 'enter' key (as usual to end a command).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Escape Command Summary'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?s&lt;br /&gt;
| skip the current parameter&lt;br /&gt;
|-&lt;br /&gt;
| ?c&lt;br /&gt;
| cancel the current command&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| get help&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| get full help&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Using the '?s' command to skip a parameter may cause the &amp;lt;rpc&amp;gt; request to be invalid.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the setting of the '''--bad-data''' configuration parameter, this may or may not be allowed. The default setting is to warn and confirm. This configuration parameter also affects parameter values that are invalid according to the YANG module definition.&lt;br /&gt;
&lt;br /&gt;
== Getting Context Sensitive Help ==&lt;br /&gt;
The '''yangcli''' program provides context-sensitive help based on the current NETCONF session status and the set of YANG modules currently loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;When a NETCONF session is active, the set of modules advertised in the &amp;lt;hello&amp;gt; message by the server will be used to generate help text, if available. &amp;lt;/nowiki&amp;gt;The ''''mgrload'''' command can be used to force '''yangcli''' to use different or additional YANG modules.&lt;br /&gt;
&lt;br /&gt;
If the '''yangcli'''&amp;lt;nowiki&amp;gt; program does not have the advertised revision of a particular module available in the module search path, and the NETCONF server supports the standard &amp;lt;get-schema&amp;gt; operation, then the module will be retrieved from the server, and used just for that session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any features or deviations are advertised for a YANG module, then they will be applied to the modules used just for the current session. The help text and the error checking done for the module will be based on this 'patched' module, not the 'plain' module specified in the capability URI string.&lt;br /&gt;
&lt;br /&gt;
=== Tab Key for Command Completion ===&lt;br /&gt;
The 'tab' key can be used at any time to see a list of the possible completions that the command interpreter will accept. The list will be displayed for command names and some command parameters.&lt;br /&gt;
&lt;br /&gt;
When a NETCONF session is active, all the NETCONF operations will be available. Additional commands may also be available if the server advertised any YANG modules containing 'rpc' statements.&lt;br /&gt;
&lt;br /&gt;
=== The '?' and '??' Escape Sequences ===&lt;br /&gt;
If a partial command is entered, or if a data structure is being filled, then the help escape sequences are available to get help about that parameter or data node. Use one question mark for help, and two question marks for maximum help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Escape Sequences'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! sequence&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| Print some help text, but not description statements and some other information.&lt;br /&gt;
|-&lt;br /&gt;
| ??&lt;br /&gt;
| Print maximum help text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following example shows the help text for the 'user' parameter for the 'connect' operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''connect''' &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; '''? '''&lt;br /&gt;
 &lt;br /&gt;
    &amp;lt;nowiki&amp;gt;leaf user [NcxUserName] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
       length: 1..63 &lt;br /&gt;
       &amp;lt;nowiki&amp;gt;pattern: [a-z,A-Z][a-z,A-Z,0-9,\-,_,\.]{0,62} &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Enter string value for leaf &amp;lt;user&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 yangcli:connect&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The type of object, its name, data type, and any restrictions, will be printed.&lt;br /&gt;
&lt;br /&gt;
After that, the previous prompt will be redisplayed.&lt;br /&gt;
&lt;br /&gt;
=== The 'help' Command ===&lt;br /&gt;
The '''help''' command can be used to display all kinds of information about the '''yangcli''' program and the YANG data module contents in use at the time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Command Variants'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help &amp;lt;comand-name&amp;gt;&amp;lt;/nowiki&amp;gt;help command  &amp;lt;nowiki&amp;gt;&amp;lt;command-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help for the specified yangcli command or YANG rpc statement.&lt;br /&gt;
|-&lt;br /&gt;
| help commands&lt;br /&gt;
| Display help text for all commands.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help object &amp;lt;object-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG database top-level object (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| help notification  &amp;lt;nowiki&amp;gt;&amp;lt;notification-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for a YANG notification event (only if its module is available).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;help type &amp;lt;type-name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Display help text for an exported YANG data type (only if its module is available).&lt;br /&gt;
|}&lt;br /&gt;
Each of the help command variants also accepts a 'help-mode' parameter to control how much help text is displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Help Output Modes'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! mode&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| --brief&lt;br /&gt;
| Display minimal help text.&lt;br /&gt;
|-&lt;br /&gt;
| --normal&lt;br /&gt;
| Display a lot, but not always all the help text available (default mode).&lt;br /&gt;
|-&lt;br /&gt;
|  --full&lt;br /&gt;
| Display all available help text, including description statements.&lt;br /&gt;
|}&lt;br /&gt;
The following table shows some valid help commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| help help&lt;br /&gt;
| Get normal help for the help command.&lt;br /&gt;
|-&lt;br /&gt;
| help commands brief&lt;br /&gt;
| Get a 1 line description of each command.&lt;br /&gt;
|-&lt;br /&gt;
| help object system full&lt;br /&gt;
| Get all available help for the /system container and all its descendant nodes.&lt;br /&gt;
|-&lt;br /&gt;
| help type NcxIdentifier&lt;br /&gt;
| Get summary and description of the data type called 'NcxIdentifier'.&lt;br /&gt;
|-&lt;br /&gt;
| help notification sysSessionStart&lt;br /&gt;
| Get a summary of the 'sysSessionStart' notification, and each of objects in its payload.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Start a NETCONF session ==&lt;br /&gt;
Each yangcli program instance can run 1 NETCONF session at a time.&lt;br /&gt;
&lt;br /&gt;
If no session is currently active, then the prompt will contain just the program name, indicating that the 'connect' command is available:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== The connect Command ===&lt;br /&gt;
The 'connect' command is used to start a NETCONF session.&lt;br /&gt;
&lt;br /&gt;
There are 3 mandatory parameters for this command:&lt;br /&gt;
&lt;br /&gt;
* '''user''': the system (or SSH) user name to use&lt;br /&gt;
* '''server''': the IP address or DNS name of the NETCONF server to use&lt;br /&gt;
* '''password''': the password string to use&lt;br /&gt;
&lt;br /&gt;
Make sure you have a user name and password already configured on the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
If a partial command is given, then yangcli will prompt for any missing mandatory parameters. In this example, the complete command is given at once:&lt;br /&gt;
&lt;br /&gt;
 yangcli'''&amp;gt;''' '''connect server=localhost user=joe password=yangrocks'''&lt;br /&gt;
&lt;br /&gt;
After this command is entered, '''yangcli''' will generate some informational log messages to the screen.&lt;br /&gt;
&lt;br /&gt;
If the session is started successfully, a summary of the server session capabilities and available modules should be displayed. Also, the command prompt will change to indicate that a NETCONF session is currently active.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At this point any command supported by the server can be entered, in addition to any '''yangcli''' command (except 'connect').&lt;br /&gt;
&lt;br /&gt;
=== Fixing Connection Problems ===&lt;br /&gt;
If the session did not start correctly, check the error messages to fix the problem. Some common problems:&lt;br /&gt;
&lt;br /&gt;
* Make sure the '''netconfd''' program is running.&lt;br /&gt;
* Make sure the '''netconf-subsystem''' program is properly installed.&lt;br /&gt;
* Check if the SSH configuration contains the portion for NETCONF.&lt;br /&gt;
* If the SSH configuration looks correct, then try restarting the SSH server to make sure that configuration file is the one being used.&lt;br /&gt;
* If the SSH server seems to be running correctly, then check if any firewall or other security mechanism is blocking TCP port 830. If so, either enable TCP port 830, or enable port 22 on the NETCONF server (by restarting the server), and include 'port=22' in the 'connect' command parameters.&lt;br /&gt;
* If no firewall or other security measure is blocking TCP port 830, try to establish a normal SSH session with the server.&lt;br /&gt;
* If a normal SSH session works correctly, then check the log messages on the NETCONF server for more information.&lt;br /&gt;
&lt;br /&gt;
== Enable Notification Delivery ==&lt;br /&gt;
In order to receive the 'toastDone' notification event, a notification subscription has to be enabled.&lt;br /&gt;
&lt;br /&gt;
A default NETCONF notification stream can be started with the 'create-subscription' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''create-subscription'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Depending on other activity within the NETCONF server, it is possible other notification events, such as 'sysSessionStart' or 'sysSessionEnd' will be generated. Notifications are displayed in their entirety, but not during 'rpc reply output'. If a command is being entered, the notification will be displayed, and then the command line restored.&lt;br /&gt;
&lt;br /&gt;
== Load the Toaster Module ==&lt;br /&gt;
The toaster module is not a core system module, and is not available automatically.&lt;br /&gt;
&lt;br /&gt;
The module has to be explicitly loaded by the NETCONF client.&lt;br /&gt;
&lt;br /&gt;
To load the server-supported version of the toaster module, use the 'load' command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''load toaster'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Data Reply 2 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    mod-revision 2009-11-20 &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:44:45Z &lt;br /&gt;
       sysCapabilityChange { &lt;br /&gt;
          changed-by { &lt;br /&gt;
             userName joe &lt;br /&gt;
             sessionId 1 &lt;br /&gt;
             remoteHost 127.0.0.1 &lt;br /&gt;
          } &lt;br /&gt;
          added-capability &lt;br /&gt;
           http://netconfcentral.com/ns/toaster?module=toaster&amp;amp;revision=2009-11-20 &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 3 &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the module was successfully loaded, then a data response will be sent, containing the revision date of the toaster module that was loaded. This response will be returned even if the module was already loaded.&lt;br /&gt;
&lt;br /&gt;
Note that the 'sysCapabilityChange' notification event will only be sent if the module has not already been loaded into the server. &amp;lt;nowiki&amp;gt;In this case, it was not advertised in the &amp;lt;hello&amp;gt; message for this session, and the toaster module needs to be loaded manually into yangcli with the 'mgrload' command:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''mgrload toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Load module 'toaster' OK&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Enable the Toaster ==&lt;br /&gt;
Try to make some toast, using the 'make-toast' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast'''&lt;br /&gt;
 &lt;br /&gt;
 RPC Error Reply 4 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    rpc-error { &lt;br /&gt;
       error-type protocol &lt;br /&gt;
       error-tag resource-denied &lt;br /&gt;
       error-severity error &lt;br /&gt;
       error-app-tag no-access &lt;br /&gt;
       error-message 'resource denied' &lt;br /&gt;
       error-info { &lt;br /&gt;
          error-number 269 &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
What happened?&lt;br /&gt;
&lt;br /&gt;
A 'resource-denied' error was returned instead of 'OK', because the toaster service is not enabled yet. A node has to be created in the NETCONF database before the 'make-toast' command can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lock the Databases ===&lt;br /&gt;
The first step is to lock the NETCONF databases for writing. Locks do not affect read operations.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has a high-level command to deal with locking, called 'get-locks'. It will handle retries for any missing locks, until an overall timeout occurs or all the locks needed are acquired.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' get-locks'''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;lock&amp;gt; operations for get-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 get-locks finished OK &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the toaster Container ===&lt;br /&gt;
The toaster module uses a simple YANG 'presence' container to configure the toaster service.&lt;br /&gt;
&lt;br /&gt;
Once the /toaster container is created, the read-only nodes within that container will be maintained by the server, and the toaster service will be enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The first step is to create the /toaster node in the &amp;lt;candidate&amp;gt; configuration database:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' create /toaster'''&lt;br /&gt;
 &lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC OK Reply 5 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Now the /toaster node is created in the &amp;lt;candidate&amp;gt; database.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commit the Database Changes ===&lt;br /&gt;
In order to activate these changes, the 'commit' command needs to be issued.&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''commit'''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 6 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-28T00:59:58Z &lt;br /&gt;
       sysConfigChange { &lt;br /&gt;
          userName joe &lt;br /&gt;
          sessionId 1 &lt;br /&gt;
          remoteHost 127.0.0.1 &lt;br /&gt;
          edit { &lt;br /&gt;
             target /toast:toaster &lt;br /&gt;
             operation create &lt;br /&gt;
          } &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 4 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
The 'RPC OK' message indicate that the server successfully commited the configuration.&lt;br /&gt;
&lt;br /&gt;
The 'sysConfigChange' notification indicates what was changed in the running configuration, and who made the change(s).&lt;br /&gt;
&lt;br /&gt;
The toaster server should now be enabled.&lt;br /&gt;
&lt;br /&gt;
=== Unlock the Databases ===&lt;br /&gt;
The database locks need to be released as soon as possible after the edits are completed or discarded.&lt;br /&gt;
&lt;br /&gt;
The high-level command 'release-locks' must be used if 'get-locks' was used to acquire the database locks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''release-locks '''&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Sending &amp;lt;unlock&amp;gt; operations for release-locks... &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get the Toaster State Information ==&lt;br /&gt;
To discover the toaster model and its current status, the 'sget' or 'xget' commands can be used to retrieve just the toaster portion of the conceptual state data available on the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'sget' command is high-level subtree filter handler for the &amp;lt;get&amp;gt; operation:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''sget /toaster'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The 'xget' command is high-level XPath filter handler for the &amp;lt;get&amp;gt; operation. &amp;lt;/nowiki&amp;gt;It is only available if the NETCONF server supports the ''':xpath '''capability (like '''netconfd''').&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''xget /toaster'''&lt;br /&gt;
&lt;br /&gt;
Both commands should return the same data:&lt;br /&gt;
&lt;br /&gt;
 Filling container /toaster: &lt;br /&gt;
 RPC Data Reply 7 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 rpc-reply { &lt;br /&gt;
    data { &lt;br /&gt;
       toaster { &lt;br /&gt;
          toasterManufacturer 'Acme, Inc.' &lt;br /&gt;
          toasterModelNumber 'Super Toastamatic 2000' &lt;br /&gt;
          toasterStatus up &lt;br /&gt;
       } &lt;br /&gt;
    } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
This data shows that the 'Super Toastamatic 2000' is ready to make toast!&lt;br /&gt;
&lt;br /&gt;
== Start Making Toast ==&lt;br /&gt;
Now that the toaster is enabled, the 'make-toast' command should work.&lt;br /&gt;
&lt;br /&gt;
Instead of using the default parameter values, let's make a frozen waffle a little less done than normal:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 8 for session 1: &lt;br /&gt;
&lt;br /&gt;
At this point the toaster timer is running, and the simulated waffle is cooking,&lt;br /&gt;
&lt;br /&gt;
After about 40 seconds, the 'toastDone' notification should be received:&lt;br /&gt;
&lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:20:05Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus done &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 5 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was completed, and is ready to eat.&lt;br /&gt;
&lt;br /&gt;
== Stop Making Toast ==&lt;br /&gt;
What if you change your mind, and want wheat toast instead of a waffle?&lt;br /&gt;
&lt;br /&gt;
Repeat the previous command (Control-P should recall the previous command):&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''make-toast toasterDoneness=4 toasterToastType=toast:frozen-waffle '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 9 for session 1: &lt;br /&gt;
&lt;br /&gt;
Now enter the 'cancel-toast' command right away, before the waffle finishes:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''cancel-toast '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 10 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 Incoming notification: &lt;br /&gt;
    notification { &lt;br /&gt;
       eventTime 2009-12-29T01:24:36Z &lt;br /&gt;
       toastDone { &lt;br /&gt;
          toastStatus cancelled &lt;br /&gt;
       } &lt;br /&gt;
       sequence-id 6 &lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
This 'toastDone' event shows that the toast was cancelled.&lt;br /&gt;
&lt;br /&gt;
== Close the NETCONF Session ==&lt;br /&gt;
To close the NETCONF session, use the 'close-session' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''close-session''' &lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 11 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 ses: session 1 shut by remote peer &lt;br /&gt;
 yangcli&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the prompt returned to the default form, once the session was dropped by the NETCONF server.&lt;br /&gt;
&lt;br /&gt;
The terminate the yangcli program, use the 'quit' command:&lt;br /&gt;
&lt;br /&gt;
 yangcli&amp;gt; '''quit '''&lt;br /&gt;
 &lt;br /&gt;
 mydir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Advanced Topics =&lt;br /&gt;
This section introduces some advanced features of the NETCONF protocol and YANG data modeling language.&lt;br /&gt;
&lt;br /&gt;
== Data Retrieval ==&lt;br /&gt;
=== Basic NETCONF Retrieval Operations ===&lt;br /&gt;
The NETCONF protocol has 2 different retrieval operations:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt;&amp;lt;/nowiki&amp;gt;''': get state data and the running configuration database.&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt;&amp;lt;/nowiki&amp;gt;''': get just the specified configuration database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Each of these operations accepts a &amp;lt;filter&amp;gt; parameter, which has 2 forms:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''subtree filter:''' retrieve just the subtrees in the database that match the XML subtrees in the filter.&lt;br /&gt;
* '''XPath filter:''' retrieve just the subtrees that match the result node set produced by evaluating the specified XPath expression against the database. This mode cannot be used unless the ''':xpath''' capability must be advertised by the server.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program supports 3 different forms of each command:&lt;br /&gt;
&lt;br /&gt;
* '''plain''': plain NETCONF operation with user-supplied filter&lt;br /&gt;
* '''subtree'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter subtree XML.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* '''xpath'''&amp;lt;nowiki&amp;gt;: XPath path expression or user variable is converted to XML for the &amp;lt;filter&amp;gt; parameter 'select' XML attribute&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Retrieval Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! command&lt;br /&gt;
! description&lt;br /&gt;
! example&lt;br /&gt;
|-&lt;br /&gt;
| '''get'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get with-defaults=trim&lt;br /&gt;
|-&lt;br /&gt;
| '''get-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;plain &amp;lt;get-config&amp;gt; operation&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| get-config source=candidate&lt;br /&gt;
|-&lt;br /&gt;
| '''sget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget /system&lt;br /&gt;
|-&lt;br /&gt;
| '''sget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with a subtree filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| sget-config source=running /nacm/rules &lt;br /&gt;
|-&lt;br /&gt;
| '''xget'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| xget &amp;quot;/interfaces-state/interface/statistics&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''xget-config'''&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt;get-config&amp;gt; with an XPath filter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;xget-config source=candidate &amp;quot;/interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The retrieval commands return an element named &amp;lt;data&amp;gt; containing the requested XML subtrees.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any identifier nodes (YANG key leafs) are needed to distinguish the data in the reply, they will be added as needed by the server. &amp;lt;nowiki&amp;gt;In the 'xget' example above, the &amp;lt;name&amp;gt; element for each interface would be returned, even though it was not directly requested by the XPath expression.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Default Value Filtering ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The data will also be filtered according to the defaults handling behavior of the server, unless the &amp;lt;with-defaults&amp;gt; parameter is added to the command. &amp;lt;/nowiki&amp;gt;This parameter is only supported if the server advertised the 'with-defaults' capability, If not, the client does not get any indication from the server what type of defaults filtering is being done (if any).&lt;br /&gt;
&lt;br /&gt;
There are 3 types of defaults filtering provided:&lt;br /&gt;
&lt;br /&gt;
* '''report-all''': no filtering -- return all nodes even those the server might normally suppress because they are considerer to be default values by the server.&lt;br /&gt;
* '''trim''': return all nodes except skip any leaf nodes that match the schema defined default value&lt;br /&gt;
* '''explicit''': return all nodes that were set by the client or the server to some value, even if the value happens to be the schema defined default. This is normally the default behavior for the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The defaults handling behavior can be changed just for a specific NETCONF session, using the &amp;lt;set-my-session&amp;gt; operation. &amp;lt;/nowiki&amp;gt;This is only available on the '''netconfd''' server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' set-my-session with-defaults=report-all '''&lt;br /&gt;
 &lt;br /&gt;
 RPC OK Reply 12 for session 1: &lt;br /&gt;
 &lt;br /&gt;
 yangcli joe@localhost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this example, the 'basic' behavior is changed from 'explicit' to 'report-all', but just for session 1. This setting is temporary, and will not be remembered when the session is terminated. &amp;lt;nowiki&amp;gt;If the &amp;lt;with-defaults&amp;gt; parameter is present, it will be used instead of this value.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Special Retrieval Operations ===&lt;br /&gt;
Any YANG module can add new operations with the 'rpc' statement.&lt;br /&gt;
&lt;br /&gt;
New retrieval operations may also be added which are associated with a protocol capability.&lt;br /&gt;
&lt;br /&gt;
Just like any other data model content, the operator (or application) needs to understand the YANG file definitions, including the description statements, to understand how each custom retrieval operation works.&lt;br /&gt;
&lt;br /&gt;
There are 2 custom retrieval operations supported by '''netconfd''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Special Retrieval Operations'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! operation&lt;br /&gt;
! description&lt;br /&gt;
|-&lt;br /&gt;
| '''get-schema'''&lt;br /&gt;
| Retrieve the YANG or YIN source file for one of the modules advertised by the server.This is a standard operation defined in the '''ietf-netconf-monitoring''' module.&lt;br /&gt;
|-&lt;br /&gt;
| '''get-my-session'''&lt;br /&gt;
| Retrieve the customizable settings for my session. This is a proprietary operation defined in the '''yuma-my-session''' module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notifications ==&lt;br /&gt;
Notifications are used in NETCONF to send server event information to the client application.&lt;br /&gt;
&lt;br /&gt;
A session must request notifications with the 'create-subscription' command.&lt;br /&gt;
&lt;br /&gt;
Notifications are grouped into 'streams', but only the 'NETCONF' stream is defined at this time.&lt;br /&gt;
&lt;br /&gt;
A notification subscription request specifies the stream name (and perhaps more parameters).&lt;br /&gt;
&lt;br /&gt;
A NETCONF session on the netconfd server will never expire due to inactivity, while a notification subscription is active. This allows notification processing applications to maintain long-lived connections without worrying about a NETCONF timeout. Note that the SSH server may also be configured to drop idle SSH sessions, whether a notification subscription is active or not.&lt;br /&gt;
&lt;br /&gt;
=== Notification Contents ===&lt;br /&gt;
[[Image:notification-structure.png]]&lt;br /&gt;
&lt;br /&gt;
The 'notification' element is sent from the server to the client, if an event occurs, and the client has created a notification subscription.&lt;br /&gt;
&lt;br /&gt;
The child nodes of this element comprise the notification content, and it is divided into 3 sections:&lt;br /&gt;
&lt;br /&gt;
# '''event generation time-stamp''': This standard NETCONF leaf is always the first child element within the notification element.&lt;br /&gt;
# '''event payload''': The module-specific event payload is represented as a container with the name of the notification. Any data nodes defined within the YANG notification statement appear (in order) as child nodes of the event type container.&lt;br /&gt;
# '''proprietary extensions''': Zero or more vendor-specific elements may appear after the event payload element. For example, the monotonically increasing 'sequence-id' element is added to each notification saved in the '''netconfd''' event log.&lt;br /&gt;
&lt;br /&gt;
=== Notification Replay ===&lt;br /&gt;
[[Image:notification-replay-buffer.png]]&lt;br /&gt;
&lt;br /&gt;
The NETCONF server will maintain an ordered buffer of saved notification events, if the :notification-replay capability is supported by the server. For the '''netconfd''' server, this is a configurable feature, set by the '''--eventlog-size''' parameter.&lt;br /&gt;
&lt;br /&gt;
The '''netconfd''' default is to save the most recent 1000 notification events.&lt;br /&gt;
&lt;br /&gt;
Only system events are saved and are available for retrieval. The 'replayComplete' and 'subscriptionComplete' events are session-specific events, and are therefore not saved in the replay buffer.&lt;br /&gt;
&lt;br /&gt;
The 'create-subscription' command has 2 parameters to request that stored notifications be delivered to the client session:&lt;br /&gt;
&lt;br /&gt;
* '''startTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred after this time are delivered.&lt;br /&gt;
* '''stopTime''': the date (or date-and-time) to compare against the event generation time-stamp. Only notification events that occurred before this time are delivered. This parameter can specify a time in the future. When that time has passed, the subscription will be terminated. The stopTime does not cause the server to wait that period of time to generate an event. If the stopTime is in the past, then the subscription will terminate after all the matching event timestamps in the replay buffer have been delivered.&lt;br /&gt;
&lt;br /&gt;
Notifications are delivered in the order they are stored. Each new '''netconfd''' notification contains a monotonically increasing sequence-id (unsigned integer). This can be used to help determine if any configured notification filters are working as expected.&lt;br /&gt;
&lt;br /&gt;
=== The interleave capability ===&lt;br /&gt;
The '''netconfd''' server supports the :interleave capability, which means that all commands (except create-subscription) will be accepted by the server. &amp;lt;nowiki&amp;gt;The client should expect &amp;lt;rpc-reply&amp;gt; and &amp;lt;notification&amp;gt; messages. &amp;lt;/nowiki&amp;gt;The server will always maintain proper message serialization. &amp;lt;nowiki&amp;gt;These messages will always be sent in their entirety, which may impact applications (e.g., a really long &amp;lt;get&amp;gt; response on the same session will delay notification delivery).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the NETCONF server does not support the :interleave capability, then it may only allow the &amp;lt;close-session&amp;gt; operation while the notification subscription is active. &amp;lt;/nowiki&amp;gt;In this case, a new NETCONF session is required to perform any management operations.&lt;br /&gt;
&lt;br /&gt;
This special mode is only applicable while a notification subscription is active. It is possible for a replay subscription to terminate, without terminating the session as well. In this case, the 'notificationComplete' event will be generated, and the session will return to accepting all possible operations.&lt;br /&gt;
&lt;br /&gt;
== Database Editing ==&lt;br /&gt;
NETCONF supports multiple conceptual configuration databases. Only the 'running' database is actually active. All other databases are scratch-pad databases, or some other special-purpose off-line database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Every NETCONF server must allow arbitrary partial (and concurrent) editing to its configuration with the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;Refer to the Yuma Tools User Manual for complete details on this NETCONF operation. The '''yangcli''' program has simplified editing commands, which are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;config&amp;gt; element within an &amp;lt;edit-config&amp;gt; PDU represents the 'root node' (/) in the path expression for each node in the conceptual database. &amp;lt;/nowiki&amp;gt;Each top-level YANG object that is supported and configured will be represented as child nodes to this root node. The conceptual database can be processed as an XML instance document with multiple top nodes (similar to XSLT rules).&lt;br /&gt;
&lt;br /&gt;
Database editing in NETCONF has several variants, but basically, it follows this simple procedure:&lt;br /&gt;
&lt;br /&gt;
# Lock the database(s) that will be affected.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;Use &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; on the target database to make changes.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# Activate and save/commit the database edits.&lt;br /&gt;
# Unlock the database(s) that were previously locked.&lt;br /&gt;
&lt;br /&gt;
=== The Target Database ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;Usually a NETCONF server supports the &amp;lt;edit-config&amp;gt; operation on only one database, which is either the candidate or the running database. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;This is called the 'target' database, which corresponds to the &amp;lt;target&amp;gt; parameter in the &amp;lt;edit-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;If the target database is the candidate configuration, then the &amp;lt;edit-config&amp;gt; operation does not always cause all possible database validation checking to be done by the server. &amp;lt;/nowiki&amp;gt;Since the candidate database is just a scratch-pad for (possibly) incremental edits, the server is not required to completely validate its contents. &amp;lt;nowiki&amp;gt;Instead, these 'final validation' tests are only required to be done when the &amp;lt;commit&amp;gt; operation is invoked.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program will automatically handle the target database management, based on the server capabilities reported each session, if the 'save' command is used. &amp;lt;nowiki&amp;gt;The manual procedure (&amp;lt;commit&amp;gt; and/or maybe &amp;lt;copy-config&amp;gt; operations) is also supported, but do not mix them within the same editing session.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Database Locking ===&lt;br /&gt;
NETCONF supports database locking so a session can have exclusive write access to the configuration.&lt;br /&gt;
&lt;br /&gt;
These locks are intended to be short-lived, but there is no actual time limit on a lock. If the session terminates for any reason with any locks, they will be released automatically by the server.&lt;br /&gt;
&lt;br /&gt;
All the databases that are involved in the edit should be locked. This always includes the running database, and the candidate and startup databases, if they are supported by the server.&lt;br /&gt;
&lt;br /&gt;
The yangcli program has 2 special commands to handle all locking:&lt;br /&gt;
&lt;br /&gt;
* '''get-locks''': Wait until all database locks have been acquired or the timeout occurs&lt;br /&gt;
* '''release-locks''': Rlease any locks that were obtained with get-locks&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on these commands.&lt;br /&gt;
&lt;br /&gt;
=== Non-Volatile Storage ===&lt;br /&gt;
The startup configuration is the conceptual database used on the next reboot of the NETCONF server. It is important to know whether the NETCONF server supports the :startup capability or not. &amp;lt;nowiki&amp;gt;If yes, then the operator must explicitly save the running database to non-volatile storage (the startup database), using the &amp;lt;copy-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;If no, then the server will keep the running and startup databases synchronized.&lt;br /&gt;
&lt;br /&gt;
The '''yangcli''' program has a high-level 'save' command, used after the editing operations, that will automatically issue the correct protocol operations to complete the edit, and save the changes in non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
The startup database is configurable in the '''netconfd''' server. The '''--with-startup''' configuration parameter controls whether the startup database will be used or not. The --startup parameter can be used to control the initial load of the running configuration in 3 different ways:&lt;br /&gt;
&lt;br /&gt;
# '''no startup''': skip this step and just use factory defaults&lt;br /&gt;
# '''default startup''': look for the default '''startup-cfg.xml''' file in the configured data path.&lt;br /&gt;
# '''specific startup''': use a specified file, either absolute file-spec, or a relative path in the configured data path&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for more details on controlling non-volatile storage.&lt;br /&gt;
&lt;br /&gt;
=== Editing Commands ===&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation should be used to make configuration changes. &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;The &amp;lt;copy-config&amp;gt; operation can also be used, but this is a blunt hammer approach. &amp;lt;/nowiki&amp;gt;Although the '''netconfd''' server will always analyze the edit request and only affect the nodes that actually changed, this is not a requirement in the standard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;The &amp;lt;edit-config&amp;gt; operation allows the operator to have precise control of the server. &amp;lt;/nowiki&amp;gt;These database edits are performed by the server using a combination of 3 factors:&lt;br /&gt;
&lt;br /&gt;
# The nodes that currently exist in the target database.&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The nodes that exist in the 'source' of the edits (either the inline &amp;lt;config&amp;gt; element or indirectly through the &amp;lt;url&amp;gt; element.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# &amp;lt;nowiki&amp;gt;The &amp;lt;default-operation&amp;gt; parameter and any XML attributes in the source XML elements (nc:operation attribute and YANG insert operation attributes).&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''yangcli'''&amp;lt;nowiki&amp;gt; program provides some high-level commands to automatically handle the complexity of the &amp;lt;edit-config&amp;gt; operation. &amp;lt;/nowiki&amp;gt;These commands use XPath expressions and a series of interactive prompts (e.g., for the mandatory nodes and key leafs) to fill in the specified data structures, and construct an optimized NETCONF message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''yangcli Editing Commands'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;command&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;description&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| create&lt;br /&gt;
| Create a new sub-tree, only if it does not already exist&lt;br /&gt;
|-&lt;br /&gt;
| delete&lt;br /&gt;
| Delete an existing sub-tree, only if it exists&lt;br /&gt;
|-&lt;br /&gt;
| merge&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, keeping any existing nodes that are not explicitly contained in the source.&lt;br /&gt;
|-&lt;br /&gt;
| replace&lt;br /&gt;
| Merge the source sub-tree into the target sub-tree, deleting any existing nodes that are not explicitly contained in the source. &amp;lt;nowiki&amp;gt;This is the mode used for the &amp;lt;copy-config&amp;gt; operation.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| insert&lt;br /&gt;
| Insert or move a YANG list or leaf-list entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to the Yuma Tools User Manual for details on these commands.&lt;br /&gt;
&lt;br /&gt;
== Access Control ==&lt;br /&gt;
The '''netconfd''' server can be configured to give precise access rights to each user (the SSH user name associated with the NETCONF session). Some important points to remember about access control:&lt;br /&gt;
&lt;br /&gt;
* There are 3 types of access -- read, write, and execute.&lt;br /&gt;
* If a user does not have read access to some data, then it is silently omitted from the reply.&lt;br /&gt;
* The 'access-denied' error is not generated for read requests. &amp;lt;nowiki&amp;gt;It is only generated for write requests to the database, or &amp;lt;rpc&amp;gt; operation execution requests.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* An access request results in 1 of 2 outcomes: permit or deny&lt;br /&gt;
* The server resolves the access request by searching the access control rules. Either an explicit rule will apply, or the default access rights will be checked if no rule is found.&lt;br /&gt;
* The default access rights are configurable, but usually set as follows:&lt;br /&gt;
** read access is permitted&lt;br /&gt;
** write access is denied&lt;br /&gt;
** exec access is permitted&lt;br /&gt;
* The '''nacm:secure''' and '''nacm:very-secure''' extensions can be used by the YANG module author to override the default access rights, and deny access instead. &amp;lt;nowiki&amp;gt;For example, the &amp;lt;reboot&amp;gt; operation is not permitted by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* There is a configurable 'superuser' user name. If desired, a specific user name will be considered the 'super user' and all access control will be bypassed for this user. By default, this is the name 'superuser', not 'root', since root login to the SSH server is not recommended.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
The '''yangcli''' program supports variables for easier reuse and script-based operations.&lt;br /&gt;
&lt;br /&gt;
There are 2 types of variables:&lt;br /&gt;
&lt;br /&gt;
* '''file variables''': the variable name is a file name, and the contents of the variable are stored in this file.&lt;br /&gt;
* '''internal variables''': the variable name is just an internal identifier, and the contents of the variable are stored in memory&lt;br /&gt;
&lt;br /&gt;
Variables are set with assignment statements. Here are some examples:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$backup = get-config source=running'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' $$bad-data = &amp;quot;warn&amp;quot;'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; $itf = &amp;quot;//interface[name='eth0']&amp;quot;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Note that in order to assign a string value (e.g., $$bad-data = &amp;quot;warn&amp;quot; above), single or double quotes must be used. An unquoted string will be interpreted as a command name, not a simple string value.&lt;br /&gt;
&lt;br /&gt;
Variables are referenced in a similar manner, except the variable is on the right-hand side of the equation. These commands are equivalent in this example:&lt;br /&gt;
&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' @myfile.xml = xget select=$itf'''&lt;br /&gt;
 yangcli joe@localhost&amp;gt;'''&amp;lt;nowiki&amp;gt; @myfile.xml = xget //interface[name='eth0']&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Complex variable substitution is also supported:&lt;br /&gt;
 yangcli joe@localhost&amp;gt;''' copy-config source=$$backup target=candidate'''&lt;br /&gt;
&lt;br /&gt;
Note that '''yangcli''' will attempt to figure out the structure of the parameter (e.g., 'source' and 'target' above), and adjust the NETCONF operation content. In the example above, since 'source' and 'target' are choices, the real nodes within the cases are examined, and the most appropriate case is selected. &amp;lt;nowiki&amp;gt;The 'source' parameter will contain an in-line &amp;lt;config&amp;gt; element with all the child nodes in the &amp;lt;/nowiki&amp;gt;'''$$backup''' variable, and the target parameter will contain an empty element named '''&amp;lt;nowiki&amp;gt;&amp;lt;candidate&amp;gt;.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several types of internal variables available in the '''yangcli''' program:&lt;br /&gt;
&lt;br /&gt;
* read-only system variables ($$USER)&lt;br /&gt;
* read-write system variables ($$default-operation)&lt;br /&gt;
* global user variables, available at all 'runstack' levels ($$backup)&lt;br /&gt;
* local user variables available in the current 'runstack' level only ($itf)&lt;br /&gt;
&lt;br /&gt;
The command 'show vars' can be used to see the current value of all program variables:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 yangcli joe@localhost&amp;gt; '''show vars '''&lt;br /&gt;
CLI Variables&lt;br /&gt;
&lt;br /&gt;
yangcli {&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  feature-enable-default true&lt;br /&gt;
  fixorder true&lt;br /&gt;
  force-target candidate&lt;br /&gt;
  indent 2&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  ncport 830&lt;br /&gt;
  password ****&lt;br /&gt;
  private-key /home/joe/.ssh/id_rsa&lt;br /&gt;
  public-key /home/joe/.ssh/id_rsa.pub&lt;br /&gt;
  server localhost&lt;br /&gt;
  subdirs true&lt;br /&gt;
  tcp-direct-enable false&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  transport ssh&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  warn-idlen 64&lt;br /&gt;
  warn-linelen 0&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Read-only environment variables&lt;br /&gt;
&lt;br /&gt;
  HOME /home/joe&lt;br /&gt;
  HOSTNAME &lt;br /&gt;
  LANG en_US.utf8&lt;br /&gt;
  PWD /home/joe&lt;br /&gt;
  SHELL /bin/bash&lt;br /&gt;
  USER joe&lt;br /&gt;
  YUMA_DATAPATH &lt;br /&gt;
  YUMA_HOME &lt;br /&gt;
  YUMA_MODPATH &lt;br /&gt;
  YUMA_RUNPATH &lt;br /&gt;
&lt;br /&gt;
Read-write system variables&lt;br /&gt;
&lt;br /&gt;
  aliases-file ~/.yuma/.yangcli_aliases&lt;br /&gt;
  alt-names true&lt;br /&gt;
  autoaliases true&lt;br /&gt;
  autocomp true&lt;br /&gt;
  autohistory true&lt;br /&gt;
  autoload true&lt;br /&gt;
  autouservars true&lt;br /&gt;
  bad-data check&lt;br /&gt;
  default-module &lt;br /&gt;
  default-operation merge&lt;br /&gt;
  display-mode plain&lt;br /&gt;
  echo-replies true&lt;br /&gt;
  error-option none&lt;br /&gt;
  fixorder true&lt;br /&gt;
  indent 2&lt;br /&gt;
  keep-session-model-copies-after-compilation false&lt;br /&gt;
  log-level info&lt;br /&gt;
  match-names one-nocase&lt;br /&gt;
  optional false&lt;br /&gt;
  server localhost&lt;br /&gt;
  test-option set&lt;br /&gt;
  time-rpcs false&lt;br /&gt;
  timeout 30&lt;br /&gt;
  use-xmlheader true&lt;br /&gt;
  user vladimir&lt;br /&gt;
  uservars-file ~/.yuma/yangcli_uservars.xml&lt;br /&gt;
  with-defaults none&lt;br /&gt;
&lt;br /&gt;
Global variables&lt;br /&gt;
&lt;br /&gt;
  backup {&lt;br /&gt;
    interfaces &lt;br /&gt;
    nacm &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Local variables&lt;br /&gt;
&lt;br /&gt;
  itf //interface[name='eth0']&lt;br /&gt;
yangcli joe@localhost&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
Scripts are simply a collection of '''yangcli''' commands and/or assignment statements that are stored in a text file, instead of typed directly. Scripts can call other scripts (except loops are not allowed), and numbered parameters are available (e.g., --P1='fred' passed as parameter, the $1 expands to 'fred' inside the script).&lt;br /&gt;
&lt;br /&gt;
The '''$YUMA_RUNPATH''' environment variable, or the '''--runpath''' configuration variable, can be used to set the directory path to look for script files. There is also a default path for finding files, explained in the Yuma Tools User Manual.&lt;br /&gt;
&lt;br /&gt;
The command ''''list scripts'''' can be used to show the potential script file available in the run path.&lt;br /&gt;
&lt;br /&gt;
The command ''''run foo'''' is used to invoke a script named 'foo' (with no file extension).&lt;br /&gt;
&lt;br /&gt;
If a command fails during a script, execution is halted right away and no more commands in the script are executed. If 'get-locks' was used, then any locks obtained will be automatically released. All script runstack levels will be canceled, not just the current script.&lt;br /&gt;
&lt;br /&gt;
Script syntax will be expanded in a future release to provide loops and conditional statements.&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_104_Hackathon&amp;diff=379</id>
		<title>IETF 104 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_104_Hackathon&amp;diff=379"/>
		<updated>2019-03-24T13:26:22Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/104hackathon :&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''YANG Data Model for Network Interconnect Tester'''&lt;br /&gt;
     * Champion(s)&lt;br /&gt;
       * Vladimir Vassilev &amp;lt;vladimir at transpacket.com&amp;gt;&lt;br /&gt;
     * Project(s)&lt;br /&gt;
       * implement traffic-generator and traffic-analyzer modules for Linux&lt;br /&gt;
       * implement traffic-generator and traffic-analyzer modules for discrete event network simulation tools&lt;br /&gt;
       * implement transactional network test API for python&lt;br /&gt;
     * References&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ietf-traffic-generator and ietf-traffic-analyzer modules will be implemented as netconfd SILs and the code added to the examples part of the project. They will complement the ietf-network-bridge module already there and allow for running a complete transactional network simulation with mininet.&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
* https://github.com/IETF-Hackathon/ietf104-project-presentations/blob/master/bmwg-network-interconnect-tester-hackathon104.pdf&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
	<entry>
		<id>https://yuma123.org/wiki/index.php?title=IETF_104_Hackathon&amp;diff=378</id>
		<title>IETF 104 Hackathon</title>
		<link rel="alternate" type="text/html" href="https://yuma123.org/wiki/index.php?title=IETF_104_Hackathon&amp;diff=378"/>
		<updated>2019-03-24T13:26:12Z</updated>

		<summary type="html">&lt;p&gt;Vladimir: /* Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Plan==&lt;br /&gt;
From https://trac.ietf.org/trac/ietf/meeting/wiki/104hackathon :&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''YANG Data Model for Network Interconnect Tester'''&lt;br /&gt;
     * Champion(s)&lt;br /&gt;
       * Vladimir Vassilev &amp;lt;vladimir at transpacket.com&amp;gt;&lt;br /&gt;
     * Project(s)&lt;br /&gt;
       * implement traffic-generator and traffic-analyzer modules for Linux&lt;br /&gt;
       * implement traffic-generator and traffic-analyzer modules for discrete event network simulation tools&lt;br /&gt;
       * implement transactional network test API for python&lt;br /&gt;
     * References&lt;br /&gt;
       * https://tools.ietf.org/html/draft-vassilev-bmwg-network-interconnect-tester&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ietf-traffic-generator and ietf-traffic-analyzer modules will be implemented as netconfd SILs and the code added to the examples part of the project. They will complement the ietf-network-bridge module already there and allow for running a complete transactional network simulation with mininet.&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
* https://github.com/IETF-Hackathon/ietf104-project-presentations/blob/master/bmwg-network-interconnect-tester-hackathon104.pdf*&lt;/div&gt;</summary>
		<author><name>Vladimir</name></author>
		
	</entry>
</feed>