aboutsummaryrefslogtreecommitdiff
path: root/rumba/model.py
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-04-11 19:12:53 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-04-11 19:12:53 +0200
commitf5f9fba3d6b657fd5daa31e4981c055a05c596e8 (patch)
treedef87ce8de8656f07cf9f79b209d794f5414b0c1 /rumba/model.py
parent662c33bf7ce9ddf3bcc77f7d5f51c958d2b837ad (diff)
downloadrumba-f5f9fba3d6b657fd5daa31e4981c055a05c596e8.tar.gz
rumba-f5f9fba3d6b657fd5daa31e4981c055a05c596e8.zip
ssh_support: Pass SSHConfig instead of only hostname
Only the hostname was passed to the ssh_support component. This passes an object that can also hold the port number. It can be extended to take other things as well, such as a proxy.
Diffstat (limited to 'rumba/model.py')
-rw-r--r--rumba/model.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/rumba/model.py b/rumba/model.py
index faf353c..5ec36cc 100644
--- a/rumba/model.py
+++ b/rumba/model.py
@@ -125,6 +125,13 @@ class NormalDIF(DIF):
s += "\n Component %s has policy %s" % (comp, pol)
return s
+# SSH Configuration
+#
+class SSHConfig:
+ def __init__(self, hostname, port=22):
+ self.hostname = hostname
+ self.port = port
+
# A node in the experiment
#
# @difs: DIFs the node will have an IPCP in
@@ -150,7 +157,7 @@ class Node:
if bindings is None:
bindings = dict()
self.bindings = bindings
- self.full_name = name
+ self.ssh_config = SSHConfig(name)
self.ipcps = []
self._validate()
@@ -313,10 +320,10 @@ class Experiment:
@staticmethod
def from_config_file(testbed, filename='demo.conf'):
"""
- :type testbed: Testbed
+ :type testbed: Testbed
:rtype: Experiment
:param testbed: the testbed for the experiment
- :param filename: name of the .conf file
+ :param filename: name of the .conf file
:return: an Experiment object
"""
@@ -624,4 +631,3 @@ class Experiment:
finally:
# No matter what happens, undo the testbed (testbed-specific)
self.testbed.swap_out(self)
-