diff --git a/apps/restconf/README b/apps/restconf/README index 5d3cd435..8d750288 100644 --- a/apps/restconf/README +++ b/apps/restconf/README @@ -1,19 +1,26 @@ +Clixon Restconf +=============== + +Contents: +1. Features +2. Installation using NGINX +3. Debugging + +1. FEATURES ++++++++++++ +Clixon restconf is a daemon based on FASTCGI. Instructions are available to +run with NGINX. +The implementatation supports plain OPTIONS, HEAD, GET, POST, PUT, PATCH, DELETE. +and is based on draft-ietf-netconf-restconf-13. +There is currently (2017) a RFC 8040, many of those features are _not_ implemented, +including: +- query parameters (section 4.9) +- notifications (sec 6) +- only rudimentary error reporting exists (sec 7) + +2. INSTALLATION using NGINX ++++++++++++++++++++++++++++ -# Existing clixon installation. Using CLI: -olof@vandal> clixon_cli -f /usr/local/etc/routing.conf -olof@vandal> show configuration -interfaces { - interface { - name eth0; - type eth; - enabled true; - } - interface { - name eth9; - type eth; - enabled true; - } -} # Define nginx config file/etc/nginx/sites-available/default server { ... @@ -57,8 +64,8 @@ olof@vandal> curl -G http://127.0.0.1/restconf/data/interfaces/interface/name=et curl -sX POST -d '{"clicon":{"interfaces":{"interface":{"name":"eth1","type":"eth","enabled":"true"}}}}' http://localhost/restconf/data -Debugging ---------- +3. DEBUGGING +++++++++++++ Start the restconf programs with debug flag: sudo su -c "/www-data/clixon_restconf -D" -s /bin/sh www-data diff --git a/lib/src/clixon_json_parse.l b/lib/src/clixon_json_parse.l index 86c46917..64ce04ae 100644 --- a/lib/src/clixon_json_parse.l +++ b/lib/src/clixon_json_parse.l @@ -131,11 +131,7 @@ int json_scan_exit(struct clicon_json_yacc_arg *jy) { yy_delete_buffer(jy->jy_lexbuf); -#if defined(YY_FLEX_SUBMINOR_VERSION) && YY_FLEX_SUBMINOR_VERSION >= 9 clixon_json_parselex_destroy(); /* modern */ -#else - yy_init = 1; /* This does not quite free all buffers */ -#endif return 0; } diff --git a/lib/src/clixon_xml_parse.l b/lib/src/clixon_xml_parse.l index 4797b257..3192d035 100644 --- a/lib/src/clixon_xml_parse.l +++ b/lib/src/clixon_xml_parse.l @@ -141,11 +141,7 @@ int clixon_xml_parsel_exit(struct xml_parse_yacc_arg *ya) { yy_delete_buffer(ya->ya_lexbuf); -#if defined(YY_FLEX_SUBMINOR_VERSION) && YY_FLEX_SUBMINOR_VERSION >= 9 clixon_xml_parselex_destroy(); /* modern */ -#else - yy_init = 1; /* This does not quite free all buffers */ -#endif return 0; } diff --git a/lib/src/clixon_yang_parse.l b/lib/src/clixon_yang_parse.l index 885cc708..a19328b5 100644 --- a/lib/src/clixon_yang_parse.l +++ b/lib/src/clixon_yang_parse.l @@ -248,11 +248,7 @@ int yang_scan_exit(struct clicon_yang_yacc_arg *yy) { yy_delete_buffer(yy->yy_lexbuf); -#if defined(YY_FLEX_SUBMINOR_VERSION) && YY_FLEX_SUBMINOR_VERSION >= 9 clixon_yang_parselex_destroy(); /* modern */ -#else - yy_init = 1; /* This does not quite free all buffers */ -#endif return 0; }