def rest_client(opts={})
@rest_client ||= begin
auth = RHC::Auth::Basic.new(options)
auth = RHC::Auth::Token.new(options, auth, token_store) if (options.use_authorization_tokens || options.token) && !(options.rhlogin && options.password)
debug "Authenticating with #{auth.class}"
client_from_options(:auth => auth)
end
if opts[:min_api] && opts[:min_api].to_f > @rest_client.api_version_negotiated.to_f
raise RHC::ServerAPINotSupportedException.new(opts[:min_api], @rest_client.api_version_negotiated)
end
@rest_client
end