'Unplug from MidoNet network port
Unbind the vif from a MidoNet virtual port.'

def unplug_midonet(self, instance, vif):

    dev = self.get_vif_devname(vif)
    port_id = vif['id']
    try:
        utils.execute('mm-ctl', '--unbind-port', port_id, run_as_root=True)
        linux_net.delete_net_dev(dev)
    except processutils.ProcessExecutionError:
        LOG.exception(_('Failed    while    unplugging    vif'), instance=instance)
