You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When two lists are merged with netjsonconfig.utils.merge_config, the result is the sum of the elements contained in the two lists.
However, often these lists are list of dictionaries representing interfaces and radios, and with the current implementation it is not possible to override the value of one of the dicts, this is best explained with an example.
We have a template in which radio0 has tx_power set to 20:
When two lists are merged with
netjsonconfig.utils.merge_config
, the result is the sum of the elements contained in the two lists.However, often these lists are list of dictionaries representing interfaces and radios, and with the current implementation it is not possible to override the value of one of the dicts, this is best explained with an example.
We have a template in which
radio0
hastx_power
set to20
:And a configuration object in which
radio0
hastx_power
set to10
(much lower than what's set intemplate
):When we merge the two:
result
will look like the following:But what we want is:
That is, we want to be able to override specifc attributes of dictionaries contained in lists.
The text was updated successfully, but these errors were encountered: