Hello,

I'm not able to reproduce the issue with your template. Maybe it's not the 
template that is at fault this time? Are there any other configuration files
you are using that could be the source of this double inclusion of the same 
interface in the same bridge?

The error message starts with "There is a conflict with the specified 
templates" which might be frustrating when some other configuration
is at fault.

For reference, I copy pasted your template in foo.json and run python 
bin/netjsonconfig --method validate -b openwrt --config foo.json

On Friday, 30 July 2021 at 17:47:02 UTC+2 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+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/7576ceb8-3e62-4d78-9ae3-30d5b8fce8a3n%40googlegroups.com.

Reply via email to