example regression fail

FAQ table-of-content
This commit is contained in:
Olof hagsand 2019-03-10 18:33:17 +01:00
parent b1c74b5f1f
commit b54e6c1cc0
4 changed files with 55 additions and 15 deletions

View file

@ -34,15 +34,9 @@
```
* Clixon configuration file top-level symbols has changed to `clixon-config`and namespace check is enforced. This means all Clixon configuration files must change from:
```
<config>
...
</config>
```
<config>...</config>
to:
```
<clixon-config xmlns="http://clicon.org/config">
...
</clixon-config>
<clixon-config xmlns="http://clicon.org/config">...</clixon-config>
```
* Strict XML prefixed namespace check. This means all XML namespaces must always be declared by default or prefixed attribute name. There were some cases where this was not enforced. Example, `y` must be declared:
```
@ -52,7 +46,7 @@ to:
### Minor changes
* Ensured you can add multiple callbacks for any RPC, including basic ones.
* Extra RPC:s will be called _after_ the basic ones.
* One specific usecase is hook for `copy-config` (see [doc/ROADMAP.md] that can be implemented thus way.
* One specific usecase is hook for `copy-config` (see [doc/ROADMAP.md](doc/ROADMAP.md) that can be implemented this way.
* Added "base" as CLI default mode and "cli> " as default prompt.
* clixon-config YAML file has new revision: 2019-03-05.
* New URN and changed top-level symbol to `clixon-config`

View file

@ -15,7 +15,7 @@ support.
* [Dependencies](#dependencies)
* [Extending](#extending)
* [Yang](#yang)
* [CLI](doc/FAQ.md)
* [CLI](doc/CLI.md)
* [XML and XPATH](#xml)
* [Netconf](#netconf)
* [Restconf](#restconf)

View file

@ -1,5 +1,44 @@
# Clixon FAQ
* [What is Clixon?](#what-is-clixon)
* [Why should I use Clixon?](#why-should-i-use-clixon)
* [What license is available?](#what-license-is-available)
* [Is Clixon extendible?](#is-clixon-extendible)
* [Which programming language is used?](#which-programming-language-is-used)
* [How to best understand Clixon?](#how-to-best-understand-clixon)
* [How do you build and install Clixon (and the example)?](how-do-you-build-and-install-clixon)
* [How do I run Clixon example commands?](#how-do-i-run-clixon-example-commands)
* [Do I need to setup anything? (IMPORTANT)](#do-i-need-to-setup-anything))
* [How do I use the CLI?](#how-do-i-use-the-cli)
* [How do I use netconf?](#how-do-i-use-netconf)
* [How do I use restconf?](#how-do-i-use-restconf)
* [What about reference documentation?](#what-about-reference-documentation)
* [How is configuration data stored?](#how-is-configuration-data-stored)
* [What is validate and commit?](#what-is-validate-and-commit)
* [What is a Clixon configuration file?](#what-is-a-clixon-configuration-file)
* [How are Clixon configuration files found?](#how-are-clixon-configuration-files-found)
* [Can I modify clixon options at runtime?](#can-i-modify-clixon-options-at-runtime)
* [How are Yang files found?](#how-are-yang-files-found)
* [How do I enable Yang features?](#how-do-i-enable-yang-features)
* [Can I run Clixon as a container?](#can-i-run-clixon-as-a-container)
* [Does Clixon support event streams?](#does-clixon-support-event-streams)
* [How should I start the backend daemon?](#how-should-i-start-the-backend-daemon)
* [Can I use systemd with Clixon?](#can-i-use-systemd-with-clixon)
* [How can I add extra XML?](#how-can-i-add-extra-xml)
* [I want to program. How do I extend the example?](#i-want-to-program-how-do-i-extend-the-example)
* [How is a plugin initiated?](#how-is-a-plugin-initiated)
* [How do I write a commit function?](#how-do-i-write-a-commit-function)
* [How do I check what has changed on commit?](#how do i check what has changed on commit)
* [How do I access the XML tree?](#how-do-i-access-the-xml-tree)
* [How do I write a CLI callback function?](#how-do-i-write-a-cli-callback-function)
* [How do I write a validation function?](#how-do-i-write-a-validation-function)
* [How do I write a state data callback function?](#how-do-i-write-a-state-data-callback-function)
* [How do I write an RPC function?](#how-do-i-write-an-rpc-function)
* [I want to add a hook to an existing operation, can I do that?](#i-want-to-add-a-hook-to-an-existing-operation-can-i-do-that)
* [How do I write an authentication callback?](#how-do-i-write-an-authentication-callback)
* [What about access control?](#what-about-access-control)
* [How do I write a CLI translator function?](#how-do-i-write-a-cli-translator-function)
## What is Clixon?
Clixon is a YANG-based configuration manager, with interactive CLI,
@ -27,7 +66,7 @@ specification uses [CLIgen](http://github.com/olofhagsand/cligen)
## How to best understand Clixon?
Run the Clixon example, in the [example](../example) directory.
## How do you build and install Clixon (and the example)?
## How do you build and install Clixon?
Clixon:
```
./configure;
@ -52,7 +91,7 @@ The example:
More info in the [example](../example) directory.
## Do I need to setup anything? (IMPORTANT)
## Do I need to setup anything?
The config demon requires a valid group to create a server UNIX domain socket.
Define a valid CLICON_SOCK_GROUP in the config file or via the -g option

View file

@ -407,6 +407,13 @@ clixon_plugin_init(clicon_handle h)
"optional"/* Xml tag when callback is made */
) < 0)
goto done;
/* Same as example but with optional input/output */
if (rpc_callback_register(h, example_rpc,
NULL,
"urn:example:clixon",
"example"/* Xml tag when callback is made */
) < 0)
goto done;
/* Called after the regular system copy_config callback */
if (rpc_callback_register(h, example_copy_extra,
NULL,