'Plug in the interface.'

def plug_new(self, network_id, port_id, device_name, mac_address, bridge=None, namespace=None, prefix=None, mtu=None):

    if (not bridge):
        bridge = self.conf.ovs_integration_bridge
    self.check_bridge_exists(bridge)
    ip = ip_lib.IPWrapper()
    tap_name = self._get_tap_name(device_name, prefix)
    if self.conf.ovs_use_veth:
        (root_dev, ns_dev) = ip.add_veth(tap_name, device_name, namespace2=namespace)
        root_dev.disable_ipv6()
    else:
        ns_dev = ip.device(device_name)
    internal = (not self.conf.ovs_use_veth)
    self._ovs_add_port(bridge, tap_name, port_id, mac_address, internal=internal)
    for i in range(9):
        try:
            ns_dev.link.set_address(mac_address)
            break
        except RuntimeError as e:
            LOG.warning(_LW('Got    error    trying    to    set    mac,    retrying:    %s'), str(e))
            time.sleep(1)
    else:
        ns_dev.link.set_address(mac_address)
    if ((not self.conf.ovs_use_veth) and namespace):
        namespace_obj = ip.ensure_namespace(namespace)
        namespace_obj.add_device_to_namespace(ns_dev)
    if mtu:
        self.set_mtu(device_name, mtu, namespace=namespace, prefix=prefix)
    else:
        LOG.warning(_LW('No    MTU    configured    for    port    %s'), port_id)
    ns_dev.link.set_up()
    if self.conf.ovs_use_veth:
        root_dev.link.set_up()
