Preparing for 3.3.0

This commit is contained in:
Olof hagsand 2017-05-07 17:38:43 +02:00
parent 9c4ac8678d
commit a18f66b6d0
12 changed files with 90 additions and 110 deletions

View file

@ -1,35 +1,10 @@
# ***** BEGIN LICENSE BLOCK *****
#
# Copyright (C) 2009-2017 Olof Hagsand and Benny Holmgren
#
# This file is part of CLIXON
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Alternatively, the contents of this file may be used under the terms of
# the GNU General Public License Version 3 or later (the "GPL"),
# in which case the provisions of the GPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of the GPL, and not to allow others to
# use your version of this file under the terms of Apache License version 2,
# indicate your decision by deleting the provisions above and replace them with
# the notice and other provisions required by the GPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the Apache License version 2 or the GPL.
#
# ***** END LICENSE BLOCK *****
# Clixon CHANGELOG
- Datastore text module is now the default.
## 3.3.0
May 2017
- Datastore text module is now default.
- Refined netconf "none" semantics in tests and text datastore

View file

@ -6,8 +6,21 @@ databases with transaction support.
Presentations and tutorial is found on the [CLICON project page](http://www.clicon.org)
## 1. Installation
Table of contents
=================
* [Table of contents](#table-of-contents)
* [Installation](#installation)
* [Documentation](#documentation)
* [Dependencies](#dependencies)
* [Licenses](#licenses)
* [History](#history)
* [Datastore](#datastore)
* [Yang](#yang)
* [Netconf](#netconf)
* [Restconf](#restconf)
Installation
============
A typical installation is as follows:
```
configure # Configure clixon to platform
@ -17,13 +30,15 @@ A typical installation is as follows:
```
One example applications is provided, a IETF IP YANG datamodel with generated CLI and configuration interface.
## 2. Documentation
- [Frequently asked questions](http://www.clicon.org/FAQ.html)
- [Reference manual(http://www.clicon.org/doxygen/index.html) (may not be 100%% synched)
## 3. Dependencies
Documentation
=============
- [Frequently asked questions](doc/FAQ.md)
- [Reference manual](http://www.clicon.org/doxygen/index.html) (Better: cd doc; make doc)
- [Routing example](example/README.md)
- [Test](test/README.md)
Dependencies
============
Clixon is dependend on the following packages
- [CLIgen](http://www.cligen.se) is required for building CLIXON. If you need
to build and install CLIgen:
@ -36,22 +51,23 @@ to build and install CLIgen:
- Fcgi (if restconf is enabled)
- Qdbm key-value store (if keyvalue datastore is enabled)
## 4. Licenses
Licenses
========
CLIXON is dual license. Either Apache License, Version 2.0 or GNU
General Public License Version 2. You choose.
See LICENSE.md for license, CHANGELOG for recent changes.
## 5. History
History
=======
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)
## 6. Clixon Datastore
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
@ -141,8 +157,8 @@ datastore_client.c for a more elaborate example.
xmdlb_plugin_unload(h);
```
## 7. YANG
YANG
====
Clixon implements YANG RFC 6020. Clixon generates an interactive CLI
for YANG specifications. It also provides Restconf and Netconf clients.
@ -152,8 +168,8 @@ Clixon YANG currently does not provide the following support:
- unique
- rpc
## 8. Netconf
Netconf
=======
Clixon Netconf implements the following NETCONF standards:
- RFC 4741 (NETCONF Configuration Protocol)
- RFC 4742 (Using the NETCONF Configuration Protocol over Secure SHell (SSH))
@ -169,8 +185,8 @@ Clixon NETCONF currently does not support the following Netconf features:
- edit-config erropts
- edit-config config-text
## 9. Restconf
Restconf
========
### Features
Clixon restconf is a daemon based on FASTCGI. Instructions are available to
@ -251,4 +267,3 @@ Send command:
```
curl -G http://127.0.0.1/restconf/data/*
```

View file

@ -621,7 +621,6 @@ from_client_delete_config(clicon_handle h,
piddb);
goto ok;
}
if (xmldb_delete(h, target) < 0){
cprintf(cbret, "<rpc-reply><rpc-error>"
"<error-tag>operation-failed</error-tag>"

2
configure vendored
View file

@ -2135,7 +2135,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
: ${CFLAGS="-O2"}
CLIXON_VERSION_MAJOR="3"
CLIXON_VERSION_MINOR="2"
CLIXON_VERSION_MINOR="3"
CLIXON_VERSION_PATCH="0"
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\""
# Fix to specific version (eg 3.5) or head (3)

View file

@ -42,7 +42,7 @@ AC_INIT(lib/clixon/clixon.h.in)
: ${CFLAGS="-O2"}
CLIXON_VERSION_MAJOR="3"
CLIXON_VERSION_MINOR="2"
CLIXON_VERSION_MINOR="3"
CLIXON_VERSION_PATCH="0"
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\""
# Fix to specific version (eg 3.5) or head (3)

View file

@ -726,13 +726,14 @@ match_base_child(cxobj *x0,
}
/*! Modify a base tree x0 with x1 with yang spec y according to operation op
* @param[in] x0 Base xml tree
* @param[in] x0 Base xml tree (can be NULL in add scenarios)
* @param[in] x0p Parent of x0
* @param[in] x1 xml tree which modifies base
* @param[in] op OP_MERGE, OP_REPLACE, OP_REMOVE, etc
* @param[in] y Yang spec corresponding to xml-node x0. NULL if no x0
* @param[in] y Yang spec corresponding to xml-node x0. NULL if x0 is NULL
* @param[in] yspec Top-level yang spec (if y is NULL)
* Assume x0 and x1 are same on entry and that y is the spec
* @see put in clixon_keyvalue.c
* XXX: x1 är det som är under x0
*/
static int
text_modify(cxobj *x0,

View file

@ -1,11 +1,12 @@
This README contains information for developers:
# README for developers Clixon developers
1. How to document the code
2. How to work in git (branching)
3. How the meta-configure stuff works
1. How to document the code
+++++++++++++++++++++++++++
## How to document the code
```
/*! This is a small comment on one line
*
* This is a detailed description
@ -22,36 +23,17 @@ This README contains information for developers:
* @retval FALSE This is a description of another return value
* @see See also this function
*/
```
## How to work in git (branching)
2. How to work in git (branching)
+++++++++++++++++++++++++++++++++
Basically follows: http://nvie.com/posts/a-successful-git-branching-model/
only somewhat simplified:
Do commits in develop branch. When done, merge with master.
$ git checkout develop
Switch to branch develop
$ git add ..
$ git commit ..
$ git push origin develop
Add/commit stuff here (and push)
Ready for tagging
-----------------
(This is somewhat simplified - no release branch)
$ ./bump-version.sh 3.6.0
Files modified successfully, version bumped to 3.6.0
$ git checkout master
Switch to master
$ git merge --no-ff develop
Merge made by recursive.
(Summary of changes)
$ git tag -a 3.6.0
3. How the meta-configure stuff works
+++++++++++++++++++++++++++++++++++++
## How the meta-configure stuff works
```
configure.ac --.
| .------> autoconf* -----> configure
[aclocal.m4] --+---+
@ -64,4 +46,4 @@ configure.ac --.
[config.h.in] -. v .-> [config.h] -.
+--> config.status* -+ +--> make*
Makefile.in ---' `-> Makefile ---'
```

View file

@ -1,8 +1,8 @@
Clixon yang routing example
+++++++++++++++++++++++++++
# Clixon yang routing example
0. Compile and run
------------------
## Compile and run
```
cd example
make && sudo make install
# Start backend
@ -11,9 +11,10 @@ clixon_backend -f /usr/local/etc/routing.conf -I
clixon_cli -f /usr/local/etc/routing.conf
# Send netconf command
clixon_netconf -f /usr/local/etc/routing.conf
```
1. Setting data example using netconf
-------------------------------------
## Setting data example using netconf
```
<rpc><edit-config><target><candidate/></target><config>
<interfaces>
<interface>
@ -28,10 +29,10 @@ clixon_netconf -f /usr/local/etc/routing.conf
</interface>
</interfaces>
</config></edit-config></rpc>]]>]]>
```
2. Getting data using netconf
-----------------------------
## Getting data using netconf
```
<rpc><get-config><source><candidate/></source></get-config></rpc>]]>]]>
<rpc><get-config><source><candidate/></source><filter/></get-config></rpc>]]>]]>
@ -43,25 +44,29 @@ clixon_netconf -f /usr/local/etc/routing.conf
<rpc><get-config><source><candidate/></source><filter type="xpath" select="/interfaces/interface/ipv4"/></get-config></rpc>]]>]]>
<rpc><validate><source><candidate/></source></validate></rpc>]]>]]>
```
## Creating notification
3. Creating notification
------------------------
The example has an example notification triggering every 10s. To start a notification
stream in the session, create a subscription:
```
<rpc><create-subscription><stream>ROUTING</stream></create-subscription></rpc>]]>]]>
<rpc-reply><ok/></rpc-reply>]]>]]>
<notification><event>Routing notification</event></notification>]]>]]>
<notification><event>Routing notification</event></notification>]]>]]>
...
```
This can also be triggered via the CLI:
```
cli> notify
cli> Routing notification
Routing notification
...
```
## Extending
4. Downcall
-----------
Clixon has an extension mechanism which can be used to make extended internal
netconf messages to the backend configuration engine. You may need this to
make some special operation that is not covered by standard
@ -71,11 +76,13 @@ reference. A more realistic downcall would perform some action, such as
reading some status.
Example:
```
cli> downcall "This is a string"
This is a string
cli>p
```
5. Run as docker container
--------------------------
## Run as docker container
```
cd docker
# look in README
```

View file

@ -301,7 +301,6 @@ clicon_msg_send(int s,
strerror(errno), ntohs(msg->op_len), msg->op_body);
goto done;
}
ok:
retval = 0;
done:
return retval;

View file

@ -1,9 +0,0 @@
This directory contains testing code for clixon and the example
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
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 First test
test2.sh Second test,...

11
test/README.md Normal file
View file

@ -0,0 +1,11 @@
# CLixon tests
This directory contains testing code for clixon and the example
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
- 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
- test2.sh Netconf tests
- test3.sh Restconf tests
- test4.sh Yang tests
- test5.sh Datastore tests