summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface
diff options
context:
space:
mode:
authorLuke Kanies <luke@puppetlabs.com>2011-02-08 16:24:30 -0800
committerLuke Kanies <luke@puppetlabs.com>2011-02-08 16:24:30 -0800
commitefca35cbea836fac954fb655d76493f03b36e96f (patch)
treebead559fb4a20391cac95a0ff650b7ef24ceb561 /lib/puppet/interface
parent025768fc69de268b3c01526a138f54dc5778b9c8 (diff)
downloadpuppet-efca35cbea836fac954fb655d76493f03b36e96f.tar.gz
puppet-efca35cbea836fac954fb655d76493f03b36e96f.tar.xz
puppet-efca35cbea836fac954fb655d76493f03b36e96f.zip
Finishing migration from puppet repo
The whole system seems to work again, as long as you run it against 2.6.next. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'lib/puppet/interface')
-rw-r--r--lib/puppet/interface/catalog/select.rb6
-rw-r--r--lib/puppet/interface/resource.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/puppet/interface/catalog/select.rb b/lib/puppet/interface/catalog/select.rb
index 6311a4a74..4bb49315c 100644
--- a/lib/puppet/interface/catalog/select.rb
+++ b/lib/puppet/interface/catalog/select.rb
@@ -1,4 +1,8 @@
# Select and show a list of resources of a given type.
Puppet::Interface::Catalog.action :select do |*args|
- puts "Selecting #{args.inspect}"
+ host = args.shift
+ type = args.shift
+ catalog = Puppet::Resource::Catalog.indirection.find(host)
+
+ catalog.resources.reject { |res| res.type != type }.each { |res| puts res }
end
diff --git a/lib/puppet/interface/resource.rb b/lib/puppet/interface/resource.rb
new file mode 100644
index 000000000..b9b007d00
--- /dev/null
+++ b/lib/puppet/interface/resource.rb
@@ -0,0 +1,4 @@
+require 'puppet/interface'
+
+class Puppet::Interface::Resource < Puppet::Interface
+end