def _plug_ivs_hybrid(self, vif, instance): """Plug using hybrid strategy (same as OVS, removes unused parts) Create a per-VIF linux bridge, then link that bridge to the OVS integration bridge via a veth device, setting up the other end of the veth device just like a normal OVS port. Then boot the VIF on the linux bridge using standard libvirt mechanisms. """ v1_name, v2_name = self.get_veth_pair_names(vif) linux_net.ensure_bridge(vif.bridge_name) if not linux_net.device_exists(v2_name): linux_net.create_veth_pair(v1_name, v2_name) linux_net.add_bridge_port(vif.bridge_name, v1_name) linux_net.create_ivs_vif_port(v2_name)
def _plug_ivs_ethernet(self, vif, instance): dev = self.get_vif_devname(vif) linux_net.create_tap_dev(dev) linux_net.create_ivs_vif_port(dev)