lib/veewee/provider/kvm/box/helper/status.rb in veewee-0.3.0.beta1 vs lib/veewee/provider/kvm/box/helper/status.rb in veewee-0.3.0.beta2
- old
+ new
@@ -13,14 +13,14 @@
def exists?
exists_volume? || exists_vm?
end
def exists_volume?
- !@connection.volumes.all(:name => "#{name}.img").nil?
+ @connection.list_volumes.find { |v| v[:name] == "#{name}.img" }
end
def exists_vm?
- !@connection.servers.all(:name => name).nil?
+ @connection.list_domains.find { |d| d[:name] == name }
end
end # End Module
end # End Module
end # End Module