* 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
This commit is contained in:
Olof hagsand 2018-09-22 16:30:58 +02:00
parent 0631be19cb
commit 74fc0800ae
18 changed files with 921 additions and 120 deletions

View file

@ -34,6 +34,8 @@
*/
/*
* This program should be run as user www-data
*
* See draft-ietf-netconf-restconf-13.txt [draft]
* sudo apt-get install libfcgi-dev
@ -46,6 +48,10 @@
* api/test
*/
#ifdef HAVE_CONFIG_H
#include "clixon_config.h" /* generated by config & autoconf */
#endif
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@ -615,7 +621,13 @@ main(int argc,
/* Parse yang database spec file */
if (yang_spec_main(h) == NULL)
goto done;
/* Add system modules */
if (yang_spec_append(h, CLIXON_DATADIR, "ietf-restconf-monitoring", NULL)< 0)
goto done;
if (yang_spec_append(h, CLIXON_DATADIR, "ietf-netconf-notification", NULL)< 0)
goto done;
if (yang_spec_append(h, CLIXON_DATADIR, "ietf-yang-library", NULL)< 0)
goto done;
/* Call start function in all plugins before we go interactive
Pass all args after the standard options to plugin_start
*/