# File lib/deltacloud/drivers/rhevm/rhevm_client.rb, line 54 def vms(opts={}) headers = { :accept => "application/xml; detail=disks; detail=nics; detail=hosts" } headers.merge!(auth_header) if opts[:id] vm = Client::parse_response(RHEVM::client(@api_entrypoint)["/vms/%s" % opts[:id]].get(headers)).root [ RHEVM::VM::new(self, vm)] else Client::parse_response(RHEVM::client(@api_entrypoint)["/vms"].get(headers)).xpath('/vms/vm').collect do |vm| RHEVM::VM::new(self, vm) end end end