summaryrefslogtreecommitdiff
path: root/lib/chef/api_client.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2012-12-11 19:45:00 -0800
committerdanielsdeleo <dan@opscode.com>2012-12-12 13:26:16 -0800
commitbda8bbf38241c5a1dd75cd28ad9dcb89bcf808cc (patch)
treeda638269644d1e1830b658dac6056fcb31fb91da /lib/chef/api_client.rb
parenta9a083f7622b9675faa9112008af321533c0e16d (diff)
downloadchef-bda8bbf38241c5a1dd75cd28ad9dcb89bcf808cc.tar.gz
[CHEF-3662] ApiClient can set a private key from JSON
Without this change it's not possible to fix CHEF-3662 on the client without modifying Chef::REST to ignore json_class. Previously the behavior was explicitly defined to be the opposite, but the reasoning behind this decision wasn't documented; I suspect it may have been for server-side behavior that's no longer necessary.
Diffstat (limited to 'lib/chef/api_client.rb')
-rw-r--r--lib/chef/api_client.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/api_client.rb b/lib/chef/api_client.rb
index 3502f96987..6c962ec945 100644
--- a/lib/chef/api_client.rb
+++ b/lib/chef/api_client.rb
@@ -111,6 +111,7 @@ class Chef
def self.json_create(o)
client = Chef::ApiClient.new
client.name(o["name"] || o["clientname"])
+ client.private_key(o["private_key"])
client.public_key(o["public_key"])
client.admin(o["admin"])
client