diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2010-12-16 11:34:09 -0800 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2010-12-16 11:34:09 -0800 |
| commit | a2ff092d8302e09aa79f9bb16636f8298316c3c7 (patch) | |
| tree | cb67d36e37e252edceef1cd848cc32d679f5d20e /lib/puppet/indirector | |
| parent | 4b35402ba85d8842d757becec5c8a7bf4d6f6654 (diff) | |
| parent | 480c399f183627f5f588e9dc9f5f86f683c0e468 (diff) | |
| download | puppet-a2ff092d8302e09aa79f9bb16636f8298316c3c7.tar.gz puppet-a2ff092d8302e09aa79f9bb16636f8298316c3c7.tar.xz puppet-a2ff092d8302e09aa79f9bb16636f8298316c3c7.zip | |
Merge branch 'next'
Diffstat (limited to 'lib/puppet/indirector')
| -rw-r--r-- | lib/puppet/indirector/catalog/active_record.rb | 4 | ||||
| -rw-r--r-- | lib/puppet/indirector/catalog/compiler.rb | 4 | ||||
| -rw-r--r-- | lib/puppet/indirector/indirection.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/indirector/catalog/active_record.rb b/lib/puppet/indirector/catalog/active_record.rb index fabb08eb9..365cdfefe 100644 --- a/lib/puppet/indirector/catalog/active_record.rb +++ b/lib/puppet/indirector/catalog/active_record.rb @@ -30,9 +30,9 @@ class Puppet::Resource::Catalog::ActiveRecord < Puppet::Indirector::ActiveRecord host.merge_resources(catalog.vertices) host.last_compile = Time.now - if node = Puppet::Node.find(catalog.name) + if node = Puppet::Node.indirection.find(catalog.name) host.ip = node.parameters["ipaddress"] - host.environment = node.environment + host.environment = node.environment.to_s end host.save diff --git a/lib/puppet/indirector/catalog/compiler.rb b/lib/puppet/indirector/catalog/compiler.rb index 78be4caf7..f4c40812d 100644 --- a/lib/puppet/indirector/catalog/compiler.rb +++ b/lib/puppet/indirector/catalog/compiler.rb @@ -23,7 +23,7 @@ class Puppet::Resource::Catalog::Compiler < Puppet::Indirector::Code facts = Puppet::Node::Facts.convert_from(format, text_facts) end facts.add_timestamp - facts.save + Puppet::Node::Facts.indirection.save(facts) end # Compile a node's catalog. @@ -88,7 +88,7 @@ class Puppet::Resource::Catalog::Compiler < Puppet::Indirector::Code # Turn our host name into a node object. def find_node(name) begin - return nil unless node = Puppet::Node.find(name) + return nil unless node = Puppet::Node.indirection.find(name) rescue => detail puts detail.backtrace if Puppet[:trace] raise Puppet::Error, "Failed when searching for node #{name}: #{detail}" diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb index 9095e48f8..eb0aa8aee 100644 --- a/lib/puppet/indirector/indirection.rb +++ b/lib/puppet/indirector/indirection.rb @@ -247,7 +247,7 @@ class Puppet::Indirector::Indirection # Save the instance in the appropriate terminus. This method is # normally an instance method on the indirected class. - def save(key, instance = nil) + def save(instance, key = nil) request = request(:save, key, instance) terminus = prepare(request) |
