HI Federico:
I will give a try with organization method. I am assuming openwisp-config 
agent  in openwrt device will have a organization element based on which it 
can pick templates from respective organization. Will go in details and get 
back.

In the mean time, I would like to understand how I would add a new backend 
in a package which is installed with ansible-openwisp. you had mentioned 
earlier that I need to work and test in a development environment. I want 
to understand this more clear. So if I download individual packages (both 
django-netjsonconfig and netjsonconfig module using git ), include the new 
backend and how do I re-integrate them with ansible-openwisp downloaded 
package? do you have any instruction in place for this. I am new to django 
framework, hence this question.

thanks in advance,
Kumar

On Friday, 31 March 2017 18:26:40 UTC+5:30, Federico Capoano wrote:
>
> I see.
>
> I thought about this feature as well:
>
> I thought about adding a way to specify tags to templates.
> We could tag some templates as "dual-radio", some other templates as "WDS" 
> and so on.
> Then we could add these templates in the configuration of the OpenWRT/LEDE 
> deamon which would then register the device with these templates 
> preselected.
>
> But this is not possible at the moment. You could use a hackish workaround 
> though: you could use organizations (which are designed to separate roles 
> but can be hacked in a slightly different way).
>
> You could create organizations like:
>
>    - dual-radio
>    - WDS
>    - PTP
>
> Then you could create default templates for these organizations, but all 
> the other templates will have to be set as global (don't set any 
> organization to them).
>
> Federico
>
> On Fri, Mar 31, 2017 at 2:06 PM jdroid <[email protected] <javascript:>> 
> wrote:
>
>> HI, Thanks for a quick response.
>>
>> I have different router boards, one set with single Radio, other with 
>> dual radio,  and few outdoor WDS based PTP links.
>> Ideally, I would like to create predefined default templates for each one 
>> of this openwrt router models. At the time of device registration, 
>> depending upon the models, I would like to assign respective configuration 
>> templates to the registering device.
>>
>> is there a easier way for this?
>>
>> thanks in advance
>> Kumar
>>
>>
>> On Friday, 31 March 2017 17:25:44 UTC+5:30, Federico Capoano wrote:
>>>
>>> Hi Kumar and welcome,
>>>
>>> configuration backends are designed to allow to develop new ways to 
>>> configure other type of firmwares (eg: AirOS, PfSense, Raspbian) and define 
>>> different validation and UI fields with their schema.
>>>
>>> To create a new backend, you should first of all work and test in a 
>>> development environment, then once everything works you should depoy it.
>>>
>>> But I think that what you are doing may be overkill.
>>>
>>> Could you explain your need in detail so maybe I could suggest you an 
>>> easier way or we could add a feature request in the system?
>>>
>>> Federico
>>>
>>>
>>> On Friday, March 31, 2017 at 1:24:14 PM UTC+2, jdroid wrote:
>>>>
>>>> HI Federico and Team:
>>>> First of all, Very impressed with your work. Great work..
>>>>
>>>> I have installed openwisp2 package on a ubuntu 16.04 VM, and able to 
>>>> register openwrt devices to it. Many thanks for all info available in 
>>>> openwisp google group :-)
>>>>
>>>> I used ansible-openwisp2 method to install a copy of openwisp2 packages 
>>>> into my VM.
>>>>
>>>> as part of my next step, I am trying to add a new backend under 
>>>> netjsonconfig. Idea is to classify and identify different models of 
>>>> routers 
>>>> (all based on openwrt, but some with one radio, others with 2 radios, plus 
>>>> few outdoorAPs) based on the registered backend information. 
>>>>
>>>> To Create a new backend, I have already cloned the 
>>>> netjsonconfig/backend/openwrt module and created a new backend and changed 
>>>> name from "OpenWrt" to "NewBackend".
>>>>
>>>> I made simialr changed in django_netjsonconfig module also (including 
>>>> settings.py - to add this new backend info). I am able to see the new 
>>>> backend info in all the openwisp controller templates. openwrt's 
>>>> openwisp-config agent is also updated with this new backend name 
>>>> (backend="netjsonconfig.NewBackend").
>>>>
>>>> with these changes I restarted the openwisp2 controller and I am able 
>>>> to register openwrt devices with the new backend. 
>>>>
>>>> After registration, I am running into an issue with configuration 
>>>> checksum. Device sends a request for configuration checksum to controller 
>>>> but controller returns "HTTP/1.1 500 Internal Server Error". if I put back 
>>>> the openwrt device backend info to "netjsonconfig.OpenWrt" and 
>>>> re-register, 
>>>> the configuration checksum goes through fine and the device is able to get 
>>>> new config update.
>>>>
>>>> Not sure what I am missing. Is it an issue with making changes in a 
>>>> package which is created with ansible-openwisp2? or I need to add the new 
>>>> backend info to other places.
>>>>
>>>> Any help is appreciated.
>>>>
>>>> thanks
>>>> Kumar
>>>>
>>>>
>>>> -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to