Merge "Fix primitive_status for pacemaker"
This commit is contained in:
commit
537ed9e375
@ -418,11 +418,17 @@ class Puppet::Provider::Pacemaker_common < Puppet::Provider
|
|||||||
# @return [String]
|
# @return [String]
|
||||||
def primitive_status(primitive, node = nil)
|
def primitive_status(primitive, node = nil)
|
||||||
if node
|
if node
|
||||||
nodes.
|
found_node = nil
|
||||||
fetch(node, {}).
|
nodes.each do |k, v|
|
||||||
fetch('primitives',{}).
|
if v.fetch("uname", {}).eql? node
|
||||||
fetch(primitive, {}).
|
found_node = v
|
||||||
fetch('status', nil)
|
end
|
||||||
|
end
|
||||||
|
return unless found_node
|
||||||
|
found_node.
|
||||||
|
fetch('primitives',{}).
|
||||||
|
fetch(primitive, {}).
|
||||||
|
fetch('status', nil)
|
||||||
else
|
else
|
||||||
statuses = []
|
statuses = []
|
||||||
nodes.each do |k,v|
|
nodes.each do |k,v|
|
||||||
|
Loading…
Reference in New Issue
Block a user