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