From 45a9a97285d99db524d5330c236352b29e5884ed Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Thu, 28 Oct 2010 14:49:37 -0700 Subject: (#5132) Provide a query REST interface for inventory This REST interface returns a list of nodes that match a fact query. Fact queries can use (in)equality testing as a string comparison, and >, <, >=, <= numerical comparisons. Multiple tests can be done as AND comparisons, not OR. The fact queries need to be prefixed by facts, and the comparisons other than equality are specified with a .comparison_type after the fact name. This will be better explained in the REST documentation on the website. Searches that don't match anything now return empty array instead of a 404 error. --- lib/puppet/node/inventory.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib/puppet/node/inventory.rb (limited to 'lib/puppet/node') diff --git a/lib/puppet/node/inventory.rb b/lib/puppet/node/inventory.rb new file mode 100644 index 000000000..fd99163b0 --- /dev/null +++ b/lib/puppet/node/inventory.rb @@ -0,0 +1,7 @@ +require 'puppet/node' +require 'puppet/indirector' + +class Puppet::Node::Inventory + extend Puppet::Indirector + indirects :inventory, :terminus_setting => :inventory_terminus +end -- cgit