Class: Puppet::Status
Constant Summary
Constants included
from Indirector
Indirector::BadNameRegexp
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Indirector
configure_routes, indirects
Constructor Details
#initialize(status = nil) ⇒ Status
Returns a new instance of Status.
9
10
11
|
# File 'lib/puppet/status.rb', line 9
def initialize( status = nil )
@status = status || {"is_alive" => true}
end
|
Instance Attribute Details
7
8
9
|
# File 'lib/puppet/status.rb', line 7
def status
@status
end
|
Class Method Details
.from_data_hash(data) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/puppet/status.rb', line 17
def self.from_data_hash(data)
if data.include?('status')
self.new(data['status'])
else
self.new(data)
end
end
|
.from_pson(pson) ⇒ Object
25
26
27
28
|
# File 'lib/puppet/status.rb', line 25
def self.from_pson(pson)
Puppet.deprecation_warning("from_pson is being removed in favour of from_data_hash.")
self.from_data_hash(pson)
end
|
Instance Method Details
30
31
32
|
# File 'lib/puppet/status.rb', line 30
def name
"status"
end
|
#name=(name) ⇒ Object
34
35
36
|
# File 'lib/puppet/status.rb', line 34
def name=(name)
end
|
#to_data_hash ⇒ Object
13
14
15
|
# File 'lib/puppet/status.rb', line 13
def to_data_hash
@status
end
|
38
39
40
|
# File 'lib/puppet/status.rb', line 38
def version
@status['version']
end
|
#version=(version) ⇒ Object
42
43
44
|
# File 'lib/puppet/status.rb', line 42
def version=(version)
@status['version'] = version
end
|