summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTyler Cloke <tylercloke@gmail.com>2015-12-04 10:02:18 -0800
committerTyler Cloke <tylercloke@gmail.com>2015-12-04 10:02:18 -0800
commit4b49814bd24171a9472b20ed388157c8ca90e4e3 (patch)
treecbb1bdbc0ddf00ae0ad568c7a4047d7deb1c325d /lib
parent3c18cd94ec153b73441ef3e3f4bd3c82a7f24587 (diff)
downloadchef-4b49814bd24171a9472b20ed388157c8ca90e4e3.tar.gz
Revert lib/chef/api_client/registration.rb to use API V0 since it doesn't support V1.tc/fix-api-client-registration
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/api_client/registration.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/chef/api_client/registration.rb b/lib/chef/api_client/registration.rb
index 4882323293..7875afde0f 100644
--- a/lib/chef/api_client/registration.rb
+++ b/lib/chef/api_client/registration.rb
@@ -123,9 +123,13 @@ class Chef
end
def http_api
- @http_api ||= Chef::REST.new(Chef::Config[:chef_server_url],
- Chef::Config[:validation_client_name],
- Chef::Config[:validation_key])
+ @http_api ||= Chef::ServerAPI.new(Chef::Config[:chef_server_url],
+ {
+ :api_version => "0",
+ :client_name => Chef::Config[:validation_client_name],
+ :signing_key_filename => Chef::Config[:validation_key]
+ }
+ )
end
# Whether or not to generate keys locally and post the public key to the