From 4b49814bd24171a9472b20ed388157c8ca90e4e3 Mon Sep 17 00:00:00 2001 From: Tyler Cloke Date: Fri, 4 Dec 2015 10:02:18 -0800 Subject: Revert lib/chef/api_client/registration.rb to use API V0 since it doesn't support V1. --- lib/chef/api_client/registration.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/chef/api_client') 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 -- cgit v1.2.1