summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/interface')
-rw-r--r--lib/puppet/interface/catalog.rb2
-rw-r--r--lib/puppet/interface/catalog/select.rb12
-rw-r--r--lib/puppet/interface/configurer.rb9
3 files changed, 11 insertions, 12 deletions
diff --git a/lib/puppet/interface/catalog.rb b/lib/puppet/interface/catalog.rb
index f99d0881a..34a1d8119 100644
--- a/lib/puppet/interface/catalog.rb
+++ b/lib/puppet/interface/catalog.rb
@@ -25,7 +25,7 @@ Puppet::Interface::Indirector.new(:catalog) do
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
diff --git a/lib/puppet/interface/catalog/select.rb b/lib/puppet/interface/catalog/select.rb
index 4bb49315c..082d93c34 100644
--- a/lib/puppet/interface/catalog/select.rb
+++ b/lib/puppet/interface/catalog/select.rb
@@ -1,8 +1,10 @@
# Select and show a list of resources of a given type.
-Puppet::Interface::Catalog.action :select 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)
- catalog.resources.reject { |res| res.type != type }.each { |res| puts res }
+ catalog.resources.reject { |res| res.type != type }.each { |res| puts res }
+ end
end
diff --git a/lib/puppet/interface/configurer.rb b/lib/puppet/interface/configurer.rb
index 42e950fa3..c1a28b2e7 100644
--- a/lib/puppet/interface/configurer.rb
+++ b/lib/puppet/interface/configurer.rb
@@ -2,12 +2,9 @@ require 'puppet/interface'
Puppet::Interface.new(:configurer) do
action(:synchronize) 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