From 137d6a09a8ebe9b2a65326864633c3c840888d6f Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 14 Jun 2010 10:31:12 +0200 Subject: [PATCH] performs side effects on incoming plc, instead of duplicating it --- system/config_resa.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/system/config_resa.py b/system/config_resa.py index 02f485e..9cb53a0 100644 --- a/system/config_resa.py +++ b/system/config_resa.py @@ -5,18 +5,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 -- 2.47.0