IETF 96 Hackcathon yuma123 project report

From Yuma123 Wiki
Jump to navigationJump to search


Q1: What is yuma123?

  • BSD licensed evolved from the 2012 last release of Yuma (YumaWorks) as BSD licensed software.
  • Follows net-snmp in terms of standard packaging and build tools (autoconf/automake, debian dev-tools)

Q2: How stable is it?

  • It is used on commercial products (H1 switches from Transpacket AS)

Q3: What are the project advantages?

  • Lighter easier to build and install on mainstream debian/Ubuntu.
  • Focus on netconfd and yangcli and ease of development debian packaged modules for the server.

Q4: What are the project disadvantages?

  • No restconf planned yet.
  • No YANG 1.1 support yet.
  • Less focus on schema conversion tools and template generation.

Goals for IETF 96 Hackathon

[OK] Goal 0: Add mainstream distribution package repository support (ubuntu trusty 14.04). Publish online both src and binary packages. apt-get install and apt-get source should work! Do it as simple as installing net-snmp!! Power to the people!!!

sudo add-apt-repository "deb trusty main"
wget -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install netconfd yangcli netconfd-module-ietf-system netconfd-module-ietf-interfaces libyuma-perl python-yuma libyuma-dbg libyuma-dev 

Installation complete! ... Configure ssh for netconf:

sudo su
echo "Port 830" >> /etc/ssh/sshd_config
echo "Subsystem netconf /usr/sbin/netconf-subsystem" >> /etc/ssh/sshd_config
service ssh restart

Start netconfd:

netconfd --module=ietf-system --module=ietf-interfaces --superuser=$USER

Connect with yangcli:

yangcli --server= --user=$USER


yangcli vladimir@> create /system/location

Filling optional leaf /system/location:
Enter string value for leaf <location>
yangcli vladimir@> Berlin

RPC OK Reply 1 for session 1:

yangcli vladimir@> commit

RPC OK Reply 2 for session 1:

yangcli vladimir@> xget /system

RPC Data Reply 3 for session 1:

rpc-reply {
  data {
    system {
      location Berlin

[OK] Goal 1: Design a simplified client application API for development of scripted configuration and monitoring tools: yangrpc


int yangrpc_init(int argc, char* argv[]);
yangrpc_cb_t* yangrpc_connect(char* server, uint16_t port, char* user, char* password, char* publick_key, char* private_key);
status_t yangrpc_parse_cli(yangrpc_cb_t *server_cb, char* cli_cmd_str, val_value_t** request_val);
status_t yangrpc_exec(yangrpc_cb_t *server_cb, val_value_t* request_val, val_value_t** reply_val);
void yangrpc_close(yangrpc_cb_t *yangrpc_cb);

[OK] Goal 2: Add support for yangcli style scripting to perl and python


from yangcli import yangcli
from lxml import etree
import yangrpc
import sys

conn = yangrpc.connect("", 830, "root", "mysecretpass","/root/.ssh/id_rsa","/root/.ssh/")
    print("Error: yangrpc failed to connect!")

names = yangcli(conn, "xget /interfaces-state").xpath('./data/interfaces-state/interface/name')

for name in names:
	print name.text



use yuma;
use yangrpc;
use yangcli;
use XML::LibXML;

my $conn = yangrpc::connect("", 830, "root", "mysecretpass","/root/.ssh/id_rsa","/root/.ssh/");
defined($conn) || die "Error: yangrpc failed to connect!";

my @names = yangcli::yangcli($conn, "xget /interfaces-state")->findnodes("./rpc-reply/data/interfaces-state/interface/name");

for my $name (@names) {
    print $name->textContent()."\n";

[OK] Goal 3: Add python and perl modules exporting the yuma API and the yangrpc API with the yangcli wrapper.

yangcli --server= --user=phablet --password="mysecretpass" --run-command="xget /" --batch-mode 
yangcli-python --server= --user=phablet --password="mysecetpass" --run-command="xget /" --batch-mode
yangcli-perl --server= --user=phablet --password="mysecretpass" --run-command="xget /" --batch-mode

[NO] Goal 4: Add multi-client session support to yuma123

[OK] Goal 5: Publish IETF 96 Hackathon report (this) on

Hello world netconf/YANG

Everyone who is interested can connect to a Ubuntu phone running the yuma123 netconfd server and template module packages ietf-system and ietf-interfaces:

yangcli --server= --user=hackathon --password=hackathon

Post-Event Wrap Up Report