From 23fc4db954c22bce2c6cc8996d5fafb175e2b747 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 17 Feb 2011 14:59:59 -0800 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. Conflicts: spec/spec_helper.rb --- lib/puppet/node.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/puppet/node.rb') diff --git a/lib/puppet/node.rb b/lib/puppet/node.rb index 2453cd1d5..e8d58e6be 100644 --- a/lib/puppet/node.rb +++ b/lib/puppet/node.rb @@ -3,6 +3,7 @@ require 'puppet/indirector' # A class for managing nodes, including their facts and environment. class Puppet::Node require 'puppet/node/facts' + require 'puppet/node/inventory' require 'puppet/node/environment' # Set up indirection, so that nodes can be looked for in -- cgit