# File lib/openstack/compute/connection.rb, line 351
    def keypairs
      begin
        response = @connection.req("GET", "/os-keypairs")
        res = OpenStack.symbolize_keys(JSON.parse(response.body))
        res[:keypairs].inject({}){|result, c| result[c[:keypair][:name].to_sym] = c[:keypair] ; result }
      rescue OpenStack::Exception::ItemNotFound => not_found
        msg = "The os-keypairs extension is not implemented for the provider you are talking to "+
              "- #{@connection.http.keys.first}"
        raise OpenStack::Exception::NotImplemented.new(msg, 501, "#{not_found.message}")
      end
    end