diff options
Diffstat (limited to 'lib/puppet/status.rb')
-rw-r--r-- | lib/puppet/status.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/puppet/status.rb b/lib/puppet/status.rb new file mode 100644 index 000000000..f587a5a2a --- /dev/null +++ b/lib/puppet/status.rb @@ -0,0 +1,20 @@ +require 'puppet/indirector' + +class Puppet::Status + extend Puppet::Indirector + indirects :status, :terminus_class => :local + + attr :status, true + + def initialize( status = nil ) + @status = status || {"is_alive" => true} + end + + def to_pson + @status.to_pson + end + + def self.from_pson( pson ) + self.new( pson ) + end +end |