From 9f8e20ad37364e3f557b67e7a84e62d6f81aa387 Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Tue, 27 Mar 2018 14:55:37 +0200 Subject: storyboard: fix for putting logs into paths based on node name fixes #43 --- rumba/storyboard.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rumba/storyboard.py b/rumba/storyboard.py index b0ae320..edf4f0c 100644 --- a/rumba/storyboard.py +++ b/rumba/storyboard.py @@ -651,16 +651,22 @@ class StoryBoard(SBEntity): 'Cannot fetch logs.' % local_dir) for node in self.server_nodes: + dst_dir = os.path.join(local_dir, node.name) + if not os.path.isdir(dst_dir): + os.mkdir(dst_dir) logs_list = node.execute_command('ls /tmp/*_server.log') logs_list = [x for x in logs_list.split('\n') if x != ''] logger.debug('Log list is:\n%s', logs_list) - node.fetch_files(logs_list, local_dir) + node.fetch_files(logs_list, dst_dir) for node in self.client_nodes: + dst_dir = os.path.join(local_dir, node.name) + if not os.path.isdir(dst_dir): + os.mkdir(dst_dir) logs_list = node.execute_command('ls /tmp/*.rumba.log ' '|| echo ""') logs_list = [x for x in logs_list.split('\n') if x != ''] logger.debug('Log list is:\n%s', logs_list) - node.fetch_files(logs_list, local_dir) + node.fetch_files(logs_list, dst_dir) def set_link_state(self, t, dif, state): if self.experiment is None: -- cgit v1.2.3 From 69e8cfaf01a4d7ca5a58971d516cadf672016f77 Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Tue, 27 Mar 2018 14:55:59 +0200 Subject: irati: fix for da.map calling str(dif) instead of dif.name fixes #42 --- rumba/prototypes/irati.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py index 0807e10..b951d58 100644 --- a/rumba/prototypes/irati.py +++ b/rumba/prototypes/irati.py @@ -266,8 +266,8 @@ class Experiment(mod.Experiment): if len(self.dif_ordering) > 0: for adm in \ irati_templates.da_map_base["applicationToDIFMappings"]: - adm["difName"] = "%s" % (self.dif_ordering[-1],) - else: + adm["difName"] = "%s" % (self.dif_ordering[-1].name,) + else: # not yet supported irati_templates.da_map_base["applicationToDIFMappings"] = [] for apm in app_mappings: irati_templates.da_map_base["applicationToDIFMappings"]\ -- cgit v1.2.3