aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/elements/topology.py9
-rw-r--r--rumba/prototypes/irati.py16
2 files changed, 17 insertions, 8 deletions
diff --git a/rumba/elements/topology.py b/rumba/elements/topology.py
index 0ff1957..f717a5a 100644
--- a/rumba/elements/topology.py
+++ b/rumba/elements/topology.py
@@ -202,17 +202,24 @@ class NormalDIF(DIF):
"""
Normal DIF.
"""
- def __init__(self, name, members=None, policy=None):
+ def __init__(self,
+ name,
+ members=None,
+ policy=None,
+ add_default_qos_cubes=True):
"""
:param name: The name of the DIF.
:param members: The list of members.
:param policy: Policies of the normal DIF.
+ :param add_default_qos_cubes: should the prototype-dependant default
+ QoS cubes be added to this DIF?
"""
DIF.__init__(self, name, members)
if policy is None:
policy = Policy(self)
self.policy = policy
self.qos_cubes = []
+ self.add_default_qos_cubes = add_default_qos_cubes
self._last_cube_id = 0
def add_policy(self, comp, pol, **params):
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