summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/compiler.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-06 19:12:04 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-04-22 14:39:35 +1000
commit863c50b1273a7fa48d74fb74948938214b45967c (patch)
tree34252abdb4e5378740b69967f983f70a7e28d2ee /lib/puppet/parser/compiler.rb
parenta137146562fecc909afe7fc81f0033fccbb36393 (diff)
downloadpuppet-863c50b1273a7fa48d74fb74948938214b45967c.tar.gz
puppet-863c50b1273a7fa48d74fb74948938214b45967c.tar.xz
puppet-863c50b1273a7fa48d74fb74948938214b45967c.zip
Switching to Indirected ActiveRecord
This is mostly a configuration change, with some code getting removed. Also adding an extra require in Format; Puppet::Provider requires Puppet::Provider::Confiner, so the constant lookup is weird. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/parser/compiler.rb')
-rw-r--r--lib/puppet/parser/compiler.rb37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/puppet/parser/compiler.rb b/lib/puppet/parser/compiler.rb
index 7dcd50270..968e0b979 100644
--- a/lib/puppet/parser/compiler.rb
+++ b/lib/puppet/parser/compiler.rb
@@ -97,10 +97,6 @@ class Puppet::Parser::Compiler
fail_on_unevaluated()
- if Puppet[:storeconfigs]
- store()
- end
-
return @catalog
end
@@ -424,39 +420,6 @@ class Puppet::Parser::Compiler
end
end
- # Store the catalog into the database.
- def store
- unless Puppet.features.rails?
- raise Puppet::Error,
- "storeconfigs is enabled but rails is unavailable"
- end
-
- unless ActiveRecord::Base.connected?
- Puppet::Rails.connect
- end
-
- # We used to have hooks here for forking and saving, but I don't
- # think it's worth retaining at this point.
- store_to_active_record(@node, resources)
- end
-
- # Do the actual storage.
- def store_to_active_record(node, resources)
- begin
- # We store all of the objects, even the collectable ones
- benchmark(:info, "Stored catalog for #{node.name}") do
- Puppet::Rails::Host.transaction do
- Puppet::Rails::Host.store(node, resources)
- end
- end
- rescue => detail
- if Puppet[:trace]
- puts detail.backtrace
- end
- Puppet.err "Could not store configs: %s" % detail.to_s
- end
- end
-
# Return an array of all of the unevaluated resources. These will be definitions,
# which need to get evaluated into native resources.
def unevaluated_resources