diff options
author | Thom May <thom@chef.io> | 2015-12-02 12:19:33 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-11 15:40:42 +0000 |
commit | d99e306a41b1402209d320cb7119b12a3bbb962f (patch) | |
tree | f65940702826deb991e6198967d3e9e96cb2857a /lib/chef/client.rb | |
parent | 1b71aeb423b009f6d1a44215c89e9976957b47e9 (diff) | |
download | chef-d99e306a41b1402209d320cb7119b12a3bbb962f.tar.gz |
Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_rest
In the process, stop auto-expanding JSON in the HTTP client, and let
individual classes control that themselves.
Fixes #2737, Fixes #3518
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r-- | lib/chef/client.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 6ac5cecbdf..ead804879f 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -22,7 +22,7 @@ require 'chef/config' require 'chef/mixin/params_validate' require 'chef/mixin/path_sanity' require 'chef/log' -require 'chef/rest' +require 'chef/server_api' require 'chef/api_client' require 'chef/api_client/registration' require 'chef/audit/runner' @@ -92,7 +92,7 @@ class Chef # # The rest object used to communicate with the Chef server. # - # @return [Chef::REST] + # @return [Chef::ServerAPI] # attr_reader :rest @@ -575,7 +575,7 @@ class Chef # If Chef::Config.client_key does not exist, we register the client with the # Chef server and fire the registration_start and registration_completed events. # - # @return [Chef::REST] The server connection object. + # @return [Chef::ServerAPI] The server connection object. # # @see Chef::Config#chef_server_url # @see Chef::Config#client_key @@ -601,7 +601,8 @@ class Chef events.registration_completed end # We now have the client key, and should use it from now on. - @rest = Chef::REST.new(config[:chef_server_url], client_name, config[:client_key]) + @rest = Chef::ServerAPI.new(config[:chef_server_url], client_name: client_name, + signing_key_filename: config[:client_key]) register_reporters rescue Exception => e # TODO this should probably only ever fire if we *started* registration. |