Permalink
Browse files

resource plugin has moved to puppetlabs repo

  • Loading branch information...
1 parent c32d802 commit 97353e1a73212a697b34b03ffef6fd1cff9808e9 @ripienaar committed Jun 11, 2012
Showing with 0 additions and 52 deletions.
  1. +0 −29 data/resource/data/resource_data.ddl
  2. +0 −23 data/resource/data/resource_data.rb
@@ -1,29 +0,0 @@
-metadata :name => "Puppet Resources",
- :description => "Information about Puppet managed resources",
- :author => "R.I.Pienaar <rip@devco.net>",
- :license => "ASL 2.0",
- :version => "1.0",
- :url => "http://marionette-collective.org/",
- :timeout => 1
-
-dataquery :description => "Puppet Managed Resources" do
- input :query,
- :prompt => "Resource Name",
- :description => "Valid resource name",
- :type => :string,
- :validation => /^.+$/,
- :optional => true,
- :maxlength => 120
-
- output :managed,
- :description => "Is the resource managed",
- :display_as => "Managed"
-
- output :count,
- :description => "Total managed resources",
- :display_as => "Count"
-
- output :age,
- :description => "Resources list age",
- :display_as => "Age"
-end
@@ -1,23 +0,0 @@
-module MCollective
- module Data
- class Resource_data<Base
- activate_when { File.exist?("/var/lib/puppet/state/resources.txt") }
-
- query do |resource|
- resources = File.readlines("/var/lib/puppet/state/resources.txt").map {|l| l.chomp}
- stat = File.stat("/var/lib/puppet/state/resources.txt")
-
- if resource
- result[:managed] = resources.include?(resource.downcase)
- else
- result[:managed] = false
- end
-
- result[:count] = resources.size
- result[:age] = Time.now.to_i - stat.mtime.to_i
- end
- end
- end
-end
-
-

0 comments on commit 97353e1

Please sign in to comment.