Giter Site home page Giter Site logo

arun1993 / netjson-support-in-ubus Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 3 KB

Implement NetJSON output in ubus for LEDE/OpenWrt: The main aim of the project is to bring in support for NETJSON object at the interconnect system- ubus. Support for a new ubus API which allows retrieving these two NetJSON object types: DeviceConfiguration and DeviceMonitoring is to be done. SCAL plugins need to be written and code in nodewatcher-agent is to be re-adapted as a SCAL plugin.

Home Page: https://wiki.freifunk.net/Ideas#Implement_NetJSON_output_in_ubus_.28OpenWRT.2FLEDE.29

CMake 17.94% C 82.06%

netjson-support-in-ubus's Introduction

NetJSON-support-in-ubus

Implement NetJSON output in ubus for LEDE/OpenWrt

Project goals:

  1. Bring CLI support to accommodate the new parameters: DeviceConfiguration and DeviceMonitoring.
  2. Write backend ubus APIs to collect the data and store the data in NetJSON objects: DeviceConfiguration and DeviceMonitoring and display them.
  3. Revisit the implementation of JSON plugin in SCAL and try to extend the support for NetJSON. For the missing data models in the JSON plugin, try to write a data parser which uses the scal APIs to get data and convert that into NetJSON format and store in the DeviceConfiguration NetJSON object for outputting it.
  4. Adapt the code in node-watcher agent and reuse it in SCAL as a plugin. This plugin should output the monitoring data in a NetJSON DeviceMonitoring format..
  5. Writing makefile to compile the files added for supporting NetJSON in the ubus IPC/RPC system in OpenWRT/LEDE distribution. Document the work done, installation guide and usage examples of the new CLIs.

Project Details:

  1. CLI support: The CLI should be able to input the required data and display error message if entered wrongly. Generic CLI: ubus call netjson <config | monitor> <general | network | interface | none_to_display_all> <parameter | none_to_display_all> Example CLI: ubus call netjson monitor interface eth0 .The above CLI would display all the statistics related to eth0 in the DeviceMonitoring NetJSON format. CLI depth should be increased for certain commands like the interface and network entries to get the interface name.

  2. ubus call netjson API support: We should register the namespace netjson in the libubus. This allows the procedures with any number of arguments.

  3. DeviceConfiguration NetJSON: SCAL is an abstraction layer to push information onto the ubus from the device. SCAL allows gathering data on the device from UCI, ubus calls, shell commands, etc and publishes it on the ubus using a different datamodel. Already available SCAL JSON plugin takes these data models and convert it into a JSON format. My work involves extension of this plugin to support the NetJSON to be done. Add features to the JSON plugin in C which is needed in order to define the full data model using the NetJSON schema. Also for data formats which doesn’t have support in the SCAL JSON plugin, parse the scal datamodel and then store in a DeviceConfiguration NetJSON object. This is SCAL plugin is created for retrieving the information directly using C.

  4. DeviceMonitoring NetJSON: node-watcher agent code is to readapted to show the monitoring data. The existing code can be taken as such or re-adapted by writing hooks in the existing code base to output the data in a NetJSON DeviceMonitoring format rather than the json_object used in node-watcher agent. These codes are to be written as a plugin in the SCAL module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.