From 53c3236400b6340d0b0cb248f8eb82ae8a83d886 Mon Sep 17 00:00:00 2001
From: Pascal Morillon <pascal.morillon@irisa.fr>
Date: Tue, 11 Mar 2014 11:49:56 +0100
Subject: [PATCH] [admin] fixes bug with ethnb OAR property

---
 generators/lib/grid5000/node.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/generators/lib/grid5000/node.rb b/generators/lib/grid5000/node.rb
index c5c4f4bcc01..01b24bc82f0 100644
--- a/generators/lib/grid5000/node.rb
+++ b/generators/lib/grid5000/node.rb
@@ -21,8 +21,8 @@ module Grid5000
         h['cluster']         = cluster.properties['uid']
         h['nodemodel']       = cluster.properties['model']
         h['switch']          = main_network_adapter['switch']
-        h['besteffort']      = properties['supported_job_types']['besteffort'] ? "YES" : "NO"
-        h['deploy']          = properties['supported_job_types']['deploy'] ? "YES" : "NO"
+        #h['besteffort']      = properties['supported_job_types']['besteffort'] ? "YES" : "NO"
+        #h['deploy']          = properties['supported_job_types']['deploy'] ? "YES" : "NO"
         h['ip_virtual']      = properties['supported_job_types']['virtual'] ? "YES" : "NO"
         h['virtual']         = properties['supported_job_types']['virtual']
         h['cpuarch']         = properties['architecture']['platform_type']
@@ -30,7 +30,7 @@ module Grid5000
         h['cputype']         = [properties['processor']['model'], properties['processor']['version']].join(" ")
         h['cpufreq']         = properties['processor']['clock_speed']/1_000_000_000
         h['disktype']        = (properties['storage_devices'].first || {})['interface']
-        h['ethnb']           = properties["network_adapters"].select{|na| na['interface'] =~ /ethernet/i}.length
+        h['ethnb']           = properties["network_adapters"].select{|na| na['interface'] =~ /ethernet/i}.select{|nb| nb['mountable'] == true}.length
         ib10g                = properties['network_adapters'].detect{|na| na['interface'] =~ /infiniband/i && na['rate'] == 10_000_000_000}
         h['ib10g']           = ib10g.nil? ? "NO" : "YES"
         h['ib10gmodel']      = ib10g.nil? ? "none" : ib10g['version']
-- 
GitLab