summaryrefslogtreecommitdiffstats
path: root/lib/puppet/status.rb
blob: ea6a601f311612a98a2bc4f14e6545a0479f946a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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(*args)
    @status.to_pson
  end

  def self.from_pson( pson )
    self.new( pson )
  end

  def name
    "status"
  end

  def name=(name)
    # NOOP
  end
end