summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-09-18 12:48:12 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-11-20 07:27:20 +1100
commit089ac3e37dd1418751bc4dfe152e09fbacbc5122 (patch)
tree857232720ead186d188cf94c126baf846d509692 /lib/puppet
parent28e1bc6e7b866727adfd16cba5418e08f1dd2fd8 (diff)
downloadpuppet-089ac3e37dd1418751bc4dfe152e09fbacbc5122.tar.gz
puppet-089ac3e37dd1418751bc4dfe152e09fbacbc5122.tar.xz
puppet-089ac3e37dd1418751bc4dfe152e09fbacbc5122.zip
Fixing #2617 - using the searched-for REST name
This allows a separation between the wrapper class and its internals, which is (at least) necessary for the CA cert, which might not be found using the internal name. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector/rest.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/indirector/rest.rb b/lib/puppet/indirector/rest.rb
index e1ee89f04..a89e98606 100644
--- a/lib/puppet/indirector/rest.rb
+++ b/lib/puppet/indirector/rest.rb
@@ -66,7 +66,9 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
end
def find(request)
- deserialize network(request).get(indirection2uri(request), headers)
+ return nil unless result = deserialize(network(request).get(indirection2uri(request), headers))
+ result.name = request.key
+ result
end
def search(request)