Support for list representation of <multi/> nodes was fixed a very long time back. Meaning when calling get_config_dict() it must always retunr a list even if there's only one element on that <multi/> node.
T5010 brought up a corner case where this does not work.
This can be reproduced by:
set protocols bgp address-family l2vpn-evpn vni 100070 route-target both 1:2 set protocols bgp address-family l2vpn-evpn vni 100070 route-target export 70:10070 set protocols bgp address-family l2vpn-evpn vni 100070 route-target export 20:20 set protocols bgp address-family l2vpn-evpn vni 100070 route-target import 70:10070 set protocols bgp system-as 100
Which will generate a config dict of e.g.:
{'address_family': {'l2vpn_evpn': {'vni': {'100070': {'route_target': {'both': '1:2', 'export': ['70:100070', '20:20'], 'import': '70:100070'}}}}}, 'system_as': '100'}
One can cleary see if export is specified two times -> list, whereas import specified only once -> string (both use the same XML data and are <multi/> nodes. This goes back to the issue in T3234 and seems that the replacement of str -> list is dependent on the nesting depth according to @jestabro