X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Fconfig_resa.py;h=93522fb601cfe28892bf55156df2763e194ab262;hb=a9e5d3afadff87fa868bd6c2e6c2dd31ae80f816;hp=02f485e83462875352aa7fa4bc3fd6036c4f5502;hpb=72dfe45e8b716c1c599f8b50299db5ad8b898fd0;p=tests.git diff --git a/system/config_resa.py b/system/config_resa.py index 02f485e..93522fb 100644 --- a/system/config_resa.py +++ b/system/config_resa.py @@ -1,3 +1,7 @@ +# -*- python3 -*- +# Thierry Parmentelat +# Copyright (C) 2015 INRIA +# # a configuration module is expected: # (*) to define a config method # (*) that takes two arguments @@ -5,18 +9,17 @@ # (**) TestMain options field # (*) and that returns the new set of plc_specs -# values like 'hostname', 'ip' and the like are rewritten later with a TestPool object +# this config is defined to run on top of another one +# and just sets the nodes as 'reservable' +# +# use e.g. with +# run -c default -c resa import config_default def config (plc_specs, options): - result=plc_specs - for i in range (options.size): - plc = config_default.plc(options,i+1) - for site in plc['sites']: + for plc_spec in plc_specs: + for site in plc_spec['sites']: for node in site['nodes']: node['node_fields']['node_type']='reservable' - result.append(plc) - - return result - + return plc_specs