Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e9269160 authored by Jonathan Pastor's avatar Jonathan Pastor
Browse files

[DIFF] show empty character when null value is expected by generator

parent c086128d
Branches
No related tags found
1 merge request!6WIP: Features/oar gpus
......@@ -958,8 +958,12 @@ def do_diff(options, generated_hierarchy, refrepo_properties)
{:cpu => "cpu", :core => "core", :cpuset => "cpuset", :gpu => "gpu", :gpudevice => "gpudevice"}.each do |key, value|
if row[key].to_s != corresponding_resource[0][value].to_s and not (key == :gpu and row[key].nil? and corresponding_resource[0][value] == 0)
expected_value = row[key]
if expected_value == ""
expected_value = "ø"
end
fix_cmd = <<-TXT
# Error: Resource #{resc["id"]} (host=#{resc["network_address"]} cpu=#{resc["cpu"]} core=#{resc["core"]} cpuset=#{resc["cpuset"]} gpu=#{resc["gpu"]} gpudevice=#{resc["gpudevice"]}) has a mismatch for ressource #{value.upcase}: API gives #{resc[value]}, generator wants #{row[key]}.
# Error: Resource #{resc["id"]} (host=#{resc["network_address"]} cpu=#{resc["cpu"]} core=#{resc["core"]} cpuset=#{resc["cpuset"]} gpu=#{resc["gpu"]} gpudevice=#{resc["gpudevice"]}) has a mismatch for ressource #{value.upcase}: OAR API gives #{resc[value]}, generator wants #{expected_value}.
TXT
fix_cmds += "#{fix_cmd}"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment