def test_delete_ovs_vif_port(self): calls = [ mock.call('ovs-vsctl', '--', '--if-exists', 'del-port', 'fake-bridge', 'fake-dev', run_as_root=True)] with mock.patch.object(utils, 'execute', return_value=('', '')) as ex: linux_net.delete_ovs_vif_port('fake-bridge', 'fake-dev') ex.assert_has_calls(calls)
def disconnect(self, vif, ifname, netns, container_id): super(VIFOpenVSwitchDriver, self).disconnect(vif, ifname, netns, container_id) net_utils.delete_ovs_vif_port(vif.bridge_name, vif.vif_name)