* 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

@ -91,11 +91,11 @@ The main example:
## How do I run Clixon example commands?
- Start a backend server: `clixon_backend -F -s init -f /usr/local/etc/example.xml`
- Start a backend server: `sudo clixon_backend -s init -f /usr/local/etc/example.xml`
- Start a cli session: `clixon_cli -f /usr/local/etc/example.xml`
- Start a netconf session: `clixon_netconf -f /usr/local/etc/example.xml`
- Start a restconf daemon: `sudo su -c "/www-data/clixon_restconf -f /usr/local/etc/example.xml " -s /bin/sh www-data`
- Send a restconf command: `curl -G http://127.0.0.1/restconf/data`
- Send a restconf command: `curl -X GET http://127.0.0.1/restconf/data`
More info in the [example](../example) directory.
@ -195,12 +195,12 @@ Start the clixon restconf daemon
sudo su -c "/www-data/clixon_restconf -f /usr/local/etc/example.xml " -s /bin/sh www-data
```
Then acess:
Then access:
```
curl -G http://127.0.0.1/restconf/data/ietf-interfaces:interfaces/interface=eth9/type
curl -X GET http://127.0.0.1/restconf/data/ietf-interfaces:interfaces/interface=eth0/type
[
{
"ietf-interfaces:type": "ex:eth"
"ietf-interfaces:type": "clixon-example:eth"
}
]
```