Hello, The unit test for the network/v2/fakes.py for the port creates empty dictionaries e.g. for allowed_address_pairs: port_attrs = { 'admin_state_up': True, 'allowed_address_pairs': [{}], 'binding:host_id': 'binding-host-id-' + uuid.uuid4().hex, 'binding:profile': {},
In practice this value is actually “none” if someone (or nova for that matter) creates the port without specifying anything. This allowed for at least one bug I hit, which will traceback with 'NoneType' object is not iterable: https://review.openstack.org/#/c/461354/ I wonder how the unit tests should be modified to actually catch these things? I can modify fakes.py to exclude the 'allowed_address_pairs': [{}] However these issues might be in more places so it might require a more generic approach. What is the opinion on this? Note that: - I did not test against trunk neutron so maybe trunk behavior is different in always returning an empty dict ? - neutron cli used to work without this issue Thx, Robert van Leeuwen
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev