[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Nick Lewis nick at puppetlabs.com
Tue May 10 08:06:53 UTC 2011


The following commit has been merged in the experimental branch:
commit 0af36f44643a59f5137b617afae16019b485ee05
Merge: b639c69c67a15110c65919b1cab281dc30549220 e3d24865c89bccd0221f3d6d475d350f577ed3fb
Author: Nick Lewis <nick at puppetlabs.com>
Date:   Tue Mar 22 14:26:11 2011 -0700

    Merge branch 'ticket/master/6814'
    
    Conflicts:
    	lib/puppet/interface/catalog.rb
    	lib/puppet/interface/catalog/select.rb
    	lib/puppet/interface/configurer.rb

diff --combined lib/puppet/interface/catalog.rb
index 34a1d81,6c235e2..c0af53b
--- a/lib/puppet/interface/catalog.rb
+++ b/lib/puppet/interface/catalog.rb
@@@ -1,36 -1,40 +1,40 @@@
  require 'puppet/interface/indirector'
  
  Puppet::Interface::Indirector.new(:catalog) do
-   action(:apply) do |catalog|
-     report = Puppet::Transaction::Report.new("apply")
-     report.configuration_version = catalog.version
+   action(:apply) do
+     invoke do |catalog|
+       report = Puppet::Transaction::Report.new("apply")
+       report.configuration_version = catalog.version
  
-     Puppet::Util::Log.newdestination(report)
+       Puppet::Util::Log.newdestination(report)
  
-     begin
-       benchmark(:notice, "Finished catalog run") do
-         catalog.apply(:report => report)
+       begin
+         benchmark(:notice, "Finished catalog run") do
+           catalog.apply(:report => report)
+         end
+       rescue => detail
+         puts detail.backtrace if Puppet[:trace]
+         Puppet.err "Failed to apply catalog: #{detail}"
        end
-     rescue => detail
-       puts detail.backtrace if Puppet[:trace]
-       Puppet.err "Failed to apply catalog: #{detail}"
-     end
  
-     report.finalize_report
-     report
+       report.finalize_report
+       report
+     end
    end
  
-   action(:download) do |certname,facts|
-     Puppet::Resource::Catalog.terminus_class = :rest
-     facts_to_upload = {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(facts.render(:b64_zlib_yaml))}
-     catalog = nil
-     retrieval_duration = thinmark do
-       catalog = Puppet::Interface.interface(:catalog).find(certname, facts_to_upload)
+   action(:download) do
+     invoke do |certname,facts|
+       Puppet::Resource::Catalog.terminus_class = :rest
+       facts_to_upload = {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(facts.render(:b64_zlib_yaml))}
+       catalog = nil
+       retrieval_duration = thinmark do
 -        catalog = Puppet::Interface::Catalog.find(certname, facts_to_upload)
++        catalog = Puppet::Interface.interface(:catalog).find(certname, facts_to_upload)
+       end
+       catalog = catalog.to_ral
+       catalog.finalize
+       catalog.retrieval_duration = retrieval_duration
+       catalog.write_class_file
+       catalog
      end
-     catalog = catalog.to_ral
-     catalog.finalize
-     catalog.retrieval_duration = retrieval_duration
-     catalog.write_class_file
-     catalog
    end
  end
diff --combined lib/puppet/interface/catalog/select.rb
index 082d93c,349d9c5..3f724d3
--- a/lib/puppet/interface/catalog/select.rb
+++ b/lib/puppet/interface/catalog/select.rb
@@@ -1,10 -1,10 +1,12 @@@
  # Select and show a list of resources of a given type.
 -Puppet::Interface::Catalog.action :select do
 -  invoke do |*args|
 -    host = args.shift
 -    type = args.shift
 -    catalog = Puppet::Resource::Catalog.indirection.find(host)
 +Puppet::Interface.interface(:catalog) do
-   action :select do |*args|
-     host = args.shift
-     type = args.shift
-     catalog = Puppet::Resource::Catalog.indirection.find(host)
++  action :select do
++    invoke do |*args|
++      host = args.shift
++      type = args.shift
++      catalog = Puppet::Resource::Catalog.indirection.find(host)
  
--    catalog.resources.reject { |res| res.type != type }.each { |res| puts res }
++      catalog.resources.reject { |res| res.type != type }.each { |res| puts res }
++    end
    end
  end
diff --combined lib/puppet/interface/configurer.rb
index c1a28b2,36953ba..2fbde27
--- a/lib/puppet/interface/configurer.rb
+++ b/lib/puppet/interface/configurer.rb
@@@ -1,10 -1,15 +1,12 @@@
  require 'puppet/interface'
  
  Puppet::Interface.new(:configurer) do
-   action(:synchronize) do |certname|
-     facts = Puppet::Interface.interface(:facts).find(certname)
-     catalog = Puppet::Interface.interface(:catalog).download(certname, facts)
-     report = Puppet::Interface.interface(:catalog).apply(catalog)
-     report
+   action(:synchronize) do
+     invoke do |certname|
 -      facts = Puppet::Interface::Facts.find(certname)
 -
 -      catalog = Puppet::Interface::Catalog.download(certname, facts)
 -
 -      report = Puppet::Interface::Catalog.apply(catalog)
 -
++      facts = Puppet::Interface.interface(:facts).find(certname)
++      catalog = Puppet::Interface.interface(:catalog).download(certname, facts)
++      report = Puppet::Interface.interface(:catalog).apply(catalog)
+       report
+     end
    end
  end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list