The ML2 bigswitch mechanism driver's create_port_postcommit() and update_port_postcommit() methods pass the PortContext to a _prepare_port_for_controller() method that modifies the port dictionary accessed as PortContext.current. This modified port dictionary is currently returned by ML2 as the result of the port create or update operation, but the changes do not get persisted in the DB. The fix for bug 1276391 is likely to result in these changes no longer being returned to the client. Mechanism drivers are not supposed to modify this port dictionary, except by calling PortContext.set_binding() from within bind_port(). It does not appear that this mechanism driver actually binds ports. If the port dictionary needs to be modified before being passed to the bigswitch controller, it should be copied first.
Also, the TestBigSwitchMechDriverPortsV2.test_port_vif_details() unit test asserts that the returned binding:vif_type is the modified value, so this test will also need to be changed or eliminated as part of this fix.
Fix proposed to branch: master /review. openstack. org/81360
Review: https:/