Looking at the code a little more, I think the problem is that the segments extension subscribes to the delete network precommit callback (_delete_segments_for_network), which deletes the segments associated with the network. I don't know how this interacts with the precommit callback for the ML2 plugin (_network_delete_precommit_handler), which sets the mech context.
Looking at the code a little more, I think the problem is that the segments extension subscribes to the delete network precommit callback (_delete_ segments_ for_network) , which deletes the segments associated with the network. I don't know how this interacts with the precommit callback for the ML2 plugin (_network_ delete_ precommit_ handler) , which sets the mech context.