From c8ebf7fb7691ba7d761a421de2f174862de8f3b0 Mon Sep 17 00:00:00 2001
From: Jonathan Pastor <jonathancmoa@gmail.com>
Date: Fri, 18 Oct 2019 17:15:17 +0200
Subject: [PATCH] generator generate an error only when API ressources count
 does not match API

---
 lib/refrepo/gen/oar-properties.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/refrepo/gen/oar-properties.rb b/lib/refrepo/gen/oar-properties.rb
index bf8a8a76e39..9ad68567416 100644
--- a/lib/refrepo/gen/oar-properties.rb
+++ b/lib/refrepo/gen/oar-properties.rb
@@ -1157,7 +1157,10 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
           end
         end
 
-        raise "#{physical_resource} has an unexpected number of resources (current:#{phys_rsc_ids.length} vs expected:#{expected_phys_rsc_count})"
+        if ["cpu", "core"].include? physical_resource
+          puts("#{physical_resource} has an unexpected number of resources (current:#{phys_rsc_ids.length} vs expected:#{expected_phys_rsc_count})")
+          return 1
+        end
       end
 
       variables[:current_ids] = phys_rsc_ids
-- 
GitLab