From 4bc964d576e17c268b8cf80f1be53a8d974ba4e6 Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Thu, 12 Apr 2018 14:56:15 +0200 Subject: model: add parameter for not adding default cubes --- rumba/prototypes/irati.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'rumba/prototypes') diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py index 37f7ae7..2914662 100644 --- a/rumba/prototypes/irati.py +++ b/rumba/prototypes/irati.py @@ -325,13 +325,15 @@ class Experiment(mod.Experiment): dif_conf["qosCubes"].append( irati_templates.generate_qos_cube(**cube) ) - # Add basic cubes - unreliable = copy.deepcopy(irati_templates.qos_cube_u_base) - unreliable["id"] = len(dif_conf["qosCubes"]) + 1 - dif_conf["qosCubes"].append(unreliable) - reliable = copy.deepcopy(irati_templates.qos_cube_r_base) - reliable["id"] = len(dif_conf["qosCubes"]) + 1 - dif_conf["qosCubes"].append(reliable) + if dif.add_default_qos_cubes: + # Add basic cubes + unreliable = copy.deepcopy(irati_templates.qos_cube_u_base) + unreliable["id"] = len(dif_conf["qosCubes"]) + 1 + dif_conf["qosCubes"].append(unreliable) + reliable = copy.deepcopy(irati_templates.qos_cube_r_base) + reliable["id"] = len(dif_conf["qosCubes"]) + 1 + dif_conf["qosCubes"].append(reliable) + for node in dif.members: difconfs[dif.name][node.name] = copy.deepcopy( dif_conf -- cgit v1.2.3