From a2c2375b387527c159b3b2fb29e8caa1198f3cc5 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Mon, 1 May 2017 16:50:22 +0200 Subject: [PATCH] docs --- CHANGELOG.txt | 2 ++ README.md | 31 ++++++++++++++++--------------- apps/netconf/README.md | 17 +++++++++++++++++ apps/restconf/README.md | 40 +++++++++++++++++++++++++--------------- clixon.conf.cpp.cpp | 2 +- datastore/README.md | 16 ++++++++++++++++ 6 files changed, 77 insertions(+), 31 deletions(-) create mode 100644 apps/netconf/README.md create mode 100644 datastore/README.md diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ce6aadd4..84df96ff 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -29,6 +29,8 @@ # # ***** END LICENSE BLOCK ***** +- Datastore text module is now the default. + - Refined netconf "none" semantics in tests and text datastore - Moved apps/dbctrl to datastore/ diff --git a/README.md b/README.md index 47347b22..4b5a5845 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,10 @@ -# CLIXON +# Clixon -CLIXON is an automatic configuration manager where you from a YANG +Clixon is an automatic configuration manager where you from a YANG specification generate interactive CLI, NETCONF, RESTCONF and embedded databases with transaction support. -CLIXON is a fork of CLICON where legacy key specification has been -replaced completely by YANG. This means that legacy CLICON -applications such as CLICON/ROST does not run on CLIXON. - -Presentations and tutorial is found on the [CLICON project -page](http://www.clicon.org) +Presentations and tutorial is found on the [CLICON project page](http://www.clicon.org) ## Installation @@ -20,8 +15,13 @@ A typical installation is as follows: > sudo make install # Install libs, binaries, and config-files > sudo make install-include # Install include files (for compiling) -One example applications is provided, the IETF IP YANG datamodel with generated CLI and configuration interface. It all origins from work at -[KTH](http://www.csc.kth.se/~olofh/10G_OSR) +One example applications is provided, a IETF IP YANG datamodel with generated CLI and configuration interface. + +## More info + +- [Datastore](datastore). +- [Restconf](apps/restconf). +- [Netconf](apps/netconf). ## Dependencies @@ -38,12 +38,13 @@ General Public License Version 2. You choose. See LICENSE.md for license, CHANGELOG for recent changes. -## Client code +## Related -[CLI](apps/restconf). -[Restconf](apps/restconf). -[Netconf](apps/netconf). -[Netconf](apps/netconf). +CLIXON is a fork of CLICON where legacy key specification has been +replaced completely by YANG. This means that legacy CLICON +applications such as CLICON/ROST does not run on CLIXON. + +Clixon origins from work at [KTH](http://www.csc.kth.se/~olofh/10G_OSR) diff --git a/apps/netconf/README.md b/apps/netconf/README.md new file mode 100644 index 00000000..3878aa56 --- /dev/null +++ b/apps/netconf/README.md @@ -0,0 +1,17 @@ +# Clixon Netconf + +Clixon netconf implements the following standards: +- RFC 4741 (NETCONF Configuration Protocol), +- RFC 4742 (Using the NETCONF Configuration Protocol over Secure SHell (SSH)) and +- RFC 5277 (NETCONF Event Notifications). + +It needs to be updated to RFC6241 and RFC 6242. It also does not implement the following features: + +- :url capability +- copy-config source config +- edit-config testopts +- edit-config erropts +- edit-config config-text + + + diff --git a/apps/restconf/README.md b/apps/restconf/README.md index d058225b..36916db1 100644 --- a/apps/restconf/README.md +++ b/apps/restconf/README.md @@ -1,13 +1,12 @@ -Clixon Restconf -=============== +# Clixon Restconf Contents: 1. Features 2. Installation using NGINX 3. Debugging -1. FEATURES -+++++++++++ +## 1. FEATURES + Clixon restconf is a daemon based on FASTCGI. Instructions are available to run with NGINX. The implementatation supports plain OPTIONS, HEAD, GET, POST, PUT, PATCH, DELETE. @@ -18,10 +17,10 @@ including: - notifications (sec 6) - only rudimentary error reporting exists (sec 7) -2. INSTALLATION using NGINX -+++++++++++++++++++++++++++ +## 2. INSTALLATION using NGINX -# Define nginx config file/etc/nginx/sites-available/default +Define nginx config file/etc/nginx/sites-available/default +``` server { ... location /restconf { @@ -30,13 +29,19 @@ server { include fastcgi_params; } } -# Start nginx daemon +``` +Start nginx daemon +``` sudo /etc/init.d nginx start +``` -# Start clixon restconf daemon +Start clixon restconf daemon +``` olof@vandal> sudo su -c "/www-data/clixon_restconf -f /usr/local/etc/routing.conf " -s /bin/sh www-data +``` -# Make restconf calls with curl +Make restconf calls with curl +``` olof@vandal> curl -G http://127.0.0.1/restconf/data/interfaces [ { @@ -62,16 +67,21 @@ olof@vandal> curl -G http://127.0.0.1/restconf/data/interfaces/interface/name=et ] curl -sX POST -d '{"clicon":{"interfaces":{"interface":{"name":"eth1","type":"eth","enabled":"true"}}}}' http://localhost/restconf/data +``` +## DEBUGGING -3. DEBUGGING -++++++++++++ Start the restconf fastcgi program with debug flag: -sudo su -c "/www-data/clixon_restconf -Df /usr/local/etc/routing.conf" -s /bin/sh www-data - +``` +sudo su -c "/www-data/clixon_restconf -Df /usr/local/etc/routing.conf" -s /bin/sh www- +data +``` Look at syslog: +``` tail -f /var/log/syslog | grep clixon_restconf +``` Send command: +``` curl -G http://127.0.0.1/restconf/data/* - +``` diff --git a/clixon.conf.cpp.cpp b/clixon.conf.cpp.cpp index e6481452..1a6f441d 100644 --- a/clixon.conf.cpp.cpp +++ b/clixon.conf.cpp.cpp @@ -118,7 +118,7 @@ CLICON_BACKEND_PIDFILE localstatedir/APPNAME/APPNAME.pidfile CLICON_XMLDB_DIR localstatedir/APPNAME # XMLDB datastore plugin filename (see datastore/ and clixon_xml_db.[ch]) -CLICON_XMLDB_PLUGIN libdir/xmldb/keyvalue.so +CLICON_XMLDB_PLUGIN libdir/xmldb/text.so # Dont include keys in cvec in cli vars callbacks, ie a & k in 'a k ' ignored # CLICON_CLI_VARONLY 1 diff --git a/datastore/README.md b/datastore/README.md new file mode 100644 index 00000000..144446c9 --- /dev/null +++ b/datastore/README.md @@ -0,0 +1,16 @@ +# Clixon datastore + +The Clixon datastore is a stand-alone XML based datastore used by +Clixon. The idea is to be able to use different datastores. There is +currently a Key-value plugin based on qdbm and a plain text-file +datastore. + +The datastore is primarily designed to be used by Clixon but can be used +separately. See datastore_client.c for an example of how to use a +datastore plugin for other applications + +Can we equate a file that does not exist with an empty file? +Or is empty file same as ? +Three states: +NULL <---> "" <---> "" +which are valid?