We're seeing an issue where Genius and Netvirt code both are adding a TerminationPoint/port to an OVSDB bridge. TerminationPoint is a keyed list where port name is the key. IID used in both cases is properly keyed to port name. This always happens when Genius port is the first port added to bridge. If Netvirt code is the one adding first port, all works fine.
The issue we're seeing is that any ports added by Genius before Netvirt adds the port are deleted when Netvirt adds the port. Tim has a workaround [1] that seems to work. It just replaces put with a merge in the method called by Netvirt.
But genius code is also doing a put and that works, it doesn't delete any existing ports. In fact Genius code most times adds multiple ports in quick succession. Only difference between two is Genius code sets createMissingParents=True.
Any inputs on why Netvirt method ends up overwriting the existing ports in list and why merge works? Want to understand if we're missing something crucial and there can be a better fix than changing merge to put.