* Restconf top-level operations GET root resource modified to comply with

RFC 8040 Sec 3.1
  * non-pretty print remove all spaces, eg `{"operations":{"clixon-example:client-rpc":[null]`
  * Replaced JSON `null` with `[null]` as proper empty JSON leaf/leaf-list encoding.
* [Cannot write to config using restconf example #91](https://github.com/clicon/clixon/issues/91)
  * Updated restconf documentation (the example was wrong)
* [clixon-lib yang revision file name update #92](https://github.com/clicon/clixon/issues/92)
  * Clixon-lib yang file had conflicting filename and internal yang revision.
  * This was only detected in the use-case when a whole dir was loaded.
  * Inserted sanity check in all yang parse routines.
  * Committed updated clixon-lib yang file that triggered the error
This commit is contained in:
Olof hagsand 2019-08-24 15:30:43 +02:00
parent a8906fd0bd
commit 6df434093e
12 changed files with 230 additions and 192 deletions

View file

@ -42,7 +42,7 @@ datarootdir = @datarootdir@
YANG_INSTALLDIR = @YANG_INSTALLDIR@
YANGSPECS = clixon-config@2019-06-05.yang
YANGSPECS += clixon-lib@2019-06-05.yang
YANGSPECS += clixon-lib@2019-08-13.yang
YANGSPECS += clixon-rfc5277@2008-07-01.yang
YANGSPECS += clixon-xml-changelog@2019-03-21.yang

View file

@ -42,7 +42,7 @@ module clixon-lib {
revision 2019-08-13 {
description
"get-state added for restconf content=nonconfig internal rpc";
"No changes (reverted change)";
}
revision 2019-06-05 {
description
@ -52,11 +52,6 @@ module clixon-lib {
description
"Released in Clixon 3.9";
}
import ietf-netconf {
description "for the get-state extension";
prefix nc;
}
rpc debug {
description "Set debug level of backend.";
input {
@ -68,33 +63,4 @@ module clixon-lib {
rpc ping {
description "Check aliveness of backend daemon.";
}
rpc get-state {
description
"Retrieve device state information only. This is a clixon extension
to ietf-netconf to implement RESTCONF GET with attribute
content=nonconfig.
The reason is that netconf only has <get> and <get-config> neither
which retrieves state only";
reference "RFC 8040 4.8.1";
input {
anyxml filter {
description
"This parameter specifies the portion of the system
configuration and state data to retrieve.";
nc:get-filter-element-attributes;
}
}
output {
anyxml data {
description
"Copy of the running datastore subset and/or state
data that matched the filter criteria (if any).
An empty data container indicates that the request did not
produce any results.";
}
}
}
}