fog/fog — pull request #1069 by ccaum (2012-08-06 05:03:47+00:00)
Title: Improve libvirt support

Previously to this pull request, the XML erb template used to generate a new libvirt domain set the VNC settings to listen and require a password, even if the options passed were empty. In addition the mac address of an interface for a KVM instance isn't always able to be retrieved by libvirt. This seems to be a version difference, but I don't know which versions this is broken in. In these instances, the mac address gets set to nil.

This pull request updates the XML erb template to not require a VNC password or set the listen address if the options for those parameters are empty or nil. Further, this pull request uses virsh to dump the XML for a domain, then attempts to extract the mac address from the XML if libvirt could not get the mac address itself.