This commit is contained in:
Olof hagsand 2017-05-07 19:03:10 +02:00
parent e07de7414b
commit 74f1728619
4 changed files with 23 additions and 16 deletions

View file

@ -4,8 +4,6 @@ Clixon is an automatic configuration manager where you generate
interactive CLI, NETCONF, RESTCONF and embedded databases with interactive CLI, NETCONF, RESTCONF and embedded databases with
transaction support from a YANG specification. transaction support from a YANG specification.
![clixon sdk](doc/clixon_example_sdk.png)
Table of contents Table of contents
================= =================
* [Documentation](#documentation) * [Documentation](#documentation)
@ -13,7 +11,7 @@ Table of contents
* [Dependencies](#dependencies) * [Dependencies](#dependencies)
* [Licenses](#licenses) * [Licenses](#licenses)
* [Background](#background) * [Background](#background)
* [Yang and XML](#yang-and-xml) * [Clixon SDK](#SDK)
Documentation Documentation
============= =============
@ -21,9 +19,9 @@ Documentation
- [XML datastore](datastore/README.md) - [XML datastore](datastore/README.md)
- [Netconf support](apps/netconf/README.md) - [Netconf support](apps/netconf/README.md)
- [Restconf support](apps/restconf/README.md) - [Restconf support](apps/restconf/README.md)
- [Reference manual](http://www.clicon.org/doxygen/index.html) (Better: cd doc; make doc) - [Reference manual](http://www.clicon.org/doxygen/index.html) (Note the link may not be up-to-date. It is better to build your own: cd doc; make doc)
- [Routing example](example/README.md) - [Routing example](example/README.md)
- [Clicon project page](http://www.clicon.org) - [Clicon and Clixon project page](http://www.clicon.org)
- [Tests](test/README.md) - [Tests](test/README.md)
Installation Installation
@ -41,7 +39,7 @@ generated CLI and configuration interface.
Dependencies Dependencies
============ ============
Clixon is dependend on the following packages Clixon is dependend on the following software packages, which need to exist on the target machine.
- [CLIgen](http://www.cligen.se) is required for building Clixon. If you need - [CLIgen](http://www.cligen.se) is required for building Clixon. If you need
to build and install CLIgen: to build and install CLIgen:
``` ```
@ -53,6 +51,8 @@ to build and install CLIgen:
- Fcgi (if restconf is enabled) - Fcgi (if restconf is enabled)
- Qdbm key-value store (if keyvalue datastore is enabled) - Qdbm key-value store (if keyvalue datastore is enabled)
There is no yum/apt/ostree package for Clixon yet (please help?)
Licenses Licenses
======== ========
Clixon is dual license. Either Apache License, Version 2.0 or GNU Clixon is dual license. Either Apache License, Version 2.0 or GNU
@ -73,8 +73,12 @@ where the legacy key specification has been replaced completely by
YANG and using XML as configuration data. This means that legacy YANG and using XML as configuration data. This means that legacy
Clicon applications do not run on Clixon. Clicon applications do not run on Clixon.
YANG and XML SDK
============ ===
<img src="doc/clixon_example_sdk.png" alt="clixon sdk" style="width: 300px;"/>
The figure shows the SDK runtime of Clixon.
YANG and XML is at the heart of Clixon. Yang modules are used as a YANG and XML is at the heart of Clixon. Yang modules are used as a
specification for handling XML configuration data. The spec is also specification for handling XML configuration data. The spec is also

View file

@ -1,9 +1,9 @@
# Clixon datastore # Clixon datastore
The Clixon datastore is a stand-alone XML based datastore used by The Clixon datastore is a stand-alone XML based datastore. The idea is
Clixon. The idea is to be able to use different datastores. There is to be able to use different datastores backends with the same
currently a key-value plugin based on qdbm and a plain text-file API. There is currently a key-value plugin based on qdbm and a plain
datastore. text-file datastore.
The datastore is primarily designed to be used by Clixon but can be used The datastore is primarily designed to be used by Clixon but can be used
separately. separately.
@ -42,8 +42,10 @@ To use the API, a client needs the following:
- A directory where to store databases - A directory where to store databases
- A yang specification. This needs to be parsed using the Clixon yang_parse() method. - A yang specification. This needs to be parsed using the Clixon yang_parse() method.
A client calling the API needs to (1)load a plugin and (2)connect to a A client calling the API needs to:
datastore. You can connect to several datastores, even concurrently, 1. Load a plugin and
2. Connect to a datastore.
You can connect to several datastores, even concurrently,
but in practice in Clixon, you connect to a single store. but in practice in Clixon, you connect to a single store.
After connecting to a datastore, you can create and modify databases After connecting to a datastore, you can create and modify databases
@ -70,7 +72,7 @@ You can read a database with xmldb_get() and modify a database with
xmldb_put(), and xmldb_copy(). xmldb_put(), and xmldb_copy().
A typical datastore session can be as follows, see the source code of A typical datastore session can be as follows, see the source code of
datastore_client.c for a more elaborate example. [datastore_client.c](datastore_client.c) for a more elaborate example.
``` ```
h = clicon_handle_init(); h = clicon_handle_init();

View file

@ -124,6 +124,7 @@ clixon_netconf -qf /usr/local/etc/routing.conf
<notification><event>Routing notification</event></notification>]]>]]> <notification><event>Routing notification</event></notification>]]>]]>
<notification><event>Routing notification</event></notification>]]>]]> <notification><event>Routing notification</event></notification>]]>]]>
... ...
```
## I want to program. How do I extend the example? ## I want to program. How do I extend the example?
- routing.conf.local - Override default settings - routing.conf.local - Override default settings

View file

@ -2,7 +2,7 @@
This directory contains testing code for clixon and the example This directory contains testing code for clixon and the example
routing application: routing application:
- clixon A top-level script clones clixon in /tmp and starts all.sh. You can _copy_ this file (review it) and place as cron script - clixon A top-level script clones clixon in /tmp and starts all.sh. You can copy this file (review it first) and place as cron script
- all.sh Run through all tests named 'test*.sh' in this directory. Therefore, if you place a test in this directory matching 'test*.sh' it will be run automatically. - all.sh Run through all tests named 'test*.sh' in this directory. Therefore, if you place a test in this directory matching 'test*.sh' it will be run automatically.
- test1.sh CLI tests - test1.sh CLI tests
- test2.sh Netconf tests - test2.sh Netconf tests