@lockutils.synchronized('<STR_LIT>')<EOL><INDENT>def update_port_precommit(self, context):<DEDENT>
vlan_segment, vxlan_segment = self._get_segments(<EOL>context.top_bound_segment, context.bottom_bound_segment)<EOL>orig_vlan_segment, orig_vxlan_segment = self._get_segments(<EOL>context.original_top_bound_segment,<EOL>context.original_bottom_bound_segment)<EOL>if (self._is_vm_migrating(context, vlan_segment, orig_vlan_segment) or<EOL>self._is_status_down(context.current)):<EOL><INDENT>vni = (self._port_action_vxlan(<EOL>context.original, orig_vxlan_segment, self._delete_nve_db)<EOL>if orig_vxlan_segment else <NUM_LIT:0>)<EOL>self._port_action_vlan(context.original, orig_vlan_segment,<EOL>self._delete_nxos_db, vni)<EOL><DEDENT>elif self._is_supported_deviceowner(context.current):<EOL><INDENT>vni = self._port_action_vxlan(context.current, vxlan_segment,<EOL>self._configure_nve_db) if vxlan_segment else <NUM_LIT:0><EOL>self._port_action_vlan(context.current, vlan_segment,<EOL>self._configure_nxos_db, vni)<EOL><DEDENT>
Update port pre-database transaction commit event.