> For reference, I copy pasted your template in foo.json and run python 
bin/netjsonconfig --method validate -b openwrt --config foo.json
The same for me, it produces no error message. I am not able to try to 
reproduce right now. If I face the issue one more time later, I'll try to 
screenshot the whole template at fault and the error message.


Le samedi 31 juillet 2021 à 18:20:58 UTC+2, f.capoano a écrit :

> If you can find a way to replicate it consistently let us know. 
>
> Thanks
> Best regards
> Federico Capoano
>
> On Fri, Jul 30, 2021 at 10:47 AM yves baumes <yba...@gmail.com> wrote:
>
>> I had this issue a couple of times. Another time on the switch interface. 
>> I fixed it by removing the annoying field, and re-adding it later. And it 
>> passed ok. So it is solved for me. But it looks like a weird problem.
>>
>> Le vendredi 30 juillet 2021 à 16:57:18 UTC+2, f.capoano a écrit :
>>
>>> Most likely there's an interface in the device which also defines 
>>> bridge_members and has eth0 in it, please read:
>>>
>>> http://netjsonconfig.openwisp.org/en/latest/general/basics.html#netjsonconfig.utils.merge_list
>>>
>>> *... elements will be summed in order to create a list which contains 
>>> elements of both lists.*
>>>
>>> Best regards
>>> Federico Capoano
>>>
>>> On Fri, Jul 30, 2021 at 7:44 AM yves baumes <yba...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> here is a TEMPLATE I've created:
>>>> ```
>>>> {
>>>>     "radios": [
>>>>         {
>>>>             "protocol": "802.11n",
>>>>             "name": "radio0",
>>>>             "phy": "",
>>>>             "channel": 0,
>>>>             "channel_width": 20,
>>>>             "tx_power": 10,
>>>>             "country": "FR",
>>>>             "disabled": false,
>>>>             "driver": "mac80211",
>>>>             "hwmode": "11a"
>>>>         },
>>>>         {
>>>>             "protocol": "802.11n",
>>>>             "name": "radio1",
>>>>             "phy": "",
>>>>             "channel": 0,
>>>>             "channel_width": 20,
>>>>             "tx_power": 10,
>>>>             "country": "FR",
>>>>             "disabled": false,
>>>>             "driver": "mac80211",
>>>>             "hwmode": "11g"
>>>>         }
>>>>     ],
>>>>     "switch": [
>>>>         {
>>>>             "name": "switch0",
>>>>             "reset": true,
>>>>             "enable_vlan": true,
>>>>             "vlan": [
>>>>                 {
>>>>                     "device": "switch0",
>>>>                     "vlan": 3170,
>>>>                     "ports": "0t 1t"
>>>>                 }
>>>>             ]
>>>>         }
>>>>     ],
>>>>     "interfaces": [
>>>>         {
>>>>             "wireless": {
>>>>                 "network": [],
>>>>                 "mode": "access_point",
>>>>                 "radio": "radio1",
>>>>                 "ack_distance": 0,
>>>>                 "rts_threshold": 0,
>>>>                 "frag_threshold": 0,
>>>>                 "ssid": "yves-test",
>>>>                 "hidden": false,
>>>>                 "wds": true,
>>>>                 "encryption": {
>>>>                     "protocol": "wpa2_personal",
>>>>                     "key": "secretkey",
>>>>                     "disabled": false,
>>>>                     "cipher": "auto"
>>>>                 },
>>>>                 "wmm": true,
>>>>                 "isolate": false,
>>>>                 "macfilter": "disable",
>>>>                 "maclist": []
>>>>             },
>>>>             "type": "wireless",
>>>>             "name": "wlan1",
>>>>             "mtu": 1500,
>>>>             "mac": "",
>>>>             "autostart": true,
>>>>             "disabled": false,
>>>>             "addresses": [],
>>>>             "network": "bb"
>>>>         },
>>>>         {
>>>>             "type": "bridge",
>>>>             "stp": false,
>>>>             "bridge_members": [
>>>>                 "eth0"
>>>>             ],
>>>>             "name": "bb",
>>>>             "mtu": 1500,
>>>>             "mac": "",
>>>>             "autostart": true,
>>>>             "disabled": false,
>>>>             "addresses": [],
>>>>             "network": "",
>>>>             "igmp_snooping": true
>>>>         }
>>>>     ]
>>>> }
>>>> ```
>>>>
>>>> I'm trying to apply it to a device. And the issue is that it is rejeted 
>>>> by the validator with the following message:
>>>>
>>>> "There is a conflict with the specified templates. Invalid 
>>>> configuration triggered by "#/interfaces/1", validator says: {'type': 
>>>> 'bridge', 'stp': False, 'bridge_members': ['eth0', 'eth0'], 'name': 'bb', 
>>>> 'mtu': 1500, 'mac': '', 'autostart': True, 'disabled': False, 'addresses': 
>>>> [], 'network': '', 'igmp_snooping': True} is not valid under any of the 
>>>> given schemas"
>>>>
>>>> As you can see from the configuration json file, there's only one 
>>>> bridge member in this bridge interface. I do not understand why the 
>>>> validator states there's two bridge members: ['eth0','eth0'] , which are 
>>>> both eth0 by the way.. Could it be a bug in openwisp?
>>>>
>>>> -- 
>>>> 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 openwisp+u...@googlegroups.com.
>>>> To view this discussion on the web, visit 
>>>> https://groups.google.com/d/msgid/openwisp/961c92ce-f825-40ed-881c-a7278cc95460n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/openwisp/961c92ce-f825-40ed-881c-a7278cc95460n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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 openwisp+u...@googlegroups.com.
>>
> To view this discussion on the web, visit 
>> https://groups.google.com/d/msgid/openwisp/bc559712-880c-4580-a165-488747cb3663n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/openwisp/bc559712-880c-4580-a165-488747cb3663n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/712f2770-d139-4f3e-b645-819ef4088a29n%40googlegroups.com.

Reply via email to