Browse files

check for ruby-libvirtd gem

  • Loading branch information...
1 parent a1f292d commit f5a57eb2ed96a65f469eb315eaf3c3399891eef0 @jedi4ever committed Jan 11, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/veewee/provider/kvm/provider.rb
View
7 lib/veewee/provider/kvm/provider.rb
@@ -15,6 +15,13 @@ def check_requirements
Fog.credentials[:libvirt_ip_command] ||= "arp -an |grep $mac|cut -d '(' -f 2 | cut -d ')' -f 1"
begin
+ unless gems_available?(["ruby-libvirt"])
+ raise Veewee::Error, "Please install ruby-libvirt gem"
+ end
+ end
+
+ begin
+
env.logger.info "Opening a libvirt connection using fog.io"
conn = Fog::Compute[:libvirt]
env.logger.info "Libvirt connection established"

0 comments on commit f5a57eb

Please sign in to comment.