I ran the test_remove_fixed_ip_from_instance unit test in test_neutronv2.py [1], and when I stepped through the code, I saw an exception was being hit, "'Unexpected method call Client.update_port(\\'my_portid1\\', {\\'port\\': {\\'fixed_ips\\': []}}) -> None'", and then the code [2] indicates it's logged if debug logging is enabled. I'm not sure if this is by design but in this case it means the unit test is passing even if the fixed ip removal fails. I am going to confirm this and ask that someone else who has more context take a look at it to make sure this is the intention. If dropping the exception is the intention, then at minimum a comment needs to be added to that section indicating why and also documentation updated if appropriate.
I ran the test_remove_ fixed_ip_ from_instance unit test in test_neutronv2.py [1], and when I stepped through the code, I saw an exception was being hit, "'Unexpected method call Client. update_ port(\\ 'my_portid1\ \', {\\'port\\': {\\'fixed_ips\\': []}}) -> None'", and then the code [2] indicates it's logged if debug logging is enabled. I'm not sure if this is by design but in this case it means the unit test is passing even if the fixed ip removal fails. I am going to confirm this and ask that someone else who has more context take a look at it to make sure this is the intention. If dropping the exception is the intention, then at minimum a comment needs to be added to that section indicating why and also documentation updated if appropriate.
[1] https:/ /github. com/openstack/ nova/blob/ master/ nova/tests/ unit/network/ test_neutronv2. py#L2314 /github. com/openstack/ nova/blob/ master/ nova/network/ neutronv2/ api.py# L943
[2] https:/