diff options
| author | Paul Berry <paul@puppetlabs.com> | 2011-02-17 15:37:12 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2011-02-17 15:37:26 -0800 |
| commit | 6d5f1aa75c8c64033b56f49e87fc03258d5c158c (patch) | |
| tree | 13280ce802707d5a8d52e2d7a06d5ab2610d496d /lib/puppet/node | |
| parent | ab27da7967e1e145d5fbc130e5fbcec6795ca775 (diff) | |
| parent | 8a485608e2941ff8c7ecc706c21f906d59302dd6 (diff) | |
| download | puppet-6d5f1aa75c8c64033b56f49e87fc03258d5c158c.tar.gz puppet-6d5f1aa75c8c64033b56f49e87fc03258d5c158c.tar.xz puppet-6d5f1aa75c8c64033b56f49e87fc03258d5c158c.zip | |
Merge branch 'ticket/2.6.next/6338' into 2.6.next
* ticket/2.6.next/6338:
(#5150) Make fact REST terminus configurable to connect to inventory service
(#5166) Inventory service is now searchable by timestamp.
Maint: backport timestamp accessor for facts from 2.7 branch
Refactored Puppet::Node::Inventory::Yaml tests in preparation for adding freshness check
Refactor Puppet::Node::Inventory::Yaml in preparation for adding freshness
(#5132) Provide a query REST interface for inventory
Diffstat (limited to 'lib/puppet/node')
| -rwxr-xr-x | lib/puppet/node/facts.rb | 8 | ||||
| -rw-r--r-- | lib/puppet/node/inventory.rb | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb index b77ad22d5..562690026 100755 --- a/lib/puppet/node/facts.rb +++ b/lib/puppet/node/facts.rb @@ -54,6 +54,14 @@ class Puppet::Node::Facts strip_internal == other.send(:strip_internal) end + def timestamp=(time) + self.values[:_timestamp] = time + end + + def timestamp + self.values[:_timestamp] + end + private # Add internal data to the facts for storage. 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 |
