summaryrefslogtreecommitdiff
path: root/lib/chef/user_v1.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2015-12-02 12:19:33 +0000
committerThom May <thom@chef.io>2016-01-11 15:40:42 +0000
commitd99e306a41b1402209d320cb7119b12a3bbb962f (patch)
treef65940702826deb991e6198967d3e9e96cb2857a /lib/chef/user_v1.rb
parent1b71aeb423b009f6d1a44215c89e9976957b47e9 (diff)
downloadchef-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/user_v1.rb')
-rw-r--r--lib/chef/user_v1.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/user_v1.rb b/lib/chef/user_v1.rb
index 31cb0576a2..077fca50b9 100644
--- a/lib/chef/user_v1.rb
+++ b/lib/chef/user_v1.rb
@@ -140,7 +140,7 @@ class Chef
def destroy
# will default to the current API version (Chef::Authenticator::DEFAULT_SERVER_API_VERSION)
- Chef::REST.new(Chef::Config[:chef_server_url]).delete("users/#{@username}")
+ Chef::ServerAPI.new(Chef::Config[:chef_server_url]).delete("users/#{@username}")
end
def create
@@ -287,7 +287,7 @@ class Chef
end
def self.list(inflate=false)
- response = Chef::REST.new(Chef::Config[:chef_server_url]).get('users')
+ response = Chef::ServerAPI.new(Chef::Config[:chef_server_url]).get('users')
users = if response.is_a?(Array)
# EC 11 / CS 12 V0, V1
# GET /organizations/<org>/users
@@ -312,7 +312,7 @@ class Chef
def self.load(username)
# will default to the current API version (Chef::Authenticator::DEFAULT_SERVER_API_VERSION)
- response = Chef::REST.new(Chef::Config[:chef_server_url]).get("users/#{username}")
+ response = Chef::ServerAPI.new(Chef::Config[:chef_server_url]).get("users/#{username}")
Chef::UserV1.from_hash(response)
end