aboutsummaryrefslogtreecommitdiff
path: root/rumba/model.py
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2018-02-21 11:47:43 +0100
committerMarco Capitani <m.capitani@nextworks.it>2018-02-27 16:51:26 +0100
commite6af5e64b850be64d5e1d1012e890ca9571b0df0 (patch)
tree60ef94a76aea5bd4fec5843a573cc040aa2211d1 /rumba/model.py
parent0158b68b1736ca8a5fb68de5a56cae234030774c (diff)
downloadrumba-e6af5e64b850be64d5e1d1012e890ca9571b0df0.tar.gz
rumba-e6af5e64b850be64d5e1d1012e890ca9571b0df0.zip
utils & storyboard: add syslog retrieval functionality
Implements #39. Also updated examples.
Diffstat (limited to 'rumba/model.py')
-rw-r--r--rumba/model.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/rumba/model.py b/rumba/model.py
index 5647b1e..2749ae7 100644
--- a/rumba/model.py
+++ b/rumba/model.py
@@ -384,20 +384,22 @@ class Node(object):
destination
)
- def fetch_files(self, paths, destination):
+ def fetch_files(self, paths, destination, sudo=False):
ssh_support.copy_files_from_testbed(
self.ssh_config,
self.ssh_config,
paths,
- destination
+ destination,
+ sudo=sudo
)
- def fetch_file(self, path, destination):
+ def fetch_file(self, path, destination, sudo=False):
ssh_support.copy_file_from_testbed(
self.ssh_config,
self.ssh_config,
path,
- destination
+ destination,
+ sudo=sudo
)
@@ -562,7 +564,7 @@ class Experiment(object):
# If it is None, use /tmp/rumba/{project}
# Wipe it and make it again
exp_name = self.testbed.exp_name.replace('/', '_') # Just in case
- log_dir = '/tmp/rumba/' + exp_name + '/'
+ log_dir = os.path.join(tmp_dir, exp_name)
shutil.rmtree(log_dir, ignore_errors=True)
os.mkdir(log_dir)
self.log_dir = log_dir