<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi all,<br>
<br>
<font face="Helvetica, Arial, sans-serif">over the last two weeks
I have been working on an implementation of the
DeviceConfiguration spec<font face="Helvetica, Arial,
sans-serif">:</font></font></font><br>
<a class="moz-txt-link-freetext"
href="https://github.com/openwisp/netjsonconfig">https://github.com/openwisp/netjsonconfig</a><br>
<br>
The idea is to have a relatively small python library to convert
NetJSON to real router configurations, at the moment I'm working
exclusively on OpenWRT UCI configs.<br>
The openwisp project already has a UCI config generator, but the
team is not satisfied with it because adding features requires
changing SQL tables, the generated configs are too specific to a few
use cases and the generator code is embedded in a ruby on rails web
app (OpenWISP Manager), which makes it uninteresting for a lot of
other potential users and contributors.<br>
The idea for the netjsonconfig library is to keep it small and well
documented, so that other more complex apps can easily integrate it
if they need.<br>
<br>
For a practical example see the following test:<br>
<a class="moz-txt-link-freetext"
href="https://github.com/openwisp/netjsonconfig/blob/master/tests/openwrt/test_wireless.py#L186-L247">https://github.com/openwisp/netjsonconfig/blob/master/tests/openwrt/test_wireless.py#L186-L247</a><br>
A few uci config blocks are generated from a NetJSON object.<br>
Nothing special really, but this work it's allowing me to test and
improve the spec.<br>
That's the reason for which I'm opening more issues on github
regarding this object and I will be sending more emails about it.<br>
<br>
The (always up to date) DeviceConfiguration spec and its relative
JSON Schema definition are available at the following URLs:<br>
<ul>
<li>spec: <a class="moz-txt-link-freetext" href="http://netjson.org/rfc.html#rfc.section.5">http://netjson.org/rfc.html#rfc.section.5</a></li>
<li>schema: <a class="moz-txt-link-freetext" href="http://netjson.org/rfc.html#DeviceConfiguration-schema">http://netjson.org/rfc.html#DeviceConfiguration-schema</a></li>
</ul>
Nemesis<br>
</body>
</html>