From 8d56e60002ab9fad835b1af35507b2f0147c0ff5 Mon Sep 17 00:00:00 2001
From: Nicolas Michon <nicolas.michon@inria.fr>
Date: Thu, 23 Mar 2017 14:46:32 +0100
Subject: [PATCH] [dev] oar-properties: Added mic to management properties

---
 generators/oar-properties/lib/lib-oar-properties.rb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/generators/oar-properties/lib/lib-oar-properties.rb b/generators/oar-properties/lib/lib-oar-properties.rb
index bc963a6fce5..442176fd4e7 100755
--- a/generators/oar-properties/lib/lib-oar-properties.rb
+++ b/generators/oar-properties/lib/lib-oar-properties.rb
@@ -91,11 +91,15 @@ def get_node_properties(cluster_uid, cluster, node_uid, node)
     h['gpu_count'] = 0
   end
 
+  if (node['mic'])
+    h['mic'] = "YES"
+  else
+    h['mic'] = "NO"
+  end
+
   node['monitoring'] ||= {}
   h['wattmeter'] = case node['monitoring']['wattmeter'] when true; true; when false; false when nil; false; else node['monitoring']['wattmeter'].upcase end
 
-  # h['rconsole'] = node['monitoring']['rconsole']
-
   h['cluster_priority'] = (cluster['priority'] || Time.parse(cluster['created_at'].to_s).strftime('%Y%m')).to_i
   
   h['production'] = false # default
@@ -193,7 +197,6 @@ def ignore_keys()
                  "jobs", # This property exists when a job is running
                  "last_available_upto",
                  "last_job_date",
-                 "mic", # TODO
                  "network_address", # TODO
                  "next_finaud_decision",
                  "next_state",
-- 
GitLab