Hey Ajay, On Fri, Apr 10, 2020 at 6:45 AM Ajay Tripathi <[email protected]> wrote:
> Hi, > > I have started working on merging openwisp-controller and > django-netjsonconfig. > Great news! > Meanwhile, these PRs are currently open for review: > > 1. https://github.com/openwisp/netjsonconfig/pull/149 > 2. https://github.com/openwisp/django-x509/pull/87 > 3. https://github.com/openwisp/openwisp-ipam/pull/27 > Thanks a lot. These periodic reminders are helpful for me. > On Thursday, March 26, 2020 at 7:52:03 AM UTC+5:30, Federico Capoano wrote: > >> - add the required code in openwisp-config to send it >> > > I want to get started with understanding this completely as well, > so for the router / device part: > > 1. I want to use ubus / uci to fetch data from device > 2. Convert data to netjson > 3. Create a function in openwisp-config to respond back with this netjson > data to openwisp controller to display to this the operator / admin! > Converting the device configuration to NetJSON on the device is not viable right now, because the logic to do that resides on netjsonconfig, which runs on the server. Therefore at the moment the only option that allows us to move fast is to send the entire config (the command sysupgrade has an option to backup the entire conf) > What do you think about using RPCD for step 3 instead? (Just a food for > thought!) > Do you mean enabling the RCPD HTTP API on ubus to fetch the data from it? In this case, the management VPN would become a requirement unless the devices are on the same L2 network, because OpenWISP would not be able to reach the HTTP API otherwise. It's good that you're working with openwisp-config so your understanding of OpenWISP will increase. In the initial phase I suggest you to focus on making sure sending the config to OpenWISP works well, because the following steps will be hard. For example, these for me are still open questions: - we're not going to send the full config to OpenWISP periodically are we? That would generate a lot of traffic. Maybe we can send the checksum like we do for the download config - is there a way to find out if the config on the device has been changed by the user and send an update to the controller straight away? if there is, maybe we can then check if we need to re-upload the full config less often; if there isn't, we may implement a trick - what happens if a user edits the config on the device while at the same time another user modifies a template? This will have to be handled well - what happens if a user edits the config on the device while at the same time another user modifies the same config in the device config of openwisp? This will have to be handled well, an one of the two sides will win, probably the one that comes afterwards These are just the ones that come from the top of my head. There are more. What you're working on is the first phase. The second phase will need additional thought. The best thing in these cases is to sit down, draw, sketch. Create issues. Discuss a bit more. If we jump to coding straightaway we risk to create a messy solution, which is still good to learn, but with some more careful design we will be able to do a lot better. Federico -- You received this message because you are subscribed to the Google Groups "OpenWISP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAERYH6VZfkr8%2BVLdWg%2BOa%2BZmkTBfnyzAMKxqgckdZeG_31J5kA%40mail.gmail.com.
