'Plug into MidoNet\'s network port
Bind the vif to a MidoNet virtual port.'

def plug_midonet(self, instance, vif):

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