diff options
author | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-12 01:59:08 +0000 |
---|---|---|
committer | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-12 01:59:08 +0000 |
commit | aed12c36514738e6ec3916e4fc849ef32ed2e716 (patch) | |
tree | e22ef59a1746a6b99e69946e03adfa6f9fd88d7e /lib | |
parent | 19af1cb35b3d6c1e8d6a986ba5712ca26ac3e907 (diff) | |
download | puppet-aed12c36514738e6ec3916e4fc849ef32ed2e716.tar.gz puppet-aed12c36514738e6ec3916e4fc849ef32ed2e716.tar.xz puppet-aed12c36514738e6ec3916e4fc849ef32ed2e716.zip |
Use @http in store, add filterhost
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2509 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/config_stores/rest.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/puppet/config_stores/rest.rb b/lib/puppet/config_stores/rest.rb index 531c7661f..980968bd8 100644 --- a/lib/puppet/config_stores/rest.rb +++ b/lib/puppet/config_stores/rest.rb @@ -43,12 +43,13 @@ Puppet::Util::ConfigStore.newstore(:rest) do # Can we use a thread here? Probably needs to be the caller's thread. def collect_exported(client, conditions) begin - @http = Net::HTTP.new(@host, @port) # Gotta be a better way... seems goofy to me. # maybe using a nested rails rest route... - url = "/#{client}/resources?restype=exported" + + # filterhost so we don't get exported resources for the current client + url = "/resources?restype=exported&filterhost=#{client}" conditions.each_pair {|k,v| url << "&#{k}=#{v}"} - res = http.get(url) + res = @http.get(url) rescue => detail Puppet.err("ERROR: collect_exported failed: ", detail.to_s) end |