Commit 7cfd57f2 authored by Jérémie Gaidamour's avatar Jérémie Gaidamour
Browse files

[dev] oar-properties.rb convert boolean and float to string

parent 3db7ba9c
......@@ -97,6 +97,17 @@ def get_node_properties(cluster_uid, cluster, node_uid, node)
h['max_walltime'] = 0 # default
h['max_walltime'] = node['supported_job_types']['max_walltime'] if node['supported_job_types'] && node['supported_job_types'].has_key?('max_walltime')
# convert booleans to YES/NO string
h.each {|k,v|
if v == true
h[k] = 'YES'
elsif v == false
h[k] = 'NO'
elsif v.is_a? Float
h[k] = "#{v}"
return h
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment