# File lib/client/vm_api.rb, line 8 def vms(opts={}) headers = {:accept => "application/xml; detail=disks; detail=nics; detail=hosts"} search= opts[:search] || ("datacenter=%s" % current_datacenter.name) http_get("/vms?search=%s" % CGI.escape(search), headers).xpath('/vms/vm').collect do |vm| OVIRT::VM::new(self, vm) end end