summaryrefslogtreecommitdiff
path: root/lib/chef/api_client.rb
diff options
context:
space:
mode:
authortylercloke <tylercloke@gmail.com>2015-07-02 11:46:22 -0700
committertylercloke <tylercloke@gmail.com>2015-07-06 14:36:03 -0700
commitdcf21598f2fec37521ca846e750c58bc34e410fa (patch)
tree48c6de966e477792828ee82863cab2e3495a5724 /lib/chef/api_client.rb
parent7a699b40f5432086a026c46de62bd99e3058b6ea (diff)
downloadchef-dcf21598f2fec37521ca846e750c58bc34e410fa.tar.gz
Set Chef::ApiClient to use API V0.
Diffstat (limited to 'lib/chef/api_client.rb')
-rw-r--r--lib/chef/api_client.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/api_client.rb b/lib/chef/api_client.rb
index 6fee78225f..b7b9f7dc43 100644
--- a/lib/chef/api_client.rb
+++ b/lib/chef/api_client.rb
@@ -23,6 +23,7 @@ require 'chef/mixin/from_file'
require 'chef/mash'
require 'chef/json_compat'
require 'chef/search/query'
+require 'chef/server_api'
# DEPRECATION NOTE
#
@@ -148,7 +149,7 @@ class Chef
end
def self.http_api
- Chef::REST.new(Chef::Config[:chef_server_url])
+ Chef::ServerAPI.new(Chef::Config[:chef_server_url], {:api_version => "0"})
end
def self.reregister(name)
@@ -224,7 +225,7 @@ class Chef
end
def http_api
- @http_api ||= Chef::REST.new(Chef::Config[:chef_server_url])
+ @http_api ||= Chef::ServerAPI.new(Chef::Config[:chef_server_url], {:api_version => "0"})
end
end