'Plug using PLUMgrid IO Visor Driver
Connect a network device to their respective
Virtual Domain in PLUMgrid Platform.'

def plug_iovisor(self, instance, vif):

    dev = self.get_vif_devname(vif)
    iface_id = vif['id']
    linux_net.create_tap_dev(dev)
    net_id = vif['network']['id']
    tenant_id = instance.project_id
    try:
        utils.execute('ifc_ctl', 'gateway', 'add_port', dev, run_as_root=True)
        utils.execute('ifc_ctl', 'gateway', 'ifup', dev, 'access_vm', iface_id, vif['address'], ('pgtag2=%s' % net_id), ('pgtag1=%s' % tenant_id), run_as_root=True)
    except processutils.ProcessExecutionError:
        LOG.exception(_('Failed    while    plugging    vif'), instance=instance)
