Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7a93bc77 authored by Pierre Neyron's avatar Pierre Neyron :bicyclist:
Browse files

[spec] make oar_properties2 allow using only a subset of the nodes of an existing real cluster

parent ce9c2ea5
No related branches found
No related tags found
1 merge request!10311903 set the chassis property
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
require 'spec_helper'
def gen_stub(file, site, cluster)
def gen_stub(file, site, cluster, node_count = 9999)
data = load_data_hierarchy
data['sites'].delete_if { |k, v| site != k }
data['sites'].each_pair do |site_uid, s|
......@@ -17,7 +17,7 @@ def gen_stub(file, site, cluster)
nodes = c['clustera']['nodes']
nodes.keys.each do |k|
c, n = k.split('-')
nodes["clustera-#{n}"] = nodes[k]
nodes["clustera-#{n}"] = nodes[k] if n.to_i <= node_count
nodes.delete(k)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment