Skip to content

Commit

Permalink
Misc: Use crm_simulate instead of ptest (bnc#854050)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Serong <tserong@suse.com>
  • Loading branch information
tserong committed Dec 6, 2013
1 parent b052f0a commit 3621930
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hawk/app/controllers/explorer_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get
require "tempfile"
tmpfile = Tempfile.new("hawk_dot")
tmpfile.close
Util.safe_x("/usr/sbin/ptest", "-x", tpath,
Util.safe_x("/usr/sbin/crm_simulate", "-x", tpath,
params[:format] == "xml" ? "-G" : "-D", tmpfile.path)
# TODO(must): handle failure of above

Expand Down
2 changes: 1 addition & 1 deletion hawk/app/models/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def instantiate(xml)
Hash[xml.elements['utilization'].elements.collect {|e|
[e.attributes['name'], { :total => e.attributes['value'].to_i } ] }] : {})
if (node.utilization.any?)
Util.safe_x('/usr/sbin/ptest', '-LU').split("\n").each do |line|
Util.safe_x('/usr/sbin/crm_simulate', '-LU').split("\n").each do |line|
m = line.match(/^Remaining:\s+([^\s]+)\s+capacity:\s+(.*)$/)
next unless m
next unless m[1] == node.uname
Expand Down

0 comments on commit 3621930

Please sign in to comment.