Commit graph

88 commits

Author SHA1 Message Date
Olof hagsand
1cfb190ea9 * Changed return values in internal functions: netconf_trymerge, startup_module_state, yang_modules_state_get 2019-05-07 13:26:34 +02:00
Olof hagsand
b5f1f7346e Structural C-code change: Merged yang_spec and yang_node types into yang_stmt 2019-04-02 12:27:33 +02:00
Olof hagsand
3f68cca06c * New yang changelog experimental feature for automatic upgrade
* Added modules-state diff parameter to xmldb_get datastore function for startup scenarios.
* Allowed Yang extended Xpath functions (syntax only):
  * re-match, deref, derived-from, derived-from-or-self, enum-value, bit-is-set
* XSD regular expression handling of dash(`-`)
  *: Translate XDS `[xxx\-yyy]` to POSIX `[xxxyyy-]`.
* YANG Anydata treated same as Anyxml
2019-03-21 18:05:55 +01:00
Olof Hagsand
f035c3ca23 * Removed all dependency on strverscmp
* Added libgen.h for baseline()
2019-02-27 10:46:05 +01:00
Olof hagsand
560110b4e8 * New backend startup and upgrade support, see [doc/startup.md] for details
* Datastore files contain RFC7895 module-state information
2019-02-26 15:48:15 +01:00
Olof hagsand
0103d58994 2019 2019-01-02 15:48:30 +01:00
Olof hagsand
0baebc93fd * Strict namespace setting can be a problem when upgrading existing database files, such as startup-db or persistent running-db, or any other saved XML file.
* For backward compatibility, load of startup and running set CLICON_XML_NS_STRICT to false temporarily.
* Added three-valued return values for several validate functions where -1 is fatal error, 0 is validation failed and 1 is validation OK.
  * This includes: `xmldb_put`, `xml_yang_validate_all`, `xml_yang_validate_add`, `xml_yang_validate_rpc`, `api_path2xml`, `api_path2xpath`
* Added new xml functions for specific types: `xml_child_nr_notype`, `xml_child_nr_notype`, `xml_child_i_type`, `xml_find_type`.
2019-01-02 15:18:29 +01:00
Olof hagsand
07542269ec Event stream discovery support
Added config options CLICON_MODULE_LIBRARY_RFC7895, CLICON_STREAM_DISCOVERY_RFC5277, LICON_STREAM_DISCOVERY_RFC804
2018-09-23 17:45:22 +02:00
Olof hagsand
74fc0800ae * Limited support of RFC 7895 YANG Module Library to list modules:
* That is, limited support of: ietf-yang-library.yang
  * For example: `<module><name>example</name><revision/></module><module><name>ietf-restconf-monitoring</name><revision>2017-01-26</revision></module>...`
* Comply to RFC 8040 3.5.3.1 rule: api-identifier = [module-name ":"] identifier
  * The "module-name" was a no-op before.
  * This means that there was no difference between eg: GET /restconf/data/ietf-yang-library:modules-state and GET /restconf/data/XXXX:modules-state
2018-09-22 16:30:58 +02:00
Olof Hagsand
10ada483e5 Memory error in backend transaction revert 2018-08-01 18:34:44 +02:00
Olof Hagsand
e48f8dd00e clixon_netconf -S is obsolete. Use clixon_netconf -l s instead.
* Unified log handling for all clicon applications using -l e|o|s|f.
  * The options stand for e:stderr, o:stdout, s: syslog, f:file
2018-07-29 19:41:10 +02:00
Olof hagsand
85c4782e36 Dedicated xml,json,yang and xsl parser utility programs added
Sanity check of stdarg (...) added
Cleanup of error messages.
2018-06-17 19:40:06 +02:00
Olof hagsand
5cabc11bfb * Added -U <user> command line to clixon_cli and clixon_netconf for NACM pseudo-user tests 2018-06-07 21:34:52 +02:00
Olof hagsand
3ed1c98556 * Fixed issue https://github.com/clicon/clixon/issues/18 RPC response issues reported by Stephen Jones at Netgate 2018-04-22 16:53:12 +02:00
Olof hagsand
7650803475 * Experimental NACM RFC8341 Network Configuration Access Control Model.
* CLICON_NACM_MODE config option, default is disabled.
  * Added username attribute to all rpc:s from frontend to backend
  * Added NACM backend module in example
