No description
Find a file
Olof hagsand c5991c9844 * Added a generated CLI show command that works on the generated parse tree with auto completion.
* A typical call is: 	show @datamodel:example, cli_show_auto("candidate", "json");
  * The example contains a more elaborate example.
  * Thanks ngashok for request, see https://github.com/clicon/clixon/issues/24
2018-06-05 16:45:43 +02:00
apps * Added a generated CLI show command that works on the generated parse tree with auto completion. 2018-06-05 16:45:43 +02:00
build-root/scripts Implement make dist target 2017-12-05 05:23:27 -06:00
datastore * INSTALLFLAGS added with default value -s(strip). 2018-04-30 12:06:19 +02:00
doc * Removed cli callback vector functions. Set COMPAT_COMPAT_CLIV if you need to keep these functions in clixon_custom.h. 2018-05-30 22:38:12 +02:00
docker 2017->2018 2018-01-01 12:25:33 +01:00
etc Improve permissions and strip binaries 2018-04-23 13:33:21 -05:00
example * Added a generated CLI show command that works on the generated parse tree with auto completion. 2018-06-05 16:45:43 +02:00
extras Prepare build system to produce RPMs 2017-12-05 07:27:59 -06:00
include * Removed cli callback vector functions. Set COMPAT_COMPAT_CLIV if you need to keep these functions in clixon_custom.h. 2018-05-30 22:38:12 +02:00
lib xmlns sanity check 2018-06-05 16:43:43 +02:00
test * Added xmlns validation 2018-06-05 09:42:11 +02:00
yang from 3.6.1: * https://github.com/clicon/clixon/issues/23 clixon_cli failing with error 2018-05-29 22:27:41 +02:00
.gitignore Prepare build system to produce RPMs 2017-12-05 07:27:59 -06:00
CHANGELOG.md * Added a generated CLI show command that works on the generated parse tree with auto completion. 2018-06-05 16:45:43 +02:00
clixon.mk.cpp * The following backward compatible options to configure have been obsoleted. If you havent already migrated this code you must do this now. 2018-01-01 14:48:57 +01:00
config.guess Inital commit 2016-02-22 22:17:30 +01:00
config.sub Inital commit 2016-02-22 22:17:30 +01:00
configure * Removed cli callback vector functions. Set COMPAT_COMPAT_CLIV if you need to keep these functions in clixon_custom.h. 2018-05-30 22:38:12 +02:00
configure.ac * Removed cli callback vector functions. Set COMPAT_COMPAT_CLIV if you need to keep these functions in clixon_custom.h. 2018-05-30 22:38:12 +02:00
install-sh Inital commit 2016-02-22 22:17:30 +01:00
LICENSE.md 2017->2018 2018-01-01 12:25:33 +01:00
Makefile.in * INSTALLFLAGS added with default value -s(strip). 2018-04-30 12:06:19 +02:00
README.md * Support for YANG identity and identityref according to RFC 7950 Sec 7.18 and 9.10 2018-06-03 15:36:05 +02:00
README_DEVELOP.md * INSTALLFLAGS added with default value -s(strip). 2018-04-30 12:06:19 +02:00
README_NACM.md * INSTALLFLAGS added with default value -s(strip). 2018-04-30 12:06:19 +02:00

Clixon

Clixon is an automatic configuration manager where you generate interactive CLI, NETCONF, RESTCONF and embedded databases with transaction support from a YANG specification.

Background

Clixon was implemented to provide an open-source generic configuration tool. The existing CLIgen tool was for command-lines only, while clixon is a system with configuration database, xml and rest interfaces. Most of the projects using clixon are for embedded network and measuring devices. But Clixon is more generic than that.

Users of clixon currently include:

See also Clicon project page.

Installation

A typical installation is as follows:

     configure	       	       # Configure clixon to platform
     make                      # Compile
     sudo make install         # Install libs, binaries, and config-files
     sudo make install-include # Install include files (for compiling)

One example application is provided, a IETF IP YANG datamodel with generated CLI, Netconf and restconf interface.

Licenses

Clixon is open-source and dual licensed. Either Apache License, Version 2.0 or GNU General Public License Version 2; you choose.

See LICENSE.md for the license.

Dependencies

Clixon depends on the following software packages, which need to exist on the target machine.

  • CLIgen If you need to build and install CLIgen:
    git clone https://github.com/olofhagsand/cligen.git
    cd cligen; configure; make; make install
  • Yacc/bison
  • Lex/Flex
  • Fcgi (if restconf is enabled)

There is no yum/apt/ostree package for Clixon (please help?)

Support

Clixon interaction is best done posting issues, pull requests, or joining the slack channel. Slack invite.

Extending

Clixon provides a core system and can be used as-is using available Yang specifications. However, an application very quickly needs to specialize functions. Clixon is extended by writing plugins for cli and backend. Extensions for netconf and restconf are also available.

Plugins are written in C and easiest is to look at example or consulting the FAQ.

Yang

YANG and XML is at the heart of Clixon. Yang modules are used as a specification for handling XML configuration data. The YANG spec is used to generate an interactive CLI, netconf and restconf clients. It also manages an XML datastore.

Clixon mainly follows YANG 1.0 RFC 6020 with some exceptions:

  • conformance: feature, if-feature, deviation
  • list features: min/max-elements, unique
  • when, must, action statements
  • notifications

The aim is also to cover new features in YANG 1.1 YANG RFC 7950

Clixon has its own XML library designed for performance.

Netconf

Clixon implements the following NETCONF proposals or standards:

Some updates are being made to RFC 6241 and RFC 6242.

Clixon does not yet support the following netconf features:

  • :url capability
  • copy-config source config
  • edit-config testopts
  • edit-config erropts
  • edit-config config-text

Restconf

Clixon restconf is a daemon based on FASTCGI. Instructions are available to run with NGINX. The implementatation is based on RFC 8040: RESTCONF Protocol. The following features are supported:

  • OPTIONS, HEAD, GET, POST, PUT, DELETE The following are not implemented
  • PATCH
  • query parameters (section 4.9)
  • notifications (sec 6)
  • schema resource

See more detailed instructions.

Datastore

The Clixon datastore is a stand-alone XML based datastore. The idea is to be able to use different datastores backends with the same API.

Update: There used to be a key-value plugin based on qdbm but isnow obsoleted. Only a text datastore is implemented.

The datastore is primarily designed to be used by Clixon but can be used separately.

See more detailed instructions.

Auth

Authentication is managed outside Clixon using SSH, SSL, Oauth2, etc.

For CLI, login is typically made via SSH. For netconf, SSH netconf subsystem can be used.

Restconf however needs credentials. This is done by writing a credentials callback in a restconf plugin. See:

The clients send the ID of the user using a "username" attribute with the RPC calls to the backend. Note that the backend trusts the clients so the clients can in principle fake a username.

There is an ongoing effort to implement authorization for Clixon according to RFC8341(NACM), at least a subset of the functionality. See more information here: NACM.

Runtime

clixon sdk

The figure shows the SDK runtime of Clixon.