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