diff options
author | tylercloke <tylercloke@gmail.com> | 2015-06-03 13:21:50 -0700 |
---|---|---|
committer | tylercloke <tylercloke@gmail.com> | 2015-06-05 10:38:49 -0700 |
commit | eb49eedb6333bc1c6b82d0c7befffb9188c5b523 (patch) | |
tree | 50272e378ea73a4692dc5b9c160a0a1fb5d1f98c /lib/chef/user.rb | |
parent | a929c389252d5da4c3ddc2f0cce10e43e6dc19ab (diff) | |
download | chef-eb49eedb6333bc1c6b82d0c7befffb9188c5b523.tar.gz |
Use Chef::ServerAPI to create versioned API requests in Chef::(User|Client).
Diffstat (limited to 'lib/chef/user.rb')
-rw-r--r-- | lib/chef/user.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/user.rb b/lib/chef/user.rb index 0ec7e87ed3..2ffba18005 100644 --- a/lib/chef/user.rb +++ b/lib/chef/user.rb @@ -21,16 +21,15 @@ require 'chef/mixin/from_file' require 'chef/mash' require 'chef/json_compat' require 'chef/search/query' -require 'chef/versioned_rest' require 'chef/mixin/api_version_request_handling' require 'chef/exceptions' +require 'chef/server_api' class Chef class User include Chef::Mixin::FromFile include Chef::Mixin::ParamsValidate - include Chef::VersionedRest include Chef::ApiVersionRequestHandling SUPPORTED_API_VERSIONS = [0,1] @@ -50,11 +49,11 @@ class Chef end def chef_root_rest_v0 - @chef_root_rest_v0 ||= get_versioned_rest_object(Chef::Config[:chef_server_root], "0") + @chef_root_rest_v0 ||= Chef::ServerAPI.new(Chef::Config[:chef_server_root], {:api_version => "0"}) end def chef_root_rest_v1 - @chef_root_rest_v1 ||= get_versioned_rest_object(Chef::Config[:chef_server_root], "1") + @chef_root_rest_v1 ||= Chef::ServerAPI.new(Chef::Config[:chef_server_root], {:api_version => "1"}) end def username(arg=nil) |