2018-04-19 22:44:15 +02:00
Olof Hagsand
0907574acf renamed plugin_find/each to clixon_plugin_find/each 2018-04-08 14:10:06 +00:00
Olof hagsand
2e00411621 CLI plugin API restructuring completed. Now all plugin APIs have the generic form
documented in README and FAQ.
2018-04-08 11:32:43 +02:00
Olof hagsand
b9a54f07f3 Restructure and more generic plugin API for backend 2018-04-02 19:27:57 +02:00
Olof hagsand
79e3fbdaa9 * Restructure and more generic plugin API (cli,backend,restconf,netconf)
* For preparation for authorization RFC8341
  * Plugins add clixon_plugin_init() and api struct for function pointers, eg:
```
static const struct clixon_plugin_api api = {
    "example",
    clixon_plugin_init,
    ...
}
clixon_plugin_api *clixon_plugin_init(clicon_handle h)
{
    return (void*)&api;
}
```
  * Moved specific plugin functions from apps/ to generic functions in lib/
    * New generic plugin load function: clixon_plugins_load()
  * Removed client-local netconf plugins netconf_plugin_callbacks()
    * This was code used before generic YANG rpc calls
  * Added username to clixon handle:
    * clicon_username_get() / clicon_username_set()
  * Added authentication plugin callback
  * Removed some obscure plugin code that seem not to be used (please report if needed!)
    * CLI parse hook
    * CLICON_FIND_PLUGIN
    * clicon_valcb()
* Removed username to rpc calls (added below)
2018-04-02 10:38:53 +02:00
Olof hagsand
38f0b446fa 2017->2018 2018-01-01 12:25:33 +01:00
Olof hagsand
e169485985 Datastore cache introduced; Added yang to XML API 2017-12-02 14:49:49 +01:00
Olof hagsand
013a0dba14 editt changelog 2017-11-19 19:11:34 +01:00
Olof hagsand
548ffd2da6 Disabled key-value datastore; Removed mandatory requirements for BACKEND, NETCONF, RESTCONF and CLI dirs 2017-11-19 18:04:23 +01:00
Olof hagsand
496d676ad3 Backend daemon startup modes 2017-11-19 11:52:30 +01:00
Olof hagsand
61551b07d6 When user callbacks p_statedata() clixon_backend nolonger silently exit 2017-11-14 23:14:51 +01:00
Olof hagsand
4d82d4f6ea double free if plugin load failed 2017-09-09 17:42:08 +02:00
Olof hagsand
4e986d6660 Added new backend plugin callback: plugin_statedata() for getting state data; Added generic xml_merge() function. 2017-07-05 12:30:42 +02:00
Olof hagsand
91f91fe526 memleaks, cli-generate leafref 2017-06-06 22:09:37 +02:00
Olof hagsand
540cd96e74 datastore handles 2017-04-15 19:42:35 +02:00
Olof hagsand
85af4342dc common plugin code, removed clixon_proc.c 2017-04-12 22:39:01 +02:00
Olof hagsand
f6b3e95100 Created xmldb plugin api 2017-04-09 22:53:48 +02:00
Olof hagsand
2fcefda831 Change internal protocol from clicon_proto.h to netconf. 2017-03-25 11:10:50 +01:00
Olof hagsand
bc2b606167 dual license 2016-12-30 16:14:48 +01:00
Olof hagsand
887d43428b json parser 2016-08-15 09:29:22 +02:00
Olof hagsand
741fb97a9f double predicates in xpath; leaks; grideye debug 2016-03-26 10:47:58 +01:00
Olof Hagsand
79b77943f9 renamed .h and libs clicon->clixon 2016-02-28 15:27:36 +01:00
Olof hagsand
5a45eca301 file rearrangement 2016-02-26 16:05:34 +01:00
Olof hagsand
d6e393ea58 Inital commit 2016-02-22 22:17:30 +01:00