There is a clash between [1] and [2]. The second one is calling the first one, "get_devices_with_ip", but in this method we are forcing again the conversion of the scope from a string ("link", "global", etc.) to a pyroute2 value (see "rtnl.rtscopes").
IMO, the best solution is undoing the conversion done in [2]. This is the other only call to "get_devices_with_ip" with "scope" parameter. I always prefer to make those parameter conversions close to the library method.
Hello:
There is a clash between [1] and [2]. The second one is calling the first one, "get_devices_ with_ip" , but in this method we are forcing again the conversion of the scope from a string ("link", "global", etc.) to a pyroute2 value (see "rtnl.rtscopes").
IMO, the best solution is undoing the conversion done in [2]. This is the other only call to "get_devices_ with_ip" with "scope" parameter. I always prefer to make those parameter conversions close to the library method.
Regards.
[1]https:/ /review. opendev. org/#/c/ 747628/ 1/neutron/ agent/linux/ ip_lib. py /github. com/openstack/ neutron/ blob/b3582e1ae3 627bc0a8b35238d ddc90647a5f9d89 /neutron/ agent/linux/ ip_lib. py#L538
[2]https:/