Skip to content

Commit

Permalink
Merge "Fix primitive_status for pacemaker"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jan 23, 2015
2 parents bb3438c + 908103d commit 537ed9e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/puppet/provider/pacemaker_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,17 @@ def constraint_location_remove(primitive, node)
# @return [String]
def primitive_status(primitive, node = nil)
if node
nodes.
fetch(node, {}).
fetch('primitives',{}).
fetch(primitive, {}).
fetch('status', nil)
found_node = nil
nodes.each do |k, v|
if v.fetch("uname", {}).eql? node
found_node = v
end
end
return unless found_node
found_node.
fetch('primitives',{}).
fetch(primitive, {}).
fetch('status', nil)
else
statuses = []
nodes.each do |k,v|
Expand Down

0 comments on commit 537ed9e

Please sign in to comment.