Improve libvirt support #351

merged 9 commits into from Aug 6, 2012


None yet
2 participants

ccaum commented Aug 6, 2012

This pull request improves KVM support by...

  • Using public methods and dropping deprecated methods
  • Improving the way VNC ports are discovered
  • Fixes --postinstall-exclude parameter
  • Improves the way veewee determines the if a VM or volume exists

NOTE: While not required, it is recommended this pull request be merged after this Fog pull request: fog/fog#1069

ccaum added some commits Aug 3, 2012

Properly format options when doing an scp
Previous to this commit, when printing the scp command to stdout, the
options hash was converted to a string causing all the keys and values
to concat as a single, spaceless, string.

This commit calls Hash#inspect on the hash object to format it
Fix typo
'addres' should have been 'address'
Use rubygems if available
Previous to this commit, rubygems wasn't being loaded before the
veewee libraries were. This caused dependencies that were installed by
gems to fail.  This commit requires rubygems if it's available on the
Remove postinstall files matching exclude regex
Previous to this commit, postinstall files matching the provided exclude
regex were not removed from the postinstall list, but rather were just
prepended with '_'.  This caused an error since the script '_<original
filename>' doesn't exist in the definition.

This commit removes the files from the list of postinstall files if the
filename matches the provided regex
Replace network from 'nat' to 'network'
Previous to the commit, a new libvirt instance was created with the
'nat' network type.  However, Fog master/HEAD doesn't support this
network type.

This commit changes the network type from 'nat' to 'network', which Fog
Use display port provided by Fog
Previous to this commit, the VNC port was determined using the
deprecated vnc_port method in Fog.  This commit uses the display[:port]
Properly retrieve version of libvirt
Previous to this commit, the non-existent LibVirt#libversion method was
called to determine the version of libvirt.  This commit calls the
LibVirt#version method.
Properly determine if a volume or instance exists
Preious to this commit, volumes were determined to exist or not by
calling the Volumes#all method the :name parameter to filter only the
volumes that matched the value of :name.  This was not properly
finding the volumes.  This commit uses the #list_volumes method and
calls #find on the array returned.

Likewise for instances
Use public Fog methods to get public IP address
Previous to this commit, the private method #address was called to get
the public IP address of an instance, which caused an exception.  This
commit calls the public #public_ip_address method instead

jedi4ever added a commit that referenced this pull request Aug 6, 2012

@jedi4ever jedi4ever merged commit b047eaf into jedi4ever:master Aug 6, 2012


jedi4ever commented Aug 6, 2012

awesome thanks man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment