Comment 3 for bug 1899141

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

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
[2]https://github.com/openstack/neutron/blob/b3582e1ae3627bc0a8b35238dddc90647a5f9d89/neutron/agent/linux/ip_lib.py#L538