Support libvirt named NAT networks
Currently libvirt compute resources support bridged interfaces, but not libvirt NAT networks.
The NICs on a fog compute resource have both a bridge and network attribute, but the libvirt network view (
app/views/compute_resources_vms/form/libvirt/_network.html.erb) only sets the bridge.
This is compounded because the getter for libvirt networks (
networks) calls fog's
interfaces getter which returns a list of physical interfaces (eth0, wlan0) and doesn't include bridges (virbr*). If the getter doesn't return data, the view allows a bridge interface to be manually entered and so you can get around it in some configurations. Entering the network name is more reliable across reboots of the hypervisor.
The way it should probably work is:
- allow selection of either an interface or a libvirt network name
- offer a list of interfaces, including bridges
- always offer a text box for manual interface override
- offer a list of libvirt network names
fixes #1951 - support for libvirt named networks
based on Dominic initial pull request 